Example #1
0
        //string _loggedInUserID = System.Web.HttpContext.Current.Session["UserID"].ToString();
        //long _loggedInUserID = 750002;


        public ActionResult Index()
        {
            string _loggedInUserID = System.Web.HttpContext.Current.Session["UserID"].ToString();
            int    _empSOMRole     = int.Parse(System.Web.HttpContext.Current.Session["EmpSOMRole"].ToString());
            string _dept           = System.Web.HttpContext.Current.Session["UserDepartment"].ToString();
            //Assistant.ConvertHTML2PDF("", "", "");

            DashboardModel model = new DashboardModel();

            _loginRepo = new LoginRepo();

            List <SelectListItem> deptFilter = new List <SelectListItem>();

            if (_empSOMRole == (int)SOMEmpRole.TQCHead || _empSOMRole == (int)SOMEmpRole.Admin)
            {
                deptFilter = _loginRepo.GetDepartmentDetails();
            }
            else if (_empSOMRole == (int)SOMEmpRole.Nomination)
            {
                deptFilter = _loginRepo.GetDepartmentDetails(_dept, _dept);
            }
            else
            {
                deptFilter = _loginRepo.GetDepartmentDetails(_dept, "");
            }
            model.From_Date     = DateTime.Now.ToString("MMMM yyyy");
            model.To_Date       = DateTime.Now.ToString("MMMM yyyy");
            model.DeptFilterlst = deptFilter;

            return(View(model));
        }
Example #2
0
        public ActionResult Evaluationlst()
        {
            DashboardModel model = new DashboardModel();

            _loginRepo = new LoginRepo();
            //string _dept = System.Web.HttpContext.Current.Session["UserDepartment"].ToString();

            List <SelectListItem> deptFilter = new List <SelectListItem>();

            //int _empSOMRole = int.Parse(System.Web.HttpContext.Current.Session["EmpSOMRole"].ToString());
            //if (_empSOMRole == (int)SOMEmpRole.TQCHead)
            //{
            //    deptFilter = _loginRepo.GetDepartmentDetails();
            //}
            //else
            //{
            //    deptFilter = _loginRepo.GetDepartmentDetails(_dept, "");
            //}
            deptFilter          = _loginRepo.GetDepartmentDetails();
            model.DeptFilterlst = deptFilter;

            model.From_Date = DateTime.Now.ToString("MMMM yyyy");
            model.To_Date   = DateTime.Now.ToString("MMMM yyyy");
            return(View(model));
        }
Example #3
0
        public ActionResult ApproveNomination()
        {
            DashboardModel model = new DashboardModel();

            _loginRepo    = new LoginRepo();
            _repoResponse = new RepositoryResponse();
            var deptFilter = _loginRepo.GetDepartmentDetails();

            model.DeptFilterlst = deptFilter;
            return(View(model));
        }
        // 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));
        }
Example #5
0
        // 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));
        }