Пример #1
0
        public ActionResult LeaveBalanceAdmin()
        {
            LeaveBalanceViewModel lbvm = new LeaveBalanceViewModel();
            int roleid = Convert.ToInt32(Session["RoleId"]);

            lbvm.EmpList = _employeeServices.GetEmployeeList(roleid);
            List <int>            neapaliyear = _reportServices.GetYearList();
            List <SelectListItem> year        = new List <SelectListItem>();

            foreach (int str in neapaliyear)
            {
                year.Add(new SelectListItem
                {
                    Text  = str.ToString(),
                    Value = str.ToString()
                });
            }
            lbvm.YearList = year;
            return(View(lbvm));
        }
Пример #2
0
        public ActionResult AttendanceReport()
        {
            int empcode = Convert.ToInt32(Session["EmpCode"]);
            AttendanceReportsDTO     result     = new AttendanceReportsDTO();
            IEnumerable <OfficeDTOs> officelist = _officeServices.GetClildOfficeListByEmpCode(empcode);
            List <int> nepaliyears = _reportServices.GetYearList();

            List <SelectListItem> sl  = new List <SelectListItem>();
            List <SelectListItem> yrs = new List <SelectListItem>();
            List <SelectListItem> Mth = _reportServices.NepaliMonthList();


            foreach (int str in nepaliyears)
            {
                yrs.Add(new SelectListItem
                {
                    Text  = str.ToString(),
                    Value = str.ToString()
                });
            }
            foreach (OfficeDTOs str in officelist)
            {
                sl.Add(new SelectListItem
                {
                    Text  = str.OfficeName,
                    Value = str.OfficeId.ToString()
                });
            }

            result.BranchSelectList = sl;
            result.MonthList        = Mth;
            result.YearList         = yrs;
            return(View(result));
        }