예제 #1
0
        public object Clone()
        {
            FieldsCollections collections = new FieldsCollections();

            foreach (FieldItem item in this)
            {
                FieldItem fieldItem = new FieldItem();
                fieldItem.CalcType         = item.CalcType;
                fieldItem.DataTableName    = item.DataTableName;
                fieldItem.TableAliasName   = item.TableAliasName;
                fieldItem.DisplayOrder     = item.DisplayOrder;
                fieldItem.Expression       = item.Expression;
                fieldItem.FieldChineseName = item.FieldChineseName;
                fieldItem.FieldName        = item.FieldName;
                fieldItem.FieldType        = item.FieldType;
                fieldItem.FunctionName     = item.FunctionName;
                fieldItem.IsGroup          = item.IsGroup;
                fieldItem.Precision        = item.Precision;
                fieldItem.ColumnVisible    = item.ColumnVisible;
                fieldItem.Converge         = item.Converge;
                fieldItem.DisplayWidth     = item.DisplayWidth;
                fieldItem.DecimalDigits    = item.DecimalDigits;
                StyleFormat[] s = new StyleFormat[item.StyleFormat.Count];
                item.StyleFormat.CopyTo(s);
                fieldItem.StyleFormat = new System.Collections.Generic.List <StyleFormat>();

                foreach (StyleFormat st in s)
                {
                    fieldItem.StyleFormat.Add(st);
                }

                collections.Add(fieldItem);
            }
            return(collections);
        }
예제 #2
0
        public object Clone()
        {
            SnDataSet set = new SnDataSet();

            set.reportPath    = this.reportPath;
            set.dataSetID     = this.dataSetID;
            set.dataSetName   = this.dataSetName;
            set.dataSetType   = this.dataSetType;
            set.DataType      = this.DataType;
            set.sqlExpression = this.sqlExpression;
            FieldsCollections   collections2 = (FieldsCollections)this.fieldsList.Clone();
            SQLParamCollections collections3 = (SQLParamCollections)this.paramList.Clone();

            set.fieldsList = collections2;
            set.paramList  = collections3;
            return(set);
        }