Beispiel #1
0
 private void IDCanje_KeyPress(object sender, KeyPressEventArgs e)
 {
     if (e.KeyChar == (int)Keys.Enter)
     {
         if (IDCanje.Text.Length != 0)
         {
             if (proceso.ExistenciaCampo("Codigo", "Vva_producto", "Codigo = '" + IDCanje.Text + "'"))
             {
                 NmCanje.Text = proceso.ConsultarCadena("descripcion", "Vva_producto", "Codigo = '" + IDCanje.Text + "'");
             }
             else
             {
                 MessageBox.Show("codigo no existe");
             }
         }
         else
         {
             Maestro.frmProducto msproducto = new Maestro.frmProducto();
             proceso.consultar("select Codigo,Descripcion,Unidad,Fisico,Disponible from Vva_producto where activo = 1", "Producto");
             msproducto.gridControl1.DataSource = proceso.ds.Tables["Producto"];
             msproducto.gridView1.OptionsView.ShowGroupPanel = false;
             msproducto.gridView1.OptionsView.ShowIndicator  = false;
             msproducto.gridView1.BestFitColumns();
             msproducto.pasar        += new Maestro.frmProducto.variables(camposproductocanje);
             msproducto.StartPosition = FormStartPosition.CenterScreen;
             msproducto.ShowDialog();
         }
     }
 }
Beispiel #2
0
 private void IDCanje_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
 {
     Maestro.frmProducto msproducto = new Maestro.frmProducto();
     msproducto.gridView1.BestFitColumns();
     msproducto.pasar        += new Maestro.frmProducto.variables(camposproductocanje);
     msproducto.StartPosition = FormStartPosition.CenterScreen;
     msproducto.ShowDialog();
 }
Beispiel #3
0
        private void VARIABLE_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
        {
            var proceso = new Libreria.Rutina();

            switch (TPSEARCH.SelectedIndex)
            {
            case 0:
                var FormularioA = new Maestro.frmProveedor();
                FormularioA.pasar += new Maestro.frmProveedor.variables(IDProveedor);
                proceso.consultar("select Proveedor, razonsocial as Nombre,ruc,direccion from proveedor", "proveedor");
                FormularioA.gridControl1.DataSource = proceso.ds.Tables["proveedor"];
                FormularioA.gridView1.OptionsView.ShowGroupPanel = false;
                FormularioA.gridView1.BestFitColumns();
                FormularioA.StartPosition = FormStartPosition.CenterScreen;
                FormularioA.ShowDialog();
                break;

            case 1:
                var FormularioB = new Maestro.frmMarca();
                FormularioB.pasar += new Maestro.frmMarca.variables(IDMarca);
                proceso.consultar("select Marca, Descripcion from MARCA order by Proveedor,Descripcion,Orden", "Marca");
                FormularioB.gridControl1.DataSource = proceso.ds.Tables["Marca"];
                FormularioB.gridView1.OptionsView.ShowGroupPanel = false;
                FormularioB.gridView1.BestFitColumns();
                FormularioB.StartPosition = FormStartPosition.CenterScreen;
                FormularioB.ShowDialog();
                break;

            case 2:
                var FormularioC = new Maestro.frmLinea();
                FormularioC.pasar += new Maestro.frmLinea.variables(IDLinea);
                proceso.consultar("select Linea,Descripcion from LINEA order by Linea,Descripcion,orden", "Linea");
                FormularioC.gridControl1.DataSource = proceso.ds.Tables["Linea"];
                FormularioC.gridView1.OptionsView.ShowGroupPanel = false;
                FormularioC.gridView1.BestFitColumns();
                FormularioC.StartPosition = FormStartPosition.CenterScreen;
                FormularioC.ShowDialog();
                break;

            case 3:
                var FormularioD = new Maestro.frmProducto();
                FormularioD.pasar += new Maestro.frmProducto.variables(IDProducto);
                proceso.consultar("select Linea,Descripcion from LINEA order by Linea,Descripcion,orden", "Linea");
                FormularioD.gridControl1.DataSource = proceso.ds.Tables["Linea"];
                FormularioD.gridView1.OptionsView.ShowGroupPanel = false;
                FormularioD.gridView1.BestFitColumns();
                FormularioD.StartPosition = FormStartPosition.CenterScreen;
                FormularioD.ShowDialog();
                break;
            }
        }
Beispiel #4
0
        private void btnAgregar_Click(object sender, EventArgs e)
        {
            switch (BoxTipoAsociado.EditValue)
            {
            case 1:
                Maestro.frmMarca msmarca = new Maestro.frmMarca();
                proceso.consultar("select Marca,Descripcion from Marca", "Marca");
                msmarca.gridControl1.DataSource = proceso.ds.Tables["Marca"];
                msmarca.gridView1.OptionsView.ShowGroupPanel = false;
                msmarca.gridView1.BestFitColumns();
                msmarca.pasar += new Maestro.frmMarca.variables(camposmarca);
                msmarca.ShowDialog();
                break;

            case 2:
                Maestro.frmLinea mslinea = new Maestro.frmLinea();
                proceso.consultar("select Linea,Descripcion from Linea", "Linea");
                mslinea.gridControl1.DataSource = proceso.ds.Tables["Linea"];
                mslinea.gridView1.OptionsView.ShowGroupPanel = false;
                mslinea.gridView1.BestFitColumns();
                mslinea.pasar += new Maestro.frmLinea.variables(camposlinea);
                mslinea.ShowDialog();
                break;

            case 3:
                Maestro.frmGrupo msgroup = new Maestro.frmGrupo();
                proceso.consultar("select grupo,descrip from grupo", "Grupo");
                msgroup.gridControl1.DataSource = proceso.ds.Tables["Grupo"];
                msgroup.gridView1.OptionsView.ShowGroupPanel = false;
                msgroup.gridView1.BestFitColumns();
                msgroup.pasar += new Maestro.frmGrupo.variables(camposgrupo);
                msgroup.ShowDialog();
                break;

            case 4:
                Maestro.frmProducto msproducto = new Maestro.frmProducto();
                msproducto.gridView1.BestFitColumns();
                msproducto.pasar        += new Maestro.frmProducto.variables(camposproducto);
                msproducto.StartPosition = FormStartPosition.CenterScreen;
                msproducto.ShowDialog();
                break;
            }
        }