Пример #1
0
        /// <summary>
        /// 根据计算表达式得到计算结果
        /// </summary>
        /// <param name="value">计算式(比如:1*5+(2-1))</param>
        /// <returns></returns>
        public static decimal Calculate(string value)
        {
            using (DataTable table = new DataTable())
            {
                try
                {
                    return(ToolKit.ParseDecimal(table.Compute(value, string.Empty)));
                }
                catch
                {
                    return(0m);
                }
            }
            //try
            //{

            //    decimal a = 0m;
            //    sc.Language = "JavaScript";
            //    string str = sc.Eval(value.ToString()).ToString();
            //    decimal.TryParse(str, out a);
            //    return a;
            //}
            //catch (Exception ex)
            //{
            //    return 0;
            //}
        }
Пример #2
0
        /// <summary>
        /// 统计当前的父行计算结果
        /// </summary>
        /// <param name="row"></param>
        public void SetCurrentParent(DataRow row)
        {
            //1.当前父节点是否为0
            //2.若不是0统计所有当前父节点的数据求和
            //3.赋值给父节点
            int id = ToolKit.ParseInt(row["ParentID"]);

            if (id != 0)
            {
                decimal   d    = 0m;
                decimal   d1   = 0m;
                DataRow[] rows = this.m_Source.Select(string.Format(" ParentID = {0}", id));
                foreach (DataRow item in rows)
                {
                    if (!string.IsNullOrEmpty(item["Combinedprice"].ToString()))
                    {
                        d += ToolKit.ParseDecimal(item["Combinedprice"]);
                    }
                    if (!string.IsNullOrEmpty(item["cjhj"].ToString()))
                    {
                        d1 += ToolKit.ParseDecimal(item["cjhj"]);
                    }
                }

                DataRow r = this.m_Source.Rows.Find(id);
                r.BeginEdit();
                r["Combinedprice"] = d;
                r["cjhj"]          = d1;
                r.EndEdit();
                SetCurrentParent(r);
            }
        }
Пример #3
0
        /// <summary>
        /// 统计并计算子节点
        /// </summary>
        private void calculateChilden(DataRow row)
        {
            DataRow[] rows = this.m_Source.Select(string.Format("ParentID = {0}", row["ID"]));
            if (rows.Length == 0)
            {
                if (row["Feature"].ToString() == "ZZJ")
                {
                    int i = 0;
                }
                //直接计算
                string str = ToolKit.ExpressionReplace(row["Calculation"].ToString(), this.Parent.Property.Statistics.ResultVarable.DataSource);
                //完成统计
                //decimal d = ToolKit.Calculate(str);
                decimal d = 0;
                using (DataTable table = new DataTable())
                {
                    try
                    {
                        d = ToolKit.ParseDecimal(table.Compute(str, string.Empty));
                    }
                    catch
                    {
                        d = 0;
                    }
                }
                //decimal d = ToolKit.Expression(str);
                //费率若小于 0 大于 100 按照100计算
                decimal coe = ToolKit.ParseDecimal(row["Coefficient"]);
                if (coe < 0 || coe > 100)
                {
                    coe = 100;
                }
                d = d * coe * 0.01M;

                //结果赋值
                row.BeginEdit();
                row["Price"] = d;
                row.EndEdit();
                //添加到结果集合(汇总分析此处修改添加列特项进入参数列表)
                //this.Parent.Statistics.ResultVarable.Set(row["Number"].ToString(), d, row["Remark"].ToString());

                this.Parent.Property.Statistics.ResultVarable.Set(row["Feature"].ToString(), d, row["Remark"].ToString());
            }
            else
            {
                //继续计算(有孩子继续计算 并且统计当前节点)
                foreach (DataRow r in rows)
                {
                    this.calculateChilden(r);
                    //SetCurrentParent(r);
                }
                //计算完成后统计当前节点
                this.SetCurrentParent(row);

                if (isRate(row))
                {
                    this.SetRate(row);
                }
            }
        }
Пример #4
0
        /// <summary>
        /// 插入一条新的用户价格
        /// </summary>
        /// <param name="p_Info">当前修改对象</param>
        /// <param name="p_BH">指定编号:如果是 string.Empty 则获取新编号 否则是指定编号</param>
        public void Insert(DataRow p_Info, string p_BH)
        {
            _UserPriceLibraryInfo newinfo = new _UserPriceLibraryInfo();

            newinfo.YSBH  = p_Info["YSBH"].ToString();
            newinfo.YSDW  = p_Info["YSDW"].ToString();
            newinfo.YSMC  = p_Info["YSMC"].ToString();
            newinfo.YSXHL = ToolKit.ParseDecimal(p_Info["YSXHL"]);
            newinfo.ZCLB  = p_Info["ZCLB"].ToString();
            newinfo.BH    = p_BH == string.Empty ? GetNumber(p_Info) : p_BH; //如果是 string.Empty 则获取新编号 否则是指定编号
            newinfo.DEDJ  = ToolKit.ParseDecimal(p_Info["DEDJ"]);

            newinfo.LB     = p_Info["LB"].ToString();
            newinfo.MC     = this.FieldName == "MC" ? p_Info["MC", DataRowVersion.Proposed].ToString() : p_Info["MC"].ToString();
            newinfo.DW     = this.FieldName == "DW" ? p_Info["DW", DataRowVersion.Proposed].ToString() : p_Info["DW"].ToString();
            newinfo.XHL    = ToolKit.ParseDecimal(p_Info["XHL"]);
            newinfo.SCDJ   = this.FieldName == "SCDJ" ? ToolKit.ParseDecimal(p_Info["SCDJ", DataRowVersion.Proposed]) : ToolKit.ParseDecimal(p_Info["SCDJ"]);
            newinfo.SL     = ToolKit.ParseDecimal(p_Info["SL"]);
            newinfo.GGXH   = p_Info["GGXH"].ToString();
            newinfo.SSDWGC = this.Activitie.Name;
            //newinfo.SSKLB = p_Info["SSKLB"].ToString();
            newinfo.SSLB = ToolKit.ParseInt(p_Info["SSLB"]);
            this.m_UserPriceLibraryList.Add(newinfo);
            //执行范围修改  设置新的编号
            EditPart(p_Info, newinfo.BH);
        }
Пример #5
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;
            }
        }
Пример #6
0
        /// <summary>
        /// 设置一个变量
        /// </summary>
        /// <param name="key">变量主键</param>
        /// <param name="value">变量值</param>
        /// <param name="remark">变量说明</param>
        public void Set(int p_ID, int p_Type, string key, object value, string remark, string p_fylb, bool p_ISDE)
        {
            DataRow row = this.Rows.Find(new object[] { key, p_ID, p_Type });

            if (row == null)
            {
                row = this.NewRow();
                row.BeginEdit();
                row["Key"]    = key;
                row["Value"]  = ToolKit.ParseDecimal(value).ToString(Median);
                row["Remark"] = remark;
                row["FYLB"]   = p_fylb;
                row["Length"] = key.Length;
                row["ISDE"]   = p_ISDE;
                row["Type"]   = p_Type;
                row["ID"]     = p_ID;
                row.EndEdit();
                this.Rows.Add(row);
            }
            else
            {
                row.BeginEdit();
                row["Key"]    = key;
                row["Value"]  = ToolKit.ParseDecimal(value).ToString(Median);
                row["Remark"] = remark;
                row["FYLB"]   = p_fylb;
                row["Length"] = key.Length;
                row["ISDE"]   = p_ISDE;
                row["Type"]   = p_Type;
                row["ID"]     = p_ID;
                row.EndEdit();
            }
        }
Пример #7
0
        /// <summary>
        /// 获取变量
        /// </summary>
        /// <param name="key">变量值</param>
        /// <returns></returns>
        public decimal GetDecimal(int p_Type, string key)
        {
            DataRow row = this.Rows.Find(new object[] { key, p_Type });

            if (row != null)
            {
                return(ToolKit.ParseDecimal(row["Value"]));
            }
            return(0);
        }
Пример #8
0
 /// <summary>
 /// 行计算 数据行
 /// </summary>
 /// <param name="p_info"></param>
 public void SummaryRowCalculate(DataRow p_info)
 {
     p_info["DJC"]    = (ToolKit.ParseDecimal(p_info["SCDJ"]) - ToolKit.ParseDecimal(p_info["DEDJ"])).ToString("F2");
     p_info["JSDJC"]  = (p_info["JSDJ"].Equals(0m) ? 0m : ToolKit.ParseDecimal(p_info["JSDJ"]) - ToolKit.ParseDecimal(p_info["SCDJ"])).ToString("F2");;
     p_info["SLDEHJ"] = (ToolKit.ParseDecimal(p_info["DEDJ"]) * ToolKit.ParseDecimal(p_info["SLH"])).ToString("F2");
     p_info["SLSCHJ"] = (ToolKit.ParseDecimal(p_info["SCDJ"]) * ToolKit.ParseDecimal(p_info["SLH"])).ToString("F2");
     p_info["HJC"]    = (ToolKit.ParseDecimal(p_info["DJC"]) * ToolKit.ParseDecimal(p_info["SLH"])).ToString("F2");
     p_info["JSHJC"]  = (p_info["JSDJ"].Equals(0m) ? 0m : ToolKit.ParseDecimal(p_info["JSDJC"]) * ToolKit.ParseDecimal(p_info["SLH"])).ToString("F2");
     p_info["SDCHJ"]  = (ToolKit.ParseDecimal(p_info["SDCXS"]) * ToolKit.ParseDecimal(p_info["SLH"])).ToString("F2");
     p_info["DEHJ"]   = (ToolKit.ParseDecimal(p_info["DEDJ"]) * ToolKit.ParseDecimal(p_info["XHL"]));
     p_info["SCHJ"]   = (ToolKit.ParseDecimal(p_info["SCDJ"]) * ToolKit.ParseDecimal(p_info["XHL"]));
 }
Пример #9
0
        /// <summary>
        /// 通过图集库给子目赋值
        /// </summary>
        /// <param name="info"></param>
        /// <param name="dr"></param>
        /// <param name="Libname"></param>
        public void SetSubheadingsInfoByTJ(_Entity_SubInfo info, DataRow dr, string Libname)
        {
            info.XMBM    = dr["DEBH"].ToString();
            info.XMMC    = dr["DEMC"].ToString();
            info.OLDXMBM = dr["DEBH"].ToString();
            info.DW      = dr["DEDW"].ToString();
            info.LB      = "子目";
            info.XMTZ    = "";
            info.GCLJSS  = "";
            info.HL      = 1.00m;
            string dw = dr["DEDW"].ToString().Replace("m2", "").Replace("m3", "");

            if (dw == "")
            {
                dw = "1";
            }
            decimal xs = ToolKit.ParseDecimal(dr["GCXS"]);

            if (xs <= 0)
            {
                xs = 1m;
            }

            decimal c = ToolKit.ParseDecimal(dw) * xs;

            if (c == 0)
            {
                c = 1m;
            }
            info.GCL         = 1 / c;
            info.LibraryName = Libname;
            _Library.GetLibrary(Libname);
            DataTable dt = (_Library.Libraries[Libname] as DataSet).Tables["定额表"];

            if (dt != null)
            {
                DataRow[] rows = dt.Select(string.Format("DINGEH='{0}'", info.XMBM));
                if (rows.Length > 0)
                {
                    info.DECJ = rows[0]["DECJ"].ToString();
                    string oldvalue = dr["HSQ"].ToString();
                    string newvalue = dr["HSH"].ToString();
                    if (oldvalue.Length > 0)
                    {
                        info.XMBM = info.XMBM + "换";
                        info.DECJ = info.DECJ.Replace(oldvalue, newvalue);
                    }
                    //
                }
            }
            //info.DECJ = dr["DECJ"].ToString();
        }
Пример #10
0
        /// <summary>
        /// 统计当前的父行计算结果
        /// </summary>
        /// <param name="row"></param>
        public void SetCurrentParent(DataRow row)
        {
            //1.当前父节点是否为0
            //2.若不是0统计所有当前父节点的数据求和
            //3.赋值给父节点
            int     id = ToolKit.ParseInt(row["ID"]);
            DataRow r  = this.m_Source.Rows.Find(id);
            decimal d  = ToolKit.ParseDecimal(this.m_Source.Compute("SUM(Price)", string.Format(" ParentID = {0}", id)));

            r.BeginEdit();
            r["Price"] = d;
            r.EndEdit();
            //this.Parent.Statistics.ResultVarable.Set(r["Number"].ToString(), d, r["Remark"].ToString());
            this.Parent.Property.Statistics.ResultVarable.Set(row["Feature"].ToString(), d, row["Remark"].ToString());
            //SetCurrentParent(r);
        }
Пример #11
0
 bool IEqualityComparer <DataRow> .Equals(DataRow x, DataRow y)
 {
     if (x == null)
     {
         return(y == null);
     }
     if (x["BH"].Equals(y["BH"]))
     {
         x.BeginEdit();
         x["SLH"] = ToolKit.ParseDecimal(x["SLH"]) + ToolKit.ParseDecimal(y["SL"]);
         this.SummaryRowCalculate(x);
         x.EndEdit();
         return(true);
     }
     return(false);
 }
Пример #12
0
        private void SetCurrent(DataRow row)
        {
            int     id = ToolKit.ParseInt(row["ID"]);
            DataRow r  = this.m_Source.Rows.Find(id);
            decimal d  = 0m;

            DataRow[] rows = this.m_Source.Select(string.Format(" ParentID = {0}", id));
            foreach (DataRow item in rows)
            {
                d += ToolKit.ParseDecimal(item["Combinedprice"]);
            }

            // ToolKit.ParseDecimal(this.m_Source.Compute("SUM(Combinedprice)", string.Format(" ParentID = {0}", id)));
            r.BeginEdit();
            r["Combinedprice"] = d;
            r.EndEdit();
        }
Пример #13
0
        /// <summary>
        /// 获取三大材
        /// </summary>
        /// <returns></returns>
        public DataTable GetSDC(IEnumerable <DataRow> p_Summary)
        {
            DataTable             m_dt     = this.CreateSDC();
            IEnumerable <DataRow> sdc_list = p_Summary.Where(p => !p["SDCLB"].Equals(string.Empty));

            foreach (DataRow item in sdc_list)
            {
                DataRow dr = m_dt.NewRow();
                switch (item["SDCLB"].ToString())
                {
                case "钢材":
                    dr["ParentID"] = 1;
                    break;

                case "木材":
                    dr["ParentID"] = 2;
                    break;

                case "水泥":
                    dr["ParentID"] = 3;
                    break;

                default:
                    break;
                }
                dr["ID"]     = (m_dt.Rows.Count + 1);
                dr["BH"]     = item["BH"];
                dr["MC"]     = item["MC"];
                dr["DW"]     = item["DW"];
                dr["SLH"]    = item["SL"];
                dr["SCDJ"]   = item["SCDJ"];
                dr["SCHJ"]   = item["SCHJ"];
                dr["SDCSLH"] = ToolKit.ParseDecimal(item["SL"]) * ToolKit.ParseDecimal(item["SDCXS"]);
                m_dt.Rows.Add(dr);
            }
            m_dt.Select("ID=1")[0]["SLH"] = m_dt.Compute("Sum(SDCSLH)", "ParentID = 1");
            m_dt.Select("ID=2")[0]["SLH"] = m_dt.Compute("Sum(SDCSLH)", "ParentID = 2");
            m_dt.Select("ID=3")[0]["SLH"] = m_dt.Compute("Sum(SDCSLH)", "ParentID = 3");
            return(m_dt);
        }
Пример #14
0
        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="p_Info"></param>
        public void Add(DataRow p_Info)
        {
            _UserPriceLibraryInfo newinfo = new _UserPriceLibraryInfo();

            newinfo.YSBH   = p_Info["YSBH"].ToString();
            newinfo.YSDW   = p_Info["YSDW"].ToString();
            newinfo.YSMC   = p_Info["YSMC"].ToString();
            newinfo.YSXHL  = ToolKit.ParseDecimal(p_Info["YSXHL"]);
            newinfo.ZCLB   = p_Info["ZCLB"].ToString();
            newinfo.BH     = p_Info["BH"].ToString();
            newinfo.DEDJ   = ToolKit.ParseDecimal(p_Info["DEDJ"]);
            newinfo.DW     = p_Info["DW"].ToString();
            newinfo.LB     = p_Info["LB"].ToString();
            newinfo.MC     = p_Info["MC"].ToString();
            newinfo.XHL    = ToolKit.ParseDecimal(p_Info["XHL"]);
            newinfo.SCDJ   = ToolKit.ParseDecimal(p_Info["SCDJ"]);
            newinfo.SL     = ToolKit.ParseDecimal(p_Info["SL"]);
            newinfo.SSDWGC = this.Activitie.Name;
            newinfo.SSKLB  = p_Info["SSKLB"].ToString();
            newinfo.SSLB   = ToolKit.ParseInt(p_Info["SSLB"]);
            this.m_UserPriceLibraryList.Add(newinfo);
        }
Пример #15
0
        public static decimal Convert(string a_Unit, string b_Unit)
        {
            decimal d = 0m;

            if (m_Source != null)
            {
                if (a_Unit == null || b_Unit == null)
                {
                    return(0);
                }
                DataRow[] rowsb = m_Source.Select(string.Format("Name='{0}'", b_Unit.ToUpper()));
                DataRow[] rowsa = m_Source.Select(string.Format("Name='{0}'", a_Unit.ToUpper()));
                if (rowsb.Length > 0 && rowsa.Length > 0)
                {
                    if (rowsb[0]["Type"].ToString() == rowsa[0]["Type"].ToString())
                    {
                        return(ToolKit.ParseDecimal(rowsa[0]["Value"]) / ToolKit.ParseDecimal(rowsb[0]["Value"]));
                    }
                }
            }
            return(d);
        }
Пример #16
0
        public void Begin()
        {
            string  Dian = "F2";
            decimal temp = 0m;

            switch (this.JSJC)
            {
            case "rgf":
                temp = this.Parent.RGFHJ;
                break;

            case "clf":
                temp = this.Parent.CLFHJ;
                break;

            case "jxf":
                temp = this.Parent.JXFHJ;
                break;

            default:
                break;
            }
            temp = temp + this.FJJS;

            // this.HJ

            decimal d = temp * this.XS * 0.01m;

            this.RGF = d * this.RGXS * 0.01m;
            this.RGF = ToolKit.ParseDecimal(this.RGF.ToString(Dian));
            this.CLF = d * this.CLXS * 0.01m;
            this.CLF = ToolKit.ParseDecimal(this.CLF.ToString(Dian));
            this.JXF = d * this.JXXS * 0.01m;
            this.JXF = ToolKit.ParseDecimal(this.JXF.ToString(Dian));
            this.HJ  = this.RGF + this.CLF + this.JXF;
            this.HJ  = ToolKit.ParseDecimal(this.HJ.ToString(Dian));
            //hu  PBegin();
        }
Пример #17
0
        /// <summary>
        /// 添加补充人才机
        /// </summary>
        /// <param name="new_info"></param>
        public void CreateZMGLJ(DataRow new_info)
        {
            _RepairQuantityUnitInfo info = new _RepairQuantityUnitInfo();

            info.ID     = this.RepairQuantityUnitList.Count + 1;
            info.YSBH   = new_info["YSBH"].ToString();
            info.YSMC   = new_info["YSMC"].ToString();
            info.YSDW   = new_info["YSDW"].ToString();
            info.YSXHL  = ToolKit.ParseDecimal(new_info["YSXHL"]);
            info.DEDJ   = ToolKit.ParseDecimal(new_info["DEDJ"]);
            info.BH     = new_info["BH"].ToString();
            info.MC     = new_info["MC"].ToString();
            info.DW     = new_info["DW"].ToString();
            info.LB     = new_info["LB"].ToString();
            info.IFZYCL = ToolKit.ParseBoolen(new_info["IFZYCL"]);
            info.SL     = ToolKit.ParseDecimal(new_info["SL"]);
            info.XHL    = ToolKit.ParseDecimal(new_info["YSXHL"]);
            info.SCDJ   = ToolKit.ParseDecimal(new_info["SCDJ"]);
            info.GGXH   = new_info["GGXH"].ToString();
            info.SSDWGC = new_info["SSDWGC"].ToString();
            info.CTIME  = DateTime.Now;
            this.m_RepairQuantityUnitList.Add(info);
        }
Пример #18
0
        /// <summary>
        /// 费率统计计算
        /// </summary>
        /// <param name="row"></param>
        public void SetRate(DataRow row)
        {
            DataRow[] rows = this.m_Source.Select(string.Format("ParentID = {0}", row["ID"]));
            if (rows.Length > 0)
            {
                foreach (DataRow r in rows)
                {
                    SetRate(r);
                }

                if (IsEdit)
                {
                    int     id = ToolKit.ParseInt(row["ID"]);
                    DataRow r  = this.m_Source.Rows.Find(id);
                    decimal d  = ToolKit.ParseDecimal(this.m_Source.Compute("SUM(Coefficient)", string.Format(" ParentID = {0}", id)));
                    IsEdit = false;
                    r.BeginEdit();
                    r["Coefficient"] = d;
                    r.EndEdit();
                    IsEdit = true;
                }
            }
        }
Пример #19
0
 /// <summary>
 /// 小数点格式化
 /// </summary>
 /// <param name="o"></param>
 /// <returns></returns>
 public static decimal Formart(object o, int p_num)
 {
     return(decimal.Parse(ToolKit.ParseDecimal(o).ToString(string.Format("F{0}", p_num))));
 }
Пример #20
0
 /// <summary>
 /// 创建工料机组成
 /// </summary>
 /// <returns>工料机组成对象</returns>
 public void Create()
 {
     if (this.YSBH.StartsWith("P") || this.YSBH.StartsWith("J"))
     {
         _Library.GetLibrary(this.SSKLB);
         if (this.SSKLB == string.Empty)
         {
             this.SSKLB = this.Activitie.Property.Libraries.FixedLibrary.FullName;
         }
         DataRow[] drs_zc = drs_zc = (_Library.Libraries[this.SSKLB] as DataSet).Tables["配合比表"].Select(string.Format("CAIJBH ='{0}'", this.YSBH));
         this.IFKFJ = drs_zc.Count() > 0 ? true : false;
         foreach (DataRow dr in drs_zc)
         {
             DataRow[] dr_zc = (_Library.Libraries[this.SSKLB] as DataSet).Tables["材机表"].Select(string.Format("CAIJBH ='{0}'", dr["PHB_CJBH"]));
             if (dr_zc != null)
             {
                 _QuantityUnitComponentInfo info = new _QuantityUnitComponentInfo(this);
                 info.STATUS   = Status.AreAdd;
                 info.YSBH     = dr_zc[0]["CAIJBH"].ToString();
                 info.YSMC     = dr_zc[0]["CAIJMC"].ToString();
                 info.YSDW     = dr_zc[0]["CAIJDW"].ToString();
                 info.YSXHL    = ToolKit.ParseDecimal(dr["PHB_CJSL"]);
                 info.BH       = dr_zc[0]["CAIJBH"].ToString();
                 info.MC       = dr_zc[0]["CAIJMC"].ToString();
                 info.DW       = dr_zc[0]["CAIJDW"].ToString();
                 info.XHL      = ToolKit.ParseDecimal(dr["PHB_CJSL"]);
                 info.DEDJ     = dr_zc[0]["CAIJDJ"].ToString().Trim() == string.Empty ? 0m : Convert.ToDecimal(dr_zc[0]["CAIJDJ"].ToString());
                 info.LB       = dr_zc[0]["CAIJLB"].ToString();
                 info.ZCLB     = "W";
                 info.SDCLB    = dr_zc[0]["SANDCMC"].ToString();
                 info.SDCXS    = dr_zc[0]["SANDCXS"].ToString().Length == 0 ? 0m : Convert.ToDecimal(dr_zc[0]["SANDCXS"]);
                 info.GCL      = this.GCL;
                 info.SSKLB    = this.Parent.LibraryName;
                 info.SSDWGCLB = this.Parent.GetSSDWGCLB();
                 info.SSDWGC   = this.Activitie.Name;
                 _ObjectQuantityUnitInfo y_info = this.Activitie.Property.GetAllQuantityUnit.Cast <_ObjectQuantityUnitInfo>().Where(p => p.BH == info.BH).FirstOrDefault();
                 if (y_info == null)
                 {
                     info.IFSC   = dr_zc[0]["CAIJSC"].ToString() == "是" ? true : false;
                     info.IFZYCL = dr_zc[0]["CAIJXSJG"].ToString() == "是" ? true : false;
                     if (info.LB == "主材" || info.LB == "设备")
                     {
                         info.SCDJ = 0m;
                     }
                     else
                     {
                         info.SCDJ = info.DEDJ;
                     }
                 }
                 else
                 {
                     info.IFSC     = y_info.IFSC;
                     info.IFFX     = y_info.IFFX;
                     info.IFSDSCDJ = y_info.IFSDSCDJ;
                     info.IFZYCL   = y_info.IFZYCL;
                     info.YTLB     = y_info.YTLB;
                     info.SCDJ     = y_info.SCDJ;
                     info.JSDJ     = y_info.JSDJ;
                     info.CJ       = y_info.CJ;
                     info.PP       = y_info.PP;
                     info.ZLDJ     = y_info.ZLDJ;
                     info.GYS      = y_info.GYS;
                     info.CD       = y_info.CD;
                     info.CJBZ     = y_info.CJBZ;
                 }
                 info.STATUS = Status.Normal;
                 this.m_QuantityUnitComponentList.Add(info);
             }
         }
         if (this.IFKFJ)
         {
             this.CalculateParentSCDJ();
         }
     }
 }