protected void SetBadge(List <BestMessageInfo> bestMessages, string orderBy) { object best; List <BestMessageInfo> list = ((this.currentSortOrder == SortOrder.Desc) && (orderBy == this.currentSortArgument)) ? bestMessages : this.GetBestExistingData(orderBy, SortOrder.Desc, 1); if (list.Count != 0) { best = DataBinder.Eval(list[0], orderBy); BestMessageInfo info = bestMessages.FirstOrDefault <BestMessageInfo>(delegate(BestMessageInfo e) { object obj2 = DataBinder.Eval(e, orderBy); if (obj2 is int) { int num = (int)obj2; return((num > 0) && (num.CompareTo(best) == 0)); } if (!(obj2 is double)) { return(false); } double num2 = (double)obj2; return((num2 > 0.0) && (num2.CompareTo(best) == 0)); }); if (info != null) { info.IsBest = true; info.IsBestFieldsNames.Add(orderBy); } } }
private BestMessageInfo CreateRow(MessageItem message, MessageData data) { MessageStateInfo info = new MessageStateInfo(message); BestMessageInfo info2 = new BestMessageInfo(); info2.ID = info.ID; info2.CleanID = info.CleanID; info2.Name = info.Name; info2.Value = data.Value; info2.ValuePerVisit = data.ValuePerVisit; info2.VisitsPerEmail = data.VisitsPerEmail; info2.ValuePerEmail = data.ValuePerEmail; return(info2); }
private BestMessageInfo CreateRow(MessageItem message, MessageData data) { MessageStateInfo info = new MessageStateInfo(message); BestMessageInfo info2 = new BestMessageInfo(); info2.ID = info.ID; info2.CleanID = info.CleanID; info2.Name = info.Name; info2.Value = data.Value; info2.ValuePerVisit = data.ValuePerVisit; info2.VisitsPerEmail = data.VisitsPerEmail; info2.ValuePerEmail = data.ValuePerEmail; return info2; }