예제 #1
0
        public ActionResult Requests()
        {
            string result = (new CommonDAL()).CheckValidation("Banker", this.Session);

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

            BankerDAL obj = new BankerDAL();
            List<RequestViewModel> mdL = new List<RequestViewModel>();
            long branchCode;

            if (Session["User"] == null)
                return RedirectToAction("Login", "CommonBiz");
            else
                ViewBag.user = (Session["User"] as UserRole).userID;

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

            mdL = obj.GetAllRequests(branchCode);

            Session["AllRequests"] = mdL;

            return View(mdL);
        }