コード例 #1
0
 public ActionResult AddGroup(int? id)
 {
     if (id == null)
     {
         return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
     }
     Groups Groups = new Groups { Id = (int)id };
     return View(Groups);
 }
コード例 #2
0
        public ActionResult AddGroup(Groups model)
        {
            if (ModelState.IsValid)
            {
                um.AddGroup(model.Id, model.GroupId);

                return RedirectToAction("Details", new { Id = model.Id });
            }
            return View(model);
        }