public ActionResult Create() { BindMonthYear(); objPayService = new RePaymentService(); objPayItem = new RePaymentItem(); #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 <RePaymentItem> objPay = new List <RePaymentItem>(); objPay = objPayService.GetPaymentDetails(cid); objPayItem.ListRePayment = new List <RePaymentItem>(); objPayItem.ListRePayment.AddRange(objPay); return(View(objPayItem)); }
public ActionResult Edit(RePaymentItem Model) { RePaymentService objPayService = new RePaymentService(); RePaymentItem objPayItem = new RePaymentItem(); objPayService.Update(Model); return(RedirectToAction("Create")); }
public ActionResult AdvanceAmount(int EmpId) { int strEmp = EmpId; List <RePaymentItem> lstRepay = new List <RePaymentItem>(); RePaymentItem objRepayItem = new RePaymentItem(); RePaymentService objEmp = new RePaymentService(); lstRepay = objEmp.GetAmtDetails(strEmp); objRepayItem.ListRePayment = new List <RePaymentItem>(); //objBranchItem.ListBranch.Add(new BranchItem { id = 0, BranchName = "--Select Branch--" }); objRepayItem.ListRePayment.AddRange(lstRepay); // lstRepay. if (objRepayItem.ListRePayment.Count != 0) { return(Json(objRepayItem.ListRePayment[0].Payment, JsonRequestBehavior.AllowGet)); } else { return(Json("0", JsonRequestBehavior.AllowGet)); } }
public ActionResult Edit(int Id) { objPayService = new RePaymentService(); objPayItem = new RePaymentItem(); List <RePaymentItem> ListRePayments = new List <RePaymentItem>(); List <CompanyItem> lstComp = new List <CompanyItem>(); List <EmployeeItem> lstEmp = new List <EmployeeItem>(); objPayItem = objPayService.GetById(Id); int cid = 0; if (Session["CompID"] != null) { cid = Convert.ToInt32(Session["CompID"].ToString()); } ListRePayments = objPayService.GetPaymentDetails(cid); objPayItem.ListRePayment = new List <RePaymentItem>(); objPayItem.ListRePayment.AddRange(ListRePayments); #region Bind DropDown Comp lstComp = objPayService.GetAllComp(); objPayItem.ListComp = new List <CompanyItem>(); objPayItem.ListComp.AddRange(lstComp); #endregion #region Bind DropDown Emp lstEmp = objPayService.GetEmp(cid); objPayItem.ListEmp = new List <EmployeeItem>(); objPayItem.ListEmp.AddRange(lstEmp); #endregion //Session["Empid"] = objPassItem.EmpId; // ViewBag.DeptId = DepId; ViewBag.Menuid = Request.QueryString["menuId"]; BindMonthYear(); return(View(objPayItem)); }
public ActionResult LedgerReport(RePaymentItem Model) { RePaymentService objPayService = new RePaymentService(); RePaymentItem objPayItem = new RePaymentItem(); int?EmpId = Model.EmpId; int?CompId = Model.CompId; int?cid = 0; if (Session["CompID"] != null) { cid = Convert.ToInt32(Session["CompID"].ToString()); } if (cid == 0) { cid = Model.CompId; } List <RePaymentItem> lstRepay = new List <RePaymentItem>(); lstRepay = objPayService.GetLedgerDetails(EmpId, cid); objPayItem.ListRePayment = new List <RePaymentItem>(); objPayItem.ListRePayment.AddRange(lstRepay); #region Bind DropDown Comp List <CompanyItem> lstComp = new List <CompanyItem>(); lstComp = objPayService.GetAllComp(); objPayItem.ListComp = new List <CompanyItem>(); objPayItem.ListComp.AddRange(lstComp); #endregion #region Bind DropDown Emp List <EmployeeItem> lstEmp = new List <EmployeeItem>(); lstEmp = objPayService.GetEmp(cid); objPayItem.ListEmp = new List <EmployeeItem>(); objPayItem.ListEmp.AddRange(lstEmp); #endregion return(View(objPayItem)); }
public ActionResult LedgerReport() { RePaymentService objPayService = new RePaymentService(); RePaymentItem objPayItem = new RePaymentItem(); #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 return(View(objPayItem)); }