public ActionResult AddCustomerPolicy(CustomerpolicyViewModel jg) { cs.Add(jg); List <CustomerpolicyViewModel> d = cs.GetAll(); Session["CustomAll"] = d; return(RedirectToAction("CustomerPolicyViewAll")); }
public ActionResult CreateBill(int id) { int customerPolicyId = id; CustomerpolicyDAORequest request = new CustomerpolicyDAORequest(); CustomerpolicyViewModel model = request.GetCustomerPolicyById(id); return(View(model)); }
public ActionResult NewCustomerPolicy(CustomerpolicyViewModel ff) { cs.Update(ff); List <CustomerpolicyViewModel> d = cs.GetAll(); Session["CustomAll"] = d; if (Session["CusPLSearch"] == null) { return(RedirectToAction("CustomerPolicyViewAll")); } return(RedirectToAction("customerPolicySearch")); }
public ActionResult EditCustomerPolicy(int id) { CustomerpolicyViewModel k = cs.GetEdit(id); ViewData["CustomAll"] = k; List <PolicyViewModel> s = pl.GetAll(); Session["PolicyAll"] = s; List <VehicleinfoViewModel> a = vh.GetAll(); Session["VehicleAll"] = a; List <CustomerinfoViewModel> w = csi.GetAll(); Session["customerInAll"] = w; return(View()); }
public void AddCustomerPolicy() { CheckoutInfo checkout = (CheckoutInfo)Session["checkoutInfo"]; Vehicle_Info vehicleInfo = checkout.Vehicle; Customer_Policy customerPolicy = checkout.CustomerPolicy; VehicleinfoViewModel vehicle = new VehicleinfoViewModel() { address = vehicleInfo.address, brandid = vehicleInfo.brand_id, eginenumber = vehicleInfo.engine_number, framenumber = vehicleInfo.frame_number, modelid = vehicleInfo.model_id, ownername = vehicleInfo.owner_name, ratebycondition = vehicleInfo.rate_by_condition, vehiclecondition = vehicleInfo.vehicle_condition, vehiclenumber = vehicleInfo.vehicle_number, version = vehicleInfo.version }; VehicleinfoDAORequest request1 = new VehicleinfoDAORequest(); request1.Add(vehicle); VehicleinfoViewModel vehicle2 = request1.GetByAllNumber(vehicle.framenumber, vehicle.eginenumber, vehicle.vehiclenumber); CustomerpolicyViewModel cPolicy = new CustomerpolicyViewModel() { active = customerPolicy.active, createdate = customerPolicy.create_date, customeraddprove = customerPolicy.customer_add_prove, customerid = (int)customerPolicy.customer_id, policyenddate = customerPolicy.policy_end_date, policyid = (int)customerPolicy.policy_id, policystartdate = customerPolicy.policy_start_date, TotalPayment = customerPolicy.total_payment, vehicleid = vehicle2.id }; CustomerpolicyDAORequest request2 = new CustomerpolicyDAORequest(); request2.Add(cPolicy); }
public ActionResult SearchCustomerPolicy(int id) { CustomerpolicyViewModel model = csp.GetCustomerPolicyById(id); return(Json(model.TotalPayment, JsonRequestBehavior.AllowGet)); }