Ejemplo n.º 1
0
        public ActionResult delete(int id, int LId, int menuid)
        {
            //int Empid = Convert.ToInt32(Url.RequestContext.RouteData.Values["id"].ToString());
            EmpLeaveService     objService = new EmpLeaveService();
            List <EmpLeaveItem> lstItem    = new List <EmpLeaveItem>();
            EmpLeaveItem        objDoc     = new EmpLeaveItem();

            objDoc = objService.GetById(LId);
            db.EmployeeLeaves.Remove(db.EmployeeLeaves.Find(LId));
            db.SaveChanges();

            //ViewBag.Empid = Empid;
            ViewBag.Menuid = Request.QueryString["menuId"];

            return(RedirectToAction("Create", new { @id = id, @menuId = Request.QueryString["menuId"] }));
        }
Ejemplo n.º 2
0
        public ActionResult View(int id, int LeaveId)
        {
            EmpLeaveService objLeaveService = new EmpLeaveService();
            EmpLeaveItem    objPassItem     = new EmpLeaveItem();

            objPassItem = objLeaveService.GetById(LeaveId);
            //Session["Empid"] = objPassItem.EmpID;
            List <EmpLeaveItem> lstLeave = new List <EmpLeaveItem>();

            objPassItem.ListLeave = new List <EmpLeaveItem>();
            objPassItem.ListLeave.AddRange(lstLeave);
            #region Bind DropDown Leave
            List <clsMasterData> lstMasters = new List <clsMasterData>();
            lstMasters = objLeaveService.GetALLLeaveTypeId();
            objPassItem.ListMasterTable = new List <clsMasterData>();
            objPassItem.ListMasterTable.AddRange(lstMasters);
            ViewBag.LId = LeaveId;
            #endregion
            ViewBag.Menuid = Request.QueryString["menuId"];

            return(View(objPassItem));
        }