Ejemplo n.º 1
0
        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"));
        }
Ejemplo n.º 2
0
        public ActionResult Edit(AdvancePaymentItem Model)
        {
            AdvancePaymentService objPayService = new AdvancePaymentService();
            AdvancePaymentItem    objPayItem    = new AdvancePaymentItem();

            objPayService.Update(Model);
            return(RedirectToAction("Create"));
        }
Ejemplo n.º 3
0
 public AdvancePaymentsController()
 {
     Service = new AdvancePaymentService();
 }
 public AdvancePaymentsController()
 {
     Service=new AdvancePaymentService();
 }