Example #1
0
        private void btnAddNew_Click(object sender, EventArgs e)
        {
            FrmEditItemDetail dlg = new FrmEditItemDetail();

            dlg.OnDataSaved += new EventHandler(dlg_OnDataSaved);
            dlg.InitFunction(base.LoginUserInfo, base.FunctionDict);//该步骤省略也可以,用户信息以通过基类缓存进行获取

            if (DialogResult.OK == dlg.ShowDialog())
            {
                BindData();
            }
        }
Example #2
0
        private void winGridViewPager1_OnEditSelected(object sender, EventArgs e)
        {
            Int32        Id     = this.winGridViewPager1.gridView1.GetFocusedRowCellDisplayText("ID").ToInt32();
            List <Int32> IdList = new List <Int32>();

            for (int i = 0; i < this.winGridViewPager1.gridView1.RowCount; i++)
            {
                Int32 intTemp = this.winGridViewPager1.GridView1.GetRowCellDisplayText(i, "ID").ToInt32();
                IdList.Add(intTemp);
            }

            if (Id > 0)
            {
                FrmEditItemDetail dlg = new FrmEditItemDetail();
                dlg.Id     = Id;
                dlg.IdList = IdList;
                dlg.InitFunction(this.LoginUserInfo, this.FunctionDict);//初始化权限控制信息
                dlg.OnDataSaved += new EventHandler(dlg_OnDataSaved);
                if (DialogResult.OK == dlg.ShowDialog())
                {
                    BindData();
                }
            }
        }
Example #3
0
        private void winGridViewPager1_OnEditSelected(object sender, EventArgs e)
        {
            string        ID     = this.winGridViewPager1.gridView1.GetFocusedRowCellDisplayText("ID");
            List <string> IDList = new List <string>();

            for (int i = 0; i < this.winGridViewPager1.gridView1.RowCount; i++)
            {
                string strTemp = this.winGridViewPager1.GridView1.GetRowCellDisplayText(i, "ID");
                IDList.Add(strTemp);
            }

            if (!string.IsNullOrEmpty(ID))
            {
                FrmEditItemDetail dlg = new FrmEditItemDetail();
                dlg.ID     = ID;
                dlg.IDList = IDList;
                dlg.InitFunction(this.LoginUserInfo, this.FunctionDict);//初始化权限控制信息
                dlg.OnDataSaved += new EventHandler(dlg_OnDataSaved);
                if (DialogResult.OK == dlg.ShowDialog())
                {
                    BindData();
                }
            }
        }