예제 #1
0
        public claseVenta BucarID(string id)
        {
            claseVenta claseventa = new claseVenta();


            DataTable Tabla = conexion.consulta(string.Format("SELECT idVenta ,idFactura, idProducto, precio, Cantidad,Descuento,total FROM idDetalleDeVenta WHERE idEmpleado='{0}';", id));

            //MessageBox.Show(Convert.ToString(id));
            //empleado.usuario = "HHHH";
            //MessageBox.Show(Convert.ToString(idEmpleado = Tabla.Rows[0][0].ToString()));
            if (Tabla.Rows.Count > 0)
            {
                claseventa.idVenta    = Convert.ToInt32(Tabla.Rows[0][2]);
                claseventa.idFactura  = Convert.ToInt32(Tabla.Rows[0][3]);
                claseventa.idProducto = Convert.ToInt32(Tabla.Rows[0][4]);
                claseventa.precio     = Convert.ToDouble(Tabla.Rows[0][5]);
                claseventa.cantidades = Convert.ToInt32(Tabla.Rows[0][6]);
                claseventa.descuento  = Convert.ToInt32(Tabla.Rows[0][3]);
                claseventa.total      = Convert.ToDouble(Tabla.Rows[0][7]);
                //MessageBox.Show("Si hay");
            }
            return(claseventa);
        }
예제 #2
0
 public Ins_Venta()
 {
     InitializeComponent();
     venta    = new claseVenta();
     conexion = new Conexion();
 }