public ActionResult Modifier(String nuComm) { if (Session["id"] != null) { Commande comm = null; ModifCommande modComm = null; IEnumerable <String> listClients = null; IEnumerable <String> listVendeurs = null; try { comm = CommandeDao.GetCommande(nuComm); listClients = ClientDao.GetNuClients(); listVendeurs = VendeurDao.GetNuVendeurs(); modComm = new ModifCommande(comm, listClients, listVendeurs); return(View(modComm)); } catch (MonException e) { return(HttpNotFound()); } } else { return(View("~/Views/Home/Connexion.cshtml")); } }
public ActionResult Ajout() { if (Session["id"] != null) { ModifCommande modComm = null; IEnumerable <String> listClients = null; IEnumerable <String> listVendeurs = null; String max = ""; try { listClients = ClientDao.GetNuClients(); listVendeurs = VendeurDao.GetNuVendeurs(); max = CommandeDao.GetMaxNuComm(); modComm = new ModifCommande(max, listClients, listVendeurs); return(View(modComm)); } catch (MonException e) { return(HttpNotFound()); } } else { return(View("~/Views/Home/Connexion.cshtml")); } }