Exemplo n.º 1
0
        private void frmGestionGlobal_Load(object sender, EventArgs e)
        {
            egreso = new GlobalEgreso();
            ingreso = new GlobalIngreso();

            ingresoEfectivo = new GlobalIngreso();
            ingresoCheque = new GlobalIngreso();
            ingresoTarjeta = new GlobalIngreso();
            ingresoTrans = new GlobalIngreso();

            this.calcular();

            if (this.efectivoTotal == 0 && this.bancoTotal == 0 &&
                this.chequeTotal == 0 && this.globalTotal == 0 && this.tarjetaTotal == 0)
            {
                MessageBox.Show("Debe Inicializar los valores de la caja para continuar.");
                this.soloLectura();
            }
        }
Exemplo n.º 2
0
        private void buttonTerminar_Click(object sender, EventArgs e)
        {
            try
            {
                //Guardamos los valores finales para comenzar el siguiente dia
                GlobalIngreso caja = new GlobalIngreso();
                GlobalIngreso banco = new GlobalIngreso();
                GlobalIngreso cheque = new GlobalIngreso();
                GlobalIngreso global = new GlobalIngreso();
                GlobalIngreso tarjeta = new GlobalIngreso();

                caja.Fecha = this.dateTimePickerInicio.Value;
                banco.Fecha = this.dateTimePickerInicio.Value;
                cheque.Fecha = this.dateTimePickerInicio.Value;
                global.Fecha = this.dateTimePickerInicio.Value;
                tarjeta.Fecha = this.dateTimePickerInicio.Value;

                caja.Descripcion = "Inicialización";
                banco.Descripcion = "Inicialización";
                cheque.Descripcion = "Inicialización";
                global.Descripcion = "Inicialización";
                tarjeta.Descripcion = "Inicialización";

                caja.Importe = Convert.ToDouble(this.textEfectivoTotal.Text.Replace("$", ""));
                banco.Importe = Convert.ToDouble(this.textBancoTotal.Text.Replace("$", ""));
                cheque.Importe = Convert.ToDouble(this.textChequeTotal.Text.Replace("$", ""));
                global.Importe = Convert.ToDouble(this.textGlobalTotal.Text.Replace("$", ""));
                tarjeta.Importe = Convert.ToDouble(this.textTarjetaTotal.Text.Replace("$", ""));

                caja.Tipo = "EFECTIVO";
                banco.Tipo = "BANCO";
                cheque.Tipo = "CHEQUE";
                global.Tipo = "GLOBAL";
                tarjeta.Tipo = "TARJETA";

                caja.terminarJornada();
                banco.terminarJornada();
                cheque.terminarJornada();
                global.terminarJornada();
                tarjeta.terminarJornada();

            }
            catch (Exception ex)
            {
                MessageBox.Show("ERROR: "+ex, "Error");
                return;
            }
        }
Exemplo n.º 3
0
        public ArrayList coleccion(string fechaInicio, string fechaFin)
        {
            string SQL_p;
            MySqlDataReader Reader;
            ArrayList colIngresos = new ArrayList();

            SQL_p = "SELECT * FROM globalingresos "+
                    "WHERE fechaingreso BETWEEN '" + fechaInicio + "' AND '" + fechaFin + "' AND globalingresos.descripcioningreso != 'Inicialización'" +
                    "ORDER BY globalingresos.descripcioningreso";

            Reader = Conector.consultar(SQL_p);

            while (Reader.Read())
            {
                GlobalIngreso objIngreso = new GlobalIngreso();

                //Datos Ingreso
                objIngreso.IdIngreso = Reader.GetInt32("idglobalingresos");
                objIngreso.Descripcion = Reader.GetString("descripcioningreso");
                objIngreso.Importe = Reader.GetDouble("importeingreso");
                objIngreso.Fecha = Reader.GetDateTime("fechaingreso");
                objIngreso.Tipo = Reader.GetString("tipo");

                colIngresos.Add(objIngreso);
            }
            Reader.Close();
            return colIngresos;
        }
        private void frmAgregarEditarIngresoGlobal_Load(object sender, EventArgs e)
        {
            ingreso = new GlobalIngreso();
            if (flagEditar)
            {
                ingreso.IdIngreso = this.idIngreso;
                ingreso.getIngreso();

                this.dateTimePickerFecha.Value = ingreso.Fecha;
                this.textBoxDescripcion.Text = ingreso.Descripcion;
                this.textBoxImporte.Text = ingreso.Importe.ToString();
                this.comboBoxTipo.Text = ingreso.Tipo;

                this.buttonGuardar.Text = "Terminar";
                this.buttonGuardar.TextAlign = ContentAlignment.MiddleCenter;
                this.buttonGuardar.Image = null;

            }
        }
        private void frmIniciarCajaDiaria_Load(object sender, EventArgs e)
        {
            this.dateTimePickerFecha.Value = DateTime.Now.AddDays(-1);

            caja = new GlobalIngreso();
            banco = new GlobalIngreso();
            cheque = new GlobalIngreso();
            global = new GlobalIngreso();
            tarjeta = new GlobalIngreso();
        }