Esempio n. 1
0
        public ActionResult Create()
        {
            //if (Url.RequestContext.RouteData.Values["id"].ToString()!=null)
            //{

            //}
            List <EmpLeaveItem> lstleave = new List <EmpLeaveItem>();
            EmpLeaveService     objLeave = new EmpLeaveService();
            int Empid = Convert.ToInt32(Url.RequestContext.RouteData.Values["id"].ToString());

            lstleave      = objLeave.LeaveListData(Empid);
            ViewBag.Empid = Empid;
            EmpLeaveItem objEmpItem = new EmpLeaveItem();

            objEmpItem.ListLeave = new List <EmpLeaveItem>();
            objEmpItem.ListLeave.AddRange(lstleave);

            #region Bind DropDown Leave
            List <clsMasterData> lstMasters = new List <clsMasterData>();
            lstMasters = objLeave.GetALLLeaveTypeId();
            objEmpItem.ListMasterTable = new List <clsMasterData>();
            objEmpItem.ListMasterTable.AddRange(lstMasters);

            #endregion
            ViewBag.Menuid = Request.QueryString["menuId"];
            return(View(objEmpItem));
        }
Esempio 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));
        }