public List <ClsPropiedadesPedido> CargarPedidoDetalle(string NumeroPedido) { DataTable tabla = new DataTable(); Droid.ServicioWeb.Service1 service = new Droid.ServicioWeb.Service1(); tabla = service.ConsultarMultiple(NumeroPedido, "pedido"); List <ClsPropiedadesPedido> templist = new List <ClsPropiedadesPedido>(); for (int i = 0; i < tabla.Rows.Count; i++) { string cliente = tabla.Rows[i]["Prod_Descripcion"].ToString(); string NumPedido = tabla.Rows[i]["Prod_Codigo"].ToString(); string fecha = tabla.Rows[i]["PedDet_Precio"].ToString(); string valor = tabla.Rows[i]["PedDet_Cantidad"].ToString(); templist.Add(new ClsPropiedadesPedido { Codigo = NumPedido, Descripcion = cliente, VarDetalle = Convert.ToInt32(fecha), Cantidad = Convert.ToInt32(valor), }); } tabla.Dispose(); return(templist); }
public List <Tabla_Pedido> CargarPedidoCliente(string identificacion) { DataTable tabla = new DataTable(); Droid.ServicioWeb.Service1 service = new Droid.ServicioWeb.Service1(); tabla = service.ConsultarMultiple(identificacion, "pendiente"); List <Tabla_Pedido> templist = new List <Tabla_Pedido>(); for (int i = 0; i < tabla.Rows.Count; i++) { string cliente = tabla.Rows[i]["Cli_Identificacion"].ToString(); int NumPedido = Convert.ToInt32(tabla.Rows[i]["Ped_Numero"]); DateTime fecha = Convert.ToDateTime(tabla.Rows[i]["Ped_Fecha"]); string valor = tabla.Rows[i]["Ped_Valor"].ToString(); string estado = tabla.Rows[i]["Esta_Descripcion"].ToString(); templist.Add(new Tabla_Pedido { Ped_Numero = NumPedido, Ped_IdCliente = cliente, Ped_Fecha = fecha, Ped_Valor = Convert.ToInt32(valor), Ped_Estado = estado }); } tabla.Dispose(); return(templist); }