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