public override void Add() { if (ReadOnly) { return; } if (ImportUI.ImportRegions()) { LoadRegions(); } /*Baumax.Import.UI.FrmImport frmImport = new Baumax.Import.UI.FrmImport(ClientEnvironment.CountryService, ClientEnvironment.RegionService, ClientEnvironment.StoreService, ClientEnvironment.EmployeeService, Baumax.Import.ImportType.Region); * frmImport.ShowDialog(); * if (frmImport.BeenRunSuccessfully) * { * LoadRegions(); * }*/ /* * Domain.Region r = ClientEnvironment.RegionService.CreateEntity(); * r.LanguageID = Baumax.Contract.SharedConsts.NeutralLangId; * using (RegionFrm frm = new RegionFrm()) * { * frm.Entity = r; * if (frm.ShowDialog(this) == DialogResult.OK && frm.Modified) * { * if (r.IsNew) * r = ClientEnvironment.RegionService.Save(r); * else * ClientEnvironment.RegionService.SaveOrUpdate(r); * _entityList.Add(new RegionView(r)); * } * } */ }
private void menu_importRegion_ItemClick(object sender, ItemClickEventArgs e) { ImportUI.ImportRegions(); }
private void bi_ImportCountry_ItemClick(object sender, ItemClickEventArgs e) { ClearPressedButtons(); // acpro item #124036 // simply closing current UC and clearing out client part of main form // when the one of import routines is called CurrentUC = null; if (e.Item == bi_ImportCountry) { ImportUI.ImportCountries(); } else if (e.Item == bi_ImportRegion) { ImportUI.ImportRegions(); } else if (e.Item == bi_ImportStore) { ImportUI.ImportStores(); } else if (e.Item == bi_ImportWorld) { ImportUI.ImportWorlds(); } else if (e.Item == bi_ImportHWGR) { ImportUI.ImportHwgrs(); } else if (e.Item == bi_ImportWGR) { ImportUI.ImportWgrs(); } else if (e.Item == bi_ImportEmployee) { ImportUI.ImportEmployees(); } else if (e.Item == bi_ImportLongTimeAbsence) { ImportUI.ImportLongTimeAbsences(); } else if (e.Item == bi_ImportFeast) { ImportUI.ImportFeasts(); } else if (e.Item == bi_ImportClosedDay) { ImportUI.ImportWorkingDays(); } else if (e.Item == bi_ImportCashRegisterReceipt) { ImportUI.ImportCashRegisterReceipt(); } else if (e.Item == bi_ImportTargetBusinessVolume) { ImportUI.ImportTargetBusinessVolume(); } else if (e.Item == bi_ImportBusinessVolume) { ImportUI.ImportBusinessVolume(); } else if (e.Item == bi_ImportTimePlanning) { ImportUI.ImportTimePlanning(); } else if (e.Item == bi_ImportTimeRecording) { ImportUI.ImportTimeRecording(); } }