public ActionResult Edit(int id, SkillAgregationModel skillAgregation) { if (ModelState.IsValid) { if (id != skillAgregation.iAggregationID) { return RedirectToAction("Message", "Error", new { Error = "スキルアグリゲーション在しません。" }); } } string skillGroupIDs = Request.Form["selectSkillGroup"]; WFMDBDataContext db = new WFMDBDataContext(); db.uspWFMUpdateAggregation(id, skillAgregation.vAggregationName, skillGroupIDs); return RedirectToAction("Index"); }
public ActionResult Edit(int id) { uspWFMGetSingleAggregationResult result; using (WFMDBDataContext db = new WFMDBDataContext()) { result = db.uspWFMGetSingleAggregation(id).FirstOrDefault(); } GetSkillGroupListForDDL(id); if (result != null) { SkillAgregationModel model = new SkillAgregationModel() { iAggregationID = result.iAggregationID, vAggregationName = result.vAggregationName }; return View(model); } else { return RedirectToAction("Message", "Error", new { Error = "スキルアグリゲーション在しません。" }); } }