public List <FDDetailsByIdDTO> GetToFdDetailsByid(string FdAccountNo, string Connectionstring) { List <FDDetailsByIdDTO> lstFDDetailsbyid = new List <FDDetailsByIdDTO>(); try { using (NpgsqlDataReader dr = NPGSqlHelper.ExecuteReader(Connectionstring, CommandType.Text, "select fdaccountid,fdaccountno,membercode,membername,depositamount,maturityamount,accountid,tenortype,tenor,interesttype,interestrate,interestpayable,interestpayout,to_char(depositdate, 'dd-mon-yyyy')depositdate,to_char(maturitydate, 'dd-mon-yyyy') maturitydate from tbltransfdcreation where upper(fdaccountno)='" + ManageQuote(FdAccountNo).ToUpper() + "';")) { while (dr.Read()) { FDDetailsByIdDTO objFDdetailsbyid = new FDDetailsByIdDTO(); objFDdetailsbyid.pFdaccountid = dr["fdaccountid"]; objFDdetailsbyid.pFdaccountno = dr["fdaccountno"]; objFDdetailsbyid.pMembername = dr["membername"]; objFDdetailsbyid.pDeposiamount = dr["depositamount"]; objFDdetailsbyid.pMaturityamount = dr["maturityamount"]; objFDdetailsbyid.pAccountno = dr["accountid"]; objFDdetailsbyid.pTenortype = dr["tenortype"]; objFDdetailsbyid.pTenor = dr["tenor"]; objFDdetailsbyid.pInteresttype = dr["interesttype"]; objFDdetailsbyid.pInterestrate = dr["interestrate"]; objFDdetailsbyid.pInterestPayble = dr["interestpayable"]; objFDdetailsbyid.pInterestPayout = dr["interestpayout"]; objFDdetailsbyid.pDeposidate = dr["depositdate"]; objFDdetailsbyid.pMaturitydate = dr["maturitydate"]; lstFDDetailsbyid.Add(objFDdetailsbyid); } } } catch (Exception ex) { throw ex; } return(lstFDDetailsbyid); }
public List <FDDetailsByIdDTO> GetFdDetailsByid(string FdAccountNo, string Connectionstring) { List <FDDetailsByIdDTO> lstFDDetailsbyid = new List <FDDetailsByIdDTO>(); try { //string query = "select fdaccountid,fdaccountno,membercode,membername,depositamount,maturityamount,accountid,tenortype,tenor,interesttype,interestrate,interestpayable,interestpayout,to_char(transdate, 'dd/Mon/yyyy')transdate,to_char(depositdate, 'dd/Mon/yyyy')depositdate,to_char(maturitydate, 'dd/Mon/yyyy')maturitydate from tbltransfdcreation where fdaccountno='" + FdAccountNo + "'"; using (NpgsqlDataReader dr = NPGSqlHelper.ExecuteReader(Connectionstring, CommandType.Text, "select fdname,fdaccountid,fdaccountno,membercode,membername,depositamount,maturityamount,paidamount,clearedmount,pendingchequeamount,balanceamount,accountid,tenortype,tenor,interesttype,interestrate,interestpayable,interestpayout,to_char(transdate, 'dd/Mon/yyyy')transdate,to_char(depositdate, 'dd/Mon/yyyy')depositdate,to_char(maturitydate, 'dd/Mon/yyyy')maturitydate from vwfdtransaction_details where fdaccountno ='" + FdAccountNo + "';")) { while (dr.Read()) { FDDetailsByIdDTO objFDdetailsbyid = new FDDetailsByIdDTO(); objFDdetailsbyid.pFdaccountid = dr["fdaccountid"]; objFDdetailsbyid.pFdaccountno = dr["fdaccountno"]; objFDdetailsbyid.pMembername = dr["membername"]; objFDdetailsbyid.pDeposiamount = dr["depositamount"]; objFDdetailsbyid.pMaturityamount = dr["maturityamount"]; objFDdetailsbyid.pAccountno = dr["accountid"]; objFDdetailsbyid.pTenortype = dr["tenortype"]; objFDdetailsbyid.pTenor = dr["tenor"]; objFDdetailsbyid.pInteresttype = dr["interesttype"]; objFDdetailsbyid.pInterestrate = dr["interestrate"]; objFDdetailsbyid.pInterestPayble = dr["interestpayable"]; objFDdetailsbyid.pInterestPayout = dr["interestpayout"]; objFDdetailsbyid.pDeposidate = dr["depositdate"]; objFDdetailsbyid.pMaturitydate = dr["maturitydate"]; objFDdetailsbyid.pTransdate = dr["transdate"]; objFDdetailsbyid.pPaidamount = dr["paidamount"]; objFDdetailsbyid.pClearedmount = dr["clearedmount"]; objFDdetailsbyid.pPendingchequeamount = dr["pendingchequeamount"]; objFDdetailsbyid.pBalanceamount = dr["balanceamount"]; objFDdetailsbyid.pFDName = dr["fdname"]; lstFDDetailsbyid.Add(objFDdetailsbyid); } } } catch (Exception ex) { throw ex; } return(lstFDDetailsbyid); }