public ActionResult ClientMonthlyPartial(int month, string empCd) { //get the date of current month. DateTime date = SystemClock.US_Date.AddMonths(month); ViewBag.date = date; if (empCd == null || empCd == "") //get the employee code from authentication. { empCd = FormsAuthentication.Decrypt(Request.Cookies[FormsAuthentication.FormsCookieName].Value).Name; } //get the start date of month. DateTime startOfMonth = new DateTime(date.Year, date.Month, 1); DateTime TodayDate = SystemClock.US_Date.Date; //get end date of month. DateTime endOfMonth = new DateTime(date.Year, date.Month, DateTime.DaysInMonth(date.Year, date.Month)); DashBoardIndexAction dashboardIndex = new DashBoardIndexAction(); var DashboardMatrics = dashboardIndex.getClientDashboard(empCd, startOfMonth, endOfMonth, TodayDate); //get the submission matrics //jrView.JobReportWeek = DashboardMatrics.Item1; return(PartialView(DashboardMatrics)); }
public ActionResult DetailsViewPopup(string empCd, DateTime fromDate, DateTime toDate, string data_Jr, string company) { if (empCd == null || empCd == "") //get the employee code from authentication. { empCd = FormsAuthentication.Decrypt(Request.Cookies[FormsAuthentication.FormsCookieName].Value).Name; } var _user = unitOfwork.User.GetByEmpID(empCd);//get the role for user. string role = _user.RIC_User_Role.FirstOrDefault().RIC_Role.RR_Role_Name; string headerText = null; string empTblHeaderText = null; toDate = toDate.AddDays(1); DashBoardIndexAction dashboardIndex = new DashBoardIndexAction(); var DashboardMatrics = dashboardIndex.ClientDashboardQuaterWiseDetails(empCd, data_Jr, company, fromDate, toDate, role); //if submission clicked. if (data_Jr == "Submission") { empTblHeaderText = "Submissions"; headerText = "Submissions"; // if submission clicked. } else if (data_Jr == "Interview") //if interview clicked. { empTblHeaderText = "Interviews"; headerText = "Interviews"; } else if (data_Jr == "Hire")//if hire click. { empTblHeaderText = "Hires"; headerText = "Hires"; } if (fromDate.AddDays(1) != toDate)//add the header text { headerText = headerText + " From " + fromDate.ToString("MM-dd-yyyy") + " To " + toDate.AddDays(-1).ToString("MM-dd-yyyy"); } else { headerText = headerText + " For " + fromDate.ToString("MM-dd-yyyy"); } ViewBag.empTblHeaderText = empTblHeaderText; var tupleData = new Tuple <string, List <ClientOperationalList> >(headerText, DashboardMatrics); return(PartialView("DetailsViewPopup", tupleData)); }
public ActionResult ClientDetailsByQuaterlyPartial(string empCd, int Year, string Client) { if (empCd == null || empCd == "") //get the employee code from authentication. { empCd = FormsAuthentication.Decrypt(Request.Cookies[FormsAuthentication.FormsCookieName].Value).Name; } var _user = unitOfwork.User.GetByEmpID(empCd);//get the role for user. string role = _user.RIC_User_Role.FirstOrDefault().RIC_Role.RR_Role_Name; ClientDashboardQuaterly view = new ClientDashboardQuaterly(); DashBoardIndexAction dashboardIndex = new DashBoardIndexAction(); var ClientQuaterly = dashboardIndex.ClientDashboardQuaterWise(empCd, Year, role); var ClientMonthly = dashboardIndex.ClientDashboardMonthly(empCd, Year, role); var tupleData = new Tuple <List <ClientDashboardQuaterly>, List <ClientDashboardMonthly> >(ClientQuaterly, ClientMonthly); return(PartialView("ClientDetailsByQuaterlyPartial", tupleData)); }