Пример #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();
            }
        }
Пример #2
0
        /// <summary>
        /// 通过定额库给定额赋值
        /// </summary>
        /// <param name="info"></param>
        /// <param name="dr"></param>
        /// <param name="Libname"></param>
        public void SetSubheadingsInfo(_ObjectInfo info, DataRow dr, string Libname)
        {
            info.XMBM    = dr[CEntity定额表.FILED_DINGEH].ToString();
            info.XMMC    = dr[CEntity定额表.FILED_DINGEMC].ToString();
            info.OLDXMBM = dr[CEntity定额表.FILED_DINGEH].ToString();
            info.TX      = dr[CEntity定额表.FILED_TX1].ToString();
            info.DW      = dr[CEntity定额表.FILED_DINGEDW].ToString();
            info.LB      = "子目";
            info.XMTZ    = "";
            info.GCLJSS  = "";
            info.HL      = 0.00m;
            info.GCL     = 1;

            info.ZHDJ        = ToolKit.ParseDecimal(dr[CEntity定额表.FILED_DINGEJJ].ToString());
            info.RGFDJ       = ToolKit.ParseDecimal(dr[CEntity定额表.FILED_RENGF].ToString());
            info.CLFDJ       = ToolKit.ParseDecimal(dr[CEntity定额表.FILED_CAILF].ToString());
            info.JXFDJ       = ToolKit.ParseDecimal(dr[CEntity定额表.FILED_JIXF].ToString());
            info.LibraryName = Libname;
            info.DECJ        = dr[CEntity定额表.FILED_DECJ].ToString();
            info.JX          = dr[CEntity定额表.FILED_JIANGX].ToString() == "是" ? true : false;
            if (dr[CEntity定额表.FILED_TX1].ToString() == "模板")
            {
                info.SC = false;
            }
            else
            {
                info.SC = true;
            }
        }
Пример #3
0
        private _ObjectInfo GetQIncreaseCosts()
        {
            _ObjectInfo       info  = null;
            _SubheadingsInfo  info1 = this.Parent as _SubheadingsInfo;
            _MSubheadingsInfo info2 = this.Parent as _MSubheadingsInfo;

            if (info1 != null)
            {
                foreach (_ObjectInfo item in info1.Parent.IncreaseCostsList)
                {
                    if (item.XMBM == this.DH)
                    {
                        return(item);
                    }
                }
            }
            if (info2 != null)
            {
                foreach (_ObjectInfo item in info2.Parent.IncreaseCostsList)
                {
                    if (item.XMBM == this.DH)
                    {
                        return(item);
                    }
                }
            }

            return(info);
        }
Пример #4
0
 /// <summary>
 /// 删除子目
 /// </summary>
 /// <param name="p_info"></param>
 public void Remove(_ObjectInfo p_info)
 {
     //_SubheadingsInfo infos = p_info as _SubheadingsInfo;
     //object[] s_info = infos.SubheadingsQuantityUnitList.ToArray();
     //foreach (_ObjectQuantityUnitInfo item in s_info)
     //{
     //    infos.SubheadingsQuantityUnitList.Remove(item);
     //}
     base.Remove(p_info);
 }
Пример #5
0
 public void SetSubheadingsInfoByTZ(_ObjectInfo info, DataRow dr, string Libname)
 {
     info.XMBM    = dr[CEntity清单特征定额表.FILED_TZDEH].ToString();
     info.XMMC    = dr[CEntity清单特征定额表.FILED_DEMC].ToString();
     info.OLDXMBM = dr[CEntity清单特征定额表.FILED_TZDEH].ToString();
     //info.TX = dr[CEntity清单特征定额表.FILED_TX1].ToString();
     info.DW          = dr[CEntity清单特征定额表.FILED_DEDW].ToString();
     info.LB          = "子目";
     info.XMTZ        = "";
     info.GCLJSS      = "";
     info.HL          = 1.00m;
     info.GCL         = 1;
     info.LibraryName = Libname;
     info.DECJ        = dr[CEntity清单特征定额表.FILED_DECJ].ToString();
 }
Пример #6
0
        ///// <summary>
        ///// 重排流水号
        ///// </summary>
        // public void RestLSH()
        // {
        //     IEnumerable<_ObjectInfo> infos = (from n in this.FixedList.Cast<_ObjectInfo>()
        //                                       where 1 == 1
        //                                       select n).Distinct(new QDDistinct());
        //     _ObjectInfo[] arr = infos.ToArray();
        //     foreach (_ObjectInfo item in arr)
        //     {
        //         IEnumerable<_ObjectInfo> info = from n in this.FixedList.Cast<_ObjectInfo>()
        //                                         where n.OLDXMBM == item.OLDXMBM
        //                                           select n;
        //         _ObjectInfo[] arr1 = info.ToArray();
        //         int m =0;
        //         for (int i = 0; i < arr1.Length; i++)
        //         {
        //             m = i + 1;
        //             if (m.ToString().Length == 1)
        //                 arr1[i].XMBM = arr1[i].OLDXMBM + "00"+m.ToString();
        //             else  if (m.ToString().Length == 2)
        //                  arr1[i].XMBM = arr1[i].OLDXMBM + "0" + m.ToString();
        //             else
        //                 arr1[i].XMBM = arr1[i].OLDXMBM + m.ToString();

        //         }
        //     }
        // }

        /* public void RestXH()
         * {
         *   IEnumerable<_ObjectInfo> infos = null;
         *   int m = 1;
         *   switch (this.m_ListType)
         *   {
         *       case EListType.Default:
         *           infos = from info in this.DataSource.Cast<_ObjectInfo>()
         *                   where SetXH(info,ref m, typeof(_SubSegments))
         *                   select info;
         *
         *           break;
         *       case EListType.Professional:
         *           infos = from info in DataSource.Cast<_ObjectInfo>()
         *                                            where SetXH(info,ref m, typeof(_ProfessionalInfo))
         *                                             select info;
         *
         *           break;
         *       case EListType.Chapter:
         *           infos = from info in m_ObjectsList.Cast<_ObjectInfo>()
         *                   where SetXH(info,ref m,typeof(_ChapterInfo))
         *
         *                   select info;
         *
         *           break;
         *       case EListType.Festival:
         *           infos = from info in DataSource.Cast<_ObjectInfo>()
         *                                             where SetXH(info,ref m,typeof(_FestivalInfo))
         *                                             select info;
         *
         *           break;
         *   }
         *   infos.ToList();
         *
         * }*/
        private bool SetXH(_ObjectInfo info, ref int m, Type type)
        {
            List <_FFixedListInfo> list = null;

            if (info.GetType().Name == type.Name)
            {
                switch (type.Name)
                {
                case "_ProfessionalInfo":
                    list = (info as _ProfessionalInfo).FixedList;
                    break;

                case "_ChapterInfo":
                    list = (info as _ChapterInfo).FixedList;
                    break;

                case "_FestivalInfo":
                    list = (info as _FestivalInfo).FixedList;
                    break;

                case "_SubSegments":
                    list = (info as _SubSegments).FixedList;
                    break;

                default:
                    break;
                }
            }
            if (list == null)
            {
                return(true);
            }
            foreach (_ObjectInfo item in list)
            {
                item.XH = m;
                m++;
            }
            return(true);
        }
Пример #7
0
 public _FestivalInfo_Statistics(_ObjectInfo p_Parent)
     : base(p_Parent)
 {
 }
Пример #8
0
 public _SubSegment_Statistics(_ObjectInfo p_Parent)
     : base(p_Parent)
 {
 }
Пример #9
0
 public virtual void Remove(_ObjectInfo info)
 {
 }
Пример #10
0
        /// <summary>
        /// 判断当前子目编号是否在一个范围之内
        /// </summary>
        /// <param name="p_DEBH">定额范围比如(16,B4,B16,15,14-1~14-10,15-1~15-22,b1~b500)</param>
        /// <returns></returns>
        public static bool ExistsBH(string p_DEBH, _ObjectInfo info)
        {
            bool flag = false;
            int  m    = 0;

            if (info.XMBM.IndexOf("-") > 0)
            {
                m = info.XMBM.IndexOf("-");
            }
            string DEH = info.XMBM.Substring(0, m);

            string[] DEBHArry = p_DEBH.Split(',');
            if (p_DEBH.Contains("-") && p_DEBH.Substring(p_DEBH.IndexOf("-")).Contains(DEH))//含有-并且定额号有可能存在的时候的处理
            {
                string[] ItemArr = p_DEBH.Substring(p_DEBH.IndexOf("-")).Split(',')[0].Split('~');
                int      MinNum  = Convert.ToInt32(ItemArr[0].Substring(ItemArr[0].IndexOf('-') + 1));
                int      MaxNum  = Convert.ToInt32(ItemArr[1].Substring(ItemArr[1].IndexOf('-') + 1));
                for (int i = MinNum; i <= MaxNum; i++)
                {
                    if (info.XMBM == ItemArr[1].Substring(0, ItemArr[1].IndexOf('-') + 1) + i.ToString())
                    {
                        flag = true;
                        break;
                    }
                }
            }
            else
            {
                foreach (string item in DEBHArry)
                {
                    if (!item.Contains("-"))
                    {
                        if (!item.Contains("~"))//若不存在波浪线直接比较
                        {
                            if (item == DEH)
                            {
                                flag = true;
                                break;
                            }
                        }
                        else
                        {
                            string[] ItemArr = item.Split('~');
                            if (ItemArr[0].Contains("b"))
                            {
                                int MinNum = Convert.ToInt32(ItemArr[0].Substring(ItemArr[0].IndexOf('b') + 1));
                                int MaxNum = Convert.ToInt32(ItemArr[1].Substring(ItemArr[1].IndexOf('b') + 1));
                                for (int i = MinNum; i <= MaxNum; i++)
                                {
                                    if (DEH == "b" + i.ToString())
                                    {
                                        flag = true;
                                        break;
                                    }
                                }
                            }
                        }
                    }
                }
            }

            return(flag);
        }
Пример #11
0
 /// <summary>
 /// 初始化:子目取费集合对象
 /// </summary>
 /// <param name="p_Parent">所属:子目</param>
 public _IncreaseCostsList(_ObjectInfo p_Parent)
 {
     this.m_Parent = p_Parent;
 }
Пример #12
0
 public _ChapterInfo_Statistics(_ObjectInfo p_Parent)
     : base(p_Parent)
 {
 }
Пример #13
0
 public _Measures_Statistics(_ObjectInfo p_Parent)
     : base(p_Parent)
 {
 }
Пример #14
0
 /// <summary>
 /// 子目添加到集合
 /// </summary>
 /// <param name="p_info"></param>
 public void Add(_ObjectInfo p_info)
 {
     base.Add(p_info);
 }
 public _Subheadings_Statistics_Return(_ObjectInfo p_Parent) : base(p_Parent)
 {
 }
Пример #16
0
 public _ProfessionalInfo_Statistics(_ObjectInfo p_Parent)
     : base(p_Parent)
 {
 }
Пример #17
0
 /// <summary>
 /// 构造函数
 /// </summary>
 public _Statistics(_ObjectInfo p_Parent)
 {
     this.m_Parent   = p_Parent;
     m_ResultVarable = new _CVariable();
     builder();
 }
Пример #18
0
 public _MFixedList_Statistics(_ObjectInfo p_Parent)
     : base(p_Parent)
 { }
Пример #19
0
 public _CommonrojectInfo_Statistics(_ObjectInfo p_Parent)
     : base(p_Parent)
 {
 }