public ActionResult ConfidentialSettings(ConfidentialSettingsModel model) { if (ModelState.IsValid) { Account.Settings["SHOWEMAIL"] = model.ShowEmail; Account.Settings["SHOWCREATIONDATE"] = model.ShowCreationDate; Account.Settings["SHOWLASTACTIVITYDATE"] = model.ShowLastActivityDate; Account.Settings["SHOWSTATUS"] = model.ShowStatus; Account.Settings["SHOWGROUPS"] = model.ShowGroups; Account.Save(); } else throw new HttpException(500, "HTTP/1.1 500 Server error"); return View(model); }
public ActionResult ConfidentialSettings() { ConfidentialSettingsModel model = new ConfidentialSettingsModel() { ShowEmail = Account.Settings["SHOWEMAIL"], ShowCreationDate = Account.Settings["SHOWCREATIONDATE"], ShowLastActivityDate = Account.Settings["SHOWLASTACTIVITYDATE"], ShowStatus = Account.Settings["SHOWSTATUS"], ShowGroups = Account.Settings["SHOWGROUPS"] }; return View(model); }