Exemplo n.º 1
0
 public ActionResult Edit(Assignment assignment)
 {
     if (ModelState.IsValid)
     {
         db.Entry(assignment).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(assignment);
 }
Exemplo n.º 2
0
        public ActionResult Create(Assignment assignment)
        {
            if (ModelState.IsValid)
            {
                db.Assignments.Add(assignment);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            return View(assignment);
        }
Exemplo n.º 3
0
Arquivo: Unit.cs Projeto: rtw/SARMS
 public void RemoveAssignment(Assignment assignment)
 {
     Assignments.Remove(assignment);
 }
Exemplo n.º 4
0
Arquivo: Unit.cs Projeto: rtw/SARMS
 public void AddAssignment(Assignment assignment)
 {
     Assignments.Add(assignment);
 }