public ActionResult Edit(StatusPlanejamento statusplanejamento)
 {
     if (ModelState.IsValid)
     {
         db.StatusPlanejamento.Attach(statusplanejamento);
         db.ObjectStateManager.ChangeObjectState(statusplanejamento, EntityState.Modified);
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(statusplanejamento);
 }
        public ActionResult Create(StatusPlanejamento statusplanejamento)
        {
            if (ModelState.IsValid)
            {
                db.StatusPlanejamento.AddObject(statusplanejamento);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            return View(statusplanejamento);
        }
Exemplo n.º 3
0
 /// <summary>
 /// Deprecated Method for adding a new object to the StatusPlanejamento EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToStatusPlanejamento(StatusPlanejamento statusPlanejamento)
 {
     base.AddObject("StatusPlanejamento", statusPlanejamento);
 }
Exemplo n.º 4
0
 /// <summary>
 /// Create a new StatusPlanejamento object.
 /// </summary>
 /// <param name="id">Initial value of the Id property.</param>
 /// <param name="sigla">Initial value of the Sigla property.</param>
 /// <param name="nome">Initial value of the Nome property.</param>
 public static StatusPlanejamento CreateStatusPlanejamento(global::System.Int32 id, global::System.String sigla, global::System.String nome)
 {
     StatusPlanejamento statusPlanejamento = new StatusPlanejamento();
     statusPlanejamento.Id = id;
     statusPlanejamento.Sigla = sigla;
     statusPlanejamento.Nome = nome;
     return statusPlanejamento;
 }