Ejemplo n.º 1
0
 private void btnSet_Click(object sender, EventArgs e)
 {
     if (SendEmailSet.fSMS == null)
     {
         SendEmailSet frmSendEmailSet = new SendEmailSet();
         frmSendEmailSet.Show();
     }
     else
     {
         SendEmailSet.fSMS.Activate();
     }
 }
Ejemplo n.º 2
0
 private void btnSave_Click(object sender, EventArgs e)
 {
     try
     {
         if (this.IsNull() == true)
         {
             return;
         }
         string          connectstring = "provider=Microsoft.jet.OLEDB.4.0;Data Source=accountsystem.mdb;Jet OleDb:Database Password=lxw618";
         string          sqlcommand    = "update [EmailSet] set [server]='" + txtServer.Text + "',[port]='" + txtPort.Text + "',[sendaddress]='" + txtAddress.Text + "',[username]='" + txtUsername.Text + "',[password]='" + txtPassword.Text + "'";
         OleDbConnection aConnection   = new OleDbConnection(connectstring);
         aConnection.Open();
         OleDbCommand aCommand = new OleDbCommand(sqlcommand, aConnection);
         aCommand.ExecuteNonQuery();
         MessageBox.Show("保存成功", "恭喜");
         aConnection.Close();
         this.Close();
         fSMS = null;
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "系统错误");
     }
 }
Ejemplo n.º 3
0
 public SendEmailSet()
 {
     InitializeComponent();
     fSMS = this;
 }
Ejemplo n.º 4
0
 private void picClose_MouseDown(object sender, MouseEventArgs e)
 {
     this.Close();
     fSMS = null;
 }