public bool Delete(int Id) { try { tbl = db.tbl_DeXuat_KT.Find(Id); db.tbl_DeXuat_KT.Remove(tbl); db.SaveChanges(); return true; } catch { return false; } }
public bool Update(DeXuatChiTietModel m) { try { tbl = db.tbl_DeXuat_KT.Find(m.Id); tbl.Ten = m.Ten; tbl.Mo_Ta = m.Mo_Ta; tbl.SoLuong = m.SoLuong; tbl.DVT = m.DVT; tbl.Ghi_Chu = m.Ghi_Chu; db.SaveChanges(); return true; } catch { return false; } }
public DeXuatChiTietDao() { db = new EFDbContext(); tbl = new tbl_DeXuat_KT(); }