示例#1
0
        public ActionResult ApproverList(AttendanceRequestsListViewModel att)
        {
            try
            {
                att.startdate = Convert.ToDateTime(NepEngDate.NepToEng(att.startdateNP));
                att.enddate   = Convert.ToDateTime(NepEngDate.NepToEng(att.enddateNP));

                int id   = ViewBag.Empcode;
                int role = ViewBag.EmpRoleId;
                ViewBag.emplist       = _employeeServices.GetEmployeeList(id);
                ViewBag.OfficeList    = _officeServices.GetOfficeListByEmpRole(role);
                ViewBag.startdate     = att.startdateNP;
                ViewBag.officeid      = att.OfficeId;
                ViewBag.code          = att.EmpCodes;
                ViewBag.enddate       = att.enddateNP;
                ViewBag.approvestatus = att.ApproverStatus;
                ViewBag.Id            = id;
                IEnumerable <AttendanceRequestsListViewModel> lst = _attendanceDailyServices.GetrequestAttendanceListByParms(att.OfficeId, att.EmpCodes, att.startdate, att.enddate, null, id, 2, att.ApproverStatus).ToList();
                return(View(lst));
            }
            catch (Exception Ex)
            {
                ViewBag.Error = Ex.Message;
                return(View());
            }
        }
示例#2
0
        public ActionResult Index(AttendanceRequestsListViewModel att)
        {
            att.startdate = !String.IsNullOrEmpty(att.startdateNP) ? Convert.ToDateTime(NepEngDate.NepToEng(att.startdateNP)) : att.startdate;
            att.enddate   = !String.IsNullOrEmpty(att.enddateNP) ? Convert.ToDateTime(NepEngDate.NepToEng(att.enddateNP)) : att.enddate;

            int roleid  = ViewBag.EmpRoleId;
            int EmpCode = Convert.ToInt32(Session["EmpCode"]);

            ViewBag.officeid        = att.OfficeId;
            ViewBag.empid           = att.EmpCodes;
            ViewBag.startdate       = att.startdateNP;
            ViewBag.enddate         = att.enddateNP;
            ViewBag.approvestatus   = att.ApproverStatus;
            ViewBag.recommendstatus = att.RecommendSatus;
            ViewBag.emplist         = _employeeServices.GetEmployeeList(EmpCode);
            ViewBag.OfficeList      = _officeServices.GetOfficeListByEmpRole(roleid);
            IEnumerable <AttendanceRequestsListViewModel> lst = _attendanceDailyServices.GetrequestAttendanceListByParms(att.OfficeId, att.EmpCodes, att.startdate, att.enddate, null, null, att.RecommendSatus, att.ApproverStatus).ToList();

            return(View(lst));
        }