using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Windows.Forms; using System.Xml; using System.Linq; using Datalib.DatabaseSpecific; using Datalib.EntityClasses; using Datalib.FactoryClasses; using Datalib.HelperClasses; using SD.LLBLGen.Pro.LinqSupportClasses; using Datalib.Linq; using Datalib.RelationClasses; using System.Threading; using System.Globalization; using System.Configuration; using SD.LLBLGen.Pro.ORMSupportClasses.Miscellaneous; using SD.LLBLGen.Pro.ORMSupportClasses; using SD.LLBLGen.Pro; using System.IO; namespace PatientMan.Forms { public partial class frmGeoLocations : PatientMan.BasicForms.frmCommon { EntityCollection provs = new EntityCollection(new TblProvinceEntityFactory()); public frmGeoLocations() { InitializeComponent(); } public override void LoadData() { IPrefetchPath2 prefetchPath = new PrefetchPath2((int)Datalib.EntityType.TblProvinceEntity); prefetchPath.Add(TblProvinceEntity.PrefetchPathTblDistricts).SubPath.Add(TblDistrictEntity.PrefetchPathTblCommunes); adapter.FetchEntityCollection(provs, null, prefetchPath); grdGeoLocations.DataSource = provs; } private void grdGeoLocations_Click(object sender, EventArgs e) { } public override void SaveRecord() { adapter.SaveEntityCollection(provs, true, true); base.SaveRecord(); } private void btnSave_Click(object sender, EventArgs e) { SaveRecord(); (new frmShowSaveInfo()).Show(); } } }