public ActionResult AjouterTypes(TypesRecord type) { if (ModelState.IsValid) { TypesTable table = new TypesTable(Session["Database"]); table.type = type; table.Insert(); return RedirectToAction("Index", "Bieres"); } return View(type); }
public TypesTable() { type = new TypesRecord(); SetTableName("Types"); }
public ActionResult EditerTypes(TypesRecord record) { TypesTable table = new TypesTable(Session["Database"]); if (ModelState.IsValid) { if (table.SelectByID(record.Id)) { table.type = record; table.Update(); return RedirectToAction("ListerTypes", "Bieres"); } } return View(record); }
public TypesTable(object cs) : base(cs) { type = new TypesRecord(); SetTableName("Types"); }