本文整理汇总了C#中Samba.Domain.Models.Tickets.Ticket.IsTaggedWith方法的典型用法代码示例。如果您正苦于以下问题:C# Ticket.IsTaggedWith方法的具体用法?C# Ticket.IsTaggedWith怎么用?C# Ticket.IsTaggedWith使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Samba.Domain.Models.Tickets.Ticket
的用法示例。
在下文中一共展示了Ticket.IsTaggedWith方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ShouldDisplayTicketTagList
private bool ShouldDisplayTicketTagList(Ticket ticket)
{
return ticket != null
&& ticket.Orders.Count == 0
&& _applicationState.GetTicketTagGroups().Any(x => x.AskBeforeCreatingTicket && !ticket.IsTaggedWith(x.Name));
}
示例2: TicketTagSelected
public bool TicketTagSelected(Ticket currentTicket, TicketTagGroup tagGroup)
{
SelectedTicket = currentTicket;
IsFreeTagEditorVisible = tagGroup.FreeTagging;
SelectedTicketTagData = tagGroup;
List<TicketTag> ticketTags;
if (IsFreeTagEditorVisible)
{
ticketTags = _cacheService.GetTicketTagGroupById(tagGroup.Id)
.TicketTags.OrderBy(x => x.Name).ToList();
}
else
{
ticketTags = _applicationState.GetTicketTagGroups().Where(
x => x.Name == tagGroup.Name).SelectMany(x => x.TicketTags).ToList();
}
ticketTags.Sort(new AlphanumComparator());
TicketTags.AddRange(ticketTags);
if (SelectedTicket.IsTaggedWith(tagGroup.Name))
{
if (TicketTags.Count == 1)
{
UpdateTicketTag(SelectedTicket, SelectedTicketTagData, TicketTag.Empty);
return true;
}
if (!tagGroup.ForceValue) TicketTags.Add(TicketTag.Empty);
}
if (TicketTags.Count == 1 && !IsFreeTagEditorVisible)
{
UpdateTicketTag(SelectedTicket, SelectedTicketTagData, TicketTags[0]);
return true;
}
RaisePropertyChanged(() => TagColumnCount);
RaisePropertyChanged(() => IsFreeTagEditorVisible);
RaisePropertyChanged(() => FilteredTextBoxType);
return false;
}