public static DateTime GetTimeServer()
 {
     using (var db = new DUONGDAI_DONKHACH_XEDITINH_DA())
     {
         return(db.GetTimeServer());
     }
 }
 public List <DUONGDAI_DONKHACH_XEDITINH> GetLichSu(long id)
 {
     using (var db = new DUONGDAI_DONKHACH_XEDITINH_DA())
     {
         return(db.GetLichSu(id).ToList <DUONGDAI_DONKHACH_XEDITINH>());
     }
 }
 public List <DUONGDAI_DONKHACH_XEDITINH> TimKiem(DateTime deStart, DateTime deEnd, string soxe, string sdt, string diaChi, int trangthai)
 {
     using (var db = new DUONGDAI_DONKHACH_XEDITINH_DA())
     {
         return(db.TimKiem(deStart, deEnd, soxe, sdt, diaChi, trangthai).ToList <DUONGDAI_DONKHACH_XEDITINH>());
     }
 }
 /// <summary>
 /// Gets all.
 /// </summary>
 /// <returns>DataTable.</returns>
 public DataTable GetAll()
 {
     using (var db = new DUONGDAI_DONKHACH_XEDITINH_DA())
     {
         return(db.GetAll());
     }
 }
 /// <summary>
 /// Updates this instance.
 /// </summary>
 /// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns>
 public bool Update()
 {
     using (var db = new DUONGDAI_DONKHACH_XEDITINH_DA())
     {
         db.CopyTo(this);
         return(db.Update());
     }
 }
 /// <summary>
 /// Deletes this instance.
 /// </summary>
 /// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns>
 public bool Delete()
 {
     using (var db = new DUONGDAI_DONKHACH_XEDITINH_DA())
     {
         db.Id        = this.Id;
         db.UpdatedBy = this.UpdatedBy;
         return(db.Delete());
     }
 }