Esempio n. 1
0
        // GET: Dashboard
        public ActionResult ViewDashboard()
        {
            Employee e1 = (Employee)Session["Employee"];

            if (Session["EmpID"] != null)
            {
                LeaveBusinessLayer  lb = new LeaveBusinessLayer();
                System.Data.DataSet ds = eb.GetAbsents(e1.EmployeeID);
                ds.Tables[0].TableName       = "asd";
                ViewBag.TotalPendingRequests = lb.GetTotalPendings(e1.EmployeeID);

                if (e1.IsManager)
                {
                    ViewBag.PendingCount = lb.FacultyPendingApplications_Count(e1.EmployeeID);
                }

                return(View("ViewDashboard", ds));
            }
            else
            {
                return(RedirectToAction("Index", "LogIn"));
            }
        }