Ejemplo n.º 1
0
        public ActionResult Index()
        {
            DashBoardModel dbMdl = new DashBoardModel();

            using (var client = new LeaveClient())
            {
                dbMdl = client.GetDashboardData(UserId, OfficeId);
            }
            dbMdl.IsLMSApprover      = IsLMSApprover;
            dbMdl.UserRole           = Role;
            ViewBag.OfficeEmployees  = dbMdl.EmployeeCount;
            ViewBag.OfficeAttendance = dbMdl.EmployeeInOfficeCount;

            ViewBag.PreviousYear = dbMdl.PreviousYear ? "" : "disabled";
            ViewBag.NextYear     = dbMdl.NextYear ? "" : "disabled";
            if (dbMdl.lstHolidayModel.Count > 0)
            {
                ViewBag.HolidayOfficeName = dbMdl.lstHolidayModel[0].HolidayOfficeName;
                ViewBag.HolidayYear       = dbMdl.lstHolidayModel[0].HolidayDate.Year;
            }

            return(View(dbMdl));
        }