示例#1
0
        private void btnEliminar_Click(object sender, EventArgs e)
        {
            if (click == 0)
            {
                //MessageBox.Show(Convert.ToString(Click));
                MessageBox.Show("Debes seleccionar un item de la lista.");
            }

            else
            {
                //MessageBox.Show(Convert.ToString(ListaDeEmpleados.SelectedIndices.Count));
                try
                {
                    maquillaje = ObtenerValoresDeLosText();

                    //Llamo al metodo de modificar(DELETE)
                    maquillaje.Eliminar(maquillaje);

                    CargarDatosDeLaLista();

                    VaciarTextBox();

                    click = 0;
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.ToString());
                }
            }
        }
示例#2
0
        private void button5_Click(object sender, EventArgs e)
        {
            try
            {
                maquillaje = ObtenerValoresDeLosText();

                //Llamo al metodo de modificar(UPDATE)
                maquillaje.Modificar(maquillaje);

                //Mostrar los botones y paneles a su estado natural
                btnModificar.Visible = true;
                btnEliminar.Visible  = true;

                CambiarDeColorElPanele(panel10, false);

                CambiarDeColorElPanele(panel12, false);
                CambiarDeColorElPanele(panel13, false);
                CambiarDeColorElPanele(panel14, false);
                CambiarDeColorElPanele(panel15, false);


                CambiarDeColorElPanele(panel8, false);

                CambiarDeColorElPanele(panel6, false);
                CambiarDeColorElPanele(panel9, false);


                //Restauro el valor de click para cuando se realiza otra seleccion la evalue
                click = 0;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }
示例#3
0
        private void ValoresParaLosTextDesdeObejto(claseMaquillaje maquillaje)
        {
            txtCantidad.Text    = maquillaje.cantidad;
            txtDescripcion.Text = maquillaje.descripcion;

            txtNumero.Text   = maquillaje.tonoNumero;
            txtMarca.Text    = maquillaje.marca;
            txtNombre.Text   = maquillaje.nombreDelProducto;
            txtPrecio.Text   = maquillaje.precioUnitario;
            txtProvedor.Text = maquillaje.proveedor.ToString();
        }
示例#4
0
        private void ListaMaquillaje_SelectedIndexChanged(object sender, EventArgs e)
        {
            try
            {
                maquillaje = maquillaje.BuscarID(Convert.ToInt32(ListaMaquillaje.Text));


                ValoresParaLosTextDesdeObejto(maquillaje);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }
示例#5
0
        private claseMaquillaje ObtenerValoresDeLosText()
        {
            claseMaquillaje unMaquillaje = new claseMaquillaje();

            unMaquillaje.IdCodigoDeBarra = Convert.ToInt32(ListaMaquillaje.Text);
            unMaquillaje.cantidad        = txtCantidad.Text;
            unMaquillaje.descripcion     = txtDescripcion.Text;

            unMaquillaje.marca             = txtMarca.Text;
            unMaquillaje.nombreDelProducto = txtNombre.Text;
            unMaquillaje.tonoNumero        = txtNumero.Text;
            unMaquillaje.precioUnitario    = txtPrecio.Text;
            unMaquillaje.proveedor         = Convert.ToInt32(txtProvedor.Text);

            return(unMaquillaje);
        }
示例#6
0
 public Ins_Maquillaje()
 {
     InitializeComponent();
     maquillaje = new claseMaquillaje();
 }