예제 #1
0
        private CTarget ConvertFamilyTarget(CFamilyTargetDto fTargetDal)
        {
            DateTime      month        = fTargetDal.Month;
            String        type         = fTargetDal.Type;
            Decimal       amount       = fTargetDal.Amount;
            CCategoryType categoryType = _types.GetByCategoryId(fTargetDal.CategoryID);

            return(new CTarget(month, type, amount, categoryType));
        }
예제 #2
0
        private CTarget ConvertPersonalTarget(CPersonalTargetDto pTargetDal)
        {
            DateTime      month        = pTargetDal.Month;
            String        type         = pTargetDal.Type;
            Decimal       amount       = pTargetDal.Amount;
            CCategoryType categoryType = _types.GetByCategoryId(pTargetDal.CategoryID);

            return(new CTarget(month, type, amount, categoryType));
        }
예제 #3
0
        private CSubCategory ConvertSubCategory(CSubCategoryDto subCategoryDal)
        {
            Int32         id           = subCategoryDal.SubCategoryID;
            String        title        = subCategoryDal.Title;
            String        description  = subCategoryDal.Description;
            CCategoryType categoryType = _types.GetByCategoryId(subCategoryDal.ParentCategoryID);

            CSubCategory subCategoryBll = new CSubCategory(id, title, description, categoryType);

            foreach (CPaymentDto payment in subCategoryDal.Payments)
            {
                subCategoryBll.Payments.Add(ConvertPayment(payment));
            }

            return(subCategoryBll);
        }