// GET: PanelMembers public ActionResult Index() { PanelMembersModel model = new PanelMembersModel(); _loginRepo = new LoginRepo(); _panelMembersRepo = new PanelMembersRepo(); var monthFilter = _loginRepo.GetMonthYearFilter(); var deptFilter = _loginRepo.GetDepartmentDetails(); model.DateFilterlst = monthFilter; model.DeptFilterlst = deptFilter; model.MonthFilterlst = _panelMembersRepo.LoadListofMonth(Assistant.GetMonthFromCurrentDate()); model.YearFilterlst = _panelMembersRepo.LoadListofFutureYears(5, Assistant.GetYearFromCurrentDate()); return(View(model)); }
// GET: StarOfMonth public ActionResult Index() { _loginRepo = new LoginRepo(); _panelMembersRepo = new PanelMembersRepo(); _statRepo = new StarOfMonthRepo(); string sMonth = Assistant.GetMonthFromCurrentDate(); string sYear = Assistant.GetYearFromCurrentDate(); StarOfMonthModel model = new StarOfMonthModel(); model.DeptFilterlst = _loginRepo.GetDepartmentDetails(); model.DateFilterlst = _loginRepo.GetMonthYearFilter(); model.MonthFilterlst = _panelMembersRepo.LoadListofMonth(sMonth); model.YearFilterlst = _panelMembersRepo.LoadListofFutureYears(5, sYear); //model.NominationIDlst = _statRepo.LoadNominationIDsByEmpID(""); model.NominationIDlst = _statRepo.LoadNominationIDsEvalCompByMonthAndYear(sMonth, sYear); return(View(model)); }
public ActionResult Index(string dept = "", string fromDate = "", string toDate = "") { DashboardModel model = new DashboardModel(); ParticipatedCount partModel = new ParticipatedCount(); repoResponse = new RepositoryResponse(); nominationRepo = new NominationRepo(); loginRepo = new LoginRepo(); int _empSOMRole = int.Parse(System.Web.HttpContext.Current.Session["EmpSOMRole"].ToString()); string _dept = System.Web.HttpContext.Current.Session["UserDepartment"].ToString(); var monthFilter = loginRepo.GetMonthYearFilter(); var deptFilter = loginRepo.GetDepartmentDetails(); model.From_Nom_DateFilterlst = monthFilter; model.DeptFilterlst = deptFilter; if (dept == "--Select--") { dept = ""; } if (string.IsNullOrEmpty(fromDate)) { fromDate = DateTime.Now.ToString("MMMM yyyy"); } else if (!string.IsNullOrEmpty(fromDate)) { string[] monthYear = fromDate.Split(' '); string month = monthYear[0].Substring(0, 3); string year = monthYear[1]; fromDate = month + "-" + year; } if (string.IsNullOrEmpty(toDate)) { toDate = DateTime.Now.ToString("MMMM yyyy"); } else if (!string.IsNullOrEmpty(toDate)) { string[] monthYear = toDate.Split(' '); string month = monthYear[0].Substring(0, 3); string year = monthYear[1]; toDate = month + "-" + year; } string _loggedInUserID = System.Web.HttpContext.Current.Session["UserID"].ToString(); if (_empSOMRole == (int)SOMEmpRole.TQCHead) { } else if (string.IsNullOrEmpty(dept)) { dept = System.Web.HttpContext.Current.Session["UserDepartment"].ToString(); model.DeptFilter = dept; } repoResponse = nominationRepo.GetReportDetails(_loggedInUserID, dept, fromDate, toDate); if (repoResponse.success) { partModel = repoResponse.Data; model.participatedCount = partModel; } model.From_Date = DateTime.Now.ToString("MMMM yyyy"); model.To_Date = DateTime.Now.ToString("MMMM yyyy"); return(View(model)); }