public ActionResult Create(AdvancePaymentItem model) { objPayService = new AdvancePaymentService(); objPayItem = new AdvancePaymentItem(); objPayService.Insert(model); #region Bind DropDown Comp List <CompanyItem> lstComp = new List <CompanyItem>(); lstComp = objPayService.GetAllComp(); objPayItem.ListComp = new List <CompanyItem>(); objPayItem.ListComp.AddRange(lstComp); #endregion int cid = 0; if (Session["CompID"] != null) { cid = Convert.ToInt32(Session["CompID"].ToString()); } #region Bind DropDown Emp List <EmployeeItem> lstEmp = new List <EmployeeItem>(); lstEmp = objPayService.GetEmp(cid); objPayItem.ListEmp = new List <EmployeeItem>(); objPayItem.ListEmp.AddRange(lstEmp); #endregion List <AdvancePaymentItem> objPay = new List <AdvancePaymentItem>(); objPay = objPayService.GetPaymentDetails(cid); objPayItem.ListAdvPayment = new List <AdvancePaymentItem>(); objPayItem.ListAdvPayment.AddRange(objPay); return(RedirectToAction("Create")); }
public ActionResult Edit(AdvancePaymentItem Model) { AdvancePaymentService objPayService = new AdvancePaymentService(); AdvancePaymentItem objPayItem = new AdvancePaymentItem(); objPayService.Update(Model); return(RedirectToAction("Create")); }
public AdvancePaymentsController() { Service = new AdvancePaymentService(); }
public AdvancePaymentsController() { Service=new AdvancePaymentService(); }