Ejemplo n.º 1
0
        private void BuscarBtn_Click(object sender, EventArgs e)
        {
            ProveedorResultsFrm pfrm;
            string nombre = null;

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

            if (this.NombreChk.Checked)
            {
                nombre = this.NombreTxt.Text;
            }
            pfrm = new ProveedorResultsFrm();
            if (this.operacion == OperacionForm.frmConsulta)
            {
                pfrm.NewListado();
            }
            Cursor.Current = Cursors.WaitCursor;
            this.Visible   = false;
            pfrm.ResultadosProveedor(nombre);
            this.Dispose();
        }
Ejemplo n.º 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            ProveedorResultsFrm pfrm;
            int    id_prove = 0;
            string nombre   = null;


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


            //if (!checkBox2.Checked && this.checkBox1.Checked)
            //  nombre = this.NombreTxt.Text;
            if (!checkBox3.Checked && this.checkBox1.Checked)
            {
                id_prove = Convert.ToInt32(this.IdProveeTxt.Text);
            }
            //Convert.ToInt32(this.IdProveeTxt.Text);
            nombre         = NombreTxt.Text;
            pfrm           = new ProveedorResultsFrm();
            Cursor.Current = Cursors.WaitCursor;
            this.Visible   = false;

            pfrm.ResultadosProveedor(id_prove, nombre);

            this.Dispose();
        }