Пример #1
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (comboBox1.Text == "Tipos")
     {
         Control_Articulo view = new Control_Articulo();
         view.option = "1";
         view.ShowDialog();
         tipos();
     }
     else
     {
         Control_GrupoArticulo view = new Control_GrupoArticulo();
         view.option = "1";
         view.ShowDialog();
         grupos();
     }
 }
Пример #2
0
 private void button2_Click(object sender, EventArgs e)
 {
     if (lblId.Text == "")
     {
         MessageBox.Show("Debe seleccionar un dato para editar.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
         return;
     }
     if (comboBox1.Text == "Tipos")
     {
         Control_Articulo view = new Control_Articulo();
         view.ID     = lblId.Text;
         view.option = "2";
         view.ShowDialog();
         tipos();
     }
     else
     {
         Control_GrupoArticulo view = new Control_GrupoArticulo();
         view.ID     = lblId.Text;
         view.option = "2";
         view.ShowDialog();
         grupos();
     }
 }