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);
 }
Exemple #2
0
 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);
 }
Exemple #4
0
 public TypesTable(object cs)
     : base(cs)
 {
     type = new TypesRecord();
     SetTableName("Types");
 }