private void btnVolver_Click(object sender, EventArgs e)
        {
            Caja c = new Caja();

            c.Show();
            this.Close();
        }
Exemple #2
0
        public CerrarCaja()
        {
            InitializeComponent();
            //Carga los valores guardados de los otros form
            Caja c = new Caja();

            txtDineroCaja.Text   = c.getDineroEnCaja() + "";
            txtDineroFisico.Text = c.getDineroFisico() + "";

            aux            = c.getDineroFisico() - c.getDineroEnCaja();
            txtCuadre.Text = aux + "";
        }
        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);
            }
        }
        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();
        }