示例#1
0
        public void CopySingle(object sender, object e)
        {
            Container      form1 = sender as Container;
            SubSegmentForm obj   = form1.GetWorkAreas as SubSegmentForm;

            if (obj != null)
            {
                DataRowView v = obj.subSegmentListData1.treeList1.Current;
                if (v == null)
                {
                    MsgBox.Show("没有选择子目!", MessageBoxButtons.OK); return;
                }
                if (v["LB"].ToString().Contains("子目"))
                {
                    FiexdCheck ck = new FiexdCheck();
                    ck.Activitie       = obj.Activitie;
                    ck.CurrentBusiness = obj.CurrentBusiness;
                    ck.StrCZBM         = "FZZT";
                    ck.ArrDE.Add(obj.subSegmentListData1.treeList1.Current);
                    ck.Show(obj);
                }
                else
                {
                    { MsgBox.Show("没有选择子目!", MessageBoxButtons.OK); return; }
                }
            }
        }
示例#2
0
        private void simpleButton1_Click(object sender, EventArgs e)
        {
            SaveFileDialog sfd = new SaveFileDialog();

            sfd.FileName         = "";
            sfd.Filter           = "调标文件(*.tbx)|*.tbx";
            sfd.FilterIndex      = 1;
            sfd.RestoreDirectory = true;
            if (sfd.ShowDialog() == DialogResult.OK)
            {
                string localFilePath = sfd.FileName.ToString();
                if (!localFilePath.EndsWith(".tbx"))
                {
                    localFilePath += ".tbx";
                }
                try
                {
                    ApplicationForm pForm = this.MdiParent as ApplicationForm;
                    Container       form  = pForm.ActiveMdiChild as Container;
                    SubSegmentForm  obj   = form.GetWorkAreas as SubSegmentForm;
                    File.Copy(APP.Cache.AppFolder + "工程文件\\备份文件\\" + obj.Activitie.Name + ".xls", localFilePath);
                    File.Delete(APP.Cache.AppFolder + "工程文件\\备份文件\\abcInvite.xls");
                }
                catch (Exception)
                {
                    MessageBox.Show("发生未知异常,请重试", "金建软件");
                }
            }

            this.Close();
            this.DialogResult = DialogResult.OK;
        }
示例#3
0
        public void CopyMore(object sender, object e)
        {
            Container      form1 = sender as Container;
            SubSegmentForm obj   = form1.GetWorkAreas as SubSegmentForm;

            if (obj != null)
            {
                FiexdCheck ck = new FiexdCheck();
                ck.Activitie       = obj.Activitie;
                ck.CurrentBusiness = obj.CurrentBusiness;
                ck.StrCZBM         = "KFZ";
                // bool flag = false;
                foreach (TreeListNode item in obj.subSegmentListData1.treeList1.Selection)
                {
                    DataRowView v = obj.subSegmentListData1.treeList1.GetDataRecordByNode(item) as DataRowView;
                    if (v != null)
                    {
                        if (v["LB"].ToString().Contains("子目"))
                        {
                            ck.ArrDE.Add(v);
                        }
                        else
                        {
                            MsgBox.Show("请不要选择非子目!", MessageBoxButtons.OK); return;
                        }
                    }
                }

                ck.Show(obj);
            }
        }
示例#4
0
        public void ImportEXcel(object sender, object e)
        {
            Container form1 = sender as Container;

            if (!form1.CurrentBusiness.Current.IsDZBS || APP.Jzbx_pwd)
            {
                SubSegmentForm obj = form1.GetWorkAreas as SubSegmentForm;
                if (obj != null)
                {
                    OpenFileDialog f = new OpenFileDialog();
                    f.Filter = "Excel文件(*.xls)|*.xls|Excel文件(*.xlsx)|*.xlsx";
                    DialogResult d = f.ShowDialog();
                    if (d == DialogResult.OK)
                    {
                        FileName = f.FileName;
                        m        = new _Method_Sub_ImportExcel(obj.CurrentBusiness, obj.Activitie);
                        DialogResult dl = MsgBox.Show("是否清空之前的分部分项数据?", MessageBoxButtons.YesNo);
                        if (dl == DialogResult.Yes)
                        {
                            m.ClerSub();
                        }
                        BackgroundWorker AFormInitWorker = new BackgroundWorker();
                        AFormInitWorker.WorkerReportsProgress = false;
                        AFormInitWorker.DoWork             += new DoWorkEventHandler(AFormInitWorker_DoWork);
                        AFormInitWorker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(AFormInitWorker_RunWorkerCompleted);
                        AFormInitWorker.RunWorkerAsync();
                        ProgressFrom form = new ProgressFrom(AFormInitWorker);
                        form.ShowDialog();
                    }
                }
            }
        }
示例#5
0
        private void simpleButton2_Click(object sender, EventArgs e)
        {
            if (this.CurrQD == null)
            {
                return;
            }
            DataRow r         = this.Activitie.StructSource.ModelSubSegments.GetRowByOther(this.CurrQD.ID.ToString());
            string  TextValue = r["XMMC"].ToString();
            string  Titile    = _Constant.回车符 + "【项目特征】";
            int     i         = 1;
            string  Str       = _Constant.回车符 + "【项目特征】" + _Constant.回车符;

            foreach (DataRowView item in this.bindingSource1)
            {
                if (item["Remark"].ToString() != "")
                {
                    Str += i.ToString() + "." + item["TEZMC"] + ":" + item["Remark"] + _Constant.回车符;
                    i++;
                }
            }
            Str = Str.TrimEnd();
            string Result = GLODSOFT.QDJJ.BUSINESS._Methods.SetTextBox(TextValue, Str, Titile);

            r.BeginEdit();
            r["XMMC"] = Result;
            r.EndEdit();
            SubSegmentForm form = this.ParentForm as SubSegmentForm;

            if (form != null)
            {
                form.subSegmentListData1.treeList1.Refresh();
            }
        }
示例#6
0
        /// <summary>
        /// 整理到章
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public void ToChapter(object sender, object e)
        {
            Container      form1 = sender as Container;
            SubSegmentForm obj   = form1.GetWorkAreas as SubSegmentForm;

            obj.subSegmentListData1.DataBind(EListType.Chapter);

            obj.subSegmentListData1.treeList1.Expand(2);
        }
示例#7
0
        /// <summary>
        /// 超高降效
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public void EfficiencyForm(object sender, object e)
        {
            Container      form1 = sender as Container;
            SubSegmentForm obj   = form1.GetWorkAreas as SubSegmentForm;
            EfficiencyForm form  = new EfficiencyForm();

            form.Activitie       = obj.Activitie;
            form.CurrentBusiness = obj.CurrentBusiness;
            DialogResult dl = form.ShowDialog();
        }
示例#8
0
        public void FiexdDown(object sender, object e)
        {
            Container      form1 = sender as Container;
            SubSegmentForm obj   = form1.GetWorkAreas as SubSegmentForm;

            if (obj != null)
            {
                obj.UpOrDownFiexd(false);
            }
        }
示例#9
0
        /// <summary>
        /// 序号重排
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public void Listguidelines(object sender, object e)
        {
            Container      form1 = sender as Container;
            SubSegmentForm obj   = form1.GetWorkAreas as SubSegmentForm;

            if (obj != null)
            {
                obj.subSegmentListData1.RestXH();
                obj.subSegmentListData1.DataBind();
            }
        }
示例#10
0
        /// <summary>
        /// 撤销整理
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public void ToDefault(object sender, object e)
        {
            Container      form1 = sender as Container;
            SubSegmentForm obj   = form1.GetWorkAreas as SubSegmentForm;

            // obj.subSegmentListData1.Columns = APP.DataObjects.Columns;
            //obj.subSegmentListData1.ChangeColums();
            //obj.Activitie.Property.SubSegments.ListType = EListType.Default;
            obj.subSegmentListData1.DataBind(EListType.Default);
            obj.subSegmentListData1.treeList1.Expand(1);
        }
示例#11
0
        /// <summary>
        /// 整理到专业
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public void ToPro(object sender, object e)
        {
            Container      form1 = sender as Container;
            SubSegmentForm obj   = form1.GetWorkAreas as SubSegmentForm;

            //obj.Activitie.Property.SubSegments.ListType = EListType.Professional;
            //obj.Activitie.Property.SubSegments.ChangeSource();
            obj.subSegmentListData1.DataBind(EListType.Professional);
            //obj.subSegmentListData1.treeList1.Expand(1);
            obj.subSegmentListData1.treeList1.Expand(1);
        }
示例#12
0
        /// <summary>
        /// 模板到措施
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public void MobToMeasures(object sender, object e)
        {
            /// </summary>
            Container form1 = sender as Container;
            // Container form1 = (e as object[])[0] as Container;
            SubSegmentForm obj  = form1.GetWorkAreas as SubSegmentForm;
            MobToMeasures  form = new MobToMeasures();

            form.Activitie       = obj.Activitie;
            form.CurrentBusiness = obj.CurrentBusiness;
            form.Show(obj);
        }
示例#13
0
        /// <summary>
        /// 分部分项的刷新
        /// </summary>
        private void RefreshSubSegment()
        {
            SubSegmentForm form = this.ParentForm as SubSegmentForm;

            if (form != null)
            {
                form.subSegmentListData1.DataBind();
                if (this.CurrQD != null)
                {
                    form.subSegmentListData1.FocusedNode(this.CurrQD.ID);
                }
            }
        }
示例#14
0
        private void SelectGallery_Load(object sender, EventArgs e)
        {
            SubSegmentForm form = P_form as SubSegmentForm;

            if (form != null)
            {
                //初始化清单
                this.fixedLibrary1.Folder  = APP.Application.Global.AppFolder;
                this.fixedLibrary1.Default = this.Activitie;
                //为清单控件添加双击事件
                // this.fixedLibrary1.treeList1.DoubleClick += new EventHandler(form.treeList1_DoubleClick);
                this.fixedLibrary1.listBoxControl2.DoubleClick += new EventHandler(form.listBoxControl2_DoubleClick);
            }
        }
示例#15
0
        /// <summary>
        /// 子目增加费
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public void IncreaseCosts(object sender, object e)
        {
            Container      form1 = sender as Container;
            SubSegmentForm obj   = form1.GetWorkAreas as SubSegmentForm;

            if (!obj.Activitie.ProType.Contains("安装"))
            {
                return;
            }
            IncreaseCosts inf = new IncreaseCosts();

            inf.SubSegmentForm  = obj;
            inf.Activitie       = obj.Activitie;
            inf.CurrentBusiness = obj.CurrentBusiness;
            inf.ShowDialog();
        }
示例#16
0
        /// <summary>
        /// 查询窗口
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public void QueryForm(object sender, object e)
        {
            Container      form1 = sender as Container;
            SubSegmentForm obj   = form1.GetWorkAreas as SubSegmentForm;

            if (obj != null)
            {
                DataRowView v = obj.subSegmentListData1.treeList1.Current as DataRowView;
                if (v != null)
                {
                    QueryForm form = new QueryForm(obj);
                    form.Activitie       = obj.Activitie;
                    form.CurrentBusiness = obj.CurrentBusiness;
                    form.Sform           = obj;
                    switch (v["LB"].ToString())
                    {
                    case "子目录":

                        _Entity_SubInfo info = new _Entity_SubInfo();
                        DataRow         row  = obj.Activitie.StructSource.ModelSubSegments.GetRowByOther(v["ID"].ToString());
                        _ObjectSource.GetObject(info, row);
                        form.CurrQD = info;
                        break;

                    case "清单":
                        _Entity_SubInfo info2 = new _Entity_SubInfo();
                        DataRow         row2  = obj.Activitie.StructSource.ModelSubSegments.GetRowByOther(v["ID"].ToString());
                        _ObjectSource.GetObject(info2, row2);
                        form.CurrQD = info2;
                        break;

                    default:
                        _Entity_SubInfo info1 = new _Entity_SubInfo();
                        DataRow         row1  = obj.Activitie.StructSource.ModelSubSegments.GetRowByOther(v["PID"].ToString());
                        _ObjectSource.GetObject(info1, row1);
                        form.CurrQD = info1;
                        break;
                    }
                    form.Show(obj);
                }
            }
        }
示例#17
0
        public void DoColumns(object sender, object e)
        {
            Container             form1 = sender as Container;
            SubSegmentForm        obj   = form1.GetWorkAreas as SubSegmentForm;
            SelectSubsegmenColumn form  = new SelectSubsegmenColumn();

            form.Activitie    = obj.Activitie;
            form.ColumnLayout = APP.DataObjects.GColor.ColumnLayout;
            form.Control      = obj.subSegmentListData1.treeList1;

            DialogResult r = form.ShowDialog(obj);

            if (r == DialogResult.OK)
            {
                if (obj != null)
                {
                    // obj.subSegmentListData1.ChangeColums();
                }
            }
        }
示例#18
0
        public void FindReplace(object sender, object e)
        {
            Container       form1 = sender as Container;
            SubSegmentForm  obj   = form1.GetWorkAreas as SubSegmentForm;
            FindReplaceForm form  = new FindReplaceForm();

            form.sform     = obj;
            form.Activitie = obj.Activitie;
            // form.Fitler = obj.subSegmentListData1.Source.Filter;
            // obj.subSegmentListData1.treeList1.BeginUnboundLoad();
            form.Show(form1);
            //if (r == DialogResult.OK)
            {
                // obj.BindSubSegmentList();
                //obj.subSegmentListData1.treeList1.EndUnboundLoad();
                // obj.subSegmentListData1.treeList1.Refresh();
                //obj.subSegmentListData1.Source.ResetBindings(true);
                //obj.subSegmentListData1.DataBind();
            }
            // obj.subSegmentListData1.Source.Filter = form.Fitler;
            //obj.subSegmentListData1.treeList1.EndUnboundLoad();
        }
示例#19
0
        private void WoodMachineTreeLst_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            SubSegmentForm subSegmentfrm = new SubSegmentForm();

            subSegmentfrm.ShowDialog();
        }
示例#20
0
        private void dataGridView1_DoubleClick(object sender, EventArgs e)
        {
            if (this.dataGridView1.SelectedRows.Count <= 0)
            {
                return;
            }
            columnName = this.dataGridView1.SelectedRows[0].Cells[0].Value.ToString();

            ApplicationForm pForm   = this.MdiParent as ApplicationForm;
            Container       form    = pForm.ActiveMdiChild as Container;
            decimal         rate    = 0.0m;
            decimal         oResult = 0.0m;
            int             qdID    = 0;

            DataRow[] rows = null;
            DataRow   row = null;
            bool      result = false;
            decimal   jsCount = 0.0m, zhdj = 0.0m;

            SubSegmentForm obj = form.GetWorkAreas as SubSegmentForm;

            for (int i = 0; i < obj.Activitie.StructSource.ModelSubSegments.Rows.Count; i++)
            {
                if (!obj.Activitie.StructSource.ModelSubSegments.Rows[i]["LB"].ToString().Equals("清单"))
                {
                    continue;
                }

                for (int j = 0; j < APP.GoldSoftClient.TB_RESULT.Rows.Count; j++)
                {
                    if (decimal.Parse(obj.Activitie.StructSource.ModelSubSegments.Rows[i]["ZHDJ"].ToString()) == 0.0M ||
                        APP.GoldSoftClient.TB_RESULT.Rows[j][columnName].ToString().Equals("正无穷大") ||
                        APP.GoldSoftClient.TB_RESULT.Rows[j][columnName].ToString().Equals("负无穷大") ||
                        obj.Activitie.StructSource.ModelSubSegments.Rows[i]["ZHDJ"].ToString().Equals("正无穷大") ||
                        obj.Activitie.StructSource.ModelSubSegments.Rows[i]["ZHDJ"].ToString().Equals("负无穷大"))
                    {
                        continue;
                    }
                    if (obj.Activitie.StructSource.ModelSubSegments.Rows[i]["XH"].ToString().Equals(APP.GoldSoftClient.TB_RESULT.Rows[j]["OLDXH"].ToString()) &&
                        obj.Activitie.StructSource.ModelSubSegments.Rows[i]["UnID"].ToString().Equals(APP.GoldSoftClient.TB_RESULT.Rows[j]["GCID"].ToString()))
                    {
                        row = obj.Activitie.StructSource.ModelSubSegments.Rows[i];
                        row.BeginEdit();
                        //row["ZJTJ"] = APP.GoldSoftClient.TB_RESULT.Rows[j][columnName];

                        decimal.TryParse(APP.GoldSoftClient.TB_RESULT.Rows[j][columnName].ToString(), out jsCount);
                        decimal.TryParse(obj.Activitie.StructSource.ModelSubSegments.Rows[i]["ZHDJ"].ToString(), out zhdj);
                        rate = jsCount / zhdj;
                        //rate = decimal.Parse(APP.GoldSoftClient.TB_RESULT.Rows[j][columnName].ToString()) / decimal.Parse(obj.Activitie.StructSource.ModelSubSegments.Rows[i]["ZHDJ"].ToString());
                        row["ZHDJ"] = APP.GoldSoftClient.TB_RESULT.Rows[j][columnName];
                        row.EndEdit();
                        qdID = int.Parse(obj.Activitie.StructSource.ModelSubSegments.Rows[i]["ID"].ToString());
                        rows = obj.Activitie.StructSource.ModelQuantity.Select("QDID = " + qdID);
                        for (int n = 0; n < rows.Length; n++)
                        {
                            if (!decimal.TryParse(rows[n]["XHL"].ToString(), out oResult))
                            {
                                continue;
                            }
                            rows[n].BeginEdit();
                            rows[n]["XHL"] = Math.Round(oResult * rate, 4);
                            rows[n].EndEdit();
                        }
                    }
                }
            }

            //APP.GoldSoftClient.TB_RESULT.Columns.Remove(columnName);

            this.Close();
        }
示例#21
0
        private void simpleButton2_Click(object sender, EventArgs e)
        {
            QueryForm pform = this.ParentForm as QueryForm;

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

            if (row == null)
            {
                return;
            }
            _ObjectSource.GetObject(info, row);
            pform.CurrQD = info;
            DataRow     r         = this.Activitie.StructSource.ModelSubSegments.GetRowByOther(pform.CurrQD.ID.ToString());
            string      TextValue = r["XMMC"].ToString();
            string      Titile    = _Constant.回车符 + "【标准图集】";
            string      TJNR      = _Constant.回车符 + "【标准图集】" + _Constant.回车符;
            DataRowView view      = this.bindingSource1.Current as DataRowView;

            if (view == null)
            {
                return;
            }
            DataRow[] rows1 = this.ds.Tables["图集索引表"].Copy().Select(string.Format("SYBH={0}", view["SYBH"]));
            if (rows1.Length > 0)
            {
                DataRow[] rows = this.ds.Tables["图集索引表"].Copy().Select(string.Format("SYBH={0}", rows1[0]["PARENTID"]));
                if (rows.Length > 0)
                {
                    if (ToolKit.ParseInt(rows[0]["PARENTID"]) == 1)
                    {
                        TJNR += rows[0]["MUNR"] + ":" + rows1[0]["MUNR"] + ":" + (this.bindingSource1.Current as DataRowView)["TJBH"] + _Constant.回车符;
                    }
                    else
                    {
                        DataRow[] rows2 = this.ds.Tables["图集索引表"].Select(string.Format("SYBH={0}", rows[0]["PARENTID"]));
                        if (rows2.Length > 0)
                        {
                            TJNR += (rows2[0]["MUNR"] + ":" + rows[0]["MUNR"] + ":" + rows1[0]["MUNR"] + ":" + (this.bindingSource1.Current as DataRowView)["TJBH"] + _Constant.回车符);
                        }
                    }
                }
            }
            int    i   = 1;
            string Str = "";

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

            foreach (DataRowView item in this.treeListEx2.CheckNodes)
            {
                if (item["ZFMC"].ToString() != "")
                {
                    Str += i.ToString() + "." + item["ZFMC"] + _Constant.回车符;
                    i++;
                }
            }
            Str   = Str.TrimEnd();
            TJNR += Str;
            string Result = GLODSOFT.QDJJ.BUSINESS._Methods.SetTextBox(TextValue, TJNR, Titile);

            r.BeginEdit();
            r["XMMC"] = Result;
            r.EndEdit();
            SubSegmentForm form = pform.Sform;

            if (form != null)
            {
                form.subSegmentListData1.treeList1.Refresh();
            }
        }
示例#22
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();
        }
示例#23
0
 public QueryForm(SubSegmentForm Sform)
 {
     this.Sform              = Sform;
     this.Sform.FixedChange += new SubSegmentForm.FixedChangeHandler(Sform_FixedChange);
     InitializeComponent();
 }
示例#24
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();
        }
示例#25
0
        /// <summary>
        /// 要执行那个窗体
        /// </summary>
        /// <param name="p_key"></param>
        private void doAction(string p_key)
        {
            ABaseForm from = null;

            this.CurrentBusiness.FastCalculate();

            if (FormList.Contains(p_key))
            {
                from = this.FormList[p_key] as ABaseForm;
                from.MustInit();
                //第二次加载的时候每次执行
                from.Init();
            }
            else
            {
                switch (p_key)
                {
                case "分部分项":
                    from           = new SubSegmentForm();
                    SubsegmentForm = from as SubSegmentForm;
                    break;

                //case "工程信息":
                //    from = new  ProInformation();
                // break;
                case "基本信息":
                    from = new CBaseUnitProInfo();
                    from.CurrentBusiness = this.CurrentBusiness;
                    (from as CBaseUnitProInfo).UnitProject = this.Activitie;
                    break;

                case "工料机汇总":
                    from = new UnitSummaryForm(this.Activitie, this.CurrentBusiness);
                    break;

                case "汇总分析":
                    from = new CMetaanalysisForm();
                    //设置当前的单位工程
                    this.MetaanalysisForm             = from as CMetaanalysisForm;
                    this.MetaanalysisForm.UnitProject = this.Activitie;
                    break;

                case "其他项目":
                    from = new OtherProjectForm(this.Activitie);
                    break;

                case "措施项目":
                    from = new MeasuresProjectForm();
                    break;

                case "工程历史":
                    from = new CHistoryForm();
                    break;

                case "报表":
                    from = new ReportForm();
                    break;
                    //case "参数设置":
                    //    from = new ParameterSettings();
                    break;

                case "单位工程自检":
                    from = new ProjectCheck();
                    break;
                }

                if (from == null)
                {
                    return;
                }
                from.CurrentBusiness = this.CurrentBusiness;
                from.Activitie       = this.Activitie;
                from.BusContainer    = this;
                from.TopLevelForm    = this.MainForm;
                from.FormBorderStyle = FormBorderStyle.None;
                from.Dock            = DockStyle.Fill;//设置样式是否填充整个PANEL
                //设置为非顶级控件
                from.TopLevel = false;
                //显示窗体
                from.Visible = true;
                this.FormList.Add(p_key, from);
            }

            //添加之前保存当时的界面配置
            this.WorkPanel.Controls.Clear();
            this.WorkPanel.Controls.Add(from);

            if (Parent_Projects != null)
            {
                Parent_Projects.OnModelChange(this, from);
            }
            else
            {
                this.OnModelChange(this, from);
            }
        }