public ActionResult Edit(int id, loaisanpham lsp) { TypeBus.Sua(id, lsp); return(RedirectToAction("Index")); }
public ActionResult Create(loaisanpham lsp) { lsp.bixoa = 0; TypeBus.Them(lsp); return(RedirectToAction("Index")); }
public static void Them(loaisanpham lsp) { var db = new PhucMobileConnectionDB(); db.Insert(lsp); }
public static void EditLoaiSanPham(int id, loaisanpham lsp) { var db = new BabyShopConnectionDB(); db.Update <loaisanpham>("SET TenLoaiSanPham=@0, BiXoa = @1 where MaLoaiSanPham=@2", lsp.TenLoaiSanPham, lsp.BiXoa, id); }
public static void ThemLoaiSanPham(loaisanpham lsp) { var db = new BabyShopConnectionDB(); db.Insert(lsp); }
public int postSualoaisanpham(loaisanpham lsp) { db.loaisanphams.AddOrUpdate(lsp); return(db.SaveChanges()); }