示例#1
0
        public ActionResult DeleteConfirmed(int id)
        {
            Valution valution = db.Valutions.Find(id);

            db.Valutions.Remove(valution);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
示例#2
0
 public ActionResult Edit([Bind(Include = "ID,Name,Client,Risk")] Valution valution)
 {
     if (ModelState.IsValid)
     {
         db.Entry(valution).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(valution));
 }
示例#3
0
        public ActionResult Create([Bind(Include = "ID,Name,Client,Risk")] Valution valution)
        {
            if (ModelState.IsValid)
            {
                db.Valutions.Add(valution);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(valution));
        }
示例#4
0
        // GET: Valutions/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Valution valution = db.Valutions.Find(id);

            if (valution == null)
            {
                return(HttpNotFound());
            }
            return(View(valution));
        }