Ejemplo n.º 1
0
        private void winGridViewPager1_OnEditSelected(object sender, EventArgs e)
        {
            string ID = this.winGridViewPager1.gridView1.GetFocusedRowCellDisplayText("Value");

            if (!string.IsNullOrEmpty(ID))
            {
                FrmEditDictData dlg = new FrmEditDictData();
                dlg.txtDictType.Text = this.lblDictType.Text;
                dlg.txtDictType.Tag  = this.lblDictType.Tag;
                dlg.ID           = ID;
                dlg.OnDataSaved += new EventHandler(dlg_OnDataSaved);
                if (DialogResult.OK == dlg.ShowDialog())
                {
                    winGridViewPager1_OnRefresh(null, null);
                }
            }
        }
Ejemplo n.º 2
0
        private void winGridViewPager1_OnEditSelected(object sender, EventArgs e)
        {
            Int32 Id = this.winGridViewPager1.gridView1.GetFocusedRowCellDisplayText("IntValue").ToInt32();

            if (Id > 0)
            {
                FrmEditDictData dlg = new FrmEditDictData();
                dlg.txtDictType.Text = this.lblDictType.Text;
                dlg.txtDictType.Tag  = this.lblDictType.Tag;
                dlg.Id           = Id;
                dlg.OnDataSaved += new EventHandler(dlg_OnDataSaved);
                if (DialogResult.OK == dlg.ShowDialog())
                {
                    winGridViewPager1_OnRefresh(null, null);
                }
            }
        }
Ejemplo n.º 3
0
        private void winGridViewPager1_OnAddNew(object sender, EventArgs e)
        {
            if (this.lblDictType.Text.Length == 0)
            {
                MessageDxUtil.ShowTips("请选择指定的字典大类,然后添加!");
                return;
            }

            FrmEditDictData dlg = new FrmEditDictData();

            dlg.txtDictType.Text = this.lblDictType.Text;
            dlg.txtDictType.Tag  = this.lblDictType.Tag;
            dlg.OnDataSaved     += new EventHandler(dlg_OnDataSaved);

            if (DialogResult.OK == dlg.ShowDialog())
            {
                winGridViewPager1_OnRefresh(null, null);
            }
        }