Ejemplo n.º 1
0
        private void tbIdLocalizacion_Click(object sender, EventArgs e)
        {
            Seleccionar s = new Seleccionar("ListarLocalizaciones", "Localizacion", "Seleccione la localización");

            s.Text = "Catálogo de localizaciones";

            DialogResult res = s.ShowDialog();

            if (res == DialogResult.OK)
            {
                tbIdLocalizacion.Text = s.Id.ToString();
            }
        }
Ejemplo n.º 2
0
        private void tbIdArticulo_Click(object sender, EventArgs e)
        {
            Seleccionar s = new Seleccionar("ListarArticulos", "Articulo", "Seleccione el artículo:");

            s.Text = "Catálogo de artículos";

            DialogResult res = s.ShowDialog();

            if (res == DialogResult.OK)
            {
                tbIdArticulo.Text = s.Id.ToString();
            }
        }
Ejemplo n.º 3
0
        private void tbIdGrupo_Click(object sender, EventArgs e)
        {
            Seleccionar s = new Seleccionar("ListarGrupos", "Grupo", "Seleccione un grupo");

            s.Text = "Catálogo de grupos";

            DialogResult res = s.ShowDialog();

            if (res == DialogResult.OK)
            {
                tbIdGrupo.Text = s.Id.ToString();
            }
        }
Ejemplo n.º 4
0
        private void dgvArticulos_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            Seleccionar s = new Seleccionar("ListarArticulos", "Articulo", "Seleccione un artículo:");

            s.Text = "Catálogo de artículos";

            DialogResult res = s.ShowDialog();

            if (res == DialogResult.OK)
            {
                dgvArticulos.CurrentRow.Cells[0].Value = s.Id;
            }
        }
Ejemplo n.º 5
0
        private void tbIdArticulo_Click(object sender, EventArgs e)
        {
            String      sql        = "exec ListarArticulos;";
            String      tituloForm = "Catálogo de artículos";
            String      textLabel  = "Seleccione un artículos:";
            Seleccionar s          = new Seleccionar(sql, "Articulo", textLabel);

            s.Text = tituloForm;

            DialogResult res = s.ShowDialog();

            if (res == DialogResult.OK)
            {
                //txtIdArticulo.Text = s.Id.ToString();
            }
        }
Ejemplo n.º 6
0
        private void tbIdProveedor_Click(object sender, EventArgs e)
        {
            String      sql        = "exec ListarProveedores;";
            String      tituloForm = "Catálogo de proveedores";
            String      textLabel  = "Seleccione un proveedor:";
            Seleccionar s          = new Seleccionar(sql, "Proveedor", textLabel);

            s.Text = tituloForm;

            DialogResult res = s.ShowDialog();

            if (res == DialogResult.OK)
            {
                try
                {
                    tbIdProveedor.Text = s.Id.ToString();
                }
                catch (Exception ex)
                {
                    MessageBox.Show("Algo salió mal. " + ex.Message, "Mensaje de error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
        }