public static List <DoiTac> GetDoiTacs(string strSQL) { try { List <DoiTac> lstDoiTac = new List <DoiTac>(); DataTable dt = new DataTable(); dt = new Data.DM.DoiTac().GetDoiTacs(strSQL); if (dt.Rows.Count > 0) { foreach (DataRow dr in dt.Rows) { lstDoiTac.Add(DoiTac.GetDoiTacByRow(dr)); } } dt.Dispose(); dt = null; return(lstDoiTac); } catch (Exception ex) { LogError.WriteLogError("GetDoiTacs: ", ex); return(new List <DoiTac>()); } }
public DoiTac GetDoiTacByMaDoiTac(string MaDoiTac) { DoiTac objDoiTac = new DoiTac(); DataTable dt = new DataTable(); dt = new Data.DM.DoiTac().GetCacDoiTacs(MaDoiTac); if (dt.Rows.Count == 1) { objDoiTac = DoiTac.GetDoiTacByRow(dt.Rows[0]); } return(objDoiTac); }
/// <summary> /// Tra ve thong tin cua doi tac du vao so dien thoai /// </summary> /// <param name="PhoneNumber">So dien thoai</param> /// <returns>Du lieu doi tac</returns> public static DoiTac GetDoiTacByOPhoneNumber(string PhoneNumber) { DoiTac objDoiTac = null; DataTable dt = new DataTable(); dt = new Data.DM.DoiTac().GetDoiTacByOPhoneNumber(PhoneNumber); if (dt.Rows.Count >= 1) { objDoiTac = DoiTac.GetDoiTacByRow(dt.Rows[0]); } dt.Dispose(); return(objDoiTac); }
public static DoiTac GetDoiTacByOPhoneNumber_KhacMaMoiGioi(string MaMoiGioi, string PhoneNumber) { DoiTac objDoiTac = new DoiTac(); DataTable dt = new DataTable(); dt = new Data.DM.DoiTac().GetDoiTacByOPhoneNumber_KhongCungMa(MaMoiGioi, PhoneNumber); if (dt.Rows.Count >= 1) { objDoiTac = DoiTac.GetDoiTacByRow(dt.Rows[0]); } dt.Dispose(); dt = null; return(objDoiTac); }
public List <DoiTac> GetListOfDoiTacs_ByNhanVien(string MaNhanVien) { List <DoiTac> lstDoiTac = new List <DoiTac>(); DataTable dt = new DataTable(); dt = new Data.DM.DoiTac().GetListOfDoiTacs_ByNhanVien(MaNhanVien);// lay ta ca if (dt.Rows.Count > 0) { foreach (DataRow dr in dt.Rows) { lstDoiTac.Add(DoiTac.GetDoiTacByRow(dr)); } } return(lstDoiTac); }
public List <DoiTac> GetCacDoiTacs_LastUpdate(DateTime LastUpdate) { try { List <DoiTac> lstDoiTac = new List <DoiTac>(); var dt = new DataTable(); dt = new Data.DM.DoiTac().GetCacDoiTacs_LastUpdate(LastUpdate);// lay ta ca if (dt.Rows.Count > 0) { foreach (DataRow dr in dt.Rows) { lstDoiTac.Add(DoiTac.GetDoiTacByRow(dr)); } } return(lstDoiTac); } catch (Exception ex) { LogError.WriteLogError("GetCacDoiTacs_LastUpdate: ", ex); return(new List <DoiTac>()); } }
public List <DoiTac> GetListOfDoiTacs(bool isActive) { try { List <DoiTac> lstDoiTac = new List <DoiTac>(); DataTable dt = new DataTable(); dt = new Data.DM.DoiTac().GetDSDoiTacs(isActive);// lay ta ca if (dt.Rows.Count > 0) { foreach (DataRow dr in dt.Rows) { lstDoiTac.Add(DoiTac.GetDoiTacByRow(dr)); } } return(lstDoiTac); } catch (Exception ex) { LogError.WriteLogError("GetListOfDoiTacs: ", ex); return(new List <DoiTac>()); } }