예제 #1
0
        private void button3_Click(object sender, EventArgs e)
        {
            FormListaClientes fm = new FormListaClientes();

            fm.FormClosed += new FormClosedEventHandler(MostrarFormLogoAlCerrarForms);
            AbrirFormEnPanel(fm);
        }
예제 #2
0
        private void btnBuscar_Click(object sender, EventArgs e)
        {
            FormListaClientes hijo = new FormListaClientes();

            AddOwnedForm(hijo);
            hijo.FormBorderStyle = FormBorderStyle.None;
            hijo.TopLevel        = false;
            hijo.Dock            = DockStyle.Fill;
            this.Controls.Add(hijo);
            this.Tag = hijo;
            hijo.BringToFront();

            hijo.Show();

            String sql = "SELECT * FROM alumnos ";

            sql += "WHERE 1=1 ";

            if (this.txtdni.Text.Trim() != "")
            {
                sql += " and dni = '" + this.txtdni.Text + "' ";
            }

            if (this.txtnombre.Text.Trim() != "")
            {
                sql += " and nombre LIKE '" + this.txtnombre.Text + "' ";
            }

            if (this.txtapellido.Text.Trim() != "")
            {
                sql += " and apellidos LIKE '" + this.txtapellido.Text + "' ";
            }

            if (radioButton1.Checked)
            {
                sql += " and teorico = " + radioButton1.Checked;
            }

            if (radioButton2.Checked)
            {
                sql += " and renovar_sino = " + radioButton2.Checked;
            }

            if (radioButton3.Checked)
            {
                sql += " and debe > 0";
            }

            if (this.txtRegistro.Text.Trim() != "")
            {
                sql += " and num_registro = '" + this.txtRegistro.Text + "' ";
            }

            if (radioButton4.Checked)
            {
                sql += " and traslado > 0";
            }

            if (radioButton6.Checked)
            {
                sql += " and practico = " + radioButton6.Checked;
            }



            hijo.cargarTabla(sql);
        }
예제 #3
0
        private void btnBuscar_Click(object sender, EventArgs e)
        {
            bool existeMensaje     = false;
            FormListaClientes hijo = new FormListaClientes();

            AddOwnedForm(hijo);
            hijo.FormBorderStyle = FormBorderStyle.None;
            hijo.TopLevel        = false;
            hijo.Dock            = DockStyle.Fill;
            this.Controls.Add(hijo);
            this.Tag = hijo;
            hijo.BringToFront();

            hijo.Show();

            String sql = "SELECT * FROM alumnos ";

            sql += "WHERE 1=1 ";

            if (this.txtRegistro.Text.Trim() != "")
            {
                sql += " and num_registro = '" + this.txtRegistro.Text + "' ";

                if (!existeMensaje)
                {
                    MessageBox.Show("Buscar alumnos Por el Numero  Expediente");
                    existeMensaje = true;
                }
            }

            if (this.txtdni.Text.Trim() != "")

            {
                sql += " and dni = '" + this.txtdni.Text + "' ";

                if (!existeMensaje)
                {
                    MessageBox.Show("Buscar alumnos Por el DNI ");
                    existeMensaje = true;
                }
            }

            if (this.txtnombre.Text.Trim() != "")
            {
                sql += " and nombre LIKE '" + this.txtnombre.Text + "' ";

                if (!existeMensaje)
                {
                    MessageBox.Show("Buscar alumnos Por el Nombre");
                    existeMensaje = true;
                }
            }

            if (this.txtapellido.Text.Trim() != "")
            {
                sql += " and apellidos LIKE '" + this.txtapellido.Text + "' ";

                if (!existeMensaje)
                {
                    MessageBox.Show("Buscar alumnos Por los  Apellidos");
                    existeMensaje = true;
                }
            }

            if (radioButton1.Checked)
            {
                sql += " and teorico = " + radioButton1.Checked;

                if (!existeMensaje)
                {
                    MessageBox.Show("Buscar alumnos Por Teorico Aprobado");
                    existeMensaje = true;
                }
            }

            if (radioButton6.Checked)
            {
                sql += " and practico = " + radioButton6.Checked;

                if (!existeMensaje)
                {
                    MessageBox.Show("Buscar alumnos que Tienen Aprobado el Carnet");
                    existeMensaje = true;
                }
            }
            if (radioButton2.Checked)
            {
                sql += " and renovar_sino = " + radioButton2.Checked;

                if (!existeMensaje)
                {
                    MessageBox.Show("Buscar alumnos que Tienen que Renovar Expediente");
                    existeMensaje = true;
                }
            }

            if (radioButton3.Checked)
            {
                sql += " and debe > 0";

                if (!existeMensaje)
                {
                    MessageBox.Show("Buscar alumnos que Deben Dinero");
                    existeMensaje = true;
                }
            }

            if (radioButton4.Checked)
            {
                sql += " and traslado > 0";

                if (!existeMensaje)
                {
                    MessageBox.Show("Buscar alumnos que Vienen de Traslados");
                    existeMensaje = true;
                }
            }

            hijo.cargarTabla(sql);
        }