Exemplo n.º 1
0
 public ActionResult Edit(Structure structure)
 {
     if (ModelState.IsValid)
     {
         graduatesEntity.Entry(structure).State = EntityState.Modified;
         graduatesEntity.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(structure));
 }
Exemplo n.º 2
0
 public ActionResult Edit(Position position)
 {
     if (ModelState.IsValid)
     {
         graduatesEntity.Entry(position).State = EntityState.Modified;
         graduatesEntity.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(position));
 }
 public ActionResult Edit(PersonsProffesion personsproffesion)
 {
     if (ModelState.IsValid)
     {
         graduatesEntity.Entry(personsproffesion).State = EntityState.Modified;
         graduatesEntity.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.PersonId    = new SelectList(graduatesEntity.Persons, "Id", "FirstName", personsproffesion.PersonId);
     ViewBag.PositionId  = new SelectList(graduatesEntity.Positions, "Id", "PositionName", personsproffesion.PositionId);
     ViewBag.StructureId = new SelectList(graduatesEntity.Structures, "Id", "StructureName", personsproffesion.StructureId);
     return(View(personsproffesion));
 }