private void winGridViewPager1_OnAddNew(object sender, EventArgs e) { if (!HasFunction("Client/add")) { MessageDxUtil.ShowError(Const.NoAuthMsg); return; } FrmEditClient dlg = new FrmEditClient(); dlg.InitFunction(this.LoginUserInfo, this.FunctionDict);//初始化权限控制信息 dlg.OnDataSaved += new EventHandler(dlg_OnDataSaved); if (DialogResult.OK == dlg.ShowDialog()) { BindData(); } }
private void winGridViewPager1_OnEditSelected(object sender, EventArgs e) { if (!HasFunction("Client/Edit")) { MessageDxUtil.ShowError(Const.NoAuthMsg); return; } int[] rowSelected = this.winGridViewPager1.GridView1.GetSelectedRows(); foreach (int iRow in rowSelected) { FrmEditClient dlg = new FrmEditClient(); dlg.ID = this.winGridViewPager1.GridView1.GetRowCellDisplayText(iRow, "ID"); dlg.InitFunction(this.LoginUserInfo, this.FunctionDict);//初始化权限控制信息 dlg.OnDataSaved += new EventHandler(dlg_OnDataSaved); if (DialogResult.OK == dlg.ShowDialog()) { BindData(); } break; } }