예제 #1
0
        //
        // GET: /Customer/
        public ActionResult DashBoard()
        {
            string result = (new CommonDAL()).CheckValidation("Customer", this.Session);

            if (result.Equals("LogIn"))
                return RedirectToAction("Login", "CommonBiz");
            else if (result.Equals("Unauthorised"))
                return RedirectToAction("Unauthorised", "CommonBiz");

            CustomerDAL customerDALObject = new CustomerDAL();

            long customerID = (Session["User"] as UserRole).customerID;

            ViewBag.approvedRequests = customerDALObject.GetNoOfApprovedRequests(customerID);
            ViewBag.rejectedRequests = customerDALObject.GetNoOfRejectedRequests(customerID);
            ViewBag.pendingRequests = customerDALObject.GetNoOfPendingRequests(customerID);

            return View();
        }