Esempio n. 1
0
        public ActionResult Biographies2()
        {
            ManagementBiography managementBiography = db.ManagementBiographies.Find(1);

            managementBiography.Info = HttpUtility.HtmlDecode(managementBiography.Info);
            return(View(managementBiography));
        }
Esempio n. 2
0
        public ActionResult BiographyDeleteConfirmed(int id)
        {
            ManagementBiography managementBiography = db.ManagementBiographies.Find(id);

            db.ManagementBiographies.Remove(managementBiography);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Esempio n. 3
0
 public ActionResult Edit([Bind(Include = "ManagementBiographyID,ManagementPersonName,Info")] ManagementBiography managementBiography)
 {
     if (ModelState.IsValid)
     {
         db.Entry(managementBiography).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(managementBiography));
 }
Esempio n. 4
0
        public ActionResult Create([Bind(Include = "ManagementBiographyID,ManagementPersonName,Info")] ManagementBiography managementBiography)
        {
            if (ModelState.IsValid)
            {
                db.ManagementBiographies.Add(managementBiography);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(managementBiography));
        }
Esempio n. 5
0
        public ActionResult BiographyEdit([Bind(Include = "ManagementBiographyID,ManagementPersonName,Info")] ManagementBiography managementBiography)
        {
            if (ModelState.IsValid)
            {
                managementBiography.Info = HttpUtility.HtmlEncode(managementBiography.Info);

                db.Entry(managementBiography).State = EntityState.Modified;
                db.SaveChanges();
                return(RedirectToAction("Biographies"));
            }
            return(View(managementBiography));
        }
Esempio n. 6
0
        // GET: AdminBoard/BiographyDelete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ManagementBiography managementBiography = db.ManagementBiographies.Find(id);

            if (managementBiography == null)
            {
                return(HttpNotFound());
            }
            return(View(managementBiography));
        }
Esempio n. 7
0
        public ActionResult Create([Bind(Include = "ManagementPersonName,Info")] ManagementBiography managementBiography)
        {
            if (ModelState.IsValid)
            {
                //encodinimas keliant i DB
                managementBiography.Info = HttpUtility.HtmlEncode(managementBiography.Info);

                db.ManagementBiographies.Add(managementBiography);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(managementBiography));
        }
Esempio n. 8
0
        // GET: AdminBoard/BiographyEdit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ManagementBiography managementBiography = db.ManagementBiographies.Find(id);

            if (managementBiography == null)
            {
                return(HttpNotFound());
            }
            managementBiography.Info = HttpUtility.HtmlDecode(managementBiography.Info);
            return(View(managementBiography));
        }