예제 #1
0
        public string ToSelectString(string defaultFormatString)
        {
            StringBuilder stringBuilder = new StringBuilder();

            if (this.IsAggregate)
            {
                stringBuilder.AppendFormat("{0}([{1}])", (object)this.Aggregate.ToString().ToLower(), (object)this.FieldName);
            }
            else
            {
                stringBuilder.AppendFormat("[{0}]", (object)this.FieldName);
            }
            if (this.IsFieldAliasSet)
            {
                stringBuilder.AppendFormat(" as [{0}]", (object)this.FieldAlias);
            }
            string str = this.IsFormatStringSet ? this.formatString : defaultFormatString;

            if (!string.IsNullOrEmpty(str) && string.Compare(str, GridGroupByField.DefaultFormatString) == 0)
            {
                str = (string)null;
            }
            if (!string.IsNullOrEmpty(str))
            {
                stringBuilder.AppendFormat(" format {0}", (object)GridGroupByField.UpdateFormatString(str, true, false));
            }
            return(stringBuilder.ToString());
        }
예제 #2
0
 public virtual string UpdateFormatString(bool doubleQuote, bool forceChange)
 {
     if (this.IsFormatStringSet)
     {
         this.formatString = GridGroupByField.UpdateFormatString(this.formatString, doubleQuote, forceChange);
     }
     return(this.formatString);
 }