public ActionResult LoanEntry(Loan objLoan)
        {
            LoanBL objLoanBL = new LoanBL();

            try
            {
                if (ModelState.IsValid)
                {
                    int IsRowAffected = objLoanBL.CreateLoan(objLoan);
                    if (IsRowAffected > 0)
                    {
                        ViewBag.Message = "Save Succesfully";
                    }
                    else
                    {
                        ViewBag.Message = "Save Failed";
                    }
                }
            }
            catch (Exception ex)
            {
                ViewBag.error = ("Error : " + ex.Message);
            }
            var model = new Loan
            {
                BankNameList = objLoanBL.GetBankNameforLoan()
            };

            return(View(model));
        }
        public ActionResult LoanPaid()
        {
            LoanBL      objLoanBL = new LoanBL();
            List <Loan> bankName  = objLoanBL.GetBankNameforLoan();

            ViewBag.bankName = bankName;
            return(View());
        }
        // GET: Accounts/Loan
        public ActionResult LoanEntry()
        {
            LoanBL objLoanBL = new LoanBL();
            var    model     = new Loan
            {
                BankNameList = objLoanBL.GetBankNameforLoan()
            };

            return(View(model));
        }
        public ActionResult LoanPaid(Loan objLoan)
        {
            try
            {
                LoanBL objLoanBL = new LoanBL();

                int IsRowAffected = objLoanBL.PaidLoan(objLoan);
                if (IsRowAffected > 0)
                {
                    ViewBag.Message = "Save Succesfully";
                }
                else
                {
                    ViewBag.Message = "Save Failed";
                }
                List <Loan> bankName = objLoanBL.GetBankNameforLoan();
                ViewBag.bankName = bankName;
            }
            catch (Exception ex)
            {
                ViewBag.error = ("Error : " + ex.Message);
            }
            return(View());
        }