Esempio n. 1
0
        private void GetTelefonoCliente(Int32 CodStock)
        {
            Clases.cStockAuto stock = new Clases.cStockAuto();
            DataTable         trdo  = stock.GetStockxCodigo(CodStock);

            if (trdo.Rows.Count > 0)
            {
                if (trdo.Rows[0]["CodCliente"].ToString() != "")
                {
                    Int32           CodCliente = Convert.ToInt32(trdo.Rows[0]["CodCliente"].ToString());
                    Clases.cCliente cli        = new Clases.cCliente();
                    DataTable       tbCliente  = cli.GetClientesxCodigo(CodCliente);
                    if (tbCliente.Rows.Count > 0)
                    {
                        string telefono = tbCliente.Rows[0]["Telefono"].ToString();
                        string NroDoc   = tbCliente.Rows[0]["NroDocumento"].ToString();
                        txtTelefono.Text = telefono;
                        string Nombre   = tbCliente.Rows[0]["Nombre"].ToString();
                        string Apellido = tbCliente.Rows[0]["Apellido"].ToString();
                        string NomApe   = Nombre + " " + Apellido;
                        txtCliente.Text = NomApe;
                        string Celular = tbCliente.Rows[0]["Celular"].ToString();
                        txtCelular.Text = Celular;
                        txtNroDoc.Text  = NroDoc;
                    }
                }
            }
        }
Esempio n. 2
0
        private string GetCombustiblexCodStock(Int32 CodStock)
        {
            Clases.cStockAuto obj         = new Clases.cStockAuto();
            DataTable         trdo        = obj.GetStockxCodigo(CodStock);
            string            Combustible = "";

            if (trdo.Rows.Count > 0)
            {
                Combustible = trdo.Rows[0]["Combustible"].ToString();
            }
            return(Combustible);
        }
Esempio n. 3
0
        private string GetKilometrosxCodStock(Int32 CodStock)
        {
            Clases.cStockAuto obj        = new Clases.cStockAuto();
            DataTable         trdo       = obj.GetStockxCodigo(CodStock);
            string            Kilometros = "";

            if (trdo.Rows.Count > 0)
            {
                Kilometros = trdo.Rows[0]["Kilometros"].ToString();
            }
            return(Kilometros);
        }
Esempio n. 4
0
        private string GetPrecioxCodStock(Int32 CodStock)
        {
            Clases.cStockAuto obj    = new Clases.cStockAuto();
            DataTable         trdo   = obj.GetStockxCodigo(CodStock);
            string            Precio = "";

            if (trdo.Rows.Count > 0)
            {
                Precio = trdo.Rows[0]["PrecioVenta"].ToString();
            }
            return(Precio);
        }
Esempio n. 5
0
        private string GetModeloxCodStock(Int32 CodStock)
        {
            Clases.cStockAuto obj    = new Clases.cStockAuto();
            DataTable         trdo   = obj.GetStockxCodigo(CodStock);
            string            Modelo = "";

            if (trdo.Rows.Count > 0)
            {
                Modelo = trdo.Rows[0]["Anio"].ToString();
            }
            return(Modelo);
        }
Esempio n. 6
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
            }
        }
Esempio n. 7
0
        private void CargarAuto(Int32 CodStock)
        {
            Clases.cStockAuto stock    = new Clases.cStockAuto();
            DataTable         trdoAuto = stock.GetStockxCodigo(CodStock);

            if (trdoAuto.Rows.Count > 0)
            {
                if (trdoAuto.Rows[0]["FechaAlta"].ToString() != "")
                {
                    DateTime FechaIngreso = Convert.ToDateTime(trdoAuto.Rows[0]["FechaAlta"].ToString());
                    txtFechaIngreso.Text = FechaIngreso.ToShortDateString();
                }
                txtPatente.Text     = trdoAuto.Rows[0]["Patente"].ToString();
                txtDescripcion.Text = trdoAuto.Rows[0]["Descripcion"].ToString();
                txtkms.Text         = trdoAuto.Rows[0]["Kilometros"].ToString();
                txtanio.Text        = trdoAuto.Rows[0]["Anio"].ToString();
                txtCiudad.Text      = trdoAuto.Rows[0]["Motor"].ToString();
                txtChasis.Text      = trdoAuto.Rows[0]["Chasis"].ToString();
                txtMotor.Text       = trdoAuto.Rows[0]["Motor"].ToString();
                txtCiudad.Text      = trdoAuto.Rows[0]["Ciudad"].ToString();
                txtImporte.Text     = trdoAuto.Rows[0]["ImporteCompra"].ToString();
                txtPrecioVenta.Text = trdoAuto.Rows[0]["PrecioVenta"].ToString();
                txtCodCompra.Text   = trdoAuto.Rows[0]["CodCompra"].ToString();
                if (txtImporte.Text != "")
                {
                    txtImporte.Text = txtImporte.Text.Replace(",", ".");
                    string[]          vec = txtImporte.Text.Split('.');
                    Clases.cFunciones fun = new Clases.cFunciones();
                    txtImporte.Text = fun.FormatoEnteroMiles(vec[0]);
                }

                if (txtPrecioVenta.Text != "")
                {
                    txtPrecioVenta.Text = txtPrecioVenta.Text.Replace(",", ".");
                    string[]          vec = txtPrecioVenta.Text.Split('.');
                    Clases.cFunciones fun = new Clases.cFunciones();
                    txtPrecioVenta.Text = fun.FormatoEnteroMiles(vec[0]);
                }
                txtExTitular.Text     = trdoAuto.Rows[0]["ApeNom"].ToString();
                txtAutoPartePago.Text = trdoAuto.Rows[0]["DescripcionAutoPartePago"].ToString();
            }
        }