예제 #1
0
파일: _Cache.cs 프로젝트: shansheng/QDJJ
        /// <summary>
        /// 提取报表
        /// </summary>
        /// <returns></returns>
        private _List ExtractReport()
        {
            _Files files = new _Files();

            files.ExtName  = _Files.报表格式扩展名;
            files.DirName  = string.Format("{0}库文件\\系统库", AppFolder.FullName);
            files.FileName = "报表格式";
            try
            {
                FileInfo info = new FileInfo(files.FullName);
                if (info.Exists)
                {
                    //文件存在的时候读取
                    this.m_BaseReport = new _List();
                    object    ywj = CFiles.Deserialize(files.FullName);
                    ArrayList dsd = ywj as ArrayList;
                    if (dsd != null)
                    {
                        this.m_BaseReport.AddRange(dsd.ToArray());
                        if (this.m_BaseReport.Count <= 0)
                        {
                            this.m_BaseReport = null;
                        }
                    }
                }
                return(this.m_BaseReport);
            }
            catch (Exception ex)
            {
                this.m_BaseReport = null;
                return(this.m_BaseReport);
            }
        }
예제 #2
0
 /// <summary>
 /// 如何填充到指定集合中
 /// </summary>
 /// <param name="p_List"></param>
 public override void Fill(_List p_List)
 {
     this.Project.Property.Metaanalysis.Init();
     this.Project.Property.Metaanalysis.Calculate();
     //将自己加入到集合中
     p_List.Add(this);
 }
예제 #3
0
 /// <summary>
 /// 填充项目树结构
 /// </summary>
 /// <param name="p_List"></param>
 public virtual void Fill(_List p_List)
 {
     p_List.Add(this.Parent.Directory);
     foreach (_COBJECTS item in this.Parent.StrustObject.ObjectList.Values)
     {
         item.Property.Fill(p_List);
     }
 }
예제 #4
0
 /// <summary>
 /// 填充分部分项统计数据(单项工程添加)
 /// </summary>
 /// <param name="p_list"></param>
 public override void Fill(_List p_list, ref int p_seed)
 {
     this.Key = p_seed++;
     p_list.Add(this);
     foreach (_COBJECTS obj in this.Parent.StrustObject.ObjectList.Values)
     {
         obj.Reveal.ProMeasures.PKey = this.Key;
         obj.Reveal.ProMeasures.Fill(p_list, ref p_seed);
     }
 }
예제 #5
0
 /// <summary>
 /// 如何填充到指定集合中
 /// </summary>
 /// <param name="p_List"></param>
 public override void Fill(_List p_List)
 {
     //当前父对象中的所有单位工程添加到集合
     foreach (_COBJECTS obj in this.Parent.StrustObject.ObjectList.Values)
     {
         obj.Reveal.ProMetaanalysis.Fill(p_List);
     }
     //然后填充自己
     p_List.Add(this);
 }
예제 #6
0
파일: _Cache.cs 프로젝트: shansheng/QDJJ
        /// <summary>
        /// 1.检测并且初始化目录文件
        /// 2.初始化各个缓存对象
        /// </summary>
        /// <param name="p_AppFolder">应用程序目录</param>
        public void Init(DirectoryInfo p_AppFolder)
        {
            this.AppFolder = p_AppFolder;
            //1.检测目录是否存在
            string        dirName = p_AppFolder.FullName + "Cache";
            DirectoryInfo info    = ToolKit.GetDirectoryInfo(dirName);

            this.m_HistoryCache = _HistoryCache.CreateInstance(info);
            this.m_BaseReport   = ExtractReport();
        }
예제 #7
0
 /// <summary>
 /// 措施项目的构造 父类为单位工程
 /// </summary>
 /// <param name="p_Parent"></param>
 public _MeasuresProject(_UnitProject p_Parent)
 {
     //当前父类
     this.m_Parent = p_Parent;
     //this.Activitie = p_Parent;
     m_ObjectsList = new _List();
     //当前措施项目下的所有通用项目集合
     this.Statistics = new _Measures_Statistics(this);
     init();
     //Load();
 }
예제 #8
0
 /// <summary>
 /// 填充分部分项统计数据(单项工程添加)
 /// </summary>
 /// <param name="p_list"></param>
 public override void Fill(_List p_list, ref int p_seed)
 {
     //先添加自己
     this.Key  = p_seed++;
     this.PKey = -1;
     p_list.Add(this);
     foreach (_COBJECTS obj in this.Parent.StrustObject.ObjectList.Values)
     {
         obj.Reveal.ProSubSegment.PKey = this.Key;
         obj.Reveal.ProSubSegment.Fill(p_list, ref p_seed);
     }
 }
예제 #9
0
        /// <summary>
        /// 填充分部分项统计数据(单位工程添加)
        /// </summary>
        /// <param name="p_list"></param>
        public override void Fill(_List p_list, ref int p_seed)
        {
            //根据类别处理分部分项数据或者措施项目数据

            this.Key = p_seed++;
            p_list.Add(this);
            //分部分项操作
            foreach (ISubSegment sub in this.Parent.Property.MeasuresProject.ObjectsList)
            {
                if (!(sub is _MeasuresProject))
                {
                    sub.Key = p_seed++;
                    p_list.Add(sub);
                }
            }
        }
예제 #10
0
        /// <summary>
        /// 设置结果集合的值
        /// </summary>
        /// <param name="p_LName"></param>
        /// <param name="p_List"></param>
        public void Set(ERevealType p_ERevealType, _List p_List)
        {
            switch (p_ERevealType)
            {
                case ERevealType.汇总分析: 
                    this.m_Result[0] = p_List;
                    break;
                case ERevealType.分部分项:
                    this.m_Result[1] = p_List;
                    break;
                case ERevealType.措施项目:
                    this.m_Result[2] = p_List;
                    break;
                case ERevealType.项目工料机汇总:
                    this.m_Result[3] = p_List;
                    break;
                default:

                    break;
            }   
        }
예제 #11
0
        //private _Statistics m_Statistics = null;
        ///// <summary>
        ///// 获取或设置:分部分项计算结果
        ///// </summary>
        //public _Statistics Statistics
        //{
        //    get { return m_Statistics; }
        //    set { m_Statistics = value; }
        //}


        /// <summary>
        /// 分部分项构造函数
        /// </summary>
        /// <param name="p_Parent">所属于单位工程</param>
        public _SubSegments(_UnitProject p_Parent)
        {
            //当前父类
            this.m_Parent = p_Parent;
            //this.Activitie = p_Parent;
            //用于处理分部分项方法集
            this.m_Methods = new _Methods(this);
            //返回所有的对象集合
            this.m_ObjectsList = new _List();
            //清单集合
            //this.m_FixedList = new _FixedsList(this);
            m_BindingSource = new BindingSource();
            //计算类
            Statistics         = new _SubSegment_Statistics(this);
            m_FixedList        = new List <_FFixedListInfo>();
            m_ProfessionalList = new List <_ProfessionalInfo>();
            //第一次创建分部分项的时候需要初始化当前对象
            init();
            //测试
            //_FixedListInfo info = new _FixedListInfo();
            //this.m_FixedList.Add(info);
        }
예제 #12
0
        /// <summary>
        /// 修改工料机的消耗量
        /// </summary>
        /// <param name="value"></param>
        private void UpXHL(decimal value)
        {
            decimal zhdj = this.ZHDJ;

            if (zhdj == 0)
            {
                zhdj = 1;
            }
            decimal c = value / zhdj;
            _List   t = GetAllQuantityUnitNotZC;

            UpChildIsCalc(false);
            foreach (_ObjectQuantityUnitInfo item in t)
            {
                if (!item.LB.Contains('%'))
                {
                    item.XHL = item.XHL * c;
                }
            }
            UpChildIsCalc(true);
            //int m = GetInventoryQuantityUnitSummary.Count;
        }
예제 #13
0
 public void Init(ERevealType p_ERevealType)
 {
     //1.汇总分析 2.分部分项 3.措施项目 4.项目工料机汇总
      switch (p_ERevealType)
         {
             case ERevealType.Default:
                 m_Result = new _List[4] { new _List(), new _List(), new _List(), new _List() };
                 break;
             case ERevealType.汇总分析:
                 m_Result[0] = new _List();
                 break;
          case ERevealType.分部分项:
                 m_Result[1] = new _List();
                 break;
          case ERevealType.措施项目:
                 m_Result[2] = new _List();
                 break;
          default:
                 break;
               
         }
 }
예제 #14
0
 /// <summary>
 /// 如何填充数据list集合
 /// </summary>
 /// <param name="p_list">要填充的集合列表</param>
 /// <param name="p_seed">虚拟主键结构</param>
 /// <param name="p_type">填充类别 0分部分项 1措施项目</param>
 public virtual void Fill(_List p_list, ref int p_seed, params int[] values)
 {
     //具体方式由子类实现
 }
예제 #15
0
 /// <summary>
 /// 填充当前对象
 /// </summary>
 /// <param name="p_list"></param>
 /// <param name="p_seed"></param>
 public virtual void Fill(_List p_list, ref int p_seed)
 {
 }
예제 #16
0
 /// <summary>
 /// 填充项目树结构
 /// </summary>
 /// <param name="p_List"></param>
 public override void Fill(_List p_List)
 {
     p_List.Add(this.Parent.Directory);
 }
예제 #17
0
 /// <summary>
 /// 实现填充当前对象到p_List集合中
 /// </summary>
 /// <param name="p_List"></param>
 public virtual void Fill(_List p_List)
 {
 }