I need to create a list, where it will list all the existing items within an order.
In the method below I can bring an item, but I can not bring it if I have more than one.
My question would be, do I have to create a method in code behind
and in classe
I do not know how lists logic works.
Code (note the line [ordered item]):
protected void ExibirProtocoloPedido(PedidoVenda objPed)
{
try
{
PedidoVendaItens objItPed = new PedidoVendaItens();
Produtos objProd = new Produtos();
Session["pedEmpresa"] = objPed.PedEmpresa;
Session["numPedido"] = objPed.PedNumero;
Session["msgOfertas"] = (!string.IsNullOrEmpty(objPed.pedMsgOfertas.ToString()) ? objPed.pedMsgOfertas.ToString() : "");
Session["itemPedido"] = objItPed.ItPProduto + " - " + objProd.ProdDescr + "/" + "Qtde.:" + objItPed.ItPQtde + " / " + "Total:" + objItPed.ItPrecoComp;
Session["msgMatApoio"] = (!string.IsNullOrEmpty(objPed.pedMsgMatApoio.ToString()) ? objPed.pedMsgMatApoio.ToString() : "");
Session["msgReorderGerado"] = (!string.IsNullOrEmpty(objPed.pedMsgReorderGerado.ToString()) ? objPed.pedMsgReorderGerado.ToString() : "");
Session["msgReorderAtendido"] = (!string.IsNullOrEmpty(objPed.pedMsgReorderAtendido.ToString()) ? objPed.pedMsgReorderAtendido.ToString() : "");
Session["msgReorderNaoAtendido"] = (!string.IsNullOrEmpty(objPed.pedMsgReorderNaoAtendido.ToString()) ? objPed.pedMsgReorderNaoAtendido.ToString() : "");
Session["msgPendencias"] = (!string.IsNullOrEmpty(objPed.pedMsgPendencias.ToString()) ? objPed.pedMsgPendencias.ToString() : "");
Session["valorPedido"] = (!string.IsNullOrEmpty(txtValACobrar.Text) ? string.Format("{0:0,0.00}", txtValACobrar.Text) : "0");
Session["statusPed"] = objPed.PedStatus;
Session["formaPagto"] = objPed.PedForPgto;
ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "", "ShowProtocolo();", true);
}
catch (Exception ex)
{
throw ex;
}
}
The result that returns me from this method is:
2210 - Devione 125ML / Qty .: 1 / Total: 15.75