public ActionResult Edit(int id, FormCollection collection) { bool success = false; try { Module module = manager.GetModule(id); EntityPropertiesLoader.UpdateProperties(ref module, collection); success = manager.UpdateModule(module); } catch { } if (success) { return(RedirectToAction("Index")); } else { return(View()); } }
public ActionResult Edit(int id, FormCollection collection) { bool success = false; try { User user = manager.GetUser(id); EntityPropertiesLoader.UpdateProperties <User>(ref user, collection); success = manager.UpdateUser(user); } catch { } if (success) { return(RedirectToAction("Index")); } else { return(View()); } }
public ActionResult Edit(int id, FormCollection collection) { bool success = false; try { Area area = manager.GetArea(id); EntityPropertiesLoader.UpdateProperties <Area>(ref area, collection); success = manager.UpdateArea(area); } catch { } if (success) { return(RedirectToAction("Index")); } else { return(Edit(id)); } }
public ActionResult Edit(int id, FormCollection collection) { bool success = false; try { Organization org = manager.GetOrganization(id); EntityPropertiesLoader.UpdateProperties <Organization>(ref org, collection); success = manager.UpdateOrganization(org); } catch { } if (success) { return(RedirectToAction("Index")); } else { return(Edit(id)); } }
public ActionResult Edit(int id, FormCollection collection) { bool success = false; try { mp.Action action = manager.GetAction(id); EntityPropertiesLoader.UpdateProperties <mp.Action>(ref action, collection); success = manager.UpdateAction(action); } catch { } if (success) { return(RedirectToAction("Index")); } else { return(View()); } }