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();
 }
Exemple #2
0
 private void SaveCostCenterCategory()
 {
     if (SelectedCostCenterCategory.CostCenterCategoryId != 0)
     {
         CostCenterCategories.Update(SelectedCostCenterCategory);
     }
     else
     {
         SelectedCostCenterCategory.CostCenterCategoryId =
             CostCenterCategories.Insert(SelectedCostCenterCategory);
     }
 }
Exemple #3
0
        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);
                }
            }
        }
Exemple #4
0
        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();
 }
Exemple #6
0
        private SvenTechCollection <CostCenterCategory> LoadAllCostCenterCategories()
        {
            SvenTechCollection <CostCenterCategory> allCostCenterCategories = new SvenTechCollection <CostCenterCategory>();

            return(CostCenterCategories.GetAll().ToSvenTechCollection());
        }