Example #1
0
        public ActionResult Create(BaseModel baseModel)
        {
            TruckExpenseModel truckExpenseModel = new TruckExpenseModel();

            truckExpenseModel.CopyBaseModel(baseModel);

            using (TruckExpenseBAL truckExpenseBAL = new TruckExpenseBAL(ContextInfo))
            {
                truckExpenseBAL.PrepareTruckExpenseModel(truckExpenseModel);
            }

            return(View("Create", truckExpenseModel));
        }
Example #2
0
        // GET: TruckExpense/Edit/5
        public ActionResult Edit(string id, BaseModel baseModel)
        {
            TruckExpenseModel truckExpenseModel = new TruckExpenseModel();

            truckExpenseModel.CopyBaseModel(baseModel);
            truckExpenseModel.Id = id;

            using (TruckExpenseBAL truckExpenseBAL = new TruckExpenseBAL(ContextInfo))
            {
                truckExpenseBAL.GetTruckExpenseModel(truckExpenseModel);
                truckExpenseBAL.PrepareTruckExpenseModel(truckExpenseModel);
            }

            return(View(truckExpenseModel));
        }