public static SIHOTPersonList GetPersons(int m_page, int m_RecordPerPage, out int count, int SIHOTHotelCode, int SIHOTVCCode, string parCriteria, int FromLive, DateTime DateFrom, DateTime DateTo) { SIHOTPersonList retval = new SIHOTPersonList(); SqlParameter pOut = new SqlParameter("@Count", SqlDbType.Int, 4); pOut.Direction = ParameterDirection.Output; SqlParameter[] param = new SqlParameter[]{ new SqlParameter("@FromLive", FromLive), new SqlParameter("@SIHOTHotelCode", SIHOTHotelCode), new SqlParameter("@SIHOTVCCode", SIHOTVCCode), new SqlParameter("@Page", m_page), new SqlParameter("@PageSize", m_RecordPerPage), new SqlParameter("@Criteria", parCriteria), new SqlParameter("@DateFrom", DateFrom), new SqlParameter("@DateTo", DateTo), pOut }; using (SqlDataReader reader = SqlHelper.ExecuteReader(Helper.ConnectionString, CommandType.StoredProcedure, "Select_Prospect_MainNEW", param)) { while (reader.Read()) { retval.Add(Read(reader)); } } count = Helper.ToInt32(pOut.Value); return retval; }
public static SIHOTPersonList GetPersonsTest() { SIHOTPersonList retval = new SIHOTPersonList(); using (SqlDataReader reader = SqlHelper.ExecuteReader(Helper.ConnectionString, CommandType.StoredProcedure, "Select_TSW_PersonTest")) { while (reader.Read()) { retval.Add(Read(reader)); } } return retval; }