Esempio n. 1
0
        public void Save(LoanIndexPostViewModel input)
        {
            var loanDataAccess = new LoanDataAccess();

            loanDataAccess.SaveBorrowerInfo(new DataAccess.DataModels.LoanBorrowerInputDataModel()
            {
                Salary     = input.Salary,
                LoanNumber = input.LoanNumber,
                EmployeeId = 347
            });
        }
Esempio n. 2
0
        public Loan GetLoandata(string bid)
        {
            LoanDataAccess lDL    = new LoanDataAccess();
            SqlDataReader  sdr    = lDL.ReadLoanDetail(bid);
            Loan           lModel = new Loan();

            if (sdr.Read())
            {
                lModel.business_id  = Convert.ToInt32(sdr["business_id"]);
                lModel.applicant_id = Convert.ToInt32(sdr["applicant_id"]);
            }
            LoanDataAccess.sqlcon.Close();
            return(lModel);
        }
Esempio n. 3
0
        public LoanResponseModel AddDairyLoanDetails(LoanRequestModel request)
        {
            LoanResponseModel response    = new LoanResponseModel();
            ILoanDataAccess   _repository = new LoanDataAccess();
            int Id = _repository.AddDairyLoanDetails(request.ObjDairyLoanReq);

            if (Id > 0)
            {
                response.Status = 1;
            }
            else
            {
                response.Status = 0;
            }
            return(response);
        }
Esempio n. 4
0
        public LoanIndexGetViewModel Get(decimal loanNUmber)
        {
            var loanDataAccess = new LoanDataAccess();

            var loanDataModel = loanDataAccess.GetInfo(loanNUmber);

            var propertyDataModel = loanDataAccess.GetPropertyInfo(loanNUmber);


            var loanViewModel = new LoanIndexGetViewModel();


            loanViewModel.BorrowerName    = loanDataModel.BorrowerName;
            loanViewModel.Address         = loanDataModel.Street01 + loanDataModel.Street02;
            loanViewModel.LoanNumber      = loanDataModel.LoanNumber;
            loanViewModel.PropertyAddress = propertyDataModel.Street01 + propertyDataModel.Street02;
            loanViewModel.PropertyValue   = propertyDataModel.PropertyValue;

            return(loanViewModel);
        }
Esempio n. 5
0
        public LoanResponseModel GetLoanRequestsSentByUser(LoanRequestModel request)
        {
            LoanResponseModel response    = new LoanResponseModel();
            ILoanDataAccess   _repository = new LoanDataAccess();

            response.ObjTractorLoanList          = _repository.GetTractorLoanList(request.ObjTractorLoanReq.CreatedBy);
            response.ObjKisanCreditCardList      = _repository.GetKisanCreditCardList(request.ObjTractorLoanReq.CreatedBy);
            response.ObjCropLoanList             = _repository.GetCropLoanList(request.ObjTractorLoanReq.CreatedBy);
            response.ObjGoldLoanList             = _repository.GetGoldLoanList(request.ObjTractorLoanReq.CreatedBy);
            response.ObjDripIrrigationLoanList   = _repository.GetDripIrrigationLoanList(request.ObjTractorLoanReq.CreatedBy);
            response.ObjDairyLoanList            = _repository.GetDairyLoanList(request.ObjTractorLoanReq.CreatedBy);
            response.ObjPoultryLoanList          = _repository.GetPoultryLoanList(request.ObjTractorLoanReq.CreatedBy);
            response.ObjProduceMarketingLoanList = _repository.GetProduceMarketingLoanList(request.ObjTractorLoanReq.CreatedBy);
            response.ObjStartupLoanList          = _repository.GetStartupLoanList(request.ObjTractorLoanReq.CreatedBy);
            response.ObjAgriLandLoanList         = _repository.GetAgriLandLoanList(request.ObjTractorLoanReq.CreatedBy);
            response.ObjMicroCreditLoanList      = _repository.GetMicroCreditLoanList(request.ObjTractorLoanReq.CreatedBy);
            response.ObjStreeShaktiLoanList      = _repository.GetStreeShaktiLoanList(request.ObjTractorLoanReq.CreatedBy);
            response.ObjPersonalLoanList         = _repository.GetPersonalLoanList(request.ObjTractorLoanReq.CreatedBy);
            response.ObjHouseLoanList            = _repository.GetHouseLoanList(request.ObjTractorLoanReq.CreatedBy);
            response.ObjMarriageLoanList         = _repository.GetMarriageLoanList(request.ObjTractorLoanReq.CreatedBy);
            response.Status = 1;
            return(response);
        }
Esempio n. 6
0
        public LoanResponseModel AddLoanRequestDetails(LoanRequestModel request)
        {
            LoanResponseModel response    = new LoanResponseModel();
            ILoanDataAccess   _repository = new LoanDataAccess();
            int Id = 0;

            switch (request.SubCatCode)
            {
            case "TRL":
                request.ObjTractorLoanReq                = new DataModel.Loan.TractorLoanModel();
                request.ObjTractorLoanReq.LoanAmount     = request.LoanAmount;
                request.ObjTractorLoanReq.LoanTenure     = request.LoanTenure;
                request.ObjTractorLoanReq.RateOfInterest = request.RateOfInterest;
                request.ObjTractorLoanReq.CreatedBy      = request.CreatedBy;
                Id = _repository.AddTractorLoanDetails(request.ObjTractorLoanReq);
                break;

            case "CRL":
                request.ObjCropLoanReq                = new DataModel.Loan.CropLoanModel();
                request.ObjCropLoanReq.LoanAmount     = request.LoanAmount;
                request.ObjCropLoanReq.LoanTenure     = request.LoanTenure;
                request.ObjCropLoanReq.RateOfInterest = request.RateOfInterest;
                request.ObjCropLoanReq.CreatedBy      = request.CreatedBy;
                Id = _repository.AddCropLoanDetails(request.ObjCropLoanReq);
                break;

            case "GDL":
                request.ObjGoldLoanReq                = new DataModel.Loan.GoldLoanModel();
                request.ObjGoldLoanReq.LoanAmount     = request.LoanAmount;
                request.ObjGoldLoanReq.LoanTenure     = request.LoanTenure;
                request.ObjGoldLoanReq.RateOfInterest = request.RateOfInterest;
                request.ObjGoldLoanReq.CreatedBy      = request.CreatedBy;
                Id = _repository.AddGoldLoanDetails(request.ObjGoldLoanReq);
                break;

            case "DIL":
                request.ObjDripIrrigationLoanReq                = new DataModel.Loan.DripIrrigationLoanModel();
                request.ObjDripIrrigationLoanReq.LoanAmount     = request.LoanAmount;
                request.ObjDripIrrigationLoanReq.LoanTenure     = request.LoanTenure;
                request.ObjDripIrrigationLoanReq.RateOfInterest = request.RateOfInterest;
                request.ObjDripIrrigationLoanReq.CreatedBy      = request.CreatedBy;
                Id = _repository.AddDripIrrigationLoanDetails(request.ObjDripIrrigationLoanReq);
                break;

            case "DRL":
                request.ObjDairyLoanReq                = new DataModel.Loan.DairyLoanModel();
                request.ObjDairyLoanReq.LoanAmount     = request.LoanAmount;
                request.ObjDairyLoanReq.LoanTenure     = request.LoanTenure;
                request.ObjDairyLoanReq.RateOfInterest = request.RateOfInterest;
                request.ObjDairyLoanReq.CreatedBy      = request.CreatedBy;
                Id = _repository.AddDairyLoanDetails(request.ObjDairyLoanReq);
                break;

            case "PTL":
                request.ObjPoultryLoanReq                = new DataModel.Loan.PoultryLoanModel();
                request.ObjPoultryLoanReq.LoanAmount     = request.LoanAmount;
                request.ObjPoultryLoanReq.LoanTenure     = request.LoanTenure;
                request.ObjPoultryLoanReq.RateOfInterest = request.RateOfInterest;
                request.ObjPoultryLoanReq.CreatedBy      = request.CreatedBy;
                Id = _repository.AddPoultryLoanDetails(request.ObjPoultryLoanReq);
                break;

            case "PML":
                request.ObjProduceMarketingLoanReq                = new DataModel.Loan.ProduceMarketingLoanModel();
                request.ObjProduceMarketingLoanReq.LoanAmount     = request.LoanAmount;
                request.ObjProduceMarketingLoanReq.LoanTenure     = request.LoanTenure;
                request.ObjProduceMarketingLoanReq.RateOfInterest = request.RateOfInterest;
                request.ObjProduceMarketingLoanReq.CreatedBy      = request.CreatedBy;
                Id = _repository.AddProduceMarketingLoanDetails(request.ObjProduceMarketingLoanReq);
                break;

            case "STL":
                request.ObjStartupLoanReq                = new DataModel.Loan.StartupLoanModel();
                request.ObjStartupLoanReq.LoanAmount     = request.LoanAmount;
                request.ObjStartupLoanReq.LoanTenure     = request.LoanTenure;
                request.ObjStartupLoanReq.RateOfInterest = request.RateOfInterest;
                request.ObjStartupLoanReq.CreatedBy      = request.CreatedBy;
                Id = _repository.AddStartupLoanDetails(request.ObjStartupLoanReq);
                break;

            case "ALL":
                request.ObjAgriLandLoanReq                = new DataModel.Loan.AgriLandLoanModel();
                request.ObjAgriLandLoanReq.LoanAmount     = request.LoanAmount;
                request.ObjAgriLandLoanReq.LoanTenure     = request.LoanTenure;
                request.ObjAgriLandLoanReq.RateOfInterest = request.RateOfInterest;
                request.ObjAgriLandLoanReq.CreatedBy      = request.CreatedBy;
                Id = _repository.AddAgriLandLoanDetails(request.ObjAgriLandLoanReq);
                break;

            case "KCC":
                request.ObjKisanCreditCardReq                = new DataModel.Loan.KisanCreditCardModel();
                request.ObjKisanCreditCardReq.CreditLimit    = request.LoanAmount;
                request.ObjKisanCreditCardReq.Tenure         = request.LoanTenure;
                request.ObjKisanCreditCardReq.RateOfInterest = request.RateOfInterest;
                request.ObjKisanCreditCardReq.CreatedBy      = request.CreatedBy;
                Id = _repository.AddKisanCreditCardDetails(request.ObjKisanCreditCardReq);
                break;

            case "MIC":
                request.ObjMicroCreditLoanReq                = new DataModel.Loan.MicroCreditLoanModel();
                request.ObjMicroCreditLoanReq.LoanAmount     = request.LoanAmount;
                request.ObjMicroCreditLoanReq.LoanTenure     = request.LoanTenure;
                request.ObjMicroCreditLoanReq.RateOfInterest = request.RateOfInterest;
                request.ObjMicroCreditLoanReq.CreatedBy      = request.CreatedBy;
                Id = _repository.AddMicroCreditLoanDetails(request.ObjMicroCreditLoanReq);
                break;

            case "SSL":
                request.ObjStreeShaktiLoanReq                = new DataModel.Loan.StreeShaktiLoanModel();
                request.ObjStreeShaktiLoanReq.LoanAmount     = request.LoanAmount;
                request.ObjStreeShaktiLoanReq.LoanTenure     = request.LoanTenure;
                request.ObjStreeShaktiLoanReq.RateOfInterest = request.RateOfInterest;
                request.ObjStreeShaktiLoanReq.CreatedBy      = request.CreatedBy;
                Id = _repository.AddStreeShaktiLoanDetails(request.ObjStreeShaktiLoanReq);
                break;

            case "PLL":
                request.ObjPersonalLoanReq                = new DataModel.Loan.PersonalLoanModel();
                request.ObjPersonalLoanReq.LoanAmount     = request.LoanAmount;
                request.ObjPersonalLoanReq.LoanTenure     = request.LoanTenure;
                request.ObjPersonalLoanReq.RateOfInterest = request.RateOfInterest;
                request.ObjPersonalLoanReq.CreatedBy      = request.CreatedBy;
                Id = _repository.AddPersonalLoanDetails(request.ObjPersonalLoanReq);
                break;

            case "HSL":
                request.ObjHouseLoanReq                = new DataModel.Loan.HouseLoanModel();
                request.ObjHouseLoanReq.LoanAmount     = request.LoanAmount;
                request.ObjHouseLoanReq.LoanTenure     = request.LoanTenure;
                request.ObjHouseLoanReq.RateOfInterest = request.RateOfInterest;
                request.ObjHouseLoanReq.CreatedBy      = request.CreatedBy;
                Id = _repository.AddHouseLoanDetails(request.ObjHouseLoanReq);
                break;

            case "MRL":
                request.ObjMarriageLoanReq                = new DataModel.Loan.MarriageLoanModel();
                request.ObjMarriageLoanReq.LoanAmount     = request.LoanAmount;
                request.ObjMarriageLoanReq.LoanTenure     = request.LoanTenure;
                request.ObjMarriageLoanReq.RateOfInterest = request.RateOfInterest;
                request.ObjMarriageLoanReq.CreatedBy      = request.CreatedBy;
                Id = _repository.AddMarriageLoanDetails(request.ObjMarriageLoanReq);
                break;
            }

            if (Id > 0)
            {
                response.Status = 1;
            }
            else
            {
                response.Status = 0;
            }
            return(response);
        }
Esempio n. 7
0
        public void InsertLoanData(int loan_term, int interest_rate, string borrowed_date, string deadline_date, string loan_status, int applicant_id, int business_id)
        {
            LoanDataAccess lDA = new LoanDataAccess();

            lDA.InsertLoanDetails(loan_term, interest_rate, borrowed_date, deadline_date, loan_status, applicant_id, business_id);
        }