Пример #1
0
        public override void AddFilter(HttpRequestMessage message)
        {
            var filters = new Dictionary <string, string>();

            if (EntryNumber != null)
            {
                filters.Add("entry_number" + SearchVariantValue(EntryNumber.Item1), EntryNumber.Item2);
            }

            if (ReferenceNumber != null)
            {
                filters.Add("reference_number" + SearchVariantValue(ReferenceNumber.Item1), ReferenceNumber.Item2);
            }

            if (Date != null)
            {
                filters.Add("date" + DateVariantValue(Date.Item1), Date.Item2.ToString());
            }

            if (Notes != null)
            {
                filters.Add("notes" + SearchVariantValue(Notes.Item1), Notes.Item2);
            }

            if (LastModifiedTime != null)
            {
                filters.Add("last_modified_time", LastModifiedTime.ToString());
            }

            if (Total != null)
            {
                filters.Add("total" + JsonConvert.SerializeObject(Total).Trim('\"'), Total.ToString());
            }

            if (CustomerId != null)
            {
                filters.Add("customer_id", CustomerId);
            }

            if (FilterBy != null)
            {
                filters.Add("filter_by", JsonConvert.SerializeObject(FilterBy.Value).Trim('\"'));
            }

            if (SortColumn != null)
            {
                filters.Add("sort_column", JsonConvert.SerializeObject(SortColumn.Value).Trim('\"'));
            }

            base.AddFilter(message, filters);
        }
Пример #2
0
    public override string ToString()
    {
        var  sb      = new StringBuilder("TMessageBox(");
        bool __first = true;

        if (Id != null && __isset.id)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("Id: ");
            Id.ToString(sb);
        }
        if (ChannelId != null && __isset.channelId)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("ChannelId: ");
            ChannelId.ToString(sb);
        }
        if (__isset.lastSeq)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("LastSeq: ");
            LastSeq.ToString(sb);
        }
        if (__isset.unreadCount)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("UnreadCount: ");
            UnreadCount.ToString(sb);
        }
        if (__isset.lastModifiedTime)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("LastModifiedTime: ");
            LastModifiedTime.ToString(sb);
        }
        if (__isset.status)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("Status: ");
            Status.ToString(sb);
        }
        if (__isset.midType)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("MidType: ");
            MidType.ToString(sb);
        }
        if (LastMessages != null && __isset.lastMessages)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("LastMessages: ");
            LastMessages.ToString(sb);
        }
        sb.Append(")");
        return(sb.ToString());
    }