Esempio n. 1
0
        private void BuscarBtn_Click(object sender, EventArgs e)
        {
            ProductoResultsFrm pfrm;
            string             proveedor   = null;
            string             categoria   = null;
            string             descripcion = null;

            if (!ListTodoChk.Checked && !this.ProveedorChk.Checked && !this.CategoriaChk.Checked && !this.DescripcionChk.Checked)
            {
                MessageBox.Show("Tiene que ingresar criterio de busqueda", "Faltan criterios...", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                return;
            }

            if (this.ProveedorChk.Checked)
            {
                proveedor = this.ProveedorTxt.Text;
            }
            if (this.CategoriaChk.Checked)
            {
                categoria = this.CategoriaTxt.Text;
            }
            if (this.DescripcionChk.Checked)
            {
                descripcion = this.DescripcionTxt.Text;
            }

            pfrm = new ProductoResultsFrm();

            if (this.operacion == OperacionForm.frmConsulta)
            {
                pfrm.NewListado();
            }
            Cursor.Current = Cursors.WaitCursor;
            this.Visible   = false;
            pfrm.ResultadosProducto(proveedor, categoria, descripcion);
            this.Dispose();
        }