public ActionResult ManagePanel(LoginModel model) { var loginPreferences = new LoginPreferences { OfflineMode = model.OfflineMode, PanelAdminEmail = model.PanelAdminEmail, PanelAdminUrl = model.PanelAdminUrl, PanelPassword = model.PanelPassword }; if (model.OfflineMode == false) { if (ModelState.IsValid) { return RedirectToAction("Index", "ManagePanel", loginPreferences); } return View("Index"); } return View("Index"); }
public ActionResult CreatePanel(LoginModel model) { string encryptedPassword = PasswordUtill.Encrypt(model.PanelPassword); var loginPreferences = new LoginPreferences { OfflineMode = model.OfflineMode, PanelAdminEmail = model.PanelAdminEmail, PanelAdminUrl = model.PanelAdminUrl, PanelPassword = encryptedPassword }; if (model.OfflineMode == false) { if (ModelState.IsValid) { return RedirectToAction("Index", "Home", loginPreferences); } return View("Index"); } return RedirectToAction("Index", "Home", loginPreferences); }