예제 #1
0
        public List<City> GetAllCities()
        {
            List<City> objcity = new List<City>();
            CommonDAL cd = new CommonDAL();
            List<string> listcity = cd.GetCityList();
            int id = 1;

            foreach (string v in listcity)
            {
                objcity.Add(new City { Id = id++, CityName = v });
            }

            return objcity;
        }
예제 #2
0
        public ActionResult ApplyForLoan()
        {
            CommonDAL objCommonDal = new CommonDAL();
            ViewBag.cityList = objCommonDal.GetCityList();
            long customerID = (Session["User"] as UserRole).customerID;
            CustomerDAL objCustomerDal = new CustomerDAL();
            LoanRequestViewModel objLoanRequest = new LoanRequestViewModel();
            objLoanRequest.customerID = customerID;
            objLoanRequest.age = objCustomerDal.GetAgeByCustomerID(customerID);
            objLoanRequest.salaryProof = new byte[1024];
            objLoanRequest.addressProof = new byte[1024];
            @ViewBag.loanTypeList = new List<SelectListItem>()
            {
                new SelectListItem(){Text = "Personal",Value="P"},
                new SelectListItem(){Text = "Home",Value="H"},
                new SelectListItem(){Text = "Vehicle",Value="V"},
            };

            return View(objLoanRequest);
        }
예제 #3
0
        public List<BranchL> GetAllBranch(int cityid)
        {
            List<BranchL> objbranch = new List<BranchL>();
            BranchCode = new List<long>();
            CommonDAL cd = new CommonDAL();
            List<string> listcity = cd.GetCityList();

            string city = listcity[cityid-1];

            List<BranchMiniViewModel> bmvm = new List<BranchMiniViewModel>();
            int id =1;
            bmvm = cd.GetBranchesInCity(city);

            foreach (BranchMiniViewModel b in bmvm)
            {
                objbranch.Add(new BranchL {Id = id++, BranchName = b.BranchName });
                BranchCode.Add(b.BranchCode);
            }

            return objbranch;
        }
예제 #4
0
        public ActionResult ApplyForLoan(LoanRequestViewModel model)
        {
            CommonDAL objCommonDal = new CommonDAL();
            CustomerDAL objCustomerDal = new CustomerDAL();
            ViewBag.cityList = objCommonDal.GetCityList();
            @ViewBag.loanTypeList = new List<SelectListItem>()
            {
                new SelectListItem(){Text = "Personal",Value="P"},
                new SelectListItem(){Text = "Home",Value="H"},
                new SelectListItem(){Text = "Vehicle",Value="V"},
            };
            if(objCustomerDal.AddLoanAccountRequest(model) )
            {
                ModelState.AddModelError("", "You request for loan was successful. You may apply for yet another loan");
            }
            else
            {
                ModelState.AddModelError("", "Operation failed");
            }

            return View(model);
        }
예제 #5
0
        public ActionResult CreateNewAccount(NewAccountRequestView model, HttpPostedFileBase Image)
        {
            CustomerDAL customerDALobject = new CustomerDAL();
               // ModelState.Clear();

            CommonDAL obj = new CommonDAL();
            ViewBag.cityList = obj.GetCityList();

            if (Image == null)
            {
                ViewBag.message = "Please upload image first ! ";
                return View(model);
            }

            if (customerDALobject.AddNewAccountRequest(model))
            {
                ViewBag.message = "Request Submitted. Thank You !";
                return View(model);
            }

            else
            {
                ViewBag.message = "Oops... Error in submitting request.";
                return View(model);
            }
        }
예제 #6
0
        public ActionResult CreateNewAccount()
        {
            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");

            CommonDAL obj = new CommonDAL();
            NewAccountRequestView model = new NewAccountRequestView();

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

            ViewBag.cityList = obj.GetCityList();

            model.CustomerID = customerID;
            return View(model);
        }