コード例 #1
0
ファイル: AddConnection.cs プロジェクト: leon289/vpn_manager
 private void cmdNext_Click(object sender, EventArgs e)
 {
     if (!Modifing)
     {
         if (txtPassword.Text == txtConfrimPassword.Text)
         {
             if (VpnManagerDal.InsertNewPlant(cmbCustomer.Text, (int)cmbVpnType.SelectedValue, txtServerHost.Text, txtUser.Text, txtPassword.Text))
             {
                 grpMachine.Enabled = true;
                 grpPlant.Enabled   = false;
             }
         }
         else
         {
             MessageBox.Show("Passwords Don't Match!!'");
         }
     }
     else
     {
         if (txtPassword.Text == txtConfrimPassword.Text)
         {
             if (VpnManagerDal.EditPlant(_plant, cmbCustomer.Text, (int)cmbVpnType.SelectedValue, txtServerHost.Text, txtUser.Text, txtPassword.Text))
             {
             }
         }
         else
         {
             MessageBox.Show("Passwords Don't Match!!'");
         }
     }
 }