I need to create a View Model to use on the screen.
I'm not sure where to put the button rule to be enabled or not.
I thought of this implementation, I wonder if it's the best way. Another idea I had was to put the builder content in a Business
class.
public class ApoQueueVM
{
public ApoQueueVM(ApoQueue apoQueue, ApoFileBL apoFileBL)
{
this.EnableExport = apoQueue.Status == ApoQueueStatus.Gerado.ToString() || apoQueue.Status == ApoQueueStatus.Enviado.ToString();
this.KeyFigure = apoQueue.KeyFigure;
this.PathFileGenerated = apoFileBL.GetFullPathApo(apoQueue, true);
}
public string KeyFigure { get; set; }
public bool HaveInconsistencies { get; set; }
public string PathFileGenerated { get; set; }
public bool EnableExport { get; set; }
}