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