Ejemplo n.º 1
0
 public ActionResult Edit([Bind(Include = "Id,IsActive,SortOrder,Status")] OppStatus oppStatus)
 {
     if (ModelState.IsValid)
     {
         db.Entry(oppStatus).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(oppStatus));
 }
Ejemplo n.º 2
0
        public ActionResult Create([Bind(Include = "Id,IsActive,SortOrder,Status")] OppStatus oppStatus)
        {
            if (ModelState.IsValid)
            {
                db.OppStatus.Add(oppStatus);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(oppStatus));
        }
Ejemplo n.º 3
0
        // GET: OppStatus/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            OppStatus oppStatus = db.OppStatus.Find(id);

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