Пример #1
0
 public int ThemNCC(NhaCungCap n)
 {
     try
     {
         db.NhaCungCaps.InsertOnSubmit(n);
         db.SubmitChanges();
     }
     catch
     {
         return -1;
     }
     return 1;
 }
Пример #2
0
 public int SuaNCC(NhaCungCap n)
 {
     try
     {
         NhaCungCap ncc = db.NhaCungCaps.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;
 }
Пример #3
0
 partial void UpdateNhaCungCap(NhaCungCap instance);
Пример #4
0
 partial void DeleteNhaCungCap(NhaCungCap instance);
Пример #5
0
 partial void InsertNhaCungCap(NhaCungCap instance);