コード例 #1
0
        private void UpdateProduct()
        {
            if (this.dataGridView1.RowCount <= 0)
            {
                var tooltip = new ToolTip();
                tooltip.Show("Seleccione un producto en la lista para usar esta opción", EditProduct);
                return;
            }
            Producto     product     = new Producto(dataGridView1.CurrentRow.Cells["Código de Barras"].Value.ToString());
            Form_Agregar formAgregar = new Form_Agregar(product);

            formAgregar.Show();
        }
コード例 #2
0
        private void OpenProduct(int rowindex)
        {
            var barcode = dataGridView1.Rows[rowindex].Cells["barcode"].Value.ToString();

            if (Producto.SearchProduct(barcode))
            {
                Form_Agregar form = new Form_Agregar(new Producto(barcode));
                form.Show();
            }

            else
            {
                dataGridView1.Rows.Remove(dataGridView1.Rows[rowindex]);
            }
        }
コード例 #3
0
        private void openProduct(string barcode)
        {
            Form_Agregar form = new Form_Agregar(new Producto(barcode));

            if (form.ShowDialog() == DialogResult.OK)
            {
                foreach (Control control in flowLayoutPanel1.Controls)
                {
                    if (control.Name == barcode)
                    {
                        flowLayoutPanel1.Controls.Remove(control);
                        break;
                    }
                }
            }
        }
コード例 #4
0
        private void AddButton_Click(object sender, EventArgs e)
        {
            Form_Agregar formAgregar = new Form_Agregar();

            formAgregar.Show();
        }