Example #1
0
 private void TxtPhone_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Enter)
     {
         TxtCompany.Focus();
     }
 }
Example #2
0
        private void materialRaisedButton1_Click(object sender, EventArgs e)
        {
            ControlDB control = new ControlDB(ControlDB.cPath, "dbQA.mdf");

            try
            {
                string[] parameters = { "@name", "@dir", "@comp" };
                string[] elements   = { TxtName.Text, TxtDirection.Text, TxtCompany.Text };
                if (!control.Insertar("insert into [Proveedor] values(@name,@dir,@comp)", parameters, elements))
                {
                    MessageBox.Show("EL proovedor no pudo ser agregado", "Google LLC", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                    return;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            };

            TxtName.Clear();
            TxtDirection.Clear();
            TxtCompany.Clear();
            MessageBox.Show("Proveedor Agregado Correctamente", "Google LLC", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            TxtName.Focus();
        }
Example #3
0
 private void directionTextbox_KeyDown(object sender, KeyEventArgs e)
 {
     if (Keys.Enter == e.KeyCode)
     {
         TxtCompany.Focus();
     }
 }
Example #4
0
 private void CmdNew_Click(object sender, EventArgs e)
 {
     CmList.Enabled  = false;
     LblId.Text      = "";
     TxtCompany.Text = "";
     CmdSave.Enabled = true;
     TxtCompany.Focus();
 }
 private void TxtUserName_OnKeyDown(object sender, KeyRoutedEventArgs e)
 {
     if (e.Key == VirtualKey.Enter)
     {
         TxtCompany.Focus(FocusState.Programmatic);
         e.Handled = true;
     }
 }