コード例 #1
0
 public MemberLoanDisbursementService()
 {
     _LoanDisbursementDataAccess       = new LoanDisbursementDataAccess();
     _MemberLoanDisbursementDataAccess = new MemberLoanDisbursementDataAccess();
     _dbContext = new MFISDBContext();
     AutoMapperEntityConfiguration.Configure();
 }
コード例 #2
0
        public ActionResult CheckLoanExisted(int InterestID, int MemberID)
        {
            bool IsChecked = false;
            MemberLoanDisbursementDataAccess dl = new MemberLoanDisbursementDataAccess();

            IsChecked = dl.CheckLoanExisted(MemberID, InterestID);
            return(Json(IsChecked));
        }
コード例 #3
0
        public ActionResult CreateMemberLoanApplication(MemberLoanApplicationDto objLoan)
        {
            var resultDto = new ResultDto();
            int GroupId   = GroupInfo.GroupID;

            bool IsChecked = false;

            if (objLoan.LoanMasterId <= 0)
            {
                MemberLoanDisbursementDataAccess dl = new MemberLoanDisbursementDataAccess();
                IsChecked = dl.CheckLoanExisted(objLoan.MemberID, objLoan.InterestMasterID);
                if (IsChecked)
                {
                    resultDto.Message = "Unable to create Loan: Outstanding Amount Exists for this member";
                }
            }

            objLoan         = LoadMemberLoanApprovalInfo(objLoan);
            objLoan.UserID  = UserInfo.UserID;
            objLoan.GroupID = GroupInfo.GroupID;

            if (!IsChecked)
            {
                if (string.IsNullOrEmpty(objLoan.StatusCode) || objLoan.StatusCode == "INITIATED")
                {
                    resultDto = _memberloanapplicationService.InsertUpdateMemberLoanApplication(objLoan);

                    objLoan.LoanCode     = resultDto.ObjectCode;
                    objLoan.LoanMasterId = resultDto.ObjectId;
                }

                if (objLoan.LoanMasterId > 0)
                {
                    _memberloanapplicationService.SubmitLoanApplicationApproval((MemberLoanApprovalDto)objLoan, UserInfo.UserID, objLoan.LoanMasterId, true);
                    objLoan = _memberloanapplicationService.GetMemberLoanApplicationDetailsById(objLoan.LoanMasterId);
                }
            }

            TempData["Result"] = resultDto;

            LoadDropdowns();

            return(View(objLoan));
        }
コード例 #4
0
        public ResultDto ApproveMemberLoanApplication(int loanMasterId, string loanCode, Enums.ApprovalActions actionType, string approvalComments, int userId)
        {
            MemberLoanDisbursementDataAccess objMemberLoandal = new MemberLoanDisbursementDataAccess();
            int       retVal = objMemberLoandal.ApproveMemberLoanApplication(loanMasterId, actionType, approvalComments, userId);
            ResultDto res    = new ResultDto();

            res.ObjectId = retVal;

            if (retVal > 0)
            {
                res.Message = "Loan {" + loanCode + "} " + (actionType == Enums.ApprovalActions.APP ? "Approved" : actionType == Enums.ApprovalActions.CAN ? "Cancelled" : "Rejected") + " successfully.";
            }
            else
            {
                res.Message = "Unable to process your request";
            }

            return(res);
        }
コード例 #5
0
        public ResultDto ConfirmAndDisburseMemberLoan(int loanMasterId, int groupId, int userId)
        {
            MemberLoanDisbursementDataAccess objMemberLoandal = new MemberLoanDisbursementDataAccess();

            return(objMemberLoandal.ConfirmAndDisburseMemberLoan(loanMasterId, groupId, userId));
        }
コード例 #6
0
        public ResultDto SaveMemberLoanDisbursementDetails(MemberLoanDisbursementDto objMemberLoanDisbursement, int userId)
        {
            MemberLoanDisbursementDataAccess objMemberLoandal = new MemberLoanDisbursementDataAccess();

            return(objMemberLoandal.SaveMemberLoanDisbursementDetails(objMemberLoanDisbursement, userId));
        }
コード例 #7
0
        public List <LoanAccountHeadDto> GetGroupLoanDepositAccountHeads(int GroupId, int groupInterestId = 0, string type = "L")
        {
            MemberLoanDisbursementDataAccess objMemberLoandal = new MemberLoanDisbursementDataAccess();

            return(objMemberLoandal.GetGroupLoanDepositAccountHeads(GroupId, groupInterestId, type));
        }
コード例 #8
0
        public MemberLoanApplicationViewDto GetMemberLoanApplicationViewDetails(int loanMasterId)
        {
            MemberLoanDisbursementDataAccess objMemberLoandal = new MemberLoanDisbursementDataAccess();

            return(objMemberLoandal.GetMemberLoanApplicationViewDetails(loanMasterId));
        }
コード例 #9
0
        public MemberLoanDisbursementDto GetMemberLoanDisbursementDetailsById(int loanMasterId, int userId)
        {
            MemberLoanDisbursementDataAccess objMemberLoandal = new MemberLoanDisbursementDataAccess();

            return(objMemberLoandal.GetMemberLoanDisbursementDetailsById(loanMasterId, userId));
        }
コード例 #10
0
        public MemberLoanApplicationDto GetMemberLoanApplicationDetailsById(int LoanMasterId)
        {
            MemberLoanDisbursementDataAccess objMemberLoandal = new MemberLoanDisbursementDataAccess();

            return(objMemberLoandal.GetMemberLoanApplicationDetailsById(LoanMasterId));
        }
コード例 #11
0
        public List <MemberLoanApplicationLookupDto> Lookup(int GroupID, int userId)
        {
            MemberLoanDisbursementDataAccess objMemberLoandal = new MemberLoanDisbursementDataAccess();

            return(objMemberLoandal.GetMemberLoanLookup(GroupID, userId));
        }
コード例 #12
0
        public ResultDto InsertUpdateMemberLoanApplication(MemberLoanApplicationDto objMemberLoan)
        {
            MemberLoanDisbursementDataAccess objMemberLoandal = new MemberLoanDisbursementDataAccess();

            return(objMemberLoandal.InsertUpdateMemberLoanApplication(objMemberLoan));
        }
コード例 #13
0
        public int SubmitLoanApplicationApproval(MemberLoanApprovalDto objLoanApproval, int userId, int loanMasterId, bool isSave = false)
        {
            MemberLoanDisbursementDataAccess objMemberLoandal = new MemberLoanDisbursementDataAccess();

            return(objMemberLoandal.SubmitLoanApplicationApproval(objLoanApproval, userId, loanMasterId, isSave));
        }
コード例 #14
0
        public MemberLoanClosure GetLoanClosureDemands(int loanMasterId, DateTime transactionDate)
        {
            MemberLoanDisbursementDataAccess objMemberLoandal = new MemberLoanDisbursementDataAccess();

            return(objMemberLoandal.GetLoanClosureDemands(loanMasterId, transactionDate));
        }