예제 #1
0
        private void openParams_Metaanalysis()
        {
            CParams_Metaanalysis form = new CParams_Metaanalysis();
            //循环去当前的数据特像
            int    i   = 0;
            string str = string.Empty;

            foreach (DataRowView row in this.UnitProject.StructSource.ModelMetaanalysis.DefaultView)
            {
                if (i != this.UnitProject.StructSource.ModelMetaanalysis.Rows.Count - 1)
                {
                    str += string.Format("'{0}',", row["Feature"].ToString());
                }
                else
                {
                    str += string.Format("'{0}'", row["Feature"].ToString());
                }
            }
            form.DataSource = this.ParamTable;
            form.Filter     = str;
            DialogResult r = form.ShowDialog(this);

            if (r == DialogResult.OK)
            {
                //确定了后处理当前编辑
                ChangeObject = this.metaanalysisList1.treeList1.Current["Feature"];
                this.metaanalysisList1.Edit(form.Current);
                ModifyAttribute modity = new ModifyAttribute();
                modity.CurrentValue  = this.metaanalysisList1.treeList1.Current["Feature"];
                modity.OriginalValue = ChangeObject;
                modity.ObjectName    = "费用代号";
                modity.ModelName     = "汇总分析";
                modity.Source        = this.metaanalysisList1.treeList1.Current.Row;
                modity.FieldName     = "Feature";
                //modity.ActingOn = "清单.子目";
                ChangeObject = null;
                this.LogContent.Add(modity);
                //LogContent.Add(e);
                GetContainer.ALogForm.Init();
            }
        }
예제 #2
0
        private void repositoryItemButtonEdit2_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
        {
            CParams_Metaanalysis f = new CParams_Metaanalysis();

            f.Text = "其他项目参数配置";
            DataTable ParamTable = APP.Application.Global.DataTamp.TempDataSet.Tables["Params_Other"].Copy();

            f.DataSource = ParamTable;
            f.Filter     = this.Filter;
            DialogResult d = f.ShowDialog();

            if (d == DialogResult.OK)
            {
                DataRowView view = f.Current;
                DataRowView rv   = this.treeList1.Current;
                if (rv != null)
                {
                    ChangeObject = rv["Feature"];
                    rv.BeginEdit();
                    rv["Feature"] = view["Code"];
                    rv["Name"]    = view["Name"];
                    rv.EndEdit();
                    ModifyAttribute modity = new ModifyAttribute();
                    modity.CurrentValue  = rv["Feature"];
                    modity.OriginalValue = ChangeObject;
                    modity.ObjectName    = "费用代号";
                    modity.ModelName     = "其他项目";
                    modity.Source        = this.treeList1.Current.Row;
                    modity.FieldName     = "Feature";
                    //modity.ActingOn = "清单.子目";
                    ChangeObject = null;
                    this.LogContent.Add(modity);
                    //LogContent.Add(e);
                    GetContainer.ALogForm.Init();
                }
            }
        }