Example #1
0
 public virtual void Remove(KT_NHOMHH user)
 {
     try
     {
         db.KT_NHOMHHs.DeleteOnSubmit(user);
         db.SubmitChanges();
     }
     catch (Exception e)
     {
         throw new Exception(e.Message);
     }
 }
Example #2
0
 public virtual void Create(KT_NHOMHH user)
 {
     try
     {
         this.db.KT_NHOMHHs.InsertOnSubmit(user);
         db.SubmitChanges();
     }
     catch (Exception e)
     {
         throw new Exception(e.Message);
     }
 }
Example #3
0
 public virtual void Update(KT_NHOMHH user)
 {
     try
     {
         KT_NHOMHH userOld = this.GetById(user.ID);
         userOld = user;
         db.SubmitChanges();
     }
     catch (Exception e)
     {
         throw new Exception(e.Message);
     }
 }
Example #4
0
 public virtual int Delete(KT_NHOMHH user)
 {
     try
     {
         //user.IsDelete = true;
         db.SubmitChanges();
         return 0;
     }
     catch (Exception e)
     {
         throw new Exception(e.Message);
     }
 }