Esempio n. 1
0
        public LoanResponseModel AddAgriLandLoanDetails(LoanRequestModel request)
        {
            LoanResponseModel response    = new LoanResponseModel();
            ILoanDataAccess   _repository = new LoanDataAccess();
            int Id = _repository.AddAgriLandLoanDetails(request.ObjAgriLandLoanReq);

            if (Id > 0)
            {
                response.Status = 1;
            }
            else
            {
                response.Status = 0;
            }
            return(response);
        }
Esempio n. 2
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);
        }