public static TuVanDichVuCollection SelectAll() { var List = new TuVanDichVuCollection(); using (IDataReader rd = SqlHelper.ExecuteReader(DAL.con(), CommandType.StoredProcedure, "sp_tblSpaMgr_TuVanDichVu_Select_SelectAll_linhnx")) { while (rd.Read()) { List.Add(getFromReader(rd)); } } return(List); }
public static TuVanDichVuCollection SelectByTvId(SqlConnection con, string TV_ID) { var obj = new SqlParameter[2]; obj[0] = new SqlParameter("TV_ID", TV_ID); var List = new TuVanDichVuCollection(); using (IDataReader rd = SqlHelper.ExecuteReader(con, CommandType.StoredProcedure, "sp_tblSpaMgr_TuVanDichVu_Select_SelectByTvId_linhnx", obj)) { while (rd.Read()) { List.Add(getFromReader(rd)); } } return(List); }
public static TuVanDichVuCollection BaoCaoDoanhSoTuNgayDenNgay(SqlConnection con, string TuNgay, string DenNgay, string KH_ID) { var obj = new SqlParameter[3]; if (!string.IsNullOrEmpty(TuNgay)) { obj[1] = new SqlParameter("TuNgay", TuNgay); } else { obj[1] = new SqlParameter("TuNgay", DBNull.Value); } if (!string.IsNullOrEmpty(DenNgay)) { obj[2] = new SqlParameter("DenNgay", DenNgay); } else { obj[2] = new SqlParameter("DenNgay", DBNull.Value); } if (!string.IsNullOrEmpty(KH_ID)) { obj[0] = new SqlParameter("KH_ID", KH_ID); } else { obj[0] = new SqlParameter("KH_ID", DBNull.Value); } var List = new TuVanDichVuCollection(); using (IDataReader rd = SqlHelper.ExecuteReader(con, CommandType.StoredProcedure, "sp_tblThuChi_Select_baoCaoDoanhSo_linhnx", obj)) { while (rd.Read()) { List.Add(getFromReader(rd)); } } return(List); }