private void btnUpdateMailSettings_Click(object sender, EventArgs e) { dbConfig mailSettings = new dbConfig(); mailSettings.Host = txtHost.Text; mailSettings.Port = (int)numPort.Value; mailSettings.enableSSL = chkEnableSSL.Checked; mailSettings.User = txtUser.Text.ToLower(); mailSettings.Password = txtPassword.Text; mailSettings.Sender = txtSender.Text.ToUpper(); if (!mailSettings.saveMailSettingsTxt()) { MessageBox.Show(mailSettings.errMsg); } }
private void frmMerge_Load(object sender, EventArgs e) { // TODO: esta línea de código carga datos en la tabla 'excelFilesDataSet.configData' Puede moverla o quitarla según sea necesario. this.configDataTableAdapter.Fill(this.excelFilesDataSet.configData); cboMasterFile.SelectedItem = 0; int master_id = (int)cboMasterFile.SelectedValue; _dttExcelFiles = merge.getFileDefinition(master_id); dgvFileDefinition.DataSource = _dttExcelFiles; //retrieve email settings dbConfig mailSettings = new dbConfig(); mailSettings.getMailconfigTxt(); txtHost.Text = mailSettings.Host; numPort.Value = mailSettings.Port; chkEnableSSL.Checked = mailSettings.enableSSL; txtUser.Text = mailSettings.User; txtPassword.Text = mailSettings.Password; txtSender.Text = mailSettings.Sender; }