Ejemplo n.º 1
0
        //
        // GET: /Banker/
        public ActionResult DashBoard()
        {
            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 bd = new BankerDAL();
            long branchCode;

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

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

            ViewBag.acctrf = bd.GetNoOfBranchTransferRequests(branchCode);
            ViewBag.loan = bd.GetNoOfLoanRequests(branchCode);
            ViewBag.newacc = bd.GetNoOfNewAccountRequests(branchCode);
            ViewBag.accclo = bd.GetNoOfClosureRequests(branchCode);

            BranchDetailsViewModel bm = bd.GetSelfBranchDetails(ViewBag.user);

            ViewBag.selfbranchname = bm.BranchName;
            ViewBag.selfbranchAdddress = bm.Address;
            ViewBag.selfbranchnameCity = bm.CityName;
            ViewBag.selfbranchnameContactNo = bm.ContactNumber;
            ViewBag.selfbranchMailId = bm.Email;

            return View();
        }