private void GetData() { FilteredTaxTypes = new SvenTechCollection <TaxType>(Globals.CoreData.TaxTypeList); CostAccountList = CostAccounts.GetAllVisible().ToList(); CostCenterCategoryList = CostCenterCategories.GetAll().ToSvenTechCollection(); ProjectList = Projects.GetAll().ToSvenTechCollection(); FixedCostAllocationList = FixedCostAllocations.GetAll().ToSvenTechCollection(); }
private void SaveCostCenterCategory() { if (SelectedCostCenterCategory.CostCenterCategoryId != 0) { CostCenterCategories.Update(SelectedCostCenterCategory); } else { SelectedCostCenterCategory.CostCenterCategoryId = CostCenterCategories.Insert(SelectedCostCenterCategory); } }
private void GetData() { CostCenterCategoryList = CostCenterCategories.GetAll().ToSvenTechCollection(); FixedCostAllocationList = FixedCostAllocations.GetAll().ToSvenTechCollection(); foreach (FixedCostAllocation fixedCostAllocation in FixedCostAllocationList) { foreach (FixedCostAllocationDetail detail in fixedCostAllocation.FixedCostAllocationDetails) { detail.CostCenter.CostCenterCategory = CostCenterCategoryList.Single(x => x.CostCenterCategoryId == detail.CostCenter.RefCostCenterCategoryId); } } }
private void DeleteCostCenterCategory() { if (SelectedCostCenterCategory == null) { return; } if (SelectedCostCenterCategory.CostCenterCategoryId == 0) { _CostCenterCategories.Remove(SelectedCostCenterCategory); SelectedCostCenterCategory = null; return; } CostCenterCategories.Delete(SelectedCostCenterCategory.CostCenterCategoryId); _CostCenterCategories.Remove(SelectedCostCenterCategory); SelectedCostCenterCategory = null; }
private void LoadCostCenters() { CostCenterList = CostCenters.GetAll().ToSvenTechCollection(); CostCenterCategoryList = CostCenterCategories.GetAll().ToSvenTechCollection(); SetupFlatStructure(); }
private SvenTechCollection <CostCenterCategory> LoadAllCostCenterCategories() { SvenTechCollection <CostCenterCategory> allCostCenterCategories = new SvenTechCollection <CostCenterCategory>(); return(CostCenterCategories.GetAll().ToSvenTechCollection()); }