コード例 #1
0
        private void btnBuscar_Click(object sender, EventArgs e)
        {
            if (!string.IsNullOrEmpty(txtnom.Text) == false)
            {
                MessageBox.Show("Llene todos los campos obligatorios");
                return;
            }
            if (!string.IsNullOrEmpty(txtcant.Text) == false)
            {
                MessageBox.Show("Llene todos los campos obligatorios");
                return;
            }
            if (!string.IsNullOrEmpty(txtUnidad.Text) == false)
            {
                MessageBox.Show("Llene todos los campos obligatorios");
                return;
            }
            int ver = Base_de_datos.validarNomRopa(txtnom.Text);

            if (ver != 1)
            {
                MessageBox.Show("Prenda ya existente");
                return;
            }
            Base_de_datos.Registro_Ropa(1, txtnom.Text, int.Parse(txtcant.Text), txtUnidad.SelectedItem.ToString());
            MessageBox.Show("Prenda Ingresada con exito");
            Busqueda_ropa a    = new Busqueda_ropa();
            Base_de_datos busc = new Base_de_datos();

            busc.BuscarRopaNom1("");
            a.dataGridView1.DataSource = busc.Mostrar_Resultados();
            this.Hide();
        }
コード例 #2
0
 private void txtCod_TextChanged(object sender, EventArgs e)
 {
     if (radioButton1.Checked && txtnom.TextLength >= 0)
     {
         Base_de_datos busc = new Base_de_datos();
         busc.BuscarRopaNom1(txtnom.Text.ToUpper());
         dataGridView1.DataSource = busc.Mostrar_Resultados();
     }
     else if (radioButton2.Checked && txtCod.TextLength == 0)
     {
         Base_de_datos busc = new Base_de_datos();
         busc.BuscarRopaNom1("");
         dataGridView1.DataSource = busc.Mostrar_Resultados();
     }
     else if (radioButton2.Checked && txtCod.TextLength >= 1)
     {
         Base_de_datos busc = new Base_de_datos();
         busc.BuscarRopaNom1(txtCod.Text);
         dataGridView1.DataSource = busc.Mostrar_Resultados();
     }
     else
     {
         dataGridView1.DataSource = null;
     }
     lblCan.Text    = "*";
     lblNom.Text    = "*";
     lblDes.Text    = "*";
     lblCod.Text    = "*";
     label10.Text   = "*";
     btnIng.Enabled = false;
 }
コード例 #3
0
        private void btnIng_Click(object sender, EventArgs e)
        {
            Base_de_datos.CodMed     = lblCod.Text;
            Base_de_datos.nommedi    = lblNom.Text;
            Base_de_datos.cant       = lblCan.Text;
            dataGridView1.DataSource = null;
            lblCan.Text    = "*";
            lblNom.Text    = "*";
            lblDes.Text    = "*";
            lblCod.Text    = "*";
            label10.Text   = "*";
            txtCod.Text    = "";
            txtnom.Text    = "";
            btnIng.Enabled = false;

            ingresoPrendaExisntente a = new ingresoPrendaExisntente();

            a.ShowDialog();
            if (a.DialogResult == DialogResult.OK)
            {
                Base_de_datos busc = new Base_de_datos();
                busc.BuscarRopaNom1("");
                dataGridView1.DataSource = busc.Mostrar_Resultados();
            }
        }
コード例 #4
0
        public Busqueda_ropa()
        {
            InitializeComponent();
            Base_de_datos busc = new Base_de_datos();

            busc.BuscarRopaNom1("");
            dataGridView1.DataSource = busc.Mostrar_Resultados();
        }
コード例 #5
0
        private void button1_Click(object sender, EventArgs e)
        {
            Base_de_datos.CodMed  = lblCod.Text;
            Base_de_datos.nommedi = lblNom.Text;
            Base_de_datos.cant    = lblCan.Text;
            Base_de_datos.cate    = label10.Text;
            Base_de_datos.estadoE = lblDes.Text;
            Modificar_ropa a = new Modificar_ropa();

            a.ShowDialog();
            if (a.DialogResult == DialogResult.OK)
            {
                Base_de_datos busc = new Base_de_datos();
                busc.BuscarRopaNom1("");
                dataGridView1.DataSource = busc.Mostrar_Resultados();
            }
        }