Exemple #1
0
        public void seleccionarPorId(RegistroCompraEntidad registroCompraEntidad)
        {
            string     sql = @"Select  IdRegistroCompra,IdProducto,NombreCliente,TotalImpuesto,SubTotal,Total,Estado  from  RegistroCompra 
            Where (IdRegistroCompra = @IdRegistroCompra) ";
            SqlCommand cmd = new SqlCommand();

            cmd.Parameters.AddWithValue("@IdRegistroCompra", registroCompraEntidad.IdRegistroCompra);
            cmd.CommandText = sql;
        }
Exemple #2
0
        public void eliminar(RegistroCompraEntidad registroCompraEntidad)
        {
            string     sql = @"Delete from  RegistroCompra 
            Where (@IdRegistroCompra = IdRegistroCompra) ";
            SqlCommand cmd = new SqlCommand();

            cmd.Parameters.AddWithValue("@IdRegistroCompra", registroCompraEntidad.IdRegistroCompra);
            cmd.CommandText = sql;
        }
Exemple #3
0
        public void insertar(RegistroCompraEntidad registroCompraEntidad)
        {
            string     sql = @"Insert into RegistroCompra(IdProducto,NombreCliente,TotalImpuesto,SubTotal,Total,Estado) values (@IdProducto,@NombreCliente,@TotalImpuesto,@SubTotal,@Total,@Estado)";
            SqlCommand cmd = new SqlCommand();

            cmd.Parameters.AddWithValue("@IdProducto", registroCompraEntidad.productoEntidad.IdProducto);
            cmd.Parameters.AddWithValue("@NombreCliente", registroCompraEntidad.NombreCliente);
            cmd.Parameters.AddWithValue("@TotalImpuesto", registroCompraEntidad.TotalImpuesto);
            cmd.Parameters.AddWithValue("@SubTotal", registroCompraEntidad.SubTotal);
            cmd.Parameters.AddWithValue("@Total", registroCompraEntidad.Total);
            cmd.Parameters.AddWithValue("@Estado", registroCompraEntidad.Estado);
            cmd.CommandText = sql;
        }
Exemple #4
0
        public void actualizar(RegistroCompraEntidad registroCompraEntidad)
        {
            string     sql = @"Update  RegistroCompra SET 
            IdProducto = @IdProducto ,NombreCliente = @NombreCliente ,TotalImpuesto = @TotalImpuesto ,SubTotal = @SubTotal ,Total = @Total ,Estado = @Estado  Where (@IdRegistroCompra =" + registroCompraEntidad.IdRegistroCompra + ")";
            SqlCommand cmd = new SqlCommand();

            cmd.Parameters.AddWithValue("@IdRegistroCompra", registroCompraEntidad.IdRegistroCompra);
            cmd.Parameters.AddWithValue("@IdProducto", registroCompraEntidad.productoEntidad.IdProducto);
            cmd.Parameters.AddWithValue("@NombreCliente", registroCompraEntidad.NombreCliente);
            cmd.Parameters.AddWithValue("@TotalImpuesto", registroCompraEntidad.TotalImpuesto);
            cmd.Parameters.AddWithValue("@SubTotal", registroCompraEntidad.SubTotal);
            cmd.Parameters.AddWithValue("@Total", registroCompraEntidad.Total);
            cmd.Parameters.AddWithValue("@Estado", registroCompraEntidad.Estado);
            cmd.CommandText = sql;
        }