コード例 #1
0
        public ActionResult Edit([Bind(Include = "NumeroDRE,NomDRE,Wilaya,AdresseDRE")] DRE dre1)
        {
            if (Session["user"] == null)
            {
                return(RedirectToAction("Index", "Home"));
            }
            if ((Session["user"] as Utilisateur).EtatUser != "Superviseur")
            {
                return(RedirectToAction("InvalidAccess", "Home"));
            }

            try
            {
                // TODO: Add update logic here
                dre1.edit_by_id();
                return(RedirectToAction("Index"));
            }
            catch
            {
                return(View());
            }
        }