コード例 #1
0
        /// <summary>
        /// 复制数据对象
        /// </summary>
        /// <param name="sou">源对象,需从DataPacket继承</param>
        public override void AssignFrom(DataPacket sou)
        {
            base.AssignFrom(sou);
            CtaColDef s = sou as CtaColDef;

            if (s != null)
            {
                _unCheck = s._unCheck;
            }
        }
コード例 #2
0
        /// <summary>
        /// 刷新表格列
        /// </summary>
        public virtual void ReFormFields()
        {
            colList.Clear();
            if (souTable != null)
            {
                foreach (ColDef soucol in souTable.colList)
                {
                    CtaColDef coldef = new CtaColDef();
                    coldef.AssignFrom(soucol);
                    if (soucol.colIndx == 0)           // 这里序号列不对比,其他列都对比
                    {
                        coldef.unCheck = true;
                    }
                    else
                    {
                        coldef.unCheck = false;
                    }
                    colList.Add(coldef);
                }

                if (souTable is MDTableData)
                {
                    dcolList.Clear();
                    foreach (ColDef soucol in (souTable as MDTableData).dcolList)
                    {
                        CtaColDef coldef = new CtaColDef();
                        coldef.AssignFrom(soucol);
                        if (soucol.colIndx == 0)           // 这里序号列不对比,其他列都对比
                        {
                            coldef.unCheck = true;
                        }
                        else
                        {
                            coldef.unCheck = false;
                        }
                        dcolList.Add(coldef);
                    }
                }
            }
        }