private void BtnSave_Click(object sender, EventArgs e) { smtpServerOptions.SmtpServer = tbSmtpServer.Text; smtpServerOptions.SmtpServerPort = (int)nudPort.Value; smtpServerOptions.SmtpServerUseSSl = chkSslEncryption.Checked; smtpServerOptions.SmtpAuthentication = cbSmtpAuthentication.SelectedIndex - 1; smtpServerOptions.SmtpServerUser = tbUsername.Text; smtpServerOptions.SmtpServerPassword = tbPassword.Text; systemSettingsRepository.Update(smtpServerOptions); }
public ActionResult Index(SystemSettingsExt model) { string _Msg = "", _MsgCss = ""; if (ModelState.IsValid) { SystemSettingsRepository sysRepo = new SystemSettingsRepository(); sysRepo.Update(model, ref _Msg, ref _MsgCss, this); ViewBag.Msg = _Msg; ViewBag.MsgCss = _MsgCss; } model.PaymentModes = DropDownLists.GetPaymentModes(model.GoCardless_Mode); return(View(model)); }