예제 #1
0
        private void repositoryItemButtonEdit1_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
        {
            DevExpress.XtraEditors.ButtonEdit bt = sender as DevExpress.XtraEditors.ButtonEdit;
            SelectVariableForm form = new SelectVariableForm();

            form.Activitie  = this.Activitie;
            form.DataSource = this.Activitie.StructSource.ModelProjVariable;
            //this.Activitie.Property.Statistics.Begin();
            //form.DataSource = this.Activitie.Property.Statistics.ResultVarable;
            form.GetValue = bt.Text;
            DialogResult dl = form.ShowDialog();

            if (dl == DialogResult.OK)
            {
                //bt.Text = form.GetValue;
                (this.treeList1.Current as DataRowView)["Calculation"] = form.GetValue;
                this.treeList1.RefreshDataSource();
                //this.Source.ResetBindings(false);
            }
        }
예제 #2
0
        private void repositoryItemButtonEdit1_ButtonClick(object sender, ButtonPressedEventArgs e)
        {
            DataRow view = this.gridView1.GetFocusedDataRow() as DataRow;

            if (view == null)
            {
                return;
            }
            DataRow[] drs = this.Activitie.StructSource.ModelVariable.Select(string.Format("ID={0} and type={1} and ISDE = 'False'", view["ZMID"], view["SSLB"]));
            if (drs.Length == 0)
            {
                this.m_Methods_Subheadings.ParametersTableCalculate();
            }
            ButtonEdit         bt   = sender as ButtonEdit;
            SelectVariableForm form = new SelectVariableForm();

            form.Activitie  = this.Activitie;
            form.DataSource = this.Activitie.StructSource.ModelVariable;
            form.Filter(ToolKit.ParseInt(view["ZMID"]), ToolKit.ParseInt(view["SSLB"]));
            form.GetValue = bt.Text;
            form.ShowDialog();
            bt.Text = form.GetValue;
        }