Beispiel #1
0
 public int ThemThuongHieu(Brand n)
 {
     try
     {
         db.Brands.InsertOnSubmit(n);
         db.SubmitChanges();
     }
     catch
     {
         return -1;
     }
     return 1;
 }
Beispiel #2
0
 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;
 }
Beispiel #3
0
 partial void UpdateBrand(Brand instance);
Beispiel #4
0
 partial void DeleteBrand(Brand instance);
Beispiel #5
0
 partial void InsertBrand(Brand instance);