Try to cast enum to string
This commit is contained in:
@ -40,7 +40,11 @@
|
||||
</Template>
|
||||
<Columns>
|
||||
<RadzenDataGridColumn TItem="Campaign" Property="Id" Title="ID" SortOrder="SortOrder.Descending" Resizable="false" Width="100px" MaxWidth="100px" />
|
||||
<RadzenDataGridColumn TItem="Campaign" Property="Type" Title="Тип кампании" Resizable="true" />
|
||||
<RadzenDataGridColumn TItem="Campaign" Property="Type" Title="Тип кампании" Resizable="true">
|
||||
<Template Context="campaign">
|
||||
@CampaignTypeToString(campaign.Type)
|
||||
</Template>
|
||||
</RadzenDataGridColumn>
|
||||
<RadzenDataGridColumn TItem="Campaign" Property="CreatedAt" Title="Дата создания" Resizable="false" Width="150px" MaxWidth="150px" />
|
||||
<RadzenDataGridColumn TItem="Campaign" Property="StartedAt" Title="Дата начала" Resizable="false" Width="150px" MaxWidth="150px" />
|
||||
<RadzenDataGridColumn TItem="Campaign" Property="StartedAt" Title="Дата окончания" Resizable="false" Width="150px" MaxWidth="150px" />
|
||||
@ -123,6 +127,17 @@
|
||||
});
|
||||
}
|
||||
|
||||
string CampaignTypeToString(Campaign.CampaignType campaignType)
|
||||
{
|
||||
return campaignType switch
|
||||
{
|
||||
Campaign.CampaignType.ExportPrivateRegistryElements_15_7_0_1 => "Экспорт частных справочников",
|
||||
Campaign.CampaignType.ExportCommonRegistryElements_15_7_0_1 => "Экспорт общих справочников",
|
||||
|
||||
_ => "???"
|
||||
};
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
CampaignManagementState.OnCampaignCreated -= OnCampaignCreated;
|
||||
|
||||
Reference in New Issue
Block a user