Example #1
0
        public object Clone()
        {
            QueryFieldDefInfo other = (QueryFieldDefInfo)this.MemberwiseClone();

            other.m_TableColumnInfo = (TableFieldDefInfo)this.m_TableColumnInfo.Clone();
            other.m_strAliasName    = (string)this.m_strAliasName.Clone();
            other.m_strFuncFormat   = (string)this.m_strFuncFormat.Clone();

            return(other);
        }
Example #2
0
        public QueryTableDefInfo AddColumn(NameInfo columnName)
        {
            QueryTableDefInfo other = (QueryTableDefInfo)this.MemberwiseClone();

            other.m_QueryTableInfo = this.m_QueryTableInfo;
            other.m_strName        = this.m_strName;
            other.m_strAliasName   = this.m_strAliasName;
            TableFieldDefInfo tabColumn = other.m_QueryTableInfo.FieldByName(columnName.Name);
            QueryFieldDefInfo addColumn = new QueryFieldDefInfo(tabColumn, columnName.Alias, columnName.Function);

            other.m_QueryFields = this.m_QueryFields.Concat(new List <QueryFieldDefInfo>()
            {
                addColumn
            }).ToList();

            return(other);
        }
Example #3
0
        public QueryTableDefInfo AddColumns(params NameInfo[] columnNames)
        {
            QueryTableDefInfo other = (QueryTableDefInfo)this.MemberwiseClone();

            other.m_QueryTableInfo = this.m_QueryTableInfo;
            other.m_strName        = this.m_strName;
            other.m_strAliasName   = this.m_strAliasName;

            IList <QueryFieldDefInfo> listQueryFields = this.m_QueryFields.ToList();

            foreach (var columnName in columnNames)
            {
                TableFieldDefInfo tabColumn = other.m_QueryTableInfo.FieldByName(columnName.Name);
                QueryFieldDefInfo addColumn = new QueryFieldDefInfo(tabColumn, columnName.Alias, columnName.Function);
                listQueryFields.Add(addColumn);
            }
            other.m_QueryFields = listQueryFields;
            return(other);
        }
Example #4
0
 public CloneQueryFieldDefInfo(QueryFieldDefInfo fieldInfo)
 {
     m_source = (QueryFieldDefInfo)fieldInfo.Clone();
     m_target = (QueryFieldDefInfo)fieldInfo.Clone();
 }