コード例 #1
0
        private void btnBuscar_Click(object sender, EventArgs e)
        {
            Clases.cFunciones fun = new Clases.cFunciones();
            if (fun.ValidarFecha(txtFechaDesde.Text) == false)
            {
                MessageBox.Show("Fecha desde incorrecta", Clases.cMensaje.Mensaje());
                return;
            }

            if (fun.ValidarFecha(txtFechaHasta.Text) == false)
            {
                MessageBox.Show("Fecha hasta incorrecta", Clases.cMensaje.Mensaje());
                return;
            }

            if (Convert.ToDateTime(txtFechaDesde.Text) > Convert.ToDateTime(txtFechaHasta.Text))
            {
                MessageBox.Show("La fecha desde debe ser inferior a la fecha hasta", Clases.cMensaje.Mensaje());
                return;
            }

            DateTime FechaDesde = Convert.ToDateTime(txtFechaDesde.Text);
            DateTime FechaHasta = Convert.ToDateTime(txtFechaHasta.Text);

            Clases.cGastosNegocio gasto = new Clases.cGastosNegocio();
            DataTable             trdo  = gasto.GetGastosNegocioxFecha(FechaDesde, FechaHasta, txtDescripcion.Text);

            trdo                      = fun.TablaaMiles(trdo, "Importe");
            txtTotal.Text             = fun.TotalizarColumna(trdo, "Importe").ToString();
            txtTotal.Text             = fun.FormatoEnteroMiles(txtTotal.Text);
            Grilla.DataSource         = trdo;
            Grilla.Columns[0].Visible = false;
            Grilla.Columns[2].Width   = 523;
        }
コード例 #2
0
        private void btnBuscar_Click(object sender, EventArgs e)
        {
            Clases.cFunciones fun = new Clases.cFunciones();
            if (fun.ValidarFecha(txtFechaDesde.Text) == false)
            {
                MessageBox.Show("Fecha desde incorrecta", Clases.cMensaje.Mensaje());
                return;
            }

            if (fun.ValidarFecha(txtFechaHasta.Text) == false)
            {
                MessageBox.Show("Fecha hasta incorrecta", Clases.cMensaje.Mensaje());
                return;
            }

            if (Convert.ToDateTime(txtFechaDesde.Text) > Convert.ToDateTime(txtFechaHasta.Text))
            {
                MessageBox.Show("La fecha desde debe ser inferior a la fecha hasta", Clases.cMensaje.Mensaje());
                return;
            }

            int Impago = 0;

            if (chkImpagos.Checked == true)
            {
                Impago = 1;
            }

            DateTime FechaDesde = Convert.ToDateTime(txtFechaDesde.Text);
            DateTime FechaHasta = Convert.ToDateTime(txtFechaHasta.Text);
            int      Impagos    = 0;

            if (chkImpagos.Checked == true)
            {
                Impagos = 1;
            }
            Clases.cChequesaPagar cheque = new Clases.cChequesaPagar();
            DataTable             trdo   = cheque.GetChequesPagar(FechaDesde, FechaHasta, Impago, txtPatente.Text);

            txtTotal.Text                = fun.TotalizarColumna(trdo, "Importe").ToString();
            txtTotal.Text                = fun.FormatoEnteroMiles(txtTotal.Text);
            trdo                         = fun.TablaaMiles(trdo, "Importe");
            trdo                         = fun.TablaaMiles(trdo, "Saldo");
            Grilla.DataSource            = trdo;
            Grilla.Columns[1].HeaderText = "Nro de cheque";
            Grilla.Columns[6].HeaderText = "Fecha Pago";
            Grilla.Columns[9].HeaderText = "Fecha Vto";
            Grilla.Columns[5].Width      = 130;
            Grilla.Columns[1].Width      = 140;
            Grilla.Columns[2].Width      = 150;
            Grilla.Columns[3].Width      = 100;
            Grilla.Columns[6].Width      = 110;
            Grilla.Columns[7].Width      = 180;
            Grilla.Columns[7].HeaderText = "Descripción";
            Grilla.Columns[0].Visible    = false;
        }
コード例 #3
0
        private void btnBuscar_Click(object sender, EventArgs e)
        {
            Clases.cFunciones fun = new Clases.cFunciones();
            if (fun.ValidarFecha(txtFechaDesde.Text) == false)
            {
                MessageBox.Show("Fecha desde incorrecta", Clases.cMensaje.Mensaje());
                return;
            }

            if (fun.ValidarFecha(txtFechaHasta.Text) == false)
            {
                MessageBox.Show("Fecha hasta incorrecta", Clases.cMensaje.Mensaje());
                return;
            }

            if (Convert.ToDateTime(txtFechaDesde.Text) > Convert.ToDateTime(txtFechaHasta.Text))
            {
                MessageBox.Show("La fecha desde debe ser inferior a la fecha hasta", Clases.cMensaje.Mensaje());
                return;
            }

            DateTime FechaDesde = Convert.ToDateTime(txtFechaDesde.Text);
            DateTime FechaHasta = Convert.ToDateTime(txtFechaHasta.Text);
            int      Impagos    = 0;
            Int32?   CodBanco   = null;
            string   NroCheque  = "";

            if (cmbBanco.SelectedIndex > 0)
            {
                CodBanco = Convert.ToInt32(cmbBanco.SelectedValue);
            }
            NroCheque = txtNumeroCheque.Text;
            if (chkImpagos.Checked == true)
            {
                Impagos = 1;
            }
            Clases.cCheque cheque = new Clases.cCheque();
            DataTable      trdo   = cheque.GetChequesxFecha(FechaDesde, FechaHasta, Impagos, CodBanco, NroCheque);

            trdo          = fun.TablaaMiles(trdo, "Importe");
            txtTotal.Text = fun.TotalizarColumna(trdo, "Importe").ToString();
            if (txtTotal.Text != "")
            {
                txtTotal.Text = fun.SepararDecimales(txtTotal.Text);
                txtTotal.Text = fun.FormatoEnteroMiles(txtTotal.Text);
            }
            Grilla.DataSource            = trdo;
            Grilla.Columns[1].Width      = 100;
            Grilla.Columns[1].HeaderText = "Fec. Cobro";
            Grilla.Columns[2].Width      = 100;
            Grilla.Columns[2].HeaderText = "Fecha Vto.";
            Grilla.Columns[3].Width      = 140;
            Grilla.Columns[3].HeaderText = "Nro. Cheque";
            Grilla.Columns[5].Width      = 220;
            Grilla.Columns[6].Visible    = false;
        }
コード例 #4
0
        private void CargarGrilla()
        {
            Clases.cFunciones fun = new Clases.cFunciones();
            if (fun.ValidarFecha(txtFechaDesde.Text) == false)
            {
                MessageBox.Show("Fecha desde incorrecta", Clases.cMensaje.Mensaje());
                return;
            }

            if (fun.ValidarFecha(txtFechaHasta.Text) == false)
            {
                MessageBox.Show("Fecha hasta incorrecta", Clases.cMensaje.Mensaje());
                return;
            }

            if (Convert.ToDateTime(txtFechaDesde.Text) > Convert.ToDateTime(txtFechaHasta.Text))
            {
                MessageBox.Show("La fecha desde debe ser inferior a la fecha hasta", Clases.cMensaje.Mensaje());
                return;
            }

            int soloImpago = 0;

            if (chkImpagos.Checked)
            {
                soloImpago = 1;
            }
            string Nombre = txtNombre.Text;

            Clases.cPrestamo prestamo   = new Clases.cPrestamo();
            DateTime         FechaDesde = Convert.ToDateTime(txtFechaDesde.Text);
            DateTime         FechaHasta = Convert.ToDateTime(txtFechaHasta.Text);
            DataTable        tb         = prestamo.GetPrestamosxFecha(FechaDesde, FechaHasta, Nombre, soloImpago);

            tb            = fun.TablaaMiles(tb, "Importe");
            tb            = fun.TablaaMiles(tb, "ImporteaPagar");
            txtTotal.Text = fun.TotalizarColumna(tb, "Importe").ToString();
            if (txtTotal.Text != "")
            {
                txtTotal.Text = fun.SepararDecimales(txtTotal.Text);
                txtTotal.Text = fun.FormatoEnteroMiles(txtTotal.Text);
            }
            Grilla.DataSource            = tb;
            Grilla.Columns[1].Width      = 290;
            Grilla.Columns[2].Width      = 170;
            Grilla.Columns[5].HeaderText = "Fecha";
            Grilla.Columns[5].Width      = 100;
            Grilla.Columns[7].HeaderText = "Importe a pagar";
            Grilla.Columns[7].Width      = 140;
            Grilla.Columns[8].HeaderText = "Fecha Pago";
            Grilla.Columns[8].Width      = 130;
            Grilla.Columns[0].Visible    = false;
            Grilla.Columns[4].Visible    = false;
        }
コード例 #5
0
        private void btnBuscar_Click(object sender, EventArgs e)
        {
            //arreglar que no graba el cod cliente en cobranza
            //en eo form de venta

            Clases.cFunciones fun = new Clases.cFunciones();
            if (fun.ValidarFecha(txtFechaDesde.Text) == false)
            {
                MessageBox.Show("Fecha desde incorrecta", Clases.cMensaje.Mensaje());
                return;
            }

            if (fun.ValidarFecha(txtFechaHasta.Text) == false)
            {
                MessageBox.Show("Fecha hasta incorrecta", Clases.cMensaje.Mensaje());
                return;
            }

            if (Convert.ToDateTime(txtFechaDesde.Text) > Convert.ToDateTime(txtFechaHasta.Text))
            {
                MessageBox.Show("La fecha desde debe ser inferior a la fecha hasta", Clases.cMensaje.Mensaje());
                return;
            }

            DateTime FechaDesde = Convert.ToDateTime(txtFechaDesde.Text);
            DateTime FechaHasta = Convert.ToDateTime(txtFechaHasta.Text);
            Int32    SoloImpago = 0;

            if (chkImpago.Checked == true)
            {
                SoloImpago = 1;
            }
            Clases.cCobranza cob  = new Clases.cCobranza();
            DataTable        trdo = cob.GetCobranzaxFecha(FechaDesde, FechaHasta, txtPatente.Text, txtApellido.Text, SoloImpago);

            trdo          = fun.TablaaMiles(trdo, "Saldo");
            txtTotal.Text = fun.TotalizarColumna(trdo, "Saldo").ToString();
            if (txtTotal.Text != "")
            {
                txtTotal.Text = fun.SepararDecimales(txtTotal.Text);
                txtTotal.Text = fun.FormatoEnteroMiles(txtTotal.Text);
            }
            trdo = fun.TablaaMiles(trdo, "Importe");
            Grilla.DataSource            = trdo;
            Grilla.Columns[4].HeaderText = "Fecha Pago";
            Grilla.Columns[6].HeaderText = "Fecha Comp.";
            Grilla.Columns[1].Width      = 150;
            Grilla.Columns[2].Width      = 200;
            Grilla.Columns[4].Width      = 120;
            Grilla.Columns[5].Width      = 120;
            Grilla.Columns[6].Width      = 158;
        }
コード例 #6
0
        private void btnBuscar_Click(object sender, EventArgs e)
        {
            Clases.cFunciones fun = new Clases.cFunciones();
            if (fun.ValidarFecha(txtFechaDesde.Text) == false)
            {
                MessageBox.Show("Fecha desde incorrecta", Clases.cMensaje.Mensaje());
                return;
            }

            if (fun.ValidarFecha(txtFechaHasta.Text) == false)
            {
                MessageBox.Show("Fecha hasta incorrecta", Clases.cMensaje.Mensaje());
                return;
            }

            if (Convert.ToDateTime(txtFechaDesde.Text) > Convert.ToDateTime(txtFechaHasta.Text))
            {
                MessageBox.Show("La fecha desde debe ser inferior a la fecha hasta", Clases.cMensaje.Mensaje());
                return;
            }

            int Impagos = 0;

            if (chkImpagos.Checked == true)
            {
                Impagos = 1;
            }

            Clases.cPrenda prenda     = new Clases.cPrenda();
            DateTime       FechaDesde = Convert.ToDateTime(txtFechaDesde.Text);
            DateTime       FechaHasta = Convert.ToDateTime(txtFechaHasta.Text);
            DataTable      trdo       = prenda.GetPrendasxFecha(FechaDesde, FechaHasta, Impagos, txtPatente.Text, txtApellido.Text);

            txtTotal.Text = fun.TotalizarColumna(trdo, "Importe").ToString();
            if (txtTotal.Text != "")
            {
                txtTotal.Text = fun.SepararDecimales(txtTotal.Text);
                txtTotal.Text = fun.FormatoEnteroMiles(txtTotal.Text);
            }
            trdo = fun.TablaaMiles(trdo, "Importe");
            trdo = fun.TablaaMiles(trdo, "ImportePagado");
            trdo = fun.TablaaMiles(trdo, "Diferencia");
            Grilla.DataSource            = trdo;
            Grilla.Columns[1].HeaderText = "Descripción";
            Grilla.Columns[1].Width      = 150;
            Grilla.Columns[2].Width      = 350;
            Grilla.Columns[5].HeaderText = "Fecha Pago";
            Grilla.Columns[5].Width      = 140;
            Grilla.Columns[6].Visible    = false;
            Grilla.Columns[7].HeaderText = "Pagado";
            Grilla.Columns[8].HeaderText = "Diferencia";
        }
コード例 #7
0
        private void btnBuscar_Click(object sender, EventArgs e)
        {
            Clases.cFunciones fun = new Clases.cFunciones();
            if (fun.ValidarFecha(txtFechaDesde.Text) == false)
            {
                MessageBox.Show("Fecha desde incorrecta", Clases.cMensaje.Mensaje());
                return;
            }

            if (fun.ValidarFecha(txtFechaHasta.Text) == false)
            {
                MessageBox.Show("Fecha hasta incorrecta", Clases.cMensaje.Mensaje());
                return;
            }

            if (Convert.ToDateTime(txtFechaDesde.Text) > Convert.ToDateTime(txtFechaHasta.Text))
            {
                MessageBox.Show("La fecha desde debe ser inferior a la fecha hasta", Clases.cMensaje.Mensaje());
                return;
            }

            DateTime FechaDesde = Convert.ToDateTime(txtFechaDesde.Text);
            DateTime FechaHasta = Convert.ToDateTime(txtFechaHasta.Text);
            int      SoloImpago = 0;

            if (chkSoloImpagos.Checked)
            {
                SoloImpago = 1;
            }
            cCobranzaGeneral cob  = new cCobranzaGeneral();
            DataTable        trdo = cob.GetCobranzasGeneralesxFecha(FechaDesde, FechaHasta, SoloImpago, txtConcepto.Text, txtCliente.Text);

            txtTotal.Text                = fun.TotalizarColumna(trdo, "Saldo").ToString();
            trdo                         = fun.TablaaMiles(trdo, "Importe");
            trdo                         = fun.TablaaMiles(trdo, "ImportePagado");
            trdo                         = fun.TablaaMiles(trdo, "Saldo");
            Grilla.DataSource            = trdo;
            Grilla.Columns[4].HeaderText = "Importe Pagado";
            Grilla.Columns[5].HeaderText = "Fecha Pago";
            Grilla.Columns[0].Visible    = false;
            Grilla.Columns[1].Width      = 240;
            Grilla.Columns[4].Width      = 140;
            Grilla.Columns[5].Width      = 120;
            Grilla.Columns[7].Width      = 120;
            if (txtTotal.Text != "" && txtTotal.Text != "0")
            {
                txtTotal.Text = fun.SepararDecimales(txtTotal.Text);
                txtTotal.Text = fun.FormatoEnteroMiles(txtTotal.Text);
            }
        }
コード例 #8
0
        private void btnBuscar_Click(object sender, EventArgs e)
        {
            Clases.cFunciones fun = new Clases.cFunciones();
            if (fun.ValidarFecha(txtFechaDesde.Text) == false)
            {
                MessageBox.Show("Fecha desde incorrecta", Clases.cMensaje.Mensaje());
                return;
            }

            if (fun.ValidarFecha(txtFechaHasta.Text) == false)
            {
                MessageBox.Show("Fecha hasta incorrecta", Clases.cMensaje.Mensaje());
                return;
            }

            if (Convert.ToDateTime(txtFechaDesde.Text) > Convert.ToDateTime(txtFechaHasta.Text))
            {
                MessageBox.Show("La fecha desde debe ser inferior a la fecha hasta", Clases.cMensaje.Mensaje());
                return;
            }

            DateTime FechaDesde = Convert.ToDateTime(txtFechaDesde.Text);
            DateTime FechaHasta = Convert.ToDateTime(txtFechaHasta.Text);
            int      Impagos    = 0;

            if (chkImpagos.Checked == true)
            {
                Impagos = 1;
            }
            //Clases.cFunciones fun = new Clases.cFunciones();
            Clases.cGastosPagar gasto = new Clases.cGastosPagar();
            DataTable           trdo  = gasto.GetGastosPagarxFecha(FechaDesde, FechaHasta, txtPatente.Text, Impagos);

            trdo                         = fun.TablaaMiles(trdo, "Importe");
            txtTotal.Text                = fun.TotalizarColumna(trdo, "Importe").ToString();
            Grilla.DataSource            = trdo;
            Grilla.Columns[5].HeaderText = "Fecha Pago";
            Grilla.Columns[0].Visible    = false;
            Grilla.Columns[1].Width      = 160;
            Grilla.Columns[2].Width      = 355;
            Grilla.Columns[4].Width      = 120;
            Grilla.Columns[5].Width      = 110;
            if (txtTotal.Text != "")
            {
                txtTotal.Text = fun.SepararDecimales(txtTotal.Text);
                txtTotal.Text = fun.FormatoEnteroMiles(txtTotal.Text);
            }
        }
コード例 #9
0
        private void btnBuscar_Click(object sender, EventArgs e)
        {
            Clases.cFunciones fun = new Clases.cFunciones();
            if (fun.ValidarFecha(txtFechaDesde.Text) == false)
            {
                MessageBox.Show("Fecha desde incorrecta", Clases.cMensaje.Mensaje());
                return;
            }

            if (fun.ValidarFecha(txtFechaHasta.Text) == false)
            {
                MessageBox.Show("Fecha hasta incorrecta", Clases.cMensaje.Mensaje());
                return;
            }

            if (Convert.ToDateTime(txtFechaDesde.Text) > Convert.ToDateTime(txtFechaHasta.Text))
            {
                MessageBox.Show("La fecha desde debe ser inferior a la fecha hasta", Clases.cMensaje.Mensaje());
                return;
            }

            int Impagos = 0;

            if (chkImpagos.Checked == true)
            {
                Impagos = 1;
            }

            Clases.cPrenda prenda     = new Clases.cPrenda();
            DateTime       FechaDesde = Convert.ToDateTime(txtFechaDesde.Text);
            DateTime       FechaHasta = Convert.ToDateTime(txtFechaHasta.Text);

            Clases.cEfectivoaPagar obj = new Clases.cEfectivoaPagar();
            DataTable trdo             = obj.GetEfectivosaPagarxFecha(FechaDesde, FechaHasta, txtPatente.Text.Trim(), Impagos);

            trdo = fun.TablaaMiles(trdo, "Saldo");
            trdo = fun.TablaaMiles(trdo, "Importe");
            Grilla.DataSource         = trdo;
            Grilla.Columns[0].Visible = true;
            Grilla.Columns[5].Width   = 150;
            Grilla.Columns[6].Width   = 150;
            Grilla.Columns[7].Width   = 240;
            txtTotal.Text             = fun.TotalizarColumna(trdo, "Saldo").ToString();
            if (txtTotal.Text != "")
            {
                txtTotal.Text = fun.FormatoEnteroMiles(txtTotal.Text);
            }
        }
コード例 #10
0
        private void btnAgregar_Click(object sender, EventArgs e)
        {
            Clases.cFunciones fun = new Clases.cFunciones();

            if (fun.ValidarFecha(txtFecha.Text) == false)
            {
                MessageBox.Show("La fecha es incorrecta", Clases.cMensaje.Mensaje());
                return;
            }

            if (txtMensaje.Text == "")
            {
                MessageBox.Show("Debe ingresar un mensaje para continuar", Clases.cMensaje.Mensaje());
                return;
            }
            Clases.cMensajeEfectivoPagar    msj          = new Clases.cMensajeEfectivoPagar();
            Clases.cMensajeCuotasAnteriores msjCUotasAnt = new Clases.cMensajeCuotasAnteriores();
            string   Mensaje     = txtMensaje.Text;
            Int32    CodRegistro = Convert.ToInt32(txtCodigo.Text);
            DateTime Fecha       = Convert.ToDateTime(txtFecha.Text);

            msj.InsertarMensaje(Mensaje, Fecha, CodRegistro);

            MessageBox.Show("Datos Grabados Correctamente", Clases.cMensaje.Mensaje());
            DataTable trdo = msj.GetMensajesxCodVenta(CodRegistro);

            Grilla.DataSource = trdo;
            txtMensaje.Text   = "";
        }
コード例 #11
0
        private void btnAgregarGastodeRecepcion_Click(object sender, EventArgs e)
        {
            Clases.cFunciones fun = new Clases.cFunciones();
            if (txtCodStock.Text == "")
            {
                MessageBox.Show("Debe ingresar un vehículo para continuar", Clases.cMensaje.Mensaje());
                return;
            }
            if (CmbGastoRecepcion.SelectedIndex < 1)
            {
                MessageBox.Show("Debe seleccionar una categoría de gasto de recepción ", Clases.cMensaje.Mensaje());
                return;
            }

            if (txtImporteGastoRecepcion.Text == "")
            {
                MessageBox.Show("Debe ingresar un importe de gasto de recepción ", Clases.cMensaje.Mensaje());
                return;
            }

            if (fun.ValidarFecha(txtFecha.Text) == false)
            {
                MessageBox.Show("La fecha ingresada es incorrecta", Clases.cMensaje.Mensaje());
                return;
            }
            Clases.cGasto gasto       = new Clases.cGasto();
            string        Descripcion = gasto.GetNombreGastoRecepcionxCodigo(Convert.ToInt32(CmbGastoRecepcion.SelectedValue));

            AgregarGastoRecepcion(CmbGastoRecepcion.SelectedValue.ToString(), Descripcion, txtImporteGastoRecepcion.Text, "Recepcion");
            GrabarGastosdeRecepcion(Convert.ToInt32(txtCodStock.Text));
        }
コード例 #12
0
ファイル: FrmGastos.cs プロジェクト: pablomartinzabala2/AG
        private void btnAgregarGasto_Click(object sender, EventArgs e)
        {
            Clases.cFunciones fun = new Clases.cFunciones();
            if (txtFecha.Text == "")
            {
                MessageBox.Show("Debe ingresar una fecha para continuar.", Clases.cMensaje.Mensaje());
                return;
            }

            if (fun.ValidarFecha(txtFecha.Text) == false)
            {
                MessageBox.Show("La fecha ingresada es incorrecta.", Clases.cMensaje.Mensaje());
                return;
            }

            if (txtCodStock.Text == "")
            {
                MessageBox.Show("Debe ingresar un auto para continuar", Clases.cMensaje.Mensaje());
                return;
            }
            Int32 CodCategoriaGasto = Convert.ToInt32(CmbCategoriaGasto.SelectedValue.ToString());

            Clases.cGasto gasto    = new Clases.cGasto();
            string        Nombre   = gasto.GetGastoxCodigo(Convert.ToInt32(CodCategoriaGasto));
            string        sImporte = txtImporteGasto.Text;
            DateTime      Fecha    = Convert.ToDateTime(txtFecha.Text);

            //Clases.cFunciones fun = new Clases.cFunciones();
            double Importe = fun.ToDouble(sImporte);

            gasto.InsertarGasto(Convert.ToInt32(txtCodStock.Text), CodCategoriaGasto, Importe, DateTime.Now);
            Clases.cMovimiento mov = new Clases.cMovimiento();
            mov.RegistrarMovimiento(-1, Principal.CodUsuarioLogueado, -1 * Importe, 0, 0, Importe, 0, Fecha);
            CargarGrilla();
        }
コード例 #13
0
        private void btnGrabar_Click(object sender, EventArgs e)
        {
            Clases.cFunciones fun = new Clases.cFunciones();

            if (fun.ValidarFecha(txtFecha.Text) == false)
            {
                MessageBox.Show("La fecha ingresada es incorrecta", Clases.cMensaje.Mensaje());
                return;
            }



            Int32    CodComision = Convert.ToInt32(txtCodComision.Text);
            DateTime Fecha       = Convert.ToDateTime(txtFecha.Text);

            Clases.cComisionVendedor com = new Clases.cComisionVendedor();
            com.PagoComision(Fecha, CodComision);
            string Descripcion = "PAGO COMISIÓN " + txtNombre.Text + " " + txtApellido.Text;

            Descripcion = Descripcion + ", PATENTE " + txtPatente.Text;
            double Importe = fun.ToDouble(txtImporte.Text);

            Clases.cMovimiento mov = new Clases.cMovimiento();
            mov.RegistrarMovimientoDescripcion(-1, Principal.CodUsuarioLogueado, -1 * Importe, 0, 0, 0, 0, Fecha, Descripcion);
            MessageBox.Show("Datos grabados Correctamente", Clases.cMensaje.Mensaje());

            btnGrabar.Enabled = false;
            btnAnular.Enabled = false;
        }
コード例 #14
0
        private void CargarGasto(Int32 CodGasto)
        {
            Clases.cFunciones   fun   = new Clases.cFunciones();
            Clases.cGastosPagar gasto = new Clases.cGastosPagar();
            DataTable           trdo  = gasto.GetGastosPagarxCodGasto(CodGasto);

            if (trdo.Rows.Count > 0)
            {
                txtPatente.Text     = trdo.Rows[0]["Patente"].ToString();
                txtImporte.Text     = trdo.Rows[0]["Importe"].ToString();
                txtDescripcion.Text = trdo.Rows[0]["Descripcion"].ToString();
                txtCodVenta.Text    = trdo.Rows[0]["CodVenta"].ToString();
                if (txtImporte.Text != "")
                {
                    txtImporte.Text = fun.SepararDecimales(txtImporte.Text);
                    txtImporte.Text = fun.FormatoEnteroMiles(txtImporte.Text);
                    txtTope.Text    = txtImporte.Text;
                }
                txtFechaPago.Text = trdo.Rows[0]["FechaPago"].ToString();
                if (fun.ValidarFecha(txtFechaPago.Text) == true)
                {
                    btnAnular.Enabled  = true;
                    btnGrabar.Enabled  = false;
                    txtImporte.Enabled = false;
                }
                else
                {
                    btnAnular.Enabled  = false;
                    btnGrabar.Enabled  = true;
                    txtImporte.Enabled = true;
                }
            }
        }
コード例 #15
0
        private void btnRegistrarPago_Click(object sender, EventArgs e)
        {
            Clases.cFunciones fun = new Clases.cFunciones();
            if (Grilla.CurrentRow == null)
            {
                MessageBox.Show("Debe seleccionar un registro para continuar", Clases.cMensaje.Mensaje());
                return;
            }

            if (fun.ValidarFecha(txtFechaDevolucion.Text) == false)
            {
                MessageBox.Show("La fecha de devolución es incorrecta", Clases.cMensaje.Mensaje());
                return;
            }

            if (Grilla.CurrentRow.Cells[8].Value.ToString() != "")
            {
                MessageBox.Show("Ya se ha registrado el pago del préstamo", Clases.cMensaje.Mensaje());
                return;
            }


            Int32    CodPrestamo = Convert.ToInt32(Grilla.CurrentRow.Cells[0].Value);
            DateTime FechaPago   = Convert.ToDateTime(txtFechaDevolucion.Text);
            string   Nombre      = Grilla.CurrentRow.Cells[1].Value.ToString();
            string   Descripcion = "PAGO PRESTAMO " + Nombre.ToString();
            double   Importe     = fun.ToDouble(Grilla.CurrentRow.Cells[6].Value.ToString());

            Clases.cPrestamo prestamo = new Clases.cPrestamo();
            prestamo.RegistrarDevolucion(CodPrestamo, FechaPago);
            Clases.cMovimiento mov = new Clases.cMovimiento();
            mov.RegistrarMovimientoDescripcion(-1, Principal.CodUsuarioLogueado, -1 * Importe, 0, 0, 0, 0, FechaPago, Descripcion);
            MessageBox.Show("Datos registrados correctametne", Clases.cMensaje.Mensaje());
            CargarGrilla();
        }
コード例 #16
0
        private void btnGrabar_Click(object sender, EventArgs e)
        {
            Clases.cFunciones fun = new Clases.cFunciones();
            if (fun.ValidarFecha(txtFechaDesde.Text) == false)
            {
                MessageBox.Show("La fecha ingresada es incorrecta", Clases.cMensaje.Mensaje());
                return;
            }

            if (txtDescripcion.Text == "")
            {
                MessageBox.Show("Debe ingresar un motivo", Clases.cMensaje.Mensaje());
                return;
            }

            Clases.cAlarma alarma  = new Clases.cAlarma();
            string         Patente = txtPatente.Text;
            string         Cliente = txtCliente.Text;

            if (Principal.CodigoPrincipalAbm == null)
            {
                alarma.GrabarAlarma(txtDescripcion.Text.ToUpper(), Convert.ToDateTime(txtFechaDesde.Text), Cliente, Patente);
            }
            else
            {
                alarma.ModificarAlarma(Convert.ToInt32(Principal.CodigoPrincipalAbm), txtDescripcion.Text, Convert.ToDateTime(txtFechaDesde.Text), Cliente, Patente);
            }
            MessageBox.Show("Alarma registrada correctamente", Clases.cMensaje.Mensaje());
            txtDescripcion.Text          = "";
            txtPatente.Text              = "";
            txtCliente.Text              = "";
            Principal.CodigoPrincipalAbm = null;
        }
コード例 #17
0
        private void Buscar()
        {
            if (fun.ValidarFecha(txtFechaDesde.Text) == false)
            {
                Mensaje("La fecha desde es incorrecta");
                return;
            }

            if (fun.ValidarFecha(txtFechaHasta.Text) == false)
            {
                Mensaje("La fecha desde es incorrecta");
                return;
            }
            DateTime FechaDesde = Convert.ToDateTime(txtFechaDesde.Text);
            DateTime FechaHasta = Convert.ToDateTime(txtFechaHasta.Text);

            if (FechaDesde > FechaHasta)
            {
                Mensaje("La fecha desde es superior a la fecha hasta ");
                return;
            }

            Clases.cAnotacion obj          = new Clases.cAnotacion();
            DataTable         trdo         = obj.GetAnotacionesxFecha(FechaDesde, FechaHasta, txtConcepto.Text.Trim());
            double            TotalIngreso = fun.TotalizarColumna(trdo, "ImporteIngreso");
            double            TotalEgreso  = fun.TotalizarColumna(trdo, "ImporteEgreso");

            trdo = fun.TablaaMiles(trdo, "ImporteIngreso");
            trdo = fun.TablaaMiles(trdo, "ImporteEgreso");
            Grilla.DataSource = trdo;
            double dif = TotalIngreso - TotalEgreso;

            txtTotal.Text = dif.ToString();
            if (txtTotal.Text != "")
            {
                txtTotal.Text = fun.SepararDecimales(txtTotal.Text);
                txtTotal.Text = fun.FormatoEnteroMiles(txtTotal.Text);
            }
            Grilla.Columns[1].HeaderText = "Descripción";
            Grilla.Columns[3].HeaderText = "Ingreso";
            Grilla.Columns[4].HeaderText = "Egreso";
            Grilla.Columns[1].Width      = 500;
            Grilla.Columns[3].Width      = 100;
            Grilla.Columns[4].Width      = 103;
            Grilla.Columns[0].Visible    = false;
        }
コード例 #18
0
        private void btnGrabar_Click(object sender, EventArgs e)
        {
            Clases.cFunciones fun = new Clases.cFunciones();
            if (fun.ValidarFecha(txtFechaPago.Text) == false)
            {
                MessageBox.Show("Debe ingresar una fecha válida", Clases.cMensaje.Mensaje());
                return;
            }
            double Importe  = fun.ToDouble(txtImporte.Text);
            double Tope     = fun.ToDouble(txtTope.Text);
            double dif      = Tope - Importe;
            string Descrip2 = "";

            if (dif > 0)
            {
                Descrip2 = "DIFERENCIA POSITVA DE TRANSFERENCIA, PATENTE " + txtPatente.Text;
            }
            if (dif < 0)
            {
                Descrip2 = "DIFERENCIA NEGATIVA DE TRANSFERENCIA, PATENTE " + txtPatente.Text;
            }

            if (dif < 0)
            {
                //paga el tope mas la diferencia negativa
                Importe = Tope;
            }

            if (dif > 0)
            {
                //paga el tope mas la diferencia negativa
                Importe = Tope;
            }

            string Descripcion = txtDescripcion.Text + " " + txtPatente.Text;

            Clases.cMovimiento mov   = new Clases.cMovimiento();
            DateTime           Fecha = Convert.ToDateTime(txtFechaPago.Text);

            Clases.cGastosPagar gasto = new Clases.cGastosPagar();
            gasto.ActualizarPago(Convert.ToInt32(Principal.CodigoPrincipalAbm), Fecha);
            mov.RegistrarMovimientoDescripcion(-1, Principal.CodUsuarioLogueado, -1 * Importe, 0, 0, 0, 0, Fecha, Descripcion);
            if (dif != 0)
            {
                Int32?CodVenta = null;
                if (txtCodVenta.Text.Trim() != "")
                {
                    CodVenta = Convert.ToInt32(txtCodVenta.Text);
                }
                //hubo exedente o menor plata
                mov.RegistrarMovimientoDescripcion(-1, Principal.CodUsuarioLogueado, dif, 0, 0, 0, 0, Fecha, Descrip2);
                Clases.cDiferenciaTransferencia obj = new Clases.cDiferenciaTransferencia();
                obj.Insertar(CodVenta, dif, Convert.ToInt32(Principal.CodigoPrincipalAbm));
            }
            MessageBox.Show("Datos grabados correctamente", Clases.cMensaje.Mensaje());
            btnGrabar.Enabled = false;
        }
コード例 #19
0
        private void btnAgregarCosto_Click(object sender, EventArgs e)
        {
            if (txtCodStock.Text == "")
            {
                MessageBox.Show("Debe ingresar un vehículo para continuar", Clases.cMensaje.Mensaje());
                return;
            }
            Clases.cFunciones fun = new Clases.cFunciones();
            if (txtCodAuto.Text == "")
            {
                MessageBox.Show("Debe ingresar un auto válido", Clases.cMensaje.Mensaje());
                return;
            }
            if (txtFecha.Text == "")
            {
                MessageBox.Show("Debe ingresar una fecha para continuar.", Clases.cMensaje.Mensaje());
                return;
            }

            if (fun.ValidarFecha(txtFecha.Text) == false)
            {
                MessageBox.Show("La fecha ingresada es incorrecta.", Clases.cMensaje.Mensaje());
                return;
            }


            Double Importe = 0;

            if (txtCosto.Text != "")
            {
                Importe = Convert.ToDouble(txtCosto.Text);
            }
            Int32  CodAuto     = Convert.ToInt32(txtCodAuto.Text);
            string Descripcion = txtDescripcionCosto.Text + ", PATENTE " + txtPatente.Text;
            string Fecha       = txtFecha.Text;
            string Patente     = txtPatente.Text;
            Int32? CodStock    = -1;

            if (txtCodStock.Text != "")
            {
                CodStock = Convert.ToInt32(txtCodStock.Text);
            }

            Clases.cCosto costo = new Clases.cCosto();
            costo.InsertarCosto(CodAuto, Patente, Importe, Fecha, Descripcion.ToUpper(), CodStock);
            CargarCostoxstock(Convert.ToInt32(CodStock));
            DateTime FechaCosto = Convert.ToDateTime(txtFecha.Text);

            Clases.cMovimiento mov = new Clases.cMovimiento();
            mov.RegistrarMovimientoDescripcion(-1, Principal.CodUsuarioLogueado, (-1) * (Importe), 0, 0, Importe, 0, FechaCosto, Descripcion.ToUpper());
            txtCosto.Text            = "";
            txtDescripcionCosto.Text = "";
            txtCodCosto.Text         = "";
            // Clases.cGrilla.FormatoColumnasMiles(Grilla, "Importe");
        }
コード例 #20
0
        private void btnGuardar_Click(object sender, EventArgs e)
        {
            Clases.cFunciones fun = new Clases.cFunciones();
            if (fun.ValidarFecha(txtFecha.Text) == false)
            {
                Mensaje("La fecha es incorrecta");
                return;
            }

            if (txtEfectivo.Text == "")
            {
                Mensaje("Debe ingresar un importe");
                return;
            }

            if (cmbConcepto.SelectedIndex == 0)
            {
                if (txtDescripcion.Text == "")
                {
                    Mensaje("Debe ingresar una descripción");
                    return;
                }
            }

            DateTime Fecha         = Convert.ToDateTime(txtFecha.Text);
            double   Importe       = fun.ToDouble(txtEfectivo.Text);
            string   Descripcion   = txtDescripcion.Text;
            Int32?   CodEntidad    = null;
            string   NombreEntidad = "";

            if (cmbConcepto.SelectedIndex > 0)
            {
                CodEntidad = Convert.ToInt32(cmbConcepto.SelectedValue);
                Clases.cEntidad ent = new Clases.cEntidad();
                NombreEntidad = ent.GetNombrexCodigo(Convert.ToInt32(CodEntidad));
            }

            if (NombreEntidad != "")
            {
                Descripcion = NombreEntidad + "," + Descripcion;
            }
            Clases.cGastosNegocio gasto = new Clases.cGastosNegocio();
            gasto.GrabarGastos(Fecha, CodEntidad, Descripcion, Importe);
            Clases.cMovimiento mov = new Clases.cMovimiento();
            mov.RegistrarMovimientoDescripcion(-1, Principal.CodUsuarioLogueado, -1 * Importe, 0, 0, 0, 0, Fecha, Descripcion);
            Mensaje("Datos grabados correctamente");
            txtEfectivo.Text    = "";
            txtDescripcion.Text = "";
            txtFecha.Text       = "";
            if (cmbConcepto.Items.Count > 1)
            {
                cmbConcepto.SelectedIndex = 0;
            }
        }
コード例 #21
0
        private void btnGrabar_Click(object sender, EventArgs e)
        {
            if (fun.ValidarFecha(txtFecha.Text) == false)
            {
                Mensaje("La fecha ingresada es incorrecta");
                return;
            }

            if (txtIngresarImporte.Text == "")
            {
                Mensaje("Debe ingresar un importe para continuar");
                return;
            }

            DateTime Fecha          = Convert.ToDateTime(txtFecha.Text);
            Int32    CodRegistro    = Convert.ToInt32(Principal.CodigoPrincipalAbm);
            double   Importe        = fun.ToDouble(txtIngresarImporte.Text);
            double   Saldo          = fun.ToDouble(txtSaldo.Text);
            double   aPagar         = fun.ToDouble(txtIngresarImporte.Text);
            double   ImporteInicial = fun.ToDouble(txtImporte.Text);

            if (aPagar > Saldo)
            {
                Mensaje("El Importe a pagar supera el saldo");
                return;
            }
            Clases.cSaldoEfectivoPagar objSaldo = new Clases.cSaldoEfectivoPagar();

            Clases.cEfectivoaPagar obj = new Clases.cEfectivoaPagar();
            obj.ActualizarPago(CodRegistro, Fecha, Importe);
            string Descripcion = "PAGO EFECTIVO " + txtCliente.Text;

            objSaldo.InsertarSaldo(CodRegistro, Fecha, Importe);
            Descripcion = Descripcion + ", PATENTE " + txtPatente.Text;
            Clases.cMovimiento mov = new Clases.cMovimiento();
            mov.RegistrarMovimientoDescripcion(-1, Principal.CodUsuarioLogueado, -1 * Importe, 0, 0, 0, 0, Fecha, Descripcion);
            Mensaje("Datos grabados correctamente");
            txtImporte.Text   = "";
            btnGrabar.Enabled = false;
        }
コード例 #22
0
        private void btnBuscar_Click(object sender, EventArgs e)
        {
            Clases.cFunciones fun = new Clases.cFunciones();
            if (fun.ValidarFecha(txtFechaDesde.Text) == false)
            {
                MessageBox.Show("Fecha desde incorrecta", Clases.cMensaje.Mensaje());
                return;
            }

            if (fun.ValidarFecha(txtFechaHasta.Text) == false)
            {
                MessageBox.Show("Fecha hasta incorrecta", Clases.cMensaje.Mensaje());
                return;
            }

            if (Convert.ToDateTime(txtFechaDesde.Text) > Convert.ToDateTime(txtFechaHasta.Text))
            {
                MessageBox.Show("La fecha desde debe ser inferior a la fecha hasta", Clases.cMensaje.Mensaje());
                return;
            }
            GetGanancia();
        }
コード例 #23
0
        private void btnGuardar_Click(object sender, EventArgs e)
        {
            Clases.cFunciones fun = new Clases.cFunciones();
            if (txtMontoaPagar.Text == "")
            {
                Mensaje("Debe ingresar un monto a cobrar");
                return;
            }
            double Saldo   = fun.ToDouble(txtSaldo.Text);
            double Importe = fun.ToDouble(txtMontoaPagar.Text);

            if (Saldo == 0)
            {
                Mensaje("No hay saldo para cancelar");
                return;
            }
            if (fun.ValidarFecha(txtFechaCobro.Text) == false)
            {
                Mensaje("Debe ingresar una fecha de cobro");
                return;
            }
            if (Importe > Saldo)
            {
                Mensaje("El importe a cobrar es mayor al saldo");
                return;
            }

            if (Saldo > Importe)
            {
                var result = MessageBox.Show("El importe es inferior al saldo, desea continuar", "Información",
                                             MessageBoxButtons.YesNo,
                                             MessageBoxIcon.Question);

                // If the no button was pressed ...
                if (result == DialogResult.No)
                {
                    return;
                }
            }
            Int32    CodCobranza = Convert.ToInt32(txtCodCobranza.Text);
            DateTime Fecha       = Convert.ToDateTime(txtFechaCobro.Text);
            string   Descripción = "COBRANZA GENERAL ,PATENTE " + txtPatente.Text;

            Clases.cCobranzaGeneral cob = new Clases.cCobranzaGeneral();
            cob.RegistrarCobro(CodCobranza, Fecha, Importe);
            Clases.cMovimiento mov = new Clases.cMovimiento();
            mov.RegistrarMovimientoDescripcion(-1, Principal.CodUsuarioLogueado, Importe, 0, 0, 0, 0, Fecha, Descripción);
            Mensaje("Datos grabados correctamente ");
            GetCobranzas(CodCobranza);
        }
コード例 #24
0
        private void btnBuscar_Click(object sender, EventArgs e)
        {
            Clases.cFunciones fun = new Clases.cFunciones();
            if (fun.ValidarFecha(txtFechaDesde.Text) == false)
            {
                MessageBox.Show("Fecha desde incorrecta", Clases.cMensaje.Mensaje());
                return;
            }

            if (fun.ValidarFecha(txtFechaHasta.Text) == false)
            {
                MessageBox.Show("Fecha hasta incorrecta", Clases.cMensaje.Mensaje());
                return;
            }

            if (Convert.ToDateTime(txtFechaDesde.Text) > Convert.ToDateTime(txtFechaHasta.Text))
            {
                MessageBox.Show("La fecha desde debe ser inferior a la fecha hasta", Clases.cMensaje.Mensaje());
                return;
            }

            DateTime FechaDesde = Convert.ToDateTime(txtFechaDesde.Text);
            DateTime FechaHasta = Convert.ToDateTime(txtFechaHasta.Text);

            Clases.cPagoIntereses pago = new Clases.cPagoIntereses();
            DataTable             trdo = pago.GetPagosInteresxFecha(FechaDesde, FechaHasta);

            txtTotal.Text = fun.TotalizarColumna(trdo, "Importe").ToString();
            if (txtTotal.Text != "")
            {
                txtTotal.Text = fun.SepararDecimales(txtTotal.Text);
                txtTotal.Text = fun.FormatoEnteroMiles(txtTotal.Text);
            }
            trdo = fun.TablaaMiles(trdo, "Importe");
            Grilla.DataSource       = trdo;
            Grilla.Columns[0].Width = 630;
        }
コード例 #25
0
        private void Buscar()
        {
            Clases.cFunciones fun = new Clases.cFunciones();
            if (fun.ValidarFecha(txtFechaDesde.Text) == false)
            {
                MessageBox.Show("Fecha desde incorrecta", Clases.cMensaje.Mensaje());
                return;
            }

            if (fun.ValidarFecha(txtFechaHasta.Text) == false)
            {
                MessageBox.Show("Fecha hasta incorrecta", Clases.cMensaje.Mensaje());
                return;
            }

            if (Convert.ToDateTime(txtFechaDesde.Text) > Convert.ToDateTime(txtFechaHasta.Text))
            {
                MessageBox.Show("La fecha desde debe ser inferior a la fecha hasta", Clases.cMensaje.Mensaje());
                return;
            }

            DateTime FechaDesde = Convert.ToDateTime(txtFechaDesde.Text);
            DateTime FechaHasta = Convert.ToDateTime(txtFechaHasta.Text);
            string   texto      = txtDescripcion.Text;

            Clases.cAlarma alarma = new Clases.cAlarma();
            DataTable      trdo   = alarma.GetAlertasxRangoFecha(FechaDesde, FechaHasta, texto, txtPatente.Text.Trim(), txtNombreCliente.Text.Trim());

            Grilla.DataSource            = trdo;
            Grilla.Columns[1].HeaderText = "Descripción";
            Grilla.Columns[1].Width      = 200;
            Grilla.Columns[0].Visible    = false;
            Grilla.Columns[2].Width      = 100;
            Grilla.Columns[3].Width      = 250;
            Grilla.Columns[4].Width      = 90;
        }
コード例 #26
0
        private Boolean Validar()
        {
            Boolean op = true;

            if (txtPatente.Text == "")
            {
                MessageBox.Show("Debe ingresar una patente para continuar", Clases.cMensaje.Mensaje());
                return(false);
            }

            if (txtDescripcion.Text == "")
            {
                MessageBox.Show("Debe ingresar una descripción para continuar", Clases.cMensaje.Mensaje());
                return(false);
            }

            if (cmb_CodMarca.SelectedIndex < 1)
            {
                MessageBox.Show("Debe seleccionar una marca para continuar", Clases.cMensaje.Mensaje());
                return(false);
            }

            if (txtNombre.Text == "")
            {
                MessageBox.Show("Debe ingresar un nombre para continuar", Clases.cMensaje.Mensaje());
                return(false);
            }

            if (txtApellido.Text == "")
            {
                MessageBox.Show("Debe ingresar un apellido para continuar", Clases.cMensaje.Mensaje());
                return(false);
            }
            Clases.cFunciones fun = new Clases.cFunciones();
            if (fun.ValidarFecha(txtFecha.Text) == false)
            {
                MessageBox.Show("La fecha ingresada es incontinuar", Clases.cMensaje.Mensaje());
                return(false);
            }

            if (GrillaCuotas.Rows.Count < 1)
            {
                MessageBox.Show("Debe ingresar un plan de cuotas", Clases.cMensaje.Mensaje());
                return(false);
            }

            return(op);
        }
コード例 #27
0
 private void btnPagarSaldo_Click(object sender, EventArgs e)
 {
     Clases.cFunciones fun = new Clases.cFunciones();
     if (fun.ValidarFecha(txtFecha.Text) == false)
     {
         MessageBox.Show("La fecha ingresada es incorrecta.", Clases.cMensaje.Mensaje());
         return;
     }
     if (txtSaldo.Text != "")
     {
         double saldo = fun.ToDouble(txtSaldo.Text);
         if (saldo == 0)
         {
             MessageBox.Show("El saldo ya ha sido cancelado", Clases.cMensaje.Mensaje());
             return;
         }
         Int32  CodCobranza = Convert.ToInt32(txtCodCobranza.Text);
         double Importe     = fun.ToDouble(txtImporte.Text);
         if (Importe > saldo)
         {
             MessageBox.Show("El saldo supera el saldo", Clases.cMensaje.Mensaje());
             return;
         }
         Clases.cSaldoCobranza saldoCob = new Clases.cSaldoCobranza();
         DateTime         Fecha         = Convert.ToDateTime(txtFecha.Text);
         Clases.cCobranza cob           = new Clases.cCobranza();
         cob.PagarSaldo(CodCobranza, Fecha, Importe);
         string             Descripcion = "PAGO DE SALDO PATENTE " + txtPatente.Text;
         Clases.cMovimiento mov         = new Clases.cMovimiento();
         mov.RegistrarMovimientoDescripcion(-1, Principal.CodUsuarioLogueado, Importe, 0, 0, 0, 0, Fecha, Descripcion);
         saldoCob.InsertarSaldoCob(CodCobranza, Fecha, Importe);
         Double Punitorio = 0;
         if (txtPunitorio.Text != "")
         {
             Punitorio = fun.ToDouble(txtPunitorio.Text);
         }
         Int32 CodVenta = Convert.ToInt32(Grilla.CurrentRow.Cells[1].Value.ToString());
         if (Punitorio > 0)
         {
             Clases.cPunitorioCobranza objPunitorio = new Clases.cPunitorioCobranza();
             Descripcion = "COBRO DE PUNITORIO, PATENTE " + txtPatente.Text;
             objPunitorio.GrabarPunitorio(CodVenta, CodCobranza, Punitorio, Fecha);
             mov.RegistrarMovimientoDescripcion(CodVenta, Principal.CodUsuarioLogueado, Punitorio, 0, 0, 0, 0, Fecha, Descripcion);
         }
         MessageBox.Show("Datos grabados correctamente", Clases.cMensaje.Mensaje());
     }
 }
コード例 #28
0
        private void btnGrabar_Click(object sender, EventArgs e)
        {
            Clases.cFunciones fun = new Clases.cFunciones();

            if (Grilla.CurrentRow == null)
            {
                MessageBox.Show("Debe Seleccionar un cheque para continuar ", Clases.cMensaje.Mensaje());
                return;
            }

            if (Grilla.Rows.Count < 2)
            {
                MessageBox.Show("Debe Seleccionar una prenda para continuar ", Clases.cMensaje.Mensaje());
                return;
            }

            if (txtFecha.Text == "")
            {
                MessageBox.Show("Debe ingresar una fecha para continuar.", Clases.cMensaje.Mensaje());
                return;
            }

            if (fun.ValidarFecha(txtFecha.Text) == false)
            {
                MessageBox.Show("La fecha ingresada es incorrecta.", Clases.cMensaje.Mensaje());
                return;
            }

            DateTime Fecha       = Convert.ToDateTime(txtFecha.Text);
            Int32    CodVenta    = Convert.ToInt32(Grilla.CurrentRow.Cells[0].Value.ToString());
            string   NroCheque   = Grilla.CurrentRow.Cells[1].Value.ToString();
            string   Descripcion = "COBRO CHEQUE " + txtPatente.Text + " , " + NroCheque.ToString();

            Descripcion = Descripcion + ", " + txtEntregado.Text;
            Double Importe = fun.ToDouble(Grilla.CurrentRow.Cells[2].Value.ToString());

            Clases.cCheque cheque = new Clases.cCheque();
            cheque.RegistrarCobroCheque(txtFecha.Text, Convert.ToInt32(CodVenta), NroCheque);
            Clases.cMovimiento mov = new Clases.cMovimiento();
            mov.RegistrarMovimientoDescripcion(CodVenta, Principal.CodUsuarioLogueado, Importe, 0, 0, 0, 0, Fecha, Descripcion);
            CargarGrilla();
            MessageBox.Show("Datos grabados correctamente", Clases.cMensaje.Mensaje());
        }
コード例 #29
0
        private void btnAnular_Click(object sender, EventArgs e)
        {
            if (Grilla.CurrentRow == null)
            {
                MessageBox.Show("Debe seleccionar un registro para continuar", Clases.cMensaje.Mensaje());
                return;
            }

            Int32  CodPago   = Convert.ToInt32(Grilla.CurrentRow.Cells[0].Value.ToString());
            Int32  CodCheque = Convert.ToInt32(Grilla.CurrentRow.Cells[1].Value.ToString());
            string msj       = "Confirma anular el pago ";
            var    result    = MessageBox.Show(msj, "Información",
                                               MessageBoxButtons.YesNo,
                                               MessageBoxIcon.Question);

            // If the no button was pressed ...
            if (result == DialogResult.No)
            {
                return;
            }
            Clases.cFunciones fun = new Clases.cFunciones();
            if (fun.ValidarFecha(txtFecha.Text) == false)
            {
                MessageBox.Show("La fecha ingresada es incorrecta", Clases.cMensaje.Mensaje());
                return;
            }
            Clases.cPagoCheque objPago = new Clases.cPagoCheque();
            double             Importe = fun.ToDouble(Grilla.CurrentRow.Cells[2].Value.ToString());

            Clases.cChequesaPagar cheque = new Clases.cChequesaPagar();
            Clases.cMovimiento    mov    = new Clases.cMovimiento();
            DateTime Fecha = Convert.ToDateTime(txtFecha.Text);

            //cheque.AnularPagarCheque (Convert.ToInt32(Principal.CodigoPrincipalAbm));
            objPago.AnularPagoCheque(CodPago, CodCheque, Importe);
            string Descripcion = "ANULACION PAGO DE CHEQUE " + txtCliente.Text.ToUpper();

            mov.RegistrarMovimientoDescripcion(-1, Principal.CodUsuarioLogueado, Importe, 0, 0, 0, 0, Fecha, Descripcion);
            MessageBox.Show("Datos grabados correctamente", Clases.cMensaje.Mensaje());
            btnAnular.Enabled = false;
            Cargar(CodCheque);
        }
コード例 #30
0
        private void btnGrabar_Click(object sender, EventArgs e)
        {
            Clases.cFunciones fun = new Clases.cFunciones();
            if (fun.ValidarFecha(txtFechaPago.Text) == false)
            {
                MessageBox.Show("La fecha de pago es incorrecta", Clases.cMensaje.Mensaje());
                return;
            }

            string   Descripcion = "PAGO DE INTERÉS " + txtNombre.Text.ToString();
            Int32    CodPrestamo = Convert.ToInt32(Principal.CodigoPrincipalAbm);
            DateTime Fecha       = Convert.ToDateTime(txtFechaPago.Text);
            double   Importe     = fun.ToDouble(txtMontoApagar.Text);

            Clases.cMovimiento    mov  = new Clases.cMovimiento();
            Clases.cPagoIntereses pago = new Clases.cPagoIntereses();
            pago.RegistrarPago(CodPrestamo, Fecha, Importe);
            mov.RegistrarMovimientoDescripcion(-1, Principal.CodUsuarioLogueado, -1 * Importe, 0, 0, 0, 0, Fecha, Descripcion);
            MessageBox.Show("Datos grabados correctamente", Clases.cMensaje.Mensaje());
            CargarGrilla(CodPrestamo);
        }