0
I have the lblStatus
which serves to assign 4 different values according to the query and each value has a different size, so there is no way I can directly form by the property the position. Then I would like to set the direct position by 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;
}