private void CargarDatos(Int32 CodRegistro)
        {
            Clases.cEfectivoaPagar obj = new Clases.cEfectivoaPagar();
            DataTable trdo             = obj.GetEfectivosaPagarxCodigo(CodRegistro);

            if (trdo.Rows.Count > 0)
            {
                string cliente = trdo.Rows[0]["Nombre"].ToString();
                cliente         = cliente + " " + trdo.Rows[0]["Apellido"].ToString();
                txtCliente.Text = cliente;
                string auto = trdo.Rows[0]["Patente"].ToString();
                auto = auto + " " + trdo.Rows[0]["Descripcion"].ToString();
                txtDescripcion.Text = auto;
                txtPatente.Text     = trdo.Rows[0]["Patente"].ToString();
                txtImporte.Text     = trdo.Rows[0]["Importe"].ToString();
                txtSaldo.Text       = trdo.Rows[0]["Saldo"].ToString();
                txtFecha.Text       = trdo.Rows[0]["FechaPago"].ToString();

                if (txtImporte.Text != "")
                {
                    txtImporte.Text = fun.SepararDecimales(txtImporte.Text);
                    txtImporte.Text = fun.FormatoEnteroMiles(txtImporte.Text);
                }

                if (txtSaldo.Text != "")
                {
                    txtSaldo.Text = fun.SepararDecimales(txtSaldo.Text);
                    txtSaldo.Text = fun.FormatoEnteroMiles(txtSaldo.Text);
                }
                txtIngresarImporte.Focus();
            }
        }
        public void GetCobranzas(Int32 CodCobranza)
        {
            Clases.cFunciones       fun = new Clases.cFunciones();
            Clases.cCobranzaGeneral cob = new Clases.cCobranzaGeneral();
            DataTable trdo = cob.GetCobranzaxCodigo(CodCobranza);

            if (trdo.Rows.Count > 0)
            {
                if (trdo.Rows[0]["Fecha"].ToString() != "")
                {
                    DateTime Fecha = Convert.ToDateTime(trdo.Rows[0]["Fecha"].ToString());
                    txtFecha.Text = Fecha.ToShortDateString();
                }

                if (trdo.Rows[0]["FechaPago"].ToString() != "")
                {
                    DateTime Fecha = Convert.ToDateTime(trdo.Rows[0]["FechaPago"].ToString());
                    txtFechaCobro.Text = Fecha.ToShortDateString();
                }

                if (trdo.Rows[0]["FechaPago"].ToString() == "")
                {
                    btnGuardar.Enabled    = true;
                    btnAnular.Enabled     = false;
                    btnPagarSaldo.Visible = false;
                }
                else
                {
                    btnGuardar.Enabled    = false;
                    btnAnular.Enabled     = true;
                    btnPagarSaldo.Visible = true;
                }
                txtTotalCobrado.Text = trdo.Rows[0]["ImportePagado"].ToString();
                txtDescripcion.Text  = trdo.Rows[0]["Descripcion"].ToString();
                txtImporte.Text      = trdo.Rows[0]["Importe"].ToString();
                txtPatente.Text      = trdo.Rows[0]["Patente"].ToString();
                txtSaldo.Text        = trdo.Rows[0]["Saldo"].ToString();
                if (txtImporte.Text != "")
                {
                    txtImporte.Text = fun.SepararDecimales(txtImporte.Text);
                    txtImporte.Text = fun.FormatoEnteroMiles(txtImporte.Text);
                }

                if (txtTotalCobrado.Text != "")
                {
                    txtTotalCobrado.Text = fun.SepararDecimales(txtTotalCobrado.Text);
                    txtTotalCobrado.Text = fun.FormatoEnteroMiles(txtTotalCobrado.Text);
                }

                if (txtSaldo.Text != "")
                {
                    txtSaldo.Text = fun.SepararDecimales(txtSaldo.Text);
                    txtSaldo.Text = fun.FormatoEnteroMiles(txtSaldo.Text);
                }
            }
        }
示例#3
0
        private void Cargar(Int32 CodCheque)
        {
            Clases.cFunciones     fun    = new Clases.cFunciones();
            Clases.cChequesaPagar cheque = new Clases.cChequesaPagar();
            DataTable             trdo   = cheque.GetChequesPagarxCodigo(CodCheque);

            if (trdo.Rows.Count > 0)
            {
                txtNroCheque.Text = trdo.Rows[0]["NroCheque"].ToString();
                txtImporte.Text   = trdo.Rows[0]["Importe"].ToString();
                txtCliente.Text   = trdo.Rows[0]["Nombre"].ToString();
                txtCliente.Text   = txtCliente.Text + " " + trdo.Rows[0]["Apellido"].ToString();
                txtPatente.Text   = trdo.Rows[0]["Patente"].ToString();
                txtSaldo.Text     = trdo.Rows[0]["Saldo"].ToString();
                if (trdo.Rows[0]["FechaPago"].ToString() != "")
                {
                    DateTime Fecha = Convert.ToDateTime(trdo.Rows[0]["FechaPago"].ToString());
                    txtFecha.Text = Fecha.ToShortDateString();
                }

                if (trdo.Rows[0]["FechaVencimiento"].ToString() != "")
                {
                    DateTime Fecha = Convert.ToDateTime(trdo.Rows[0]["FechaVencimiento"].ToString());
                    txtFechaVto.Text = Fecha.ToShortDateString();
                }

                if (txtSaldo.Text != "")
                {
                    txtSaldo.Text = fun.SepararDecimales(txtSaldo.Text);
                    txtSaldo.Text = fun.FormatoEnteroMiles(txtSaldo.Text);
                }

                if (txtImporte.Text != "")
                {
                    txtImporte.Text = fun.SepararDecimales(txtImporte.Text);
                    txtImporte.Text = fun.FormatoEnteroMiles(txtImporte.Text);
                }

                if (txtSaldo.Text == "0")
                {
                    btnGrabar.Enabled = false;
                }
            }

            Clases.cPagoCheque pago   = new Clases.cPagoCheque();
            DataTable          tresul = pago.GetPagosCheques(CodCheque);

            tresul            = fun.TablaaMiles(tresul, "Importe");
            Grilla.DataSource = tresul;
            // Grilla.Columns[0].Visible = false;
            //  Grilla.Columns[1].Visible = false;
            Grilla.Columns[2].Width = 280;
        }
示例#4
0
        private void CargarCheques(Int32 CodStock)
        {
            Clases.cFunciones fun       = new Clases.cFunciones();
            Clases.cCompra    compra    = new Clases.cCompra();
            Int32             CodCompra = compra.GetCodCompraxCodStock(CodStock);

            Clases.cChequesaPagar cheque = new Clases.cChequesaPagar();
            DataTable             trdo   = cheque.GetChequesxCodCompra(CodCompra);

            trdo = fun.TablaaMiles(trdo, "Importe");
            GrillaCheques.DataSource            = trdo;
            GrillaCheques.Columns[3].HeaderText = "Fecha Pago";
            GrillaCheques.Columns[3].Width      = 100;
            GrillaCheques.Columns[4].Width      = 270;
            GrillaCheques.Columns[5].Visible    = false;
            GrillaCheques.Columns[6].Visible    = false;
            DataTable tComp = compra.GetCompraxCodigo(CodCompra);

            GetEfectivoPagar(CodCompra);
            if (tComp.Rows.Count > 0)
            {
                if (tComp.Rows[0]["ImporteEfectivo"].ToString() != "")
                {
                    txtEfectivo.Text = tComp.Rows[0]["ImporteEfectivo"].ToString();
                    txtEfectivo.Text = fun.SepararDecimales(txtEfectivo.Text);
                    txtEfectivo.Text = fun.FormatoEnteroMiles(txtEfectivo.Text);
                }

                if (tComp.Rows[0]["ImporteAutoPartePago"].ToString() != "")
                {
                    txtImporteAutoPartePago.Text = tComp.Rows[0]["ImporteAutoPartePago"].ToString();
                    txtImporteAutoPartePago.Text = fun.SepararDecimales(txtImporteAutoPartePago.Text);
                    txtImporteAutoPartePago.Text = fun.FormatoEnteroMiles(txtImporteAutoPartePago.Text);
                }

                if (tComp.Rows[0]["CodStockSalida"].ToString() != "")
                {
                    Clases.cStockAuto stock = new Clases.cStockAuto();
                    DataTable         tauto = stock.GetStockxCodigo(Convert.ToInt32(tComp.Rows[0]["CodStockSalida"].ToString()));
                    if (tauto.Rows.Count > 0)
                    {
                        txtPatente2.Text     = tauto.Rows[0]["Patente"].ToString();
                        txtDescripcion2.Text = tauto.Rows[0]["Descripcion"].ToString();
                    }
                }
                //GetStockxCodigo
            }
        }
示例#5
0
        private void BuscarAutosdeStock(string Patente, Int32?CodMarca)
        {
            double Total = 0;

            Clases.cFunciones fun   = new Clases.cFunciones();
            Clases.cStockAuto stock = new Clases.cStockAuto();
            DataTable         trdo  = stock.GetStockDetalladosVigente(Patente, CodMarca);

            trdo  = fun.TablaaMiles(trdo, "Costo");
            Total = fun.TotalizarColumna(trdo, "Costo");
            txtTotalVehiculos.Text       = trdo.Rows.Count.ToString();
            Grilla.DataSource            = trdo;
            Grilla.Columns[0].Visible    = false;
            Grilla.Columns[2].Width      = 195;
            Grilla.Columns[3].Width      = 280;
            Grilla.Columns[4].Width      = 90;
            Grilla.Columns[5].Width      = 200;
            Grilla.Columns[4].HeaderText = "Fecha";
            Grilla.Columns[5].HeaderText = "Ex Titular";
            Grilla.Columns[7].HeaderText = "Concesión";
            txtMontoTotal.Text           = Total.ToString();
            if (txtMontoTotal.Text != "")
            {
                txtMontoTotal.Text = fun.SepararDecimales(txtMontoTotal.Text);
                txtMontoTotal.Text = fun.FormatoEnteroMiles(txtMontoTotal.Text);
            }
        }
示例#6
0
        public void GetAutoPartePago(Int32 CodVenta)
        {
            Clases.cFunciones fun  = new Clases.cFunciones();
            Clases.cVenta     obj  = new Clases.cVenta();
            DataTable         trdo = obj.GetAutosPartePago(CodVenta);

            if (trdo.Rows.Count > 0)
            {
                if (trdo.Rows[0]["CodAuto"].ToString() != "")
                {
                    string sImporte = trdo.Rows[0]["Importe"].ToString();
                    if (sImporte != "" && sImporte != "0")
                    {
                        sImporte = fun.SepararDecimales(sImporte);
                        sImporte = fun.FormatoEnteroMiles(sImporte);
                    }
                    Int32        CodAuto = Convert.ToInt32(trdo.Rows[0]["CodAuto"].ToString());
                    Clases.cAuto auto    = new Clases.cAuto();
                    DataTable    tauto   = auto.GetAutoxCodigo(CodAuto);
                    {
                        if (tauto.Rows.Count > 0)
                        {
                            string Descrip = " Un vehículo" + tauto.Rows[0]["Marca"].ToString() + " " + tauto.Rows[0]["Descripcion"].ToString();
                            Descrip = Descrip + " MOTOR N º" + tauto.Rows[0]["Motor"].ToString();
                            Descrip = Descrip + " CHASIS N º" + tauto.Rows[0]["Chasis"].ToString();
                            Descrip = Descrip + " AÑO " + tauto.Rows[0]["Anio"].ToString();
                            Descrip = Descrip + " DOMINIO " + tauto.Rows[0]["Patente"].ToString();
                            Descrip = Descrip + " valuado en " + sImporte;
                            txtAutoPartePago.Text = Descrip;
                        }
                    }
                }
            }
        }
        private void CargarDatos(Int32 CodComision)
        {
            Clases.cFunciones        fun = new Clases.cFunciones();
            Clases.cComisionVendedor com = new Clases.cComisionVendedor();
            DataTable trdo = com.GetComisionesxCodigo(CodComision);

            if (trdo.Rows.Count > 0)
            {
                txtNombre.Text   = trdo.Rows[0]["Nombre"].ToString();
                txtApellido.Text = trdo.Rows[0]["Apellido"].ToString();
                txtPatente.Text  = trdo.Rows[0]["Patente"].ToString();
                txtImporte.Text  = trdo.Rows[0]["Importe"].ToString();
                if (trdo.Rows[0]["FechaPago"].ToString() != "")
                {
                    DateTime fecha = Convert.ToDateTime(trdo.Rows[0]["FechaPago"].ToString());
                    txtFecha.Text = fecha.ToShortDateString();
                }
                txtImporte.Text = fun.SepararDecimales(txtImporte.Text);
                txtImporte.Text = fun.FormatoEnteroMiles(txtImporte.Text);
                if (trdo.Rows[0]["FechaPago"].ToString() == "")
                {
                    btnAnular.Enabled = false;
                    btnGrabar.Enabled = true;
                }
                else
                {
                    btnAnular.Enabled = true;
                    btnGrabar.Enabled = false;
                }
            }
        }
示例#8
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;
                }
            }
        }
示例#9
0
 private void GetEfectivosaPagar()
 {
     Clases.cEfectivoaPagar eft = new Clases.cEfectivoaPagar();
     txtEfectivosaPagar.Text = eft.TotalSaldo().ToString();
     Clases.cFunciones fun = new Clases.cFunciones();
     txtEfectivosaPagar.Text = fun.SepararDecimales(txtEfectivosaPagar.Text);
     txtEfectivosaPagar.Text = fun.FormatoEnteroMiles(txtEfectivosaPagar.Text);
 }
示例#10
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;
        }
示例#11
0
        private void GetPrendas()
        {
            Clases.cPrenda prenda  = new Clases.cPrenda();
            double         Importe = prenda.GetTotalPrenda();

            txtPrenda.Text = Importe.ToString();
            Clases.cFunciones fun = new Clases.cFunciones();
            txtPrenda.Text = fun.SepararDecimales(txtPrenda.Text);
            txtPrenda.Text = fun.FormatoEnteroMiles(txtPrenda.Text);
        }
        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;
        }
示例#13
0
        private void Buscar()
        {
            Clases.cFunciones fun      = new Clases.cFunciones();
            string            Patente  = txtPatente.Text;
            Int32?            CodMarca = null;

            if (cmbMarca.SelectedIndex > 0)
            {
                CodMarca = Convert.ToInt32(cmbMarca.SelectedValue);
            }
            Clases.cStockAuto stock = new Clases.cStockAuto();
            DataTable         trdo  = stock.GetStockDetalladosVigente(Patente, CodMarca);

            txtTotalVehiculos.Text = trdo.Rows.Count.ToString();
            trdo = fun.TablaaMiles(trdo, "Costo");
            Grilla.DataSource            = trdo;
            Grilla.Columns[0].Visible    = false;
            Grilla.Columns[7].HeaderText = "Concesión";
            //Grilla.Columns[7].Visible = false;
            Grilla.Columns[2].Width = 170;
            Grilla.Columns[3].Width = 200;
            Grilla.Columns[4].Width = 100;
            Grilla.Columns[5].Width = 200;
            //double Total = fun.TotalizarColumna(trdo, "Costo");
            double Total          = fun.TotalizarColumnaCondicion(trdo, "Costo", "Concesion", "0");
            double TotalConcesion = fun.TotalizarColumnaCondicion(trdo, "Costo", "Concesion", "1");

            txtMontoTotal.Text = Total.ToString();
            txtConcesion.Text  = TotalConcesion.ToString();
            if (txtMontoTotal.Text != "")
            {
                txtMontoTotal.Text = fun.SepararDecimales(txtMontoTotal.Text);
                txtMontoTotal.Text = fun.FormatoEnteroMiles(txtMontoTotal.Text);
            }
            if (txtConcesion.Text != "")
            {
                txtConcesion.Text = fun.SepararDecimales(txtConcesion.Text);
                txtConcesion.Text = fun.FormatoEnteroMiles(txtConcesion.Text);
            }
        }
        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";
        }
        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;
        }
示例#16
0
        private void GetTarjeta()
        {
            Clases.cFunciones fun     = new Clases.cFunciones();
            Clases.cTarjeta   tarjeta = new Clases.cTarjeta();
            Double            Importe = tarjeta.GetSaldoTarjeta();

            txtTarjeta.Text = Importe.ToString();
            if (Importe > 0)
            {
                txtTarjeta.Text = fun.SepararDecimales(txtTarjeta.Text);
                txtTarjeta.Text = fun.FormatoEnteroMiles(txtTarjeta.Text);
            }
        }
示例#17
0
        private void GetDeudasxPrestamo()
        {
            Clases.cFunciones fun      = new Clases.cFunciones();
            Clases.cPrestamo  prestamo = new Clases.cPrestamo();
            double            Importe  = prestamo.GetTotalDeudaPrestamo();

            txtDeudaxPrestamo.Text = Importe.ToString();
            if (Importe > 0)
            {
                txtDeudaxPrestamo.Text = fun.SepararDecimales(txtDeudaxPrestamo.Text);
                txtDeudaxPrestamo.Text = fun.FormatoEnteroMiles(txtDeudaxPrestamo.Text);
            }
        }
示例#18
0
        private void GetCobranzaGeneral()
        {
            Clases.cCobranzaGeneral cob = new Clases.cCobranzaGeneral();
            double Importe = cob.GetTotalCobranza();

            txtCobranzaGeneral.Text = Importe.ToString();
            Clases.cFunciones fun = new Clases.cFunciones();
            if (Importe > 0)
            {
                txtCobranzaGeneral.Text = fun.SepararDecimales(txtCobranzaGeneral.Text);
                txtCobranzaGeneral.Text = fun.FormatoEnteroMiles(txtCobranzaGeneral.Text);
            }
        }
示例#19
0
        private void btnImprimir_Click(object sender, EventArgs e)
        {
            Int32  CodStock      = 0;
            string Descripcion   = "";
            string Marca         = "";
            string Patente       = "";
            string Precio        = "100.00";
            string Modelo        = "";
            string Kilometros    = "";
            string Combustible   = "";
            string NumeroInterno = "";
            string Ubicacion     = "";
            string sql           = "";

            Clases.cFunciones fun = new Clases.cFunciones();
            Clases.cDb.ExecutarNonQuery("delete from ReporteAuto");
            for (int i = 0; i < Grilla.Rows.Count - 1; i++)
            {
                CodStock    = Convert.ToInt32(Grilla.Rows[i].Cells[0].Value.ToString());
                Modelo      = GetModeloxCodStock(CodStock);
                Precio      = GetPrecioxCodStock(CodStock);
                Kilometros  = GetKilometrosxCodStock(CodStock);
                Combustible = GetCombustiblexCodStock(CodStock);
                if (Precio != "")
                {
                    Precio = fun.SepararDecimales(Precio);
                    Precio = fun.FormatoEnteroMiles(Precio);
                }

                Patente       = Grilla.Rows[i].Cells[1].Value.ToString();
                NumeroInterno = GetNumeroInternoxPatente(Patente);
                //Ubicacion = GetUbicacion (Patente);

                Descripcion = Grilla.Rows[i].Cells[3].Value.ToString();
                Marca       = Grilla.Rows[i].Cells[2].Value.ToString();
                sql         = "Insert into ReporteAuto(Extra1,Descripcion,Marca,Modelo,Precio,Kilometros,Combustible,Extra2)";
                sql         = sql + "values(" + "'" + Patente + "'";
                sql         = sql + "," + "'" + Descripcion + "'";
                sql         = sql + "," + "'" + Marca + "'";
                sql         = sql + "," + "'" + Modelo + "'";
                sql         = sql + "," + "'" + Precio + "'";
                sql         = sql + "," + "'" + Kilometros + "'";
                sql         = sql + "," + "'" + Combustible + "'";
                sql         = sql + "," + "'" + NumeroInterno + "'";
                sql         = sql + ")";
                Clases.cDb.ExecutarNonQuery(sql);
            }
            FrmReporteListaPrecio form = new FrmReporteListaPrecio();

            form.Show();
        }
        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);
            }
        }
示例#21
0
        private void GetTotalVehiculo()
        {
            Clases.cFunciones fun   = new Clases.cFunciones();
            Clases.cStockAuto stock = new Clases.cStockAuto();
            DataTable         trdo  = stock.GetStockDetalladosVigente("", null);
            double            Total = fun.TotalizarColumnaCondicion(trdo, "Costo", "Concesion", "0");

            txtVehículo.Text = Total.ToString();
            if (txtVehículo.Text != "")
            {
                txtVehículo.Text = fun.SepararDecimales(txtVehículo.Text);
                txtVehículo.Text = fun.FormatoEnteroMiles(txtVehículo.Text);
            }
        }
示例#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;
            }

            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);
            }
        }
示例#23
0
        private void GetEfectivoPagar(Int32 CodCompra)
        {
            Clases.cFunciones      fun = new Clases.cFunciones();
            Clases.cEfectivoaPagar eft = new Clases.cEfectivoaPagar();
            DataTable trdo             = eft.GetEfectivoPagarxCodCompra(CodCompra);

            if (trdo.Rows.Count > 0)
            {
                if (trdo.Rows[0]["Importe"].ToString() != "")
                {
                    txtEfectivoPagar.Text = trdo.Rows[0]["Importe"].ToString();
                    txtEfectivoPagar.Text = fun.SepararDecimales(txtEfectivoPagar.Text);
                    txtEfectivoPagar.Text = fun.FormatoEnteroMiles(txtEfectivoPagar.Text);
                }
            }
        }
        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;
        }
示例#25
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;
        }
示例#26
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;
            }

            Boolean SoloImpago = false;

            if (chkImpagos.Checked == true)
            {
                SoloImpago = true;
            }
            //Clases.cFunciones fun = new Clases.cFunciones();
            Clases.cCuota cuota      = new Clases.cCuota();
            DateTime      FechaDesde = Convert.ToDateTime(txtFechaDesde.Text);
            DateTime      FechaHasta = Convert.ToDateTime(txtFechaHasta.Text);
            DataTable     trdo       = cuota.GetDeuda(FechaDesde, FechaHasta, SoloImpago, txtPatente.Text, txtApellido.Text);

            trdo          = fun.TablaaMiles(trdo, "Saldo");
            txtTotal.Text = fun.TotalizarColumna(trdo, "Importe").ToString();
            if (txtTotal.Text != "")
            {
                txtTotal.Text = fun.SepararDecimales(txtTotal.Text);
                txtTotal.Text = fun.FormatoEnteroMiles(txtTotal.Text);
            }
            else
            {
                txtTotal.Text = "0";
            }
            trdo = fun.TablaaMiles(trdo, "Importe");
            trdo = fun.TablaaMiles(trdo, "ImportePagado");
            Grilla.DataSource = trdo;

            Grilla.Columns[2].HeaderText = "Importe Pagado";
            Grilla.Columns[6].HeaderText = "Teléfono";
            Grilla.Columns[1].Width      = 150;
            Grilla.Columns[2].Width      = 150;
            Grilla.Columns[3].Width      = 150;
            Grilla.Columns[0].Width      = 78;
            Grilla.Columns[5].Width      = 150;
            Grilla.Columns[6].Width      = 150;
            Grilla.Columns[7].Width      = 150;
            Grilla.Columns[8].Width      = 150;

            Grilla.Columns[6].Visible = false;
            Grilla.Columns[7].Visible = false;
            Grilla.Columns[8].Width   = 120;
            Grilla.Columns[3].Width   = 80;
            Grilla.Columns[9].Width   = 100;
            Grilla.Columns[10].Width  = 220;
        }
示例#27
0
        private string GetFormasPago()
        {
            Clases.cFunciones fun   = new Clases.cFunciones();
            string            texto = "";
            int b = 0;

            if (txtSenia.Text != "")
            {
                texto = "Seña adelanto " + txtSenia.Text;
                b     = 1;
            }
            if (txtEfectivo.Text != "")
            {
                if (b == 0)
                {
                    texto = " efectivo en este acto " + txtEfectivo.Text;
                }
                else
                {
                    texto = texto + ",efectivo en este acto " + txtEfectivo.Text;
                }
                b = 1;
            }
            if (txtDocumentos.Text != "")
            {
                if (b == 0)
                {
                    texto = " Documento de " + txtDocumentos.Text;
                }
                else
                {
                    texto = texto + ", Documento de " + txtDocumentos.Text;
                }
            }

            if (txtAutoPartePago.Text != "")
            {
                texto = texto + txtAutoPartePago.Text;
            }

            // busco si hubo prenda
            Clases.cPrenda prenda = new Clases.cPrenda();
            DataTable      trdo   = prenda.GetPrendaxCodVenta(Convert.ToInt32(Principal.CodigoPrincipalAbm));

            if (trdo.Rows.Count > 0)
            {
                string Importe = trdo.Rows[0]["Importe"].ToString();
                Importe = fun.SepararDecimales(Importe);
                Importe = fun.FormatoEnteroMiles(Importe);
                string Descripcion = trdo.Rows[0]["Descripcion"].ToString();
                texto = texto + ",crédito prendario a cargo de " + Descripcion;
                texto = texto + ", por un valor de " + Importe;
            }

            texto = texto + ",sobre el cual se aplicaran los siguientes descuentos:";
            if (txtRentas.Text != "")
            {
                texto = texto + ", rentas :" + txtRentas.Text;
            }

            if (txtMunicipalidad.Text != "")
            {
                texto = texto + ", municipalidad :" + txtMunicipalidad.Text;
            }

            if (txtMultas.Text != "")
            {
                texto = texto + ", multas :" + txtMultas.Text;
            }

            if (txtMultas.Text != "")
            {
                texto = texto + ", rentas :" + txtMultas.Text;
            }

            if (txtVerificacion.Text != "")
            {
                texto = texto + ", verificación :" + txtVerificacion.Text;
            }

            if (txtFirmasyForm.Text != "")
            {
                texto = texto + ", firmas y form. :" + txtFirmasyForm.Text;
            }

            if (txtCancelacionPrenda.Text != "")
            {
                texto = texto + ", cancelac prenda. :" + txtCancelacionPrenda.Text;
            }

            if (txtOtros.Text != "")
            {
                texto = texto + ", cancelac prenda. :" + txtOtros.Text;
            }


            return(texto);
        }
示例#28
0
        private void txtPatente_TextChanged(object sender, EventArgs e)
        {
            foreach (Control c in this.Controls)
            {
                if (c is GroupBox)
                {
                    foreach (Control g in c.Controls)
                    {
                        if (g is TextBox)
                        {
                            ((TextBox)g).CharacterCasing = CharacterCasing.Upper;
                        }
                    }
                    //Empleamos un casteo
                }
            }
            Clases.cFunciones fun     = new Clases.cFunciones();
            string            Patente = txtPatente.Text;
            int b = 0;

            if (Patente.Length > 5)
            {
                Clases.cAuto auto = new Clases.cAuto();
                DataTable    trdo = auto.GetAutoxPatente(Patente);
                if (trdo.Rows.Count > 0)
                {
                    b = 1;
                    txtDescripcion.Text = trdo.Rows[0]["Descripcion"].ToString();
                    txtAnio.Text        = trdo.Rows[0]["Anio"].ToString();
                    txtKms.Text         = trdo.Rows[0]["Kilometros"].ToString();
                    txtCodAuto.Text     = trdo.Rows[0]["CodAuto"].ToString();
                    txtImporte.Text     = trdo.Rows[0]["Importe"].ToString();
                    if (txtImporte.Text != "")
                    {
                        txtImporte.Text = fun.SepararDecimales(txtImporte.Text);
                    }
                    if (trdo.Rows[0]["CodCiudad"].ToString() != "")
                    {
                        cmbCiudad.SelectedValue = trdo.Rows[0]["CodCiudad"].ToString();
                    }

                    if (trdo.Rows[0]["CodMarca"].ToString() != "")
                    {
                        cmbMarca.SelectedValue = trdo.Rows[0]["CodMarca"].ToString();
                    }

                    if (trdo.Rows[0]["Propio"].ToString() == "1")
                    {
                        radioPropio.Checked    = true;
                        radioConcesion.Checked = false;
                    }

                    if (trdo.Rows[0]["Concesion"].ToString() == "1")
                    {
                        radioPropio.Checked    = false;
                        radioConcesion.Checked = true;
                    }
                    Clases.cStockAuto stock = new Clases.cStockAuto();
                    DataTable         trdo2 = stock.GetStockAutosVigentes(Convert.ToInt32(txtCodAuto.Text));
                    if (trdo2.Rows.Count > 0)
                    {
                        txtCodStock.Text = trdo2.Rows[0]["CodStock"].ToString();
                        CargarCostoxstock(Convert.ToInt32(txtCodStock.Text));
                    }
                }
            }
            if (b == 0)
            {
                LimpiarAuto();
            }
        }
示例#29
0
        private void GetGanancia()
        {
            Clases.cFunciones         fun                  = new Clases.cFunciones();
            Clases.cVenta             objVenta             = new Clases.cVenta();
            Clases.cPunitorioCobranza objPunitorioCobranza = new Clases.cPunitorioCobranza();
            Clases.cPunitorioCuota    objPunitorioCuota    = new Clases.cPunitorioCuota();
            DateTime  FechaDesde = Convert.ToDateTime(txtFechaDesde.Text);
            DateTime  FechaHasta = Convert.ToDateTime(txtFechaHasta.Text);
            DataTable trdo       = objVenta.GetVentasxFecha(FechaDesde, FechaHasta, "", null);

            Clases.cPreVenta objPreVenta = new Clases.cPreVenta();
            DataTable        trdo2       = objPreVenta.GetPreVentasxFecha(FechaDesde, FechaHasta, "", null);
            //le agre[g
            string Dato      = "";
            Int32  PosPintar = 0;

            PosPintar = trdo.Rows.Count;
            for (int i = 0; i < trdo2.Rows.Count; i++)
            {
                DataRow fila;
                fila = trdo.NewRow();
                for (int j = 0; j < trdo2.Columns.Count; j++)
                {
                    Dato    = trdo2.Rows[i][j].ToString();
                    fila[j] = Dato;
                }
                trdo.Rows.Add(fila);
            }
            Clases.cPunitorioCuotasAnteriores objPunDocAnt = new Clases.cPunitorioCuotasAnteriores();
            Int32 Cant = trdo.Rows.Count;

            txtCantidad.Text = Cant.ToString();
            trdo             = fun.TablaaMiles(trdo, "ImporteVenta");
            trdo             = fun.TablaaMiles(trdo, "ImporteEfectivo");
            trdo             = fun.TablaaMiles(trdo, "ImporteAutoPartePago");
            trdo             = fun.TablaaMiles(trdo, "ImporteCredito");
            trdo             = fun.TablaaMiles(trdo, "ImportePrenda");
            trdo             = fun.TablaaMiles(trdo, "Cheque");
            trdo             = fun.TablaaMiles(trdo, "ImporteCobranza");
            trdo             = fun.TablaaMiles(trdo, "Ganancia");
            double Utilidad = fun.TotalizarColumna(trdo, "Ganancia");
            Double ImportePunitorioCobranza        = objPunitorioCobranza.GetImportexFecha(FechaDesde, FechaHasta);
            Double ImportePunitorioCuota           = objPunitorioCuota.GetImportexFecha(FechaDesde, FechaHasta);
            Double ImportePunitorioCuotasAnterioes = objPunDocAnt.GetImportexFecha(FechaDesde, FechaHasta);
            Double TotalPunitorio = ImportePunitorioCobranza + ImportePunitorioCuota + ImportePunitorioCuotasAnterioes;

            txtUtilidad.Text = fun.TotalizarColumna(trdo, "Ganancia").ToString();
            txtUtilidad.Text = fun.FormatoEnteroMiles(txtUtilidad.Text);

            Clases.cGastosNegocio gastos = new Clases.cGastosNegocio();
            double TotalGastos           = gastos.GetGastosNegocioxFecha(FechaDesde, FechaHasta);

            txtGastos.Text = fun.SepararDecimales(TotalGastos.ToString());
            txtGastos.Text = fun.FormatoEnteroMiles(txtGastos.Text);

            Clases.cPagoIntereses objpago = new Clases.cPagoIntereses();
            double TotalPago = objpago.GetResumenPagosInteresesxFecha(FechaDesde, FechaHasta);

            txtInteresesPagados.Text = fun.SepararDecimales(TotalPago.ToString());
            txtInteresesPagados.Text = fun.FormatoEnteroMiles(txtInteresesPagados.Text);
            double InteresesGanados = 0;

            Clases.cCuotasAnteriores cuotasAnt = new Clases.cCuotasAnteriores();
            Clases.cCuota            cuota     = new Clases.cCuota();
            InteresesGanados         = cuota.GetGanaciaCobroCuotas(FechaDesde, FechaHasta);
            InteresesGanados         = InteresesGanados + cuotasAnt.GetGanaciaCobroCuotas(FechaDesde, FechaHasta);
            txtInteresesGanados.Text = InteresesGanados.ToString();
            txtInteresesGanados.Text = fun.FormatoEnteroMiles(txtInteresesGanados.Text);
            double Ganancia = Utilidad + TotalPunitorio - TotalPago - TotalGastos + InteresesGanados;

            txtResultado.Text = fun.SepararDecimales(Ganancia.ToString());
            txtResultado.Text = fun.FormatoEnteroMiles(txtResultado.Text);
            txtPunitorio.Text = TotalPunitorio.ToString();
            txtPunitorio.Text = fun.FormatoEnteroMiles(txtPunitorio.Text);
        }
示例#30
0
        private void CargarDatos(Int32 CodVenta)
        {
            GetAutoPartePago(CodVenta);
            Clases.cCliente cliente = new Clases.cCliente();
            Clases.cVenta   venta   = new Clases.cVenta();
            DataTable       trdo    = venta.GetVentaxCodigo(CodVenta);

            if (trdo.Rows.Count > 0)
            {
                Int32     CodCliente = Convert.ToInt32(trdo.Rows[0]["CodCliente"].ToString());
                DataTable tcli       = cliente.GetClientesxCodigo(CodCliente);
                if (tcli.Rows.Count > 0)
                {
                    string nombre = tcli.Rows[0]["Nombre"].ToString();
                    nombre = nombre + " " + tcli.Rows[0]["Apellido"].ToString();
                    string Direccion = tcli.Rows[0]["Calle"].ToString();
                    Direccion         = Direccion + " " + tcli.Rows[0]["Numero"].ToString();
                    txtDireccion.Text = Direccion;
                    txtTelefono.Text  = tcli.Rows[0]["Telefono"].ToString();
                    txtNombre.Text    = nombre;
                }
            }
            txtEfectivo.Text   = trdo.Rows[0]["ImporteEfectivo"].ToString();
            txtDocumentos.Text = trdo.Rows[0]["ImporteCredito"].ToString();
            Int32 CodAuto = Convert.ToInt32(trdo.Rows[0]["CodAutoVendido"].ToString());

            Clases.cAuto auto  = new Clases.cAuto();
            DataTable    tauto = auto.GetAutoxCodigo(CodAuto);

            {
                if (tauto.Rows.Count > 0)
                {
                    string Descrip = tauto.Rows[0]["Descripcion"].ToString();
                    Descrip      = Descrip + " AÑO " + tauto.Rows[0]["Anio"].ToString();
                    Descrip      = Descrip + " DOMINIO " + tauto.Rows[0]["Patente"].ToString();
                    Descrip      = Descrip + " MOTOR N º" + tauto.Rows[0]["Motor"].ToString();
                    Descrip      = Descrip + " CHASIS N º" + tauto.Rows[0]["Chasis"].ToString();
                    txtAuto.Text = Descrip;
                }
            }
            Clases.cFunciones fun = new Clases.cFunciones();
            if (txtEfectivo.Text != "0" && txtEfectivo.Text != "")
            {
                txtEfectivo.Text = fun.SepararDecimales(txtEfectivo.Text);
                txtEfectivo.Text = fun.FormatoEnteroMiles(txtEfectivo.Text);
            }

            if (txtDocumentos.Text != "0" && txtDocumentos.Text != "")
            {
                txtDocumentos.Text = fun.SepararDecimales(txtDocumentos.Text);
                txtDocumentos.Text = fun.FormatoEnteroMiles(txtDocumentos.Text);
            }
            Clases.cPrenda prenda     = new Clases.cPrenda();
            DataTable      trdoPrenda = prenda.GetPrendaxCodVenta(Convert.ToInt32(Principal.CodigoPrincipalAbm));

            if (trdoPrenda.Rows.Count > 0)
            {
                string Importe = trdoPrenda.Rows[0]["Importe"].ToString();
                Importe = fun.SepararDecimales(Importe);
                Importe = fun.FormatoEnteroMiles(Importe);
                txtImportePrenda.Text = Importe;
            }
        }