internal QuatationDetailsBO readDetailsFromReader(SqlDataReader reader1, SqlDataReader reader2) { QuatationDetailsBO bo = new QuatationDetailsBO(); while (reader1.Read()) { bo.shopName = reader1.GetString(0); bo.shopAddress = reader1.GetString(1); } while (reader2.Read()) { bo.userName = reader2.GetString(0); bo.userAddress = reader2.GetString(1); bo.userRole = reader2.GetString(2); } return(bo); }
public QuatationDetailsBO getQuatationDetails(int val) { QuatationDetailsBO bo = new QuatationDetailsBO(); SqlDataReader sqlDataReader; if (val == 0) { sqlDataReader = quatationDetailsDAO.getNewCustomerDetails(this); } else { sqlDataReader = quatationDetailsDAO.getShopDetails(this); } SqlDataReader sqlDataReader2 = quatationDetailsDAO.getUserDetails(this); bo = readDetailsFromReader(sqlDataReader, sqlDataReader2); return(bo); }