Example #1
0
        public static BaseBudgetMasterModel ToBaseBudgetMaster(this BudgetMaster budgetMaster)
        {
            BaseBudgetMasterModel _result = new BaseBudgetMasterModel();

            _result.BudgetName   = budgetMaster.BudgetName;
            _result.Type         = budgetMaster.Type;
            _result.FromDate     = budgetMaster.FromDate;
            _result.ToDate       = budgetMaster.ToDate;
            _result.TotalDr      = budgetMaster.TotalDr;
            _result.TotalCr      = budgetMaster.TotalCr;
            _result.Narration    = budgetMaster.Narration;
            _result.CreatedDate  = budgetMaster.CreatedDate;
            _result.ModifiedDate = budgetMaster.ModifiedDate;
            return(_result);
        }
Example #2
0
        public static BudgetMaster ToBudgetMaster(this BaseBudgetMasterModel budgetMaster)
        {
            BudgetMaster _result = new BudgetMaster();

            if (budgetMaster.Id.HasValue)
            {
                _result.Id = budgetMaster.Id.GetValueOrDefault();
            }
            _result.BudgetName   = budgetMaster.BudgetName;
            _result.Type         = budgetMaster.Type;
            _result.FromDate     = budgetMaster.FromDate;
            _result.ToDate       = budgetMaster.ToDate;
            _result.TotalDr      = budgetMaster.TotalDr;
            _result.TotalCr      = budgetMaster.TotalCr;
            _result.Narration    = budgetMaster.Narration;
            _result.CreatedDate  = budgetMaster.CreatedDate;
            _result.ModifiedDate = budgetMaster.ModifiedDate;
            return(_result);
        }