Exemple #1
0
 public int updateEstadoPedido(UpdateEstadoPedido pedido)
 {
     try
     {
         using (SqlConnection con = new SqlConnection(connectionString))
         {
             SqlCommand cmd = new SqlCommand("spUpdateEstadoPedido", con);
             cmd.CommandType = CommandType.StoredProcedure;
             cmd.Parameters.AddWithValue("@estadoId", pedido.estadoPedido);
             cmd.Parameters.AddWithValue("@pedidoId", pedido.pedidoId);
             con.Open();
             cmd.ExecuteNonQuery();
             con.Close();
         }
         return(1);
     }
     catch (Exception e)
     {
         throw;
     }
 }
 public int UpdateEstadoPedido([FromBody] UpdateEstadoPedido value)
 {
     return(pedido.updateEstadoPedido(value));
 }
 public int updateEstadoPedido(UpdateEstadoPedido pedido)
 {
     return(pedidoData.updateEstadoPedido(pedido));
 }