public static ArrayList List() { /* FeedBackQueueList */ //LeadId, LeadGuid, LeadCategory, LeadDatetime, LeadMatchedDatetime, BuyerId,BuyerEmail, BuyerName ArrayList list = new ArrayList(); SqlDataReader reader = null; BuyerFeedBackQueue queue = null; try { reader = Database.ExecuteReader(CommandType.StoredProcedure, "FeedBackQueueList"); while (reader.Read()) { queue = new BuyerFeedBackQueue(); queue.leadId = reader.GetInt32(0); queue.leadGuid = reader.GetString(1); queue.leadCategory = reader.GetString(2); queue.leadDatetime = reader.GetDateTime(3); queue.leadMatchedDatetime = reader.GetDateTime(4); queue.buyerId = reader.GetInt32(5); queue.buyerEmail = reader.GetString(6); queue.buyerName = reader.GetString(7); list.Add(queue); } reader.Close(); } catch { // } finally { if (reader != null) { reader.Close(); } } return list; }
public static BuyerFeedBackQueue Get(int leadId) { /* FeedBackQueueGet @leadId int */ BuyerFeedBackQueue queue = null; SqlDataReader reader = null; try { reader = Database.ExecuteReader(CommandType.StoredProcedure, "FeedBackQueueGet", new SqlParameter[] { Database.MakeInParam("@leadId", SqlDbType.Int, leadId) }); if (reader.Read()) { queue = new BuyerFeedBackQueue(); queue.leadId = reader.GetInt32(0); queue.leadGuid = reader.GetString(1); queue.leadCategory = reader.GetString(2); queue.leadDatetime = reader.GetDateTime(3); queue.leadMatchedDatetime = reader.GetDateTime(4); queue.buyerId = reader.GetInt32(5); queue.buyerEmail = reader.GetString(6); queue.buyerName = reader.GetString(7); } reader.Close(); } catch { // } finally { if (reader != null) { reader.Close(); } } return queue; }