//[ValidateInput(false)] TODO: need this? public ViewResult Index(FormCollection collection) { // TODO: FormCollection can't be used as a parameter SaveFormValuesToSettings(Request.Form); ViewData[TimeZonesKey] = DataCollections.TimeZones(); return(View(_settingsManager.Current)); }
public ActionResult Index() { if (!_setupService.IsConnectionPossible()) { return(View("NoConnection")); } if (_setupService.IsDatabaseSetup()) { return(this.Forbidden("Forbidden", null)); } var setupVariables = new SetupVariables { SmtpPort = 25, ServerDaylightSaving = true, ServerTimeZone = -5 }; ViewData[AdminController.TimeZonesKey] = DataCollections.TimeZones(); return(View(setupVariables)); }
public ViewResult Index(FormCollection collection) { SaveFormValuesToSettings(collection); ViewData[TimeZonesKey] = DataCollections.TimeZones(); return(View(_settingsManager.Current)); }
public static MvcHtmlString TimeZoneDropDown(this HtmlHelper helper, string name, object htmlAttributes, object selectedValue) { var result = helper.DropDownList(name, new SelectList(DataCollections.TimeZones(), "Key", "Value", selectedValue), htmlAttributes); return(result); }