Пример #1
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;
             *
             *
             * _Subheadings_Statistics stat = new _Subheadings_Statistics(this.Current, this.Unit);
             * stat.DataSource = this.GetDataSource;
             * stat.Begin();
             * //计算子目经过子目取费
             * _ResultSubheadings_Statictics sta = new _ResultSubheadings_Statictics(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_Fixed(this.Unit, info);
             * met.Begin();*/
            _Entity_SubInfo info = null;
            DataRow         row  = null;
            _Methods        met  = null;

            _Subheadings_Statistics stat = new _Subheadings_Statistics(this.Current, this.Unit);

            stat.Begin();
            //计算子目经过子目取费
            _ResultSubheadings_Statictics sta = new _ResultSubheadings_Statictics(this.Current, this.Unit);

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

            //计算子目所属清单
            info = new _Entity_SubInfo();
            row  = this.Unit.StructSource.ModelMeasures.GetRowByOther(this.Current.PID.ToString());
            _ObjectSource.GetObject(info, row);
            met = new _Mothods_MFixed(this.CurrentBusiness, this.Unit, info);
            met.Begin(session);
        }
Пример #2
0
        public override void BeginCurrent()
        {
            _Subheadings_Statistics stat = new _Subheadings_Statistics(this.Current, this.Unit);

            stat.Begin();
            //计算子目经过子目取费
            _ResultSubheadings_Statictics sta = new _ResultSubheadings_Statictics(this.Current, this.Unit);

            sta.DataSource = this.GetDataSource;
            sta.Begin();
        }
Пример #3
0
        public override void BeginCurrent()
        {
            //lock (this.Unit.StructSource.ModelVariable)
            //{
            //    lock (this.Unit.StructSource.ModelResultVariable)
            //    {
            //        lock (this.Unit.StructSource.ModelSubSegments)
            //        {
            _Subheadings_Statistics stat = new _Subheadings_Statistics(this.Current, this.Unit);

            stat.Begin();

            //计算子目经过子目取费
            _ResultSubheadings_Statictics sta = new _ResultSubheadings_Statictics(this.Current, this.Unit);

            sta.DataSource = this.GetDataSource;
            sta.Begin();
            //        }
            //    }
            //}
        }
Пример #4
0
        /// <summary>
        /// 子目取费计算
        /// </summary>
        public override void SubheadingsFeeCurrent()
        {
            //工料机计算(没经过子目取费)
            _Entity_SubInfo         info = null;
            DataRow                 row  = null;
            _Methods                met  = null;
            _Subheadings_Statistics stat = new _Subheadings_Statistics(this.Current, this.Unit);

            stat.FBegin();
            //计算子目经过子目取费
            _ResultSubheadings_Statictics sta = new _ResultSubheadings_Statictics(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_Fixed(this.CurrentBusiness, this.Unit, info);
            met.Begin(null);
        }
Пример #5
0
        /// <summary>
        /// 计算子目
        /// </summary>
        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;

            if (Current.LB != "子目-增加费")
            {
                _Subheadings_Statistics stat = new _Subheadings_Statistics(this.Current, this.Unit);
                stat.Begin();
                //计算子目经过子目取费
                _ResultSubheadings_Statictics sta = new _ResultSubheadings_Statictics(this.Current, this.Unit);
                sta.DataSource = this.GetDataSource;
                sta.Begin();
            }

            //计算子目所属清单
            info = new _Entity_SubInfo();
            row  = this.Unit.StructSource.ModelSubSegments.GetRowByOther(this.Current.PID.ToString());
            var fix = _Entity_SubInfo.Parse(row);

            //var increase = new _Methods_IncreaseInfo(Current, new _Entity_IncreaseCosts());
            _ObjectSource.GetObject(info, row);
            met = new _Methods_Fixed(this.CurrentBusiness, this.Unit, info);
            met.Begin(session);
        }
Пример #6
0
        public bool BeginExtension()
        {
            //计算子目增加费
            var rows = this.GetDataSource.Select("LB = '子目-增加费' AND PID = '+" + Current.ID + "'");

            foreach (var row in rows)
            {
                var entity       = _Entity_SubInfo.Parse(row);
                var increaseRows = this.Unit.StructSource.ModelIncreaseCosts.Select("DH = '" + row["XMBM"] + "' AND QDID = '" + Current.ID + "'");

                if (increaseRows != null && increaseRows.Length > 0)
                {
                    var increaseRow = increaseRows[0];
                    var increase    = new _Entity_IncreaseCosts()
                    {
                        EnID = Current.EnID,
                        UnID = Current.UnID,
                        ZMID = Current.ID,
                        QDID = Current.PID
                    };

                    _ObjectSource.GetObject(increase, increaseRow);
                    _Methods_IncreaseInfo increaseMethod = new _Methods_IncreaseInfo(Unit, increase);
                    increaseMethod.CurrentBegin(Current);
                }

                var subStatictics = new _Subheadings_Statistics(entity, this.Unit);
                subStatictics.Begin();

                //计算子目经过子目取费
                _ResultSubheadings_Statictics resultStatictics = new _ResultSubheadings_Statictics(entity, this.Unit)
                {
                    DataSource = this.GetDataSource
                };
                resultStatictics.Begin();
            }

            return(rows != null && rows.Length > 0);
        }
Пример #7
0
        /// <summary>
        /// 计算当前子目的参数表(临时参数表)
        /// </summary>
        public void ParametersTableCalculate()
        {
            _Subheadings_Statistics stat = new _Subheadings_Statistics(this.Current, this.Unit);

            stat.ParametersTableCalculate();
        }