public ActionResult Create(FormCollection collection) { bool success = false; try { UserOrganization membership = EntityPropertiesLoader.PopulateProperties <UserOrganization>(collection); success = manager.CreateMembership(membership); } catch { } if (success) { return(RedirectToAction("Index")); } else { return(View()); } }
public ActionResult Create(FormCollection collection) { bool success = false; try { Area area = EntityPropertiesLoader.PopulateProperties <Area>(collection); success = manager.CreateArea(area); } catch { } if (success) { return(RedirectToAction("Index")); } else { return(View()); } }
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 { 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 { 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 { 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()); } }
public ActionResult Create(FormCollection collection) { LoadViewData(); bool success = false; try { Module m = EntityPropertiesLoader.PopulateProperties <Module>(collection); success = manager.CreateModule(m); } catch { } if (success) { return(RedirectToAction("Index")); } else { return(View()); } }
public ActionResult Create(FormCollection collection) { bool success = false; try { User user = EntityPropertiesLoader.PopulateProperties <User>(collection); // TODO: set password if not AD integrated user.Password = string.Empty; success = manager.CreateUser(string.Empty, user); } catch { } if (success) { return(RedirectToAction("Index")); } else { return(View()); } }