Exemplo n.º 1
0
        private void ClickAdd(object arg1, EventArgs arg2)
        {
            this.isModify = false;
            FormParamNew form = new FormParamNew();

            if (form.ShowDialog() != System.Windows.Forms.DialogResult.OK)
            {
                return;
            }
            else
            {
                if (this.Entity == null)
                {
                    this.Entity           = new TestParams();
                    this.Entity.Id        = Guid.NewGuid().ToString();
                    this.Entity.ParamList = new List <TestParam>();
                }
                else if (this.Entity.ParamList == null)
                {
                    this.Entity.ParamList = new List <TestParam>();
                }
                this.Entity.ParamList.Add(form.Entity);
            }
            this.myGridView1.LoadData(this.Entity.ParamList, base.ignoreFields);
            this.myGridView1.Refresh();
            this.Refresh();
        }
Exemplo n.º 2
0
        private void ClickModify(object arg1, EventArgs arg2)
        {
            this.isModify = true;
            FormParamNew form = new FormParamNew();

            form.Entity = this.myGridView1.FindFirstSelect <TestParam>();
            form.ShowDialog();
            //xmlBll.Load();
            this.myGridView1.LoadData(this.Entity.ParamList, base.ignoreFields);
        }