public int ThemThuongHieu(Brand n) { try { db.Brands.InsertOnSubmit(n); db.SubmitChanges(); } catch { return -1; } return 1; }
public int SuaThuongHieu(Brand n) { try { Brand ncc = db.Brands.Single(a => a.id == n.id); ncc.ten = n.ten; ncc.sdt = n.sdt; ncc.diachi = n.diachi; ncc.sdt = n.sdt; db.SubmitChanges(); } catch { return -1; } return 1; }
partial void UpdateBrand(Brand instance);
partial void DeleteBrand(Brand instance);
partial void InsertBrand(Brand instance);