Exemple #1
0
        /// <summary>
        /// 清单的下面的增加费计算
        /// </summary>
        private void PBegin()
        {
            _ObjectInfo       info  = GetQIncreaseCosts();
            _SubheadingsInfo  info1 = info as _SubheadingsInfo;
            _MSubheadingsInfo info2 = info as _MSubheadingsInfo;

            if (info1 != null)
            {
                Result result = GetResult();
                info1.Statistics.ResultVarable.Set(_Statistics.FILED_RGFDJ, result.RGF);
                info1.Statistics.ResultVarable.Set(_Statistics.FILED_CLFDJ, result.CLF);
                info1.Statistics.ResultVarable.Set(_Statistics.FILED_JXFDJ, result.JXF);

                decimal temp = result.JXF + result.CLF + result.RGF;
                info1.Statistics.ResultVarable.Set(_Statistics.FILED_ZJFDJ, temp);
                info1.Statistics.ResultVarable.Set(_Statistics.FILED_ZHDJ, temp);
                info1.Begin();
            }

            if (info2 != null)
            {
                Result result = GetResult();
                info2.Statistics.ResultVarable.Set(_Statistics.FILED_RGFDJ, result.RGF);
                info2.Statistics.ResultVarable.Set(_Statistics.FILED_CLFDJ, result.CLF);
                info2.Statistics.ResultVarable.Set(_Statistics.FILED_JXFDJ, result.JXF);

                decimal temp = result.JXF + result.CLF + result.RGF;
                info2.Statistics.ResultVarable.Set(_Statistics.FILED_ZJFDJ, temp);
                info2.Statistics.ResultVarable.Set(_Statistics.FILED_ZHDJ, temp);
                info2.Begin();
            }
        }
Exemple #2
0
        public virtual void Create(_SubheadingsInfo info)
        {
            //info.Activitie = this.Activitie;
            info.STATUS = false;
            info.IsCalc = true;
            //info.ID = this.m_Parent.ObjectID;
            info.PARENTID  = this.ID;
            info.CPARENTID = this.ID;
            info.FPARENTID = this.ID;
            info.PPARENTID = this.ID;
            int m = GCLSR();

            if (m > 0)
            {
                decimal d = _ConvertUnit.Convert(this.DW, info.DW);
                info.HL = d;
            }

            //info.Sort = this.Activitie.Property.SubSegments.GetSortByType(info.GetType()) + 1;
            this.m_SubheadingsList.Add(info);

            info.Create();
            if (info.LB == "子目")
            {
                info.Subheadings_Statistics.Begin();
                //子目添加完成执行的事件
                if (info.IsHs)
                {
                    this.OnZiMuAddEvent(info);
                }
            }
            else
            {
                info.Begin();
                // this.Parent.DataSource.ResetBindings(false);
            }

            info.STATUS = true;
            this.ActionAttribute("Create", "子目", info, null);
            this.Activitie.BeginEdit(this);
        }