public static DichVuCollection SelectAll() { var List = new DichVuCollection(); using (IDataReader rd = SqlHelper.ExecuteReader(DAL.con(), CommandType.StoredProcedure, "sp_tblSpaMgr_DichVu_Select_SelectAll_linhnx")) { while (rd.Read()) { List.Add(getFromReader(rd)); } } return(List); }
public static DichVuCollection SelectByDm(SqlConnection con, string DM_ID) { var List = new DichVuCollection(); var obj = new SqlParameter[1]; if (!string.IsNullOrEmpty(DM_ID)) { obj[0] = new SqlParameter("DM_ID", DM_ID); } else { obj[0] = new SqlParameter("DM_ID", DBNull.Value); } using (IDataReader rd = SqlHelper.ExecuteReader(con, CommandType.StoredProcedure, "sp_tblSpaMgr_DichVu_Select_SelectByDm_linhnx", obj)) { while (rd.Read()) { List.Add(getFromReader(rd)); } } return(List); }