/// <summary> /// 菜单 - 编辑 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void menuEdit_Click(object sender, EventArgs e) { string ID = this.wgvPosition.gridView1.GetFocusedRowCellDisplayText("Id"); List <string> IDList = new List <string>(); for (int i = 0; i < this.wgvPosition.gridView1.RowCount; i++) { string strTemp = this.wgvPosition.GridView1.GetRowCellDisplayText(i, "Id"); IDList.Add(strTemp); } if (!string.IsNullOrEmpty(ID)) { FrmPositionEdit dlg = new FrmPositionEdit(); dlg.ID = ID; dlg.IDList = IDList; dlg.OnDataSaved += new EventHandler(dlg_OnDataSaved); dlg.InitFunction(LoginUserInfo, FunctionDict);//给子窗体赋值用户权限信息 if (DialogResult.OK == dlg.ShowDialog()) { LoadData(); } } }
/// <summary> /// 新增数据操作 /// </summary> private void btnAddNew_Click(object sender, EventArgs e) { FrmPositionEdit dlg = new FrmPositionEdit(); dlg.OnDataSaved += new EventHandler(dlg_OnDataSaved); dlg.InitFunction(LoginUserInfo, FunctionDict);//给子窗体赋值用户权限信息 if (DialogResult.OK == dlg.ShowDialog()) { LoadData(); } }