Exemple #1
0
        public List <LoanOBLookup> LoanOBLookUpList(char loanType, int GroupID)
        {
            List <LoanOBLookup> lstloanOBLookup = new List <LoanOBLookup>();

            try
            {
                AdoHelper obj = new AdoHelper();

                SqlParameter[] parms = new SqlParameter[2];
                parms[0]           = new SqlParameter("@LoanType", loanType);
                parms[0].SqlDbType = SqlDbType.Char;

                parms[1]           = new SqlParameter("@GroupId", GroupID);
                parms[1].SqlDbType = SqlDbType.Int;
                SqlDataReader sdr = obj.ExecDataReaderProc("uspLoanMasterGetGroupOldLoansLookUp", parms);
                while (sdr.Read())
                {
                    LoanOBLookup objLoanOBLookup = new LoanOBLookup();
                    objLoanOBLookup.LoanMasrterID        = DBNull.Value == sdr["LoanMasterID"] ? 0 : Convert.ToInt32(sdr["LoanMasterID"]);
                    objLoanOBLookup.GroupID              = DBNull.Value == sdr["GroupID"] ? 0 : Convert.ToInt32(sdr["GroupID"]);
                    objLoanOBLookup.ROI                  = DBNull.Value == sdr["ROI"] ? 0 : Convert.ToDecimal(sdr["ROI"].ToString());
                    objLoanOBLookup.InterestDue          = DBNull.Value == sdr["InterestDue"] ? 0 : Convert.ToDecimal(sdr["InterestDue"]);
                    objLoanOBLookup.LoanAmountGiven      = DBNull.Value == sdr["DisbursedAmount"] ? 0 : Convert.ToDecimal(sdr["DisbursedAmount"]);
                    objLoanOBLookup.LoanDisbursedDate    = DBNull.Value == sdr["DisbursementDate"] ? "01/jan/0001" : Convert.ToDateTime(sdr["DisbursementDate"]).ToString("dd/MMM/yyyy");
                    objLoanOBLookup.MonthlyDemand        = DBNull.Value == sdr["EMI"] ? 0 : Convert.ToDecimal(sdr["EMI"]);
                    objLoanOBLookup.PrincipalDue         = DBNull.Value == sdr["PrincipalDue"] ? 0 : Convert.ToDecimal(sdr["PrincipalDue"]);
                    objLoanOBLookup.PrincipalOutstanding = DBNull.Value == sdr["OutStandingAmount"] ? 0 : Convert.ToDecimal(sdr["OutStandingAmount"]);
                    objLoanOBLookup.MemberID             = DBNull.Value == sdr["MemberID"] ? 0 : Convert.ToInt32(sdr["MemberID"]);
                    objLoanOBLookup.SLAccountNumber      = DBNull.Value == sdr["SLAccountNumber"] ? string.Empty : sdr["SLAccountNumber"].ToString();
                    objLoanOBLookup.MemberName           = DBNull.Value == sdr["MemberName"] ? string.Empty : sdr["MemberName"].ToString();
                    lstloanOBLookup.Add(objLoanOBLookup);
                }
            }
            catch (Exception ex)
            {
            }
            return(lstloanOBLookup);
        }
Exemple #2
0
        public List <LoanOBLookup> LoanOBLookUp(char loanType)
        {
            List <LoanOBLookup> lstloanOBLookup = new List <LoanOBLookup>();

            try
            {
                AdoHelper obj = new AdoHelper();

                SqlParameter[] parms = new SqlParameter[1];
                parms[0]           = new SqlParameter("@LoanType", loanType);
                parms[0].SqlDbType = SqlDbType.Char;


                SqlDataReader sdr = obj.ExecDataReaderProc("uspLoanMasterGetOldLoansLookUp", parms);
                while (sdr.Read())
                {
                    LoanOBLookup objLoanOBLookup = new LoanOBLookup();
                    objLoanOBLookup.LoanMasrterID        = Convert.ToInt32(sdr["LoanMasterID"]);
                    objLoanOBLookup.GroupID              = Convert.ToInt32(sdr["GroupID"]);
                    objLoanOBLookup.GroupName            = Convert.ToString(sdr["GroupName"]);
                    objLoanOBLookup.ROI                  = Convert.ToDecimal(sdr["ROI"].ToString());
                    objLoanOBLookup.InterestDue          = Convert.ToDecimal(sdr["InterestDue"]);
                    objLoanOBLookup.LoanAmountGiven      = Convert.ToDecimal(sdr["DisbursedAmount"]);
                    objLoanOBLookup.LoanDisbursedDate    = sdr["DisbursementDate"].ToString();
                    objLoanOBLookup.MonthlyDemand        = Convert.ToDecimal(sdr["EMI"]);
                    objLoanOBLookup.PrincipalDue         = Convert.ToDecimal(sdr["PrincipalDue"]);
                    objLoanOBLookup.PrincipalOutstanding = Convert.ToDecimal(sdr["OutStandingAmount"]);
                    objLoanOBLookup.SLAccountNumber      = sdr["SLAccountNumber"].ToString();
                    lstloanOBLookup.Add(objLoanOBLookup);
                }
            }
            catch (Exception ex)
            {
            }
            return(lstloanOBLookup);
        }