Ejemplo n.º 1
0
        private void BT_ModArt_Click(object sender, EventArgs e)
        {
            if (TB_CodArtAgr.Text != "Código de Artículo" || TB_NomArtAgr.Text != "Nombre de Artículo")
            {
                int id = 0;

                try
                {
                    id = Convert.ToInt32(TB_CodArtAgr.Text);

                    Obtener           obtener = new Obtener();
                    List <ObjUsuario> list    = obtener.ObtenerLU();

                    foreach (ObjUsuario usuario in list)
                    {
                        if (id == usuario.id)
                        {
                            this.Visible = false;
                            AgregarArticulo modArt = new AgregarArticulo("modificar", id);
                            modArt.ShowDialog();
                            this.Visible = true;
                        }
                    }
                }
                catch
                {
                    MessageBox.Show("Ingrese un caracter válido");
                }
            }
        }
Ejemplo n.º 2
0
        private void BT_AgregarNuevo_Click(object sender, EventArgs e)
        {
            this.Visible = false;
            AgregarArticulo agrArt = new AgregarArticulo();

            agrArt.ShowDialog();
            this.Visible = true;
        }