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