コード例 #1
0
        public static _Methods CreateIntace(_Business m_Currentbus, _UnitProject p_un, _Entity_SubInfo info)
        {
            _Methods m = new _Methods(m_Currentbus, p_un, info);

            switch (info.LB)
            {
            case "分部-专业":
                m = new _Methods_Pro(m_Currentbus, p_un, info);
                break;

            case "分部-章":
                m = new _Method_Chapt(m_Currentbus, p_un, info);
                break;

            case "分部-节":
                m = new _Method_Fest(m_Currentbus, p_un, info);
                break;

            case "清单":
                m = new _Methods_Fixed(m_Currentbus, p_un, info);
                break;

            case "子目":
                m = new _Methods_Subheadings(m_Currentbus, p_un, info);
                break;

            default:
                break;
            }
            return(m);
        }
コード例 #2
0
        public override void Begin(List <int> session)
        {
            if (session != null)
            {
                if (session.Contains(Current.ID))
                {
                    return;
                }
                else
                {
                    session.Add(Current.ID);
                }
            }

            _Entity_SubInfo info = null;
            DataRow         row  = null;
            _Methods        met  = null;

            _SubSegment_Statistics sta = new _SubSegment_Statistics(this.Current, this.Unit);

            sta.DataSource = this.GetDataSource;
            sta.Begin();

            //计算子目所属专业
            info = new _Entity_SubInfo();
            row  = this.Unit.StructSource.ModelSubSegments.GetRowByOther(this.Current.PID.ToString());
            _ObjectSource.GetObject(info, row);
            met = new _Methods_Pro(this.CurrentBusiness, this.Unit, info);
            met.Begin(session);
        }
コード例 #3
0
ファイル: _Method_Sub.cs プロジェクト: shansheng/QDJJ
        public override void Calculate()
        {
            DataRow[] rows = this.GetDataSource.Select(string.Format("PID={0}", this.Current.ID), "", DataViewRowState.CurrentRows);

            foreach (DataRow item in rows)
            {
                _Entity_SubInfo info = new _Entity_SubInfo();
                _ObjectSource.GetObject(info, item);
                _Methods_Pro met = new _Methods_Pro(this.CurrentBusiness, this.Unit, info);
                met.Calculate();
            }

            _SubSegment_Statistics sta = new _SubSegment_Statistics(this.Current, this.Unit);

            sta.DataSource = this.GetDataSource;
            sta.Begin();
        }