public static XuatNhapReportCollection SelectAll() { var List = new XuatNhapReportCollection(); using (IDataReader rd = SqlHelper.ExecuteReader(DAL.con(), CommandType.StoredProcedure, "sp_tblXuatNhapReport_Select_SelectAll_linhnx")) { while (rd.Read()) { List.Add(getFromReader(rd)); } } return(List); }
public static XuatNhapReportCollection baoCaoTuNgayDenNgayTheoKho(string TuNgay, string DenNgay, string KHO_ID, string DM_ID) { var List = new XuatNhapReportCollection(); var obj = new SqlParameter[4]; if (!string.IsNullOrEmpty(TuNgay)) { obj[0] = new SqlParameter("TuNgay", TuNgay); } else { obj[0] = new SqlParameter("TuNgay", DBNull.Value); } if (!string.IsNullOrEmpty(DenNgay)) { obj[1] = new SqlParameter("DenNgay", DenNgay); } else { obj[1] = new SqlParameter("DenNgay", DBNull.Value); } if (!string.IsNullOrEmpty(KHO_ID)) { obj[2] = new SqlParameter("KHO_ID", KHO_ID); } else { obj[2] = new SqlParameter("KHO_ID", DBNull.Value); } if (!string.IsNullOrEmpty(DM_ID)) { obj[3] = new SqlParameter("DM_ID", DM_ID); } else { obj[3] = new SqlParameter("DM_ID", DBNull.Value); } using (IDataReader rd = SqlHelper.ExecuteReader(DAL.con(), CommandType.StoredProcedure, "sp_tblXuatNhap_BaoCao_TonKho_TuNgayDenNgayKhoIdDmId_linhnx", obj)) { while (rd.Read()) { List.Add(getFromReader(rd)); } } return(List); }