}//fin metodo BuscarProductoVentas

        //inicio metodo cargar datagrid Ventas
        private void CargarVentas()
        {//inicio metdo cargar ventas
         //CAPTURAMOS VALOR DE LA FILA SELECCIONADA DG FORM2
            DFactura V        = new DFactura();
            DVentas  Ventas   = new DVentas();
            DDetalle Detalle1 = new DDetalle();
            decimal  Subtotal = 0;

            //dataVentas.Rows.Add(A, B, C, D, E);
            //foreach (DataGridViewRow fila in this.dataListadoProductos.Rows)
            //{
            //dataVentas.Rows.Add(fila.Cells[0].Value, fila.Cells[2].Value, fila.Cells[3].Value, fila.Cells[4].Value);
            //dataVentas.Rows.Add(A, B);
            //}
            //Int32 A = Convert.ToInt32(this.dataListadoProductos.CurrentRow.Cells[0].Value.ToString());
            //Int32 A = Convert.ToInt32(this.lblNumeroFactura.Text);
            //decimal P = Convert.ToDecimal(this.dataListadoProductos.CurrentRow.Cells[3].Value.ToString());
            //string B = this.txtCantidadProducto.Text;
            //string C = this.dataListadoProductos.CurrentRow.Cells[2].Value.ToString();
            //string D = this.dataListadoProductos.CurrentRow.Cells[3].Value.ToString();
            //Int32 E = dataListadoProductos.RowCount;
            //dataVentas.Rows.Add(A, B, D, E);

            //V.Fecha_venta = Convert.ToDateTime(this.dtpFechaVenta.Text);
            //V.Id_cliente = Convert.ToInt32(this.dataListadoProductos.CurrentRow.Cells[0].Value.ToString());
            //V.Id_cliente = Convert.ToInt32(this.txtIdentificador.Text);
            //V.Id_factura = Convert.ToInt32(this.txtCantidadProducto.Text);
            //V.Numero_factura = Convert.ToInt32(this.lblNumeroFactura.Text);
            //V.Comprobante_exposicion = Convert.ToInt32(this.dataListadoProductos.CurrentRow.Cells[0].Value.ToString());
            //V.Fecha_venta = Convert.ToDateTime(this.dtpFechaVenta.Value);

            //Detalle.Id_producto = Convert.ToInt32(this.dataListadoProductos.CurrentRow.Cells[5].Value.ToString());
            Ventas.Id_producto          = Convert.ToInt32(this.dataListadoProductos.CurrentRow.Cells[0].Value.ToString());
            Ventas.Precio_producto      = Convert.ToDecimal(this.dataListadoProductos.CurrentRow.Cells[4].Value.ToString());
            Ventas.Descripcion_producto = Convert.ToString(this.dataListadoProductos.CurrentRow.Cells[2].Value.ToString());
            Ventas.Cantidad_producto    = Convert.ToInt32(this.txtCantidadProducto.Text);
            Ventas.Id_factura           = Convert.ToInt32(this.lblNumeroFactura.Text);
            lst.Add(Ventas);
            LlenarGrilla();

            //Detalle.Id_producto = Convert.ToInt32(A);
            //Detalle.Precio_producto = Convert.ToDecimal(P);
            //Detalle.Cantidad_producto = Convert.ToInt32(this.txtCantidadProducto.Text);
            //lst.Add(Detalle);
            //LlenarGrilla();


            //foreach (DataGridViewRow row in dataListadoProductos.Rows)
            //{

            //int n = dataVentas.Rows.Add();
            //foreach (DataGridViewColumn col in dataListadoProductos.Columns)
            //    {
            //        dataVentas.Rows[n].Cells[col.Index].Value = dataListadoProductos.Rows[row.Index].Cells[col.Index].Value.ToString();
            //        //MessageBox.Show("numero de filas" + n);
            //    }


            //}
        }//fin metodo datagrid Ventas
Ejemplo n.º 2
0
        public static string InsertarVenta(out int id_venta, Ventas venta)
        {
            DVentas DVentas = new DVentas();

            return(DVentas.InsertarVentas(out id_venta, venta));
        }
Ejemplo n.º 3
0
        public static async Task <(string rpta, DataTable dtVentas)> BuscarVentas(string tipo_busqueda, string texto_busqueda)
        {
            DVentas DVentas = new DVentas();

            return(await DVentas.BuscarVentas(tipo_busqueda, texto_busqueda));
        }
Ejemplo n.º 4
0
        public static string EditarVenta(int id_venta, Ventas venta)
        {
            DVentas DVentas = new DVentas();

            return(DVentas.EditarVentas(id_venta, venta));
        }
Ejemplo n.º 5
0
 public static DataTable BuscarVentas(string tipo_busqueda, string texto_busqueda,
                                      string fecha, out string rpta)
 {
     return(DVentas.BuscarVentas(tipo_busqueda, texto_busqueda, fecha, out rpta));
 }
Ejemplo n.º 6
0
        public static string InsertarDetalleVentas(int id_venta, DataTable detalle)
        {
            DVentas dVentas = new DVentas();

            return(dVentas.InsertarDetalleVenta(id_venta, detalle));
        }
Ejemplo n.º 7
0
        public static string InsertarVentas(List <string> variables, DataTable detalle, out int id_venta)
        {
            DVentas dVentas = new DVentas();

            return(dVentas.InsertarVenta(variables, detalle, out id_venta));
        }