Example #1
0
 void ProjWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
 {
     MsgBox.Show("处理完成", MessageBoxButtons.OK);
     this.DialogResult = DialogResult.OK;
 }
Example #2
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();
        }
Example #3
0
 void ProjWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
 {
     MsgBox.Show("处理完成", MessageBoxButtons.OK);
     this.Close();
 }