예제 #1
0
        private void btnGuardar_Click(object sender, EventArgs e)
        {
            Caja c = new Caja();

            try
            {
                sueldoPlanchere = (int)(float.Parse(txtTotalHorasP.Text) * int.Parse(txtValorHoraP.Text));
                txtTotalP.Text  = sueldoPlanchere + "";
                sueldoCajere    = (int)((float.Parse(txtTotalHorasC.Text) * int.Parse(txtValorHoraC.Text)));
                txtTotalC.Text  = sueldoCajere + "";
                if (cBoxRutPlanchero.SelectedItem != null)
                {
                    rutP = cBoxRutPlanchero.SelectedItem.ToString();
                }
                if (cBoxRutCajero.SelectedItem != null)
                {
                    rutC = cBoxRutCajero.SelectedItem.ToString();
                }
                nombreC = labelNombreCajero.Text;
                nombreP = labelNombrePlanchero.Text;
                c.Show();
                this.Close();
            }
            catch (FormatException)
            {
                MessageBox.Show("Falta un dato importante!!!\nPor favor, revise las casillas ", "Falta datos!!", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1);
            }
        }
예제 #2
0
        private void btnVolver_Click(object sender, EventArgs e)
        {
            Caja c = new Caja();

            c.Show();
            this.Close();
        }
예제 #3
0
        private void btnCaja_Click(object sender, EventArgs e)
        {
            Caja ca = new Caja();

            ca.Show();
            this.Close();
        }
예제 #4
0
        private void btnGuardar_Click(object sender, EventArgs e)
        {
            if (txtDescripcion1.Text != "" && txtMonto1.Text != "")
            {
                if (txtDescripcion1.Text != "" && txtMonto1.Text != "")
                {
                    detalleG = detalleG + "Descripcion 1: " + txtDescripcion1.Text + ", Monto: " + txtMonto1.Text;
                    totalG   = totalG + int.Parse(txtMonto1.Text);
                }
                if (txtDescripcion2.Text != "" && txtMonto2.Text != "")
                {
                    detalleG = detalleG + "\nDescripcion 2: " + txtDescripcion2.Text + ", Monto: " + txtMonto2.Text;
                    totalG   = totalG + int.Parse(txtMonto2.Text);
                }
                if (txtDescripcion3.Text != "" && txtMonto3.Text != "")
                {
                    detalleG = detalleG + "\nDescripcion 3: " + txtDescripcion3.Text + ", Monto: " + txtMonto3.Text;
                    totalG   = totalG + int.Parse(txtMonto3.Text);
                }
                if (txtDescripcion4.Text != "" && txtMonto4.Text != "")
                {
                    detalleG = detalleG + "\nDescripcion 4: " + txtDescripcion4.Text + ", Monto: " + txtMonto4.Text;
                    totalG   = totalG + int.Parse(txtMonto4.Text);
                }
                if (txtDescripcion5.Text != "" && txtMonto5.Text != "")
                {
                    detalleG = detalleG + "\nDescripcion 5: " + txtDescripcion5.Text + ", Monto: " + txtMonto5.Text;
                    totalG   = totalG + int.Parse(txtMonto5.Text);
                }
                if (txtDescripcion6.Text != "" && txtMonto6.Text != "")
                {
                    detalleG = detalleG + "\nDescripcion 6: " + txtDescripcion6.Text + ", Monto: " + txtMonto6.Text;
                    totalG   = totalG + int.Parse(txtMonto6.Text);
                }
                MessageBox.Show("Se ha agregado los siguientes gastos: \n" + detalleG + " \nTotal: $" + totalG, "Gastos agregados", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1);

                Caja ca = new Caja();
                ca.Show();
                numCasilleros = 0;
                this.Close();
            }
            else
            {
                MessageBox.Show("Por favor, ingrese los datos solicitados", "Casillero vacío", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1);
            }
        }
예제 #5
0
        private void btnGuardar_Click(object sender, EventArgs e)
        {
            Caja c         = new Caja();
            int  veintemil = (int)(numeric20K.Value * 20000);
            int  diezmil   = (int)(numeric10K.Value * 10000);
            int  cincomil  = (int)(numeric5K.Value * 5000);
            int  dosmil    = (int)(numeric2K.Value * 2000);
            int  mil       = (int)(numeric1K.Value * 1000);
            int  quiniento = (int)(numeric500.Value * 500);
            int  cien      = (int)(numeric100.Value * 100);
            int  cincuenta = (int)(numeric50.Value * 50);
            int  diez      = (int)(numeric10.Value * 10);

            total = veintemil + diezmil + cincomil + dosmil + mil + quiniento + cien + cincuenta + diez;
            this.Close();

            c.Show();
        }