public virtual void Remove(KT_CNHangHoa user) { try { db.KT_CNHangHoas.DeleteOnSubmit(user); db.SubmitChanges(); } catch (Exception e) { throw new Exception(e.Message); } }
public virtual void Create(KT_CNHangHoa user) { try { this.db.KT_CNHangHoas.InsertOnSubmit(user); db.SubmitChanges(); } catch (Exception e) { throw new Exception(e.Message); } }
public virtual void Update(KT_CNHangHoa user) { try { KT_CNHangHoa userOld = this.GetById(user.ID); userOld = user; db.SubmitChanges(); } catch (Exception e) { throw new Exception(e.Message); } }
public virtual int Delete(KT_CNHangHoa user) { try { //user.IsDelete = true; db.SubmitChanges(); return 0; } catch (Exception e) { throw new Exception(e.Message); } }