Exemple #1
0
        /// <summary>
        /// 从清单索引插入到清单
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void simpleButton1_Click(object sender, EventArgs e)
        {
            if (this.CurrQD == null)
            {
                return;
            }
            if (iform.comboxTreelist1.CheckNodes.Count < 1)
            {
                this.Alert("请选择定额号");
                return;
            }
            IEnumerable <DataRowView> views = iform.comboxTreelist1.CheckNodes.Cast <DataRowView>().OrderBy(p => p["DINGEH"].ToString());
            ArrayList a = new ArrayList();

            a.AddRange(views.ToList());
            int intStart = 0;

            foreach (DataRowView item in a)
            {
                _Entity_SubInfo info = new _Entity_SubInfo();
                ///【2013.2.27 李波更改,作用处理各种备注来源】
                GLODSOFT.QDJJ.BUSINESS._Methods.SetSubheadingsInfo(info, item.Row, this.Activitie.Property.Libraries.FixedLibrary.FullName, "CXCK", ++intStart, this.CurrQD.OLDXMBM);
                _Methods_Fixed fix = new _Methods_Fixed(this.CurrentBusiness, this.Activitie, this.CurrQD);
                fix.Create(-1, info);
            }
            this.ExpandNode();
            //BindData();
            //this.bindingSource5.ResetBindings(false);

            iform.TreeListResate();
        }
Exemple #2
0
        private void simpleButton1_Click(object sender, EventArgs e)
        {
            QueryForm pform = this.ParentForm as QueryForm;

            if (pform == null)
            {
                return;
            }
            if (pform.CurrQD == null)
            {
                return;
            }
            _Entity_SubInfo info1 = new _Entity_SubInfo();
            DataRow         row   = this.Activitie.StructSource.ModelSubSegments.GetRowByOther(pform.CurrQD.ID.ToString());

            if (row == null)
            {
                return;
            }
            _ObjectSource.GetObject(info1, row);
            pform.CurrQD = info1;


            foreach (TreeListNode node in this.treeListEx1.Nodes)
            {
                treeListEx1_AfterCheckNode(this.treeListEx1, new DevExpress.XtraTreeList.NodeEventArgs(node));
            }

            foreach (DataRowView item in this.treeListEx1.CheckNodes)
            {
                _Entity_SubInfo info = new _Entity_SubInfo();

                GLODSOFT.QDJJ.BUSINESS._Methods.SetSubheadingsInfoByTJ(info, item.Row, this.Activitie.Property.Libraries.FixedLibrary.FullName);

                DataRow[] rows = this.Activitie.Property.Libraries.FixedLibrary.LibraryDataSet.Tables["定额表"].Select("DINGEH='" + info.OLDXMBM + "'");
                if (rows.Length > 0)
                {
                    info.JX = rows[0]["JIANGX"].Equals("是") ? true : false;
                    info.TX = rows[0]["TX1"].ToString();
                }
                // info.IsHs = false;
                _Methods_Fixed fix = new _Methods_Fixed(this.CurrentBusiness, this.Activitie, pform.CurrQD);
                fix.Create(-1, info);
            }

            pform.BindData();
        }
Exemple #3
0
        /// <summary>
        /// 插入定额
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void sButtonOK_Click1(object sender, EventArgs e)
        {
            if (this.CurrQD == null)
            {
                return;
            }
            DataRowView view = qf.bindingSource1.Current as DataRowView;

            if (view != null)
            {
                _Entity_SubInfo info = new _Entity_SubInfo();
                ///【2013.2.27 李波更改,作用处理各种备注来源】
                GLODSOFT.QDJJ.BUSINESS._Methods.SetSubheadingsInfo(info, view.Row, this.Activitie.Property.Libraries.FixedLibrary.FullName, "CXCK", 1, this.CurrQD.OLDXMBM);
                // Sform.subSegmentListData1.Z_Inset(info);
                _Methods_Fixed fix = new _Methods_Fixed(this.CurrentBusiness, this.Activitie, this.CurrQD);
                fix.Create(-1, info);
                this.ExpandNode();
                //Sform.subSegmentListData1.FocusedNode(info.ID);
                this.BindData();
            }
        }
Exemple #4
0
        /// <summary>
        /// 刷新定额
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void simpleButton1_Click(object sender, EventArgs e)
        {
            if (this.CurrQD == null)
            {
                return;
            }

            SubSegmentForm pform = this.ParentForm as SubSegmentForm;

            if (pform != null)
            {
                pform.ChangePositionChanged(false);
            }
            DialogResult dr = MsgBox.Show("是:删除重套定额!否:追加选中定额!取消:取消本次操作!", MessageBoxButtons.YesNoCancel);

            if (dr == DialogResult.Yes)
            {
                //this.CurrQD.RemoveAll();
                //删除所有子目
                DataRow[] rows = this.Activitie.StructSource.ModelSubSegments.Select(string.Format("PID={0}", this.CurrQD.ID));
                for (int i = 0; i < rows.Length; i++)
                {
                    rows[i].Delete();
                }
            }
            if (dr == DialogResult.Cancel)
            {
                return;
            }
            DataRow r = this.Activitie.StructSource.ModelSubSegments.GetRowByOther(this.CurrQD.ID.ToString());

            _ObjectSource.GetObject(this.CurrQD, r);
            string DEH   = string.Empty;
            int    intSD = 0;

            foreach (TreeListNode item1 in this.treeListEx1.Nodes)
            {
                if (!item1.Checked)
                {
                    continue;
                }

                DataRowView     item = this.treeListEx1.GetDataRecordByNode(item1) as DataRowView;
                _Entity_SubInfo info = new _Entity_SubInfo();
                DataTable       dt   = this.Activitie.Property.Libraries.FixedLibrary.LibraryDataSet.Tables["定额表"];
                if (dt == null)
                {
                    return;
                }
                string xmbm = item["TZDEH"].ToString();
                string temp = xmbm.Split(' ')[0];
                temp = temp.Replace("换", "");
                DataRow[] rows = dt.Select(string.Format(" DINGEH='{0}'", temp));
                if (rows == null)
                {
                    return;
                }
                if (rows.Length < 1)
                {
                    return;
                }
                GLODSOFT.QDJJ.BUSINESS._Methods.SetSubheadingsInfo(info, rows[0], this.Activitie.Property.Libraries.FixedLibrary.FullName, "XMTZ", ++intSD, this.CurrQD.OLDXMBM);
                //GLODSOFT.QDJJ.BUSINESS._Methods.SetSubheadingsInfo(info, rows[0], this.Activitie.Property.Libraries.FixedLibrary.FullName);
                info.XMBM = xmbm;
                _Methods_Fixed fix = new _Methods_Fixed(this.CurrentBusiness, this.Activitie, this.CurrQD);
                fix.Create(-1, info);
                DEH += item["TZDEH"].ToString() + ",";
            }
            if (pform != null)
            {
                pform.ChangePositionChanged(true);
            }
            //if (DEH.Length > 0) DEH = DEH.Substring(0, DEH.Length - 1);
            //string XMNR = string.Empty;
            //foreach (DataRowView item in this.bindingSource1)
            //{
            //    if (item["xmtz"] is ComboBoxSoucer)
            //    {
            //        XMNR += (item["xmtz"] as ComboBoxSoucer).TZname + ",";

            //    }
            //    else
            //    {
            //    XMNR += ""+ ",";
            //    }

            //}
            //if (XMNR.Length > 0) XMNR = XMNR.Substring(0, XMNR.Length - 1);
            //this.CurrQD.XMTZZ = XMNR + "|" + DEH;
            // RefreshSubSegment();
        }
Exemple #5
0
        private void simpleButton1_Click(object sender, EventArgs e)
        {
            SubSegmentForm pform = this.ParentForm as SubSegmentForm;

            if (pform != null)
            {
                pform.ChangePositionChanged(false);
            }
            if (this.CurrQD == null)
            {
                return;
            }
            // DialogResult dl = MessageBox.Show("是否删除原有子目并继续?", "提示", MessageBoxButtons.YesNo);
            DialogResult dl = MsgBox.Show("是:删除重套定额!否:追加选中定额!取消:取消本次操作!", MessageBoxButtons.YesNoCancel);

            if (dl == DialogResult.Yes)
            {
                DataRow[] rows = this.Activitie.StructSource.ModelSubSegments.Select(string.Format("PID={0}", this.CurrQD.ID));
                for (int i = 0; i < rows.Length; i++)
                {
                    rows[i].Delete();
                }
            }
            if (dl == DialogResult.Cancel)
            {
                return;
            }
            DataRow r = this.Activitie.StructSource.ModelSubSegments.GetRowByOther(this.CurrQD.ID.ToString());

            _ObjectSource.GetObject(this.CurrQD, r);
            GetCheckNodes();
            string DEH   = string.Empty;
            int    intSD = 0;

            foreach (DataRowView item in this.treeListEx1.CheckNodes)
            {
                _Entity_SubInfo info = new _Entity_SubInfo();
                GLODSOFT.QDJJ.BUSINESS._Methods.SetSubheadingsInfo(info, item.Row, this.Activitie.Property.Libraries.FixedLibrary.FullName, "GCNR", ++intSD, this.CurrQD.OLDXMBM);
                //GLODSOFT.QDJJ.BUSINESS._Methods.SetSubheadingsInfo(info, item.Row, this.Activitie.Property.Libraries.FixedLibrary.FullName);
                _Methods_Fixed fix = new _Methods_Fixed(this.CurrentBusiness, this.Activitie, this.CurrQD);
                fix.Create(-1, info);

                DEH += item["DINGEH"].ToString() + ",";
            }

            if (pform != null)
            {
                pform.ChangePositionChanged(true);
            }
            //if (DEH.Length > 0) DEH = DEH.Substring(0, DEH.Length - 1);

            //getDE();
            //string XMNR = string.Empty;
            //foreach (DataRowView item in this.m_DEBH)
            //{
            //    XMNR += item["NEIRBH"] + "=" + item["check"] + ",";
            //}
            //if (XMNR.Length > 0) XMNR = XMNR.Substring(0, XMNR.Length-1);
            //this.CurrQD.XMNR = XMNR + "|" + DEH;
            // RefreshSubSegment();
        }
Exemple #6
0
        /// <summary>
        /// 第一个石灰转换
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnSubmit1_Click(object sender, EventArgs e)
        {
            if (radioGroup1.SelectedIndex == 1)
            {
                ArrayList m_ArrayList = this.GetAllSub(string.Format("ZCLB='W' AND YSBH IN({0})", _Constant.石灰转换定额范围));
                DataRow   new_info    = GetSSH();
                foreach (DataRow item in m_ArrayList)
                {
                    decimal yxhl  = 0m;
                    decimal xhl   = 0m;
                    DataRow sshkg = this.Activitie.StructSource.ModelQuantity.Select(string.Format("SSLB={0} AND ZMID={1} AND ZCLB='W'AND YSBH='10900'", item["SSLB"], item["ID"])).FirstOrDefault();
                    DataRow ssht  = this.Activitie.StructSource.ModelQuantity.Select(string.Format("SSLB={0} AND ZMID={1} AND ZCLB='W'AND YSBH='10901'", item["SSLB"], item["ID"])).FirstOrDefault();
                    if (sshkg != null)
                    {
                        yxhl += _ConvertUnit.Convert(sshkg["DW"].ToString(), "千克") * ToolKit.ParseDecimal(sshkg["XHL"]);
                        xhl  += _ConvertUnit.Convert(sshkg["DW"].ToString(), "千克") * ToolKit.ParseDecimal(sshkg["XHL"]) * 1.3m;
                        sshkg.Delete();
                    }
                    if (ssht != null)
                    {
                        yxhl += _ConvertUnit.Convert(ssht["DW"].ToString(), "千克") * ToolKit.ParseDecimal(ssht["XHL"]);
                        xhl  += _ConvertUnit.Convert(ssht["DW"].ToString(), "千克") * ToolKit.ParseDecimal(ssht["XHL"]) * 1.3m;
                        ssht.Delete();
                    }

                    new_info["YSXHL"] = xhl;
                    new_info["XHL"]   = xhl;
                    new_info["CTIME"] = DateTime.Now;
                    new_info["SSLB"]  = item["SSLB"];
                    new_info["EnID"]  = item["EnID"];
                    new_info["UnID"]  = item["UnID"];
                    new_info["ZMID"]  = item["ID"];
                    new_info["QDID"]  = item["PID"];
                    new_info["PID"]   = DBNull.Value;
                    this.Activitie.StructSource.ModelQuantity.Add(new_info);

                    DataRow rg = this.Activitie.StructSource.ModelQuantity.Select(string.Format("SSLB='{0}' AND ZMID={1} AND LB='{2}'", item["SSLB"], item["ID"], "人工"), "YSBH").FirstOrDefault();
                    if (rg != null)
                    {
                        rg["XHL"] = ToolKit.ParseDecimal(rg["XHL"]) - (yxhl * 0.001m) * 0.478m;
                    }
                    DataRow sui = this.Activitie.StructSource.ModelQuantity.Select(string.Format("SSLB='{0}' AND ZMID={1} AND YSBH='{2}'", item["SSLB"], item["ID"], "11610"), "YSBH").FirstOrDefault();
                    if (sui != null)
                    {
                        sui["XHL"] = ToolKit.ParseDecimal(sui["XHL"]) - (yxhl * 0.001m) * 0.043m;
                    }
                    _Entity_SubInfo m_Entity_SubInfo = new _Entity_SubInfo();
                    _ObjectSource.GetObject(m_Entity_SubInfo, item);
                    _Methods_Subheadings m_Methods_Subheadings = new _Methods_Subheadings(this.CurrentBusiness, this.Activitie, m_Entity_SubInfo);
                    m_Methods_Subheadings.Begin(null);
                }
                MsgBox.Alert("【" + m_ArrayList.Count + "】条子目 生石灰-转换-熟石灰");
            }
            else
            {
                int       m_index     = 0;
                ArrayList m_ArrayList = this.GetAllSub("ZCLB='W' AND YSBH='10905'");
                foreach (DataRow item in m_ArrayList)
                {
                    _Entity_SubInfo m_QD_Entity_SubInfo = null;
                    _Entity_SubInfo m_Entity_SubInfo    = new _Entity_SubInfo();
                    _ObjectSource.GetObject(m_Entity_SubInfo, item);
                    if (m_Entity_SubInfo.SSLB == 0)
                    {
                        m_QD_Entity_SubInfo = new _Entity_SubInfo();
                        DataRow dr_qd = this.Activitie.StructSource.ModelSubSegments.GetRowByOther(m_Entity_SubInfo.PID.ToString());
                        if (dr_qd != null)
                        {
                            _ObjectSource.GetObject(m_QD_Entity_SubInfo, dr_qd);
                            _Methods_Fixed  m_Methods_Fixed  = new _Methods_Fixed(this.CurrentBusiness, this.Activitie, m_QD_Entity_SubInfo);
                            _Entity_SubInfo f_Entity_SubInfo = GetZMByID(m_Entity_SubInfo.OLDXMBM);
                            if (f_Entity_SubInfo != null)
                            {
                                item.Delete();
                                f_Entity_SubInfo.BEIZHU = GLODSOFT.QDJJ.BUSINESS._Methods.GetDEbeizhu("GCSZ", ++m_index, m_Methods_Fixed.Current.OLDXMBM);
                                m_Methods_Fixed.Create(m_Entity_SubInfo.Sort - 1, f_Entity_SubInfo);
                            }
                        }
                    }
                    else
                    {
                        m_QD_Entity_SubInfo = new _Entity_SubInfo();
                        DataRow dr_qd = this.Activitie.StructSource.ModelMeasures.GetRowByOther(m_Entity_SubInfo.PID.ToString());
                        if (dr_qd != null)
                        {
                            _ObjectSource.GetObject(m_QD_Entity_SubInfo, dr_qd);
                            _Mothods_MFixed m_Mothods_MFixed = new _Mothods_MFixed(this.CurrentBusiness, this.Activitie, m_QD_Entity_SubInfo);
                            _Entity_SubInfo c_Entity_SubInfo = GetZMByID(m_Entity_SubInfo.OLDXMBM);
                            if (c_Entity_SubInfo != null)
                            {
                                item.Delete();
                                c_Entity_SubInfo.BEIZHU = GLODSOFT.QDJJ.BUSINESS._Methods.GetDEbeizhu("GCSZ", ++m_index, m_Mothods_MFixed.Current.OLDXMBM);
                                m_Mothods_MFixed.Create(m_Entity_SubInfo.Sort - 1, c_Entity_SubInfo);
                            }
                        }
                    }
                }
                MsgBox.Alert("【" + m_ArrayList.Count + "】条子目 熟石灰-转换-生石灰");
            }
        }
Exemple #7
0
 /// <summary>
 /// 第三个模板应用
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnSubmit3_Click(object sender, EventArgs e)
 {
     if (radioGroup3.SelectedIndex == 1)
     {
         DataRow qd_dr = this.btnEdit1.Tag as DataRow;
         if (qd_dr != null)
         {
             ArrayList m_ArrayList = this.GetAllMBSub();
             if (m_ArrayList.Count > 0)
             {
                 _Entity_SubInfo m_QD_Entity_SubInfo = new _Entity_SubInfo();
                 _ObjectSource.GetObject(m_QD_Entity_SubInfo, qd_dr);
                 _Mothods_MFixed m_Mothods_MFixed    = new _Mothods_MFixed(this.CurrentBusiness, this.Activitie, m_QD_Entity_SubInfo);
                 _Entity_SubInfo m_ZM_Entity_SubInfo = new _Entity_SubInfo();
                 foreach (DataRow item in m_ArrayList)
                 {
                     item["SC"] = false;
                     _ObjectSource.GetObject(m_ZM_Entity_SubInfo, item);
                     m_ZM_Entity_SubInfo.SC = true;
                     m_Mothods_MFixed.Create(-1, m_ZM_Entity_SubInfo);
                     DataRow[] csxm_drs = this.Activitie.StructSource.ModelQuantity.Select(string.Format("SSLB={0} AND ZMID={1}", m_ZM_Entity_SubInfo.SSLB, m_ZM_Entity_SubInfo.ID));
                     foreach (DataRow csxm_glj_item in csxm_drs)
                     {
                         csxm_glj_item.Delete();
                     }
                     DataRow[] fbfx_drs = this.Activitie.StructSource.ModelQuantity.Select(string.Format("SSLB={0} AND ZMID={1}", item["SSLB"], item["ID"]));
                     foreach (DataRow fbfx_glj_item in fbfx_drs)
                     {
                         fbfx_glj_item["QDID"] = m_ZM_Entity_SubInfo.PID;
                         fbfx_glj_item["ZMID"] = m_ZM_Entity_SubInfo.ID;
                         fbfx_glj_item["SSLB"] = m_ZM_Entity_SubInfo.SSLB;
                     }
                 }
             }
             MsgBox.Alert("【" + m_ArrayList.Count + "】条子目 模板到措施成功");
         }
     }
     else
     {
         DialogResult dl = MessageBox.Show("您确认将模板还原到分部分项?", "提示", MessageBoxButtons.YesNo);
         if (dl == DialogResult.No)
         {
             return;
         }
         DataRow[] drs = this.Activitie.StructSource.ModelMeasures.Select("TX='模板'");
         if (drs.Length > 0)
         {
             _Methods_Fixed  m_Methods_Fixed  = new _Methods_Fixed(this.CurrentBusiness, this.Activitie, null);
             _Entity_SubInfo m_Entity_SubInfo = new _Entity_SubInfo();
             foreach (DataRow item in drs)
             {
                 _Entity_SubInfo info  = null;
                 DataRow         qd_dr = this.Activitie.StructSource.ModelSubSegments.GetRowByOther(item["QDBH"].ToString());
                 DataRow         zm_dr = this.Activitie.StructSource.ModelSubSegments.Select(string.Format("QDBH='{0}' and XMBM='{1}'", item["QDBH"], item["XMBM"])).FirstOrDefault();
                 if (qd_dr != null)
                 {
                     info = new _Entity_SubInfo();
                     _ObjectSource.GetObject(info, qd_dr);
                     m_Methods_Fixed.Current = info;
                 }
                 if (info != null)
                 {
                     if (zm_dr == null)
                     {
                         m_Entity_SubInfo.SC = true;
                         _ObjectSource.GetObject(m_Entity_SubInfo, item);
                         m_Methods_Fixed.Create(-1, m_Entity_SubInfo);
                         DataRow[] fbfx_drs = this.Activitie.StructSource.ModelQuantity.Select(string.Format("ZMID={0} and SSLB={1}", m_Entity_SubInfo.ID, m_Entity_SubInfo.SSLB));
                         foreach (DataRow fbfx_glj_item in fbfx_drs)
                         {
                             fbfx_glj_item.Delete();
                         }
                     }
                     else
                     {
                         zm_dr["SC"] = true;
                         _ObjectSource.GetObject(m_Entity_SubInfo, zm_dr);
                     }
                     DataRow[] csxm_drs = this.Activitie.StructSource.ModelQuantity.Select(string.Format("ZMID={0} and SSLB={1}", item["ID"], item["SSLB"]));
                     foreach (DataRow csxm_drs_item in csxm_drs)
                     {
                         csxm_drs_item["QDID"] = m_Entity_SubInfo.PID;
                         csxm_drs_item["ZMID"] = m_Entity_SubInfo.ID;
                         csxm_drs_item["SSLB"] = m_Entity_SubInfo.SSLB;
                     }
                 }
                 item.Delete();
             }
             MsgBox.Alert("【" + drs.Length + "】条子目 模板到分部成功");
         }
     }
 }
Exemple #8
0
        /// <summary>
        /// 第二个砂浆转换
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnSubmit2_Click(object sender, EventArgs e)
        {
            APP.UserPriceLibrary.AllQuantityUnit = this.Activitie.StructSource.ModelQuantity;
            APP.UserPriceLibrary.UnName          = this.Activitie.Name;
            APP.UserPriceLibrary.Range           = 1;
            if (this.radioGroup2.SelectedIndex == 1)
            {
                ArrayList m_ArrayList = this.GetAllSub("ZCLB='W' AND YSBH='J06016' AND XHL <> 0");
                int       count       = m_ArrayList.Count;
                //抹灰工程
                foreach (DataRow item in m_ArrayList)
                {
                    DataRow[] mh = this.Activitie.StructSource.ModelQuantity.Select(string.Format("SSLB={0} AND ZMID={1} AND ZCLB='W' AND YSBH IN({2})", item["SSLB"], item["ID"], _Constant.抹灰工程定额范围));
                    if (mh.Length > 0)
                    {
                        DataRow rg    = this.Activitie.StructSource.ModelQuantity.Select(string.Format("SSLB={0} AND ZMID={1} AND ZCLB='W' AND LB='人工'", item["SSLB"], item["ID"]), "YSBH").FirstOrDefault();
                        DataRow jx    = this.Activitie.StructSource.ModelQuantity.Select(string.Format("SSLB={0} AND ZMID={1} AND ZCLB='W' AND BH='J06016'", item["SSLB"], item["ID"]), "YSBH").FirstOrDefault();
                        decimal rgxhl = 0m;
                        foreach (DataRow dr in mh)
                        {
                            if (!dr["MC"].ToString().Contains("(预拌砂浆)"))
                            {
                                dr.BeginEdit();
                                dr["MC"] = dr["MC"].ToString() + "(预拌砂浆)";
                                APP.UserPriceLibrary.Update("MC", dr["MC", DataRowVersion.Current], dr);
                                dr.EndEdit();
                            }
                        }
                        //修改消耗量
                        foreach (DataRow mhs in mh)
                        {
                            rgxhl += ToolKit.ParseDecimal(mhs["XHL"]) * 1.1m * _ConvertUnit.Convert(mhs["DW"].ToString(), "立方米");
                        }
                        if (rg != null)
                        {
                            rg["XHL"] = ToolKit.ParseDecimal(rg["XHL"]) - rgxhl;
                        }
                        if (jx != null)
                        {
                            jx["XHL"] = 0m;
                        }
                    }

                    //砌筑工程
                    DataRow[] qz = this.Activitie.StructSource.ModelQuantity.Select(string.Format("SSLB={0} AND ZMID={1} AND ZCLB='W' AND YSBH IN ({2}) ", item["SSLB"], item["ID"], _Constant.筑工程定额范围));
                    if (qz.Count() > 0)
                    {
                        DataRow rg    = this.Activitie.StructSource.ModelQuantity.Select(string.Format("SSLB={0} AND ZMID={1} AND ZCLB='W' AND LB='人工'", item["SSLB"], item["ID"]), "YSBH").FirstOrDefault();
                        DataRow jx    = this.Activitie.StructSource.ModelQuantity.Select(string.Format("SSLB={0} AND ZMID={1} AND ZCLB='W' AND BH='J06016'", item["SSLB"], item["ID"]), "YSBH").FirstOrDefault();
                        decimal rgxhl = 0m;
                        //修改名称
                        DataRow dr = qz.FirstOrDefault();
                        if (dr != null)
                        {
                            if (!dr["MC"].ToString().Contains("(预拌砂浆)"))
                            {
                                dr.BeginEdit();
                                dr["MC"] = dr["MC"].ToString() + "(预拌砂浆)";
                                APP.UserPriceLibrary.Update("MC", dr["MC", DataRowVersion.Current], dr);
                                dr.EndEdit();
                            }
                        }
                        foreach (DataRow qzs in qz)
                        {
                            rgxhl += ToolKit.ParseDecimal(qzs["XHL"]) * 0.69m * _ConvertUnit.Convert(qzs["DW"].ToString(), "立方米");
                        }
                        if (rg != null)
                        {
                            rg["XHL"] = ToolKit.ParseDecimal(rg["XHL"]) - rgxhl;
                        }
                        if (jx != null)
                        {
                            jx["XHL"] = 0m;
                        }
                    }
                    string m_NewSubheadings = item["EnID"] + "," + item["UnID"] + "," + item["SSLB"] + "," + item["ID"] + "|";
                    if (!APP.UserPriceLibrary.SubheadingsInfo.Contains(m_NewSubheadings))
                    {
                        APP.UserPriceLibrary.SubheadingsInfo += m_NewSubheadings;
                    }
                }
                _Methods_Subheadings m_Methods_Subheadings = new _Methods_Subheadings(this.Activitie);
                m_Methods_Subheadings.BatchCalculate();
                MsgBox.Alert("【" + count + "】条子目 现场制拌砂浆-转换-预拌砂浆");
            }
            else
            {
                int       m_index     = 0;
                ArrayList m_ArrayList = this.GetAllSub("ZCLB='W' AND YSBH='J06016' AND XHL=0");
                foreach (DataRow item in m_ArrayList)
                {
                    _Entity_SubInfo m_QD_Entity_SubInfo = null;
                    _Entity_SubInfo m_Entity_SubInfo    = new _Entity_SubInfo();
                    _ObjectSource.GetObject(m_Entity_SubInfo, item);
                    if (m_Entity_SubInfo.SSLB == 0)
                    {
                        m_QD_Entity_SubInfo = new _Entity_SubInfo();
                        DataRow dr_qd = this.Activitie.StructSource.ModelSubSegments.GetRowByOther(m_Entity_SubInfo.PID.ToString());
                        if (dr_qd != null)
                        {
                            _ObjectSource.GetObject(m_QD_Entity_SubInfo, dr_qd);
                            _Methods_Fixed  m_Methods_Fixed  = new _Methods_Fixed(this.CurrentBusiness, this.Activitie, m_QD_Entity_SubInfo);
                            _Entity_SubInfo f_Entity_SubInfo = GetZMByID(m_Entity_SubInfo.OLDXMBM);
                            if (f_Entity_SubInfo != null)
                            {
                                item.Delete();
                                f_Entity_SubInfo.BEIZHU = GLODSOFT.QDJJ.BUSINESS._Methods.GetDEbeizhu("GCSZ", ++m_index, m_Methods_Fixed.Current.OLDXMBM);
                                m_Methods_Fixed.Create(m_Entity_SubInfo.Sort - 1, f_Entity_SubInfo);
                            }
                        }
                    }
                    else
                    {
                        m_QD_Entity_SubInfo = new _Entity_SubInfo();
                        DataRow dr_qd = this.Activitie.StructSource.ModelMeasures.GetRowByOther(m_Entity_SubInfo.PID.ToString());
                        if (dr_qd != null)
                        {
                            _ObjectSource.GetObject(m_QD_Entity_SubInfo, dr_qd);
                            _Mothods_MFixed m_Mothods_MFixed = new _Mothods_MFixed(this.CurrentBusiness, this.Activitie, m_QD_Entity_SubInfo);
                            _Entity_SubInfo c_Entity_SubInfo = GetZMByID(m_Entity_SubInfo.OLDXMBM);
                            if (c_Entity_SubInfo != null)
                            {
                                item.Delete();
                                c_Entity_SubInfo.BEIZHU = GLODSOFT.QDJJ.BUSINESS._Methods.GetDEbeizhu("GCSZ", ++m_index, m_Mothods_MFixed.Current.OLDXMBM);
                                m_Mothods_MFixed.Create(m_Entity_SubInfo.Sort - 1, c_Entity_SubInfo);
                            }
                        }
                    }
                }
                MsgBox.Alert("【" + m_ArrayList.Count + "】条子目 预拌砂浆-转换-现场制拌砂浆");
            }
        }