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