I have lblStatus
that serves to assign 4 different values according to the query and each value has a different size, so there is no way I can sort directly by the position property. So I would like to set the direct position for the code for each Status.
Example:
if(string.Compare(objPed.PedStatus,"L") == 0)
{
objPed.ConsultarNFPedido();
lblStatus.Text = " LIBERADO " + objPed.PedDtLib + " NOTA FISCAL: " + objPed.pedNFNumero + " SÉRIE: " + objPed.pedNFSerie + " ST: " + objPed.pedNFStatus;
lblStatus.ForeColor = Color.Green;
}
else if (string.Compare(objPed.PedStatus, "A") == 0)
{
lblStatus.Text = "PENDÊNCIA DE FATURAMENTO";
lblStatus.ForeColor = Color.Blue;
}
else if (string.Compare(objPed.PedStatus, "E") == 0)
{
lblStatus.Text = "PEDIDO EXCLUÍDO EM " + objPed.PedDtAlt + " POR " + objPed.PedIdAlt;
lblStatus.ForeColor = Color.DarkRed;
}
else if (string.Compare(objPed.PedStatus, "P") == 0)
{
lblStatus.Text = "AGUARDANDO PAGAMENTO";
lblStatus.ForeColor = Color.Blue;
}