示例#1
0
        private void Transaccion_Load(object sender, EventArgs e)
        {
            dataGridView1.Visible = false;
            n_cliente cliente = new n_cliente();

            data_Cliente.DataSource = cliente.getTabla();

            n_producto producto = new n_producto();

            dataProductos.DataSource = producto.getTabla();
        }
示例#2
0
        private void btnModificar_Click(object sender, EventArgs e)
        {
            n_producto producto = new n_producto();

            producto.actualizarProducto2(globalActualizar);

            ///System.IO.File.Move(nombreViejo + ".jpg", "newfilename");


            MessageBox.Show("Modificado correctamente");
            n_producto producto2 = new n_producto();

            dataProductos.DataSource = producto2.getTabla();
        }
示例#3
0
        private void btnEliminar_Click(object sender, EventArgs e)
        {
            ///MODIFICACIONES JOSE AL 2 DE FEBRERO
            n_detalle_de_venta reg2 = new n_detalle_de_venta();

            reg2.eliminarDetalle(global);

            ///MODIFICACIONES JOSE AL 2 DE FEBRERO
            n_producto reg = new n_producto();

            reg.eliminarProducto(global);
            MessageBox.Show("Eliminado correctamente");
            dataProductos.DataSource = reg.getTabla();
        }
示例#4
0
        private void btnLimpiar_Click(object sender, EventArgs e)
        {
            tbxAuxiliar.Text = String.Empty;
            tbxId.Text       = String.Empty;
            tbxNombre.Text   = String.Empty;
            //cbxMarca.Text = String.Empty;
            //cbxGenero.Text = String.Empty;
            //cbxPEGI.Text = String.Empty;
            tbx_genero.Text = String.Empty;
            tbx_Marca.Text  = String.Empty;
            tbx_Pegi.Text   = string.Empty;
            n_producto reg = new n_producto();

            dataProductos.DataSource = reg.getTabla();
        }
示例#5
0
        private void Agregar_Proveedor_Load(object sender, EventArgs e)
        {
            timer1.Enabled = true;
            n_proveedor reg = new n_proveedor();

            dgv_proveedor.DataSource = reg.getTabla();
            n_producto pro = new n_producto();

            dgv_productos.DataSource = pro.getTabla();
            int resu;

            resu            = reg.obtenerregistroproveedor();
            resu            = resu + 1;
            textBox_id.Text = resu.ToString();
        }
        private void Filtrar_Generos_Load(object sender, EventArgs e)
        {
            n_producto pro = new n_producto();

            dgv_productos.DataSource = pro.getTabla();

            n_genero generos = new n_genero();

            groupBox1.Visible      = false;
            groupBox2.Visible      = false;
            groupBox3.Visible      = false;
            dataGeneros.DataSource = generos.getTabla();


            timer1.Enabled = true;
        }
示例#7
0
        private void Filtrar_Marcas_Load(object sender, EventArgs e)
        {
            groupBox1.Visible = false;
            groupBox2.Visible = false;
            groupBox3.Visible = false;

            n_producto pro = new n_producto();

            dgv_prodcutos.DataSource = pro.getTabla();


            timer1.Enabled = true;
            n_marca marc = new n_marca();

            dataMarcas.DataSource = marc.getTabla();

            /// OJO!!! MODIFICACION DEL DIA 9/02

            ///tbx_id.Text = marc.get(posicion).getid_marca().ToString();
            ///tbx_nombre.Text = marc.get(posicion).getnombre();
            ///
            /// OJO!!! MODIFICACION DEL DIA 9/02
        }
示例#8
0
        private void Filtrar_Productos_Load(object sender, EventArgs e)
        {
            timer1.Enabled = true;
            n_producto producto = new n_producto();

            dataProductos.DataSource = producto.getTabla();

            //////////////////////////////
            ///



            /////

            n_genero gen = new n_genero();

            dataGenero.DataSource = gen.getTabla();
            int cantFilasGeneros = dataGenero.Rows.Count - 1;

            ///dataGenero.Columns["id_genero"].Visible = false;


            n_marca marc = new n_marca();

            dataMarca.DataSource = marc.getTabla();
            int cantFilasMarcas = dataMarca.Rows.Count - 1;


            n_pegi peg = new n_pegi();

            dataPegi.DataSource = peg.getTabla();
            int cantFilasPegis = dataPegi.Rows.Count - 1;



            //for (int i = 1; i <= cantFilasMarcas; i++)
            //{

            //    cbxMarca.Items.Add(marc.get(i).getid_marca());

            //}
            //for (int i = 1; i <= cantFilasGeneros; i++)
            //{
            //    cbxGenero.Items.Add(gen.get(i).getid_genero());

            //}

            //for (int i = 1; i <= cantFilasGeneros; i++)
            //{
            //    cbxPEGI.Items.Add(peg.get(i).getid_pegi());

            //}

            if (VariablesGlobales.tipoUsuario == "False")
            {
                btnModificar.Enabled = false;
            }
            if (VariablesGlobales.tipoUsuario == "False")
            {
                btnEliminar.Enabled = false;
            }
            if (VariablesGlobales.tipoUsuario == "False")
            {
                aviso.Visible = true;
            }
            if (VariablesGlobales.tipoUsuario == "True")
            {
                aviso.Visible = false;
            }


            //////////////////////////////
        }
示例#9
0
        private void btnFiltrar_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(tbxId.Text) && string.IsNullOrEmpty(tbxNombre.Text) &&
                string.IsNullOrEmpty(cbxGenero.Text) && string.IsNullOrEmpty(cbxMarca.Text) &&
                string.IsNullOrEmpty(cbxPEGI.Text) &&
                string.IsNullOrEmpty(tbxNombre.Text))
            {
                n_producto reg = new n_producto();
                dataProductos.DataSource = reg.getTabla();
            }

            if (!string.IsNullOrEmpty(tbxId.Text))
            {
                ((DataTable)dataProductos.DataSource).DefaultView.RowFilter = "id_producto=" + tbxId.Text;
            }

            if (!string.IsNullOrEmpty(tbx_Marca.Text))
            {
                ((DataTable)dataProductos.DataSource).DefaultView.RowFilter = "id_marca=" + tbx_Marca.Text;
            }

            if (!string.IsNullOrEmpty(tbx_genero.Text))
            {
                ((DataTable)dataProductos.DataSource).DefaultView.RowFilter = "id_genero=" + tbx_genero.Text;
            }

            if (!string.IsNullOrEmpty(tbx_Pegi.Text))
            {
                ((DataTable)dataProductos.DataSource).DefaultView.RowFilter = "id_pegi=" + tbx_Pegi.Text;
            }

            if (!string.IsNullOrEmpty(tbxNombre.Text))
            {
                ((DataTable)dataProductos.DataSource).DefaultView.RowFilter = "nombre=" + "'" + tbxNombre.Text + "'";
            }



            //resumen.Text = tbxId.Text + tbxNombre.Text + cbxGenero.Text + cbxMarca.Text + cbxPEGI.Text;

            //((DataTable)dataProductos.DataSource).DefaultView.RowFilter = "id_marca=" + cbxMarca.Text
            //                                                             + " AND " + " id_genero=" + cbxGenero.Text;

            ///****************************************************************************************
            //if (!string.IsNullOrEmpty(tbxId.Text) && !string.IsNullOrEmpty(tbxNombre.Text))
            //{
            //    ((DataTable)dataProductos.DataSource).DefaultView.RowFilter = "id_producto=" + tbxId.Text + "AND nombre =" + "'" + tbxNombre.Text + "'";
            //}

            if (!string.IsNullOrEmpty(tbx_genero.Text) && !string.IsNullOrEmpty(tbx_Marca.Text))
            {
                ((DataTable)dataProductos.DataSource).DefaultView.RowFilter = "id_genero=" + tbx_genero.Text + "AND id_marca =" + "'" + tbx_Marca.Text + "'";
            }

            if (!string.IsNullOrEmpty(tbx_genero.Text) && !string.IsNullOrEmpty(tbx_Pegi.Text))
            {
                ((DataTable)dataProductos.DataSource).DefaultView.RowFilter = "id_genero=" + tbx_genero.Text + "AND id_pegi =" + "'" + tbx_Pegi.Text + "'";
            }

            if (!string.IsNullOrEmpty(tbx_Marca.Text) && !string.IsNullOrEmpty(tbx_Pegi.Text))
            {
                ((DataTable)dataProductos.DataSource).DefaultView.RowFilter = "id_marca=" + tbx_Marca.Text + "AND id_pegi =" + "'" + tbx_Pegi.Text + "'";
            }

            if (!string.IsNullOrEmpty(tbx_genero.Text) && !string.IsNullOrEmpty(tbx_Marca.Text) && !string.IsNullOrEmpty(tbx_Pegi.Text))
            {
                ((DataTable)dataProductos.DataSource).DefaultView.RowFilter = "id_genero=" + tbx_genero.Text + "AND id_marca =" + "'" + tbx_Marca.Text + "'" + "AND id_pegi =" + "'" + tbx_Pegi.Text + "'";
            }

            //dv.RowFilter = "id > 0 AND index = 4";
        }