public static QuyTacCollection SelectAll() { QuyTacCollection List = new QuyTacCollection(); using (IDataReader rd = SqlHelper.ExecuteReader(DAL.con(), CommandType.StoredProcedure, "sp_tblQuyTac_Select_SelectAll_hoangda")) { while (rd.Read()) { List.Add(getFromReader(rd)); } } return(List); }
public static QuyTacCollection SelectByHost(string host) { SqlParameter[] obj = new SqlParameter[1]; if (!string.IsNullOrEmpty(host)) { obj[0] = new SqlParameter("host", host); } else { obj[0] = new SqlParameter("host", DBNull.Value); } QuyTacCollection List = new QuyTacCollection(); using (IDataReader rd = SqlHelper.ExecuteReader(DAL.con(), CommandType.StoredProcedure, "sp_tblQuyTac_Select_SelectByHost_hoangda", obj)) { while (rd.Read()) { List.Add(getFromReader(rd)); } } return(List); }