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