예제 #1
0
 public ActionResult AjouterBieres()
 {
     BieresRecord biere = new BieresRecord();
     TypesTable types = new TypesTable(Session["Database"]);
     types.SelectAll();
     biere.ListeTypes = types.ToList();
     return View(biere);
 }
예제 #2
0
 public ActionResult EditerBieres(String Id)
 {
     BieresTable bieres = new BieresTable(Session["Database"]);
     TypesTable types = new TypesTable(Session["Database"]);
     types.SelectAll();
     bieres.biere.ListeTypes = types.ToList();
     if (bieres.SelectByID(Id))
         return View(bieres.biere);
     else
         return RedirectToAction("ListerBieres", "Bieres");
 }
예제 #3
0
        ////////////////////////////////////////////////////////////
        // TYPES
        ////////////////////////////////////////////////////////////
        public ActionResult ListerTypes()
        {
            TypesTable table = new TypesTable(Session["Database"]);

            String orderBy = "";

            if (Session["SortBy_Type"] != null)
                orderBy = (String)Session["SortBy_Type"] + " " + (String)Session["SortOrder"];

            table.SelectAll(orderBy);

            return View(table.ToList());
        }