示例#1
0
        public ResultDto DeleteLoanOBByMemberID(int MemberID)
        {
            ResultDto resultDto    = new ResultDto();
            LoanOBDll deleteRecord = new LoanOBDll();

            resultDto = deleteRecord.DeleteLoanOBByMemberID(MemberID);
            return(resultDto);
        }
示例#2
0
        public LoanOBDto GetByID(int GroupID, char LoanType)
        {
            LoanOBDto objdto     = new LoanOBDto();
            LoanOBDll getdetails = new LoanOBDll();

            if (LoanType == 'G')
            {
                objdto = getdetails.GetByID(GroupID, LoanType);
            }
            else
            {
                objdto = getdetails.GetByID(GroupID);
            }
            return(objdto);
        }
示例#3
0
        public LoanOBDto InsertLoanOB(LoanOBDto loanOBDto)
        {
            for (int i = 0; i < 4; i++)
            {
                LoanOBByLoanDto loanOBByLoanDto = new LoanOBByLoanDto();
                if (i == 0 && loanOBDto.PrincipalOutstanding1 == 0)
                {
                    continue;
                }
                else if (i == 1 && loanOBDto.PrincipalOutstanding2 == 0)
                {
                    continue;
                }
                else if (i == 2 && loanOBDto.PrincipalOutstanding3 == 0)
                {
                    continue;
                }
                else if (i == 3 && loanOBDto.PrincipalOutstanding4 == 0)
                {
                    continue;
                }



                loanOBByLoanDto = ConvertLoanDtoToLoanByDto(loanOBDto, i);
                LoanOBDll dll = new LoanOBDll();

                bool isDisbursed = CheckForDisbursementStart(loanOBByLoanDto.LoanMasrterID);
                if (isDisbursed)
                {
                    switch (i)
                    {
                    case 0: loanOBDto.IsDisbursed1 = true;
                        break;

                    case 1: loanOBDto.IsDisbursed2 = true;
                        break;

                    case 2: loanOBDto.IsDisbursed3 = true;
                        break;

                    case 3: loanOBDto.IsDisbursed4 = true;
                        break;

                    default:
                        break;
                    }

                    continue;
                }

                loanOBByLoanDto = dll.InsertLoanOB(loanOBByLoanDto);

                if (i == 0)
                {
                    loanOBDto.SLAccountNumberAHID1 = loanOBByLoanDto.SLAccountNumberAHID;
                }
                else if (i == 1)
                {
                    loanOBDto.SLAccountNumberAHID2 = loanOBByLoanDto.SLAccountNumberAHID;
                }
                else if (i == 2)
                {
                    loanOBDto.SLAccountNumberAHID3 = loanOBByLoanDto.SLAccountNumberAHID;
                }
                else if (i == 3)
                {
                    loanOBDto.SLAccountNumberAHID4 = loanOBByLoanDto.SLAccountNumberAHID;
                }

                if (i == 0)
                {
                    loanOBDto.LoanMasrterID1 = loanOBByLoanDto.LoanMasrterID;
                }
                else if (i == 1)
                {
                    loanOBDto.LoanMasrterID2 = loanOBByLoanDto.LoanMasrterID;
                }
                else if (i == 2)
                {
                    loanOBDto.LoanMasrterID3 = loanOBByLoanDto.LoanMasrterID;
                }
                else if (i == 3)
                {
                    loanOBDto.LoanMasrterID4 = loanOBByLoanDto.LoanMasrterID;
                }
            }

            return(loanOBDto);
        }