Beispiel #1
0
        public bool ApplyLoanBL(HomeLoan home)
        {
            //HomeLoan home = (HomeLoan)(Object)obj;
            if (validate(home) == true)
            {
                home.LoanID            = "HOME" + BusinessLogicUtil.SystemDateToString();
                home.InterestRate      = 8.50;
                home.EMI_Amount        = BusinessLogicUtil.ComputeEMI(home.AmountApplied, home.RepaymentPeriod, home.InterestRate);
                home.DateOfApplication = DateTime.Now;
                home.Status            = (LoanStatus)0; // APPLIED

                HomeLoanDAL homeDAL = new HomeLoanDAL();
                return(homeDAL.ApplyLoanDAL(home));
            }
            return(false);
        }
Beispiel #2
0
        public bool ApplyLoanBL(CarLoan car)
        {
            //CarLoan car = (CarLoan)(Object)obj;
            if (validate(car) == true)
            {
                car.LoanID            = "CAR" + BusinessLogicUtil.SystemDateToString();
                car.InterestRate      = 10.65;
                car.EMI_Amount        = BusinessLogicUtil.ComputeEMI(car.AmountApplied, car.RepaymentPeriod, car.InterestRate);
                car.DateOfApplication = DateTime.Now;
                car.Status            = (LoanStatus)0;

                CarLoanDAL carDAL = new CarLoanDAL();
                return(carDAL.ApplyLoanDAL(car));
            }
            return(false);
        }
Beispiel #3
0
        public bool ApplyLoanBL(EduLoan edu)
        {
            //EduLoan edu = (EduLoan)(Object)obj;
            if (validate(edu) == true)
            {
                edu.LoanID            = "EDU" + BusinessLogicUtil.SystemDateToString();
                edu.InterestRate      = 10.65;
                edu.EMI_Amount        = BusinessLogicUtil.ComputeEMI(edu.AmountApplied, edu.RepaymentPeriod, edu.InterestRate);
                edu.DateOfApplication = DateTime.Now;
                edu.Status            = (LoanStatus)0;
                edu.RepaymentHoliday  = 1;

                EduLoanDAL eduDAL = new EduLoanDAL();
                return(eduDAL.ApplyLoanDAL(edu));
            }
            return(false);
        }