| | |
| | | using DevExpress.XtraEditors; |
| | | using DevExpress.XtraGrid.Views.Base; |
| | | using DevExpress.XtraGrid.Views.Grid; |
| | | using DevExpress.XtraGrid.Views.Grid.ViewInfo; |
| | | using DevExpress.XtraEditors.Controls; |
| | | using Gs.DevApp.Entity; |
| | | using Gs.DevApp.ToolBox; |
| | | using Gs.DevApp.UserControl; |
| | | using Newtonsoft.Json; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Data; |
| | | using System.Drawing; |
| | | using System.Threading.Tasks; |
| | | using System.Windows.Forms; |
| | | |
| | | namespace Gs.DevApp.DevFrm.User |
| | | { |
| | | public partial class User : DevExpress.XtraEditors.XtraForm |
| | | public partial class User : XtraForm |
| | | { |
| | | private List<FilterEntity> _filterList = new List<FilterEntity>(); |
| | | public User() |
| | | { |
| | | InitializeComponent(); |
| | | this.toolBarMenu1.btnAddClick += ToolBarMenu1_btnAddClick; |
| | | this.toolBarMenu1.btnEdtClick += ToolBarMenu1_btnEdtClick; |
| | | this.toolBarMenu1.btnSaveClick += ToolBarMenu1_btnSaveClick; |
| | | this.toolBarMenu1.btnLoadClick += ToolBarMenu1_btnLoadClick; |
| | | this.toolBarMenu1.btnDelClick += ToolBarMenu1_btnDelClick1; |
| | | this.toolBarMenu1.btnEscClick += ToolBarMenu1_btnEscClick; |
| | | gcMain.MouseDoubleClick += GcMain_MouseDoubleClick; |
| | | gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged; |
| | | toolBarMenu1.btnAddClick += ToolBarMenu1_btnAddClick; |
| | | toolBarMenu1.btnEdtClick += ToolBarMenu1_btnEdtClick; |
| | | toolBarMenu1.btnSaveClick += ToolBarMenu1_btnSaveClick; |
| | | toolBarMenu1.btnLoadClick += ToolBarMenu1_btnLoadClick; |
| | | toolBarMenu1.btnDelClick += ToolBarMenu1_btnDelClick1; |
| | | toolBarMenu1.btnEscClick += ToolBarMenu1_btnEscClick; |
| | | toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick; |
| | | this.toolBarMenu1.getXmlConfig(); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, null, null, "", "", (value) => |
| | | { |
| | | Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0); |
| | | }, tips); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetTabParameter(gridView1, xtraTabControl1, pageBar1, (value) => |
| | | { |
| | | getModel(value); |
| | | }, (value) => |
| | | { |
| | | getPageList(this.pageBar1.CurrentPage); |
| | | }, lbGuid); |
| | | getPageList(1); |
| | | pageBar1.PagerEvent += PageBar1_PagerEvent; |
| | | getPageList(1, UtilityHelper.GetPageSize()); |
| | | } |
| | | |
| | | private void GridView1_ColumnFilterChanged(object sender, EventArgs e) |
| | | { |
| | | //// 获取GridView组件 |
| | | //GridView view = sender as GridView; |
| | | //// 确保view不为null |
| | | //if (view == null) return; |
| | | //// 获取应用的筛选器信息 |
| | | //string filter = view.ActiveFilterString; |
| | | //MessageBox.Show(filter); |
| | | //getPageList(1, UtilityHelper.GetPageSize()); |
| | | _filterList = Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns, gridView1); |
| | | Task.Delay(100); |
| | | getPageList(1); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 双击事件 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | | private void GcMain_MouseDoubleClick(object sender, MouseEventArgs e) |
| | | { |
| | | GridHitInfo info = gridView1.CalcHitInfo(e.Location); |
| | | if (info.InRow) |
| | | { |
| | | GridView view = info.View as GridView; |
| | | if (view != null) |
| | | { |
| | | DataRow row = view.GetDataRow(info.RowHandle); |
| | | if (row != null) |
| | | { |
| | | string rowGuid = (row["guid"].ToString()); |
| | | getModel(rowGuid, false, 999); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// 分页事件 |
| | | /// 分页事件 |
| | | /// </summary> |
| | | /// <param name="curPage"></param> |
| | | /// <param name="pageSize"></param> |
| | | private void PageBar1_PagerEvent(int curPage, int pageSize) |
| | | { |
| | | getPageList(curPage, pageSize); |
| | | getPageList(curPage); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 取消事件 |
| | | /// 查询事件 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnQueryClick(object sender, EventArgs e) |
| | | { |
| | | gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged; |
| | | gridView1.ActiveFilter.Clear(); |
| | | gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged; |
| | | var frm = new ShowFilter(gridView1.Columns, _filterList, this.GetType().FullName); |
| | | frm.UpdateParent += Frm_UpdateParent; |
| | | frm.ShowDialog(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 查询回调 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | | private void Frm_UpdateParent(object sender, UpdateParentEventArgs e) |
| | | { |
| | | _filterList = e.FilterList; |
| | | getPageList(1); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 取消事件 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnEscClick(object sender, EventArgs e) |
| | | { |
| | | UtilityHelper.ChangeTab(xtraTabControl1, 0); |
| | | Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 1); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 删除事件 |
| | | /// 删除事件 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnDelClick1(object sender, EventArgs e) |
| | | { |
| | | DataRow dr = gridView1.GetFocusedDataRow(); |
| | | if (dr == null || string.IsNullOrEmpty(dr["guid"].ToString())) |
| | | string rowGuid, rowName; |
| | | (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, |
| | | lbGuid, txt_userName, gridView1, "userName"); |
| | | if (string.IsNullOrEmpty(rowGuid)) |
| | | { |
| | | ToolBox.MsgHelper.Warning("请先选择你要操作的行!"); |
| | | MsgHelper.Warning("请先选择你要操作的行!"); |
| | | return; |
| | | } |
| | | if (!MsgHelper.AskQuestion("你选择了【" + dr["userName"].ToString() + "】,确定删除吗?")) |
| | | |
| | | if (!MsgHelper.AskQuestion("你选择了【" + rowName + "】,确定删除吗?")) |
| | | return; |
| | | var _obj = new |
| | | { |
| | | guidList = dr["guid"].ToString(),//主建 |
| | | }; |
| | | string strJson = ""; |
| | | var lst = new List<string>(); |
| | | lst.Add(rowGuid); |
| | | var _obj = lst; |
| | | try |
| | | { |
| | | strJson = UtilityHelper.HttpPost("", "User/DeleteModel", JsonConvert.SerializeObject(_obj)); |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.GetDataByJson(strJson); |
| | | var strJson = UtilityHelper.HttpPost("", "User/DeleteModel", |
| | | JsonConvert.SerializeObject(_obj)); |
| | | var _rtn = UtilityHelper.ReturnToDynamic(strJson); |
| | | if (_rtn.rtnCode > 0) |
| | | { |
| | | UtilityHelper.ChangeTab(xtraTabControl1, 0); |
| | | getPageList(1, UtilityHelper.GetPageSize()); |
| | | if (xtraTabControl1.SelectedTabPageIndex == 0) |
| | | { } |
| | | else |
| | | Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 2); |
| | | getPageList(this.pageBar1.CurrentPage); |
| | | } |
| | | ToolBox.MsgHelper.Warning("提示:" + _rtn.rtnMsg); |
| | | |
| | | MsgHelper.Warning("提示:" + _rtn.rtnMsg); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | ToolBox.MsgHelper.Warning("提示:" + ex.Message); |
| | | MsgHelper.Warning("提示:" + ex.Message); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 刷新事件 |
| | | /// 刷新事件 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnLoadClick(object sender, EventArgs e) |
| | | { |
| | | UtilityHelper.ChangeTab(xtraTabControl1, 0); |
| | | getPageList(1, UtilityHelper.GetPageSize()); |
| | | if (xtraTabControl1.SelectedTabPageIndex == 1) |
| | | getModel(lbGuid.Text.Trim()); |
| | | else |
| | | { |
| | | _filterList.Clear(); |
| | | if (gridView1.ActiveFilter.Count > 0) |
| | | { |
| | | gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged; |
| | | gridView1.ActiveFilter.Clear(); |
| | | gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged; |
| | | } |
| | | getPageList(1); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 修改事件 |
| | | /// 修改事件 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnEdtClick(object sender, EventArgs e) |
| | | { |
| | | DataRow dr = gridView1.GetFocusedDataRow(); |
| | | if (dr == null || string.IsNullOrEmpty(dr["guid"].ToString())) |
| | | string rowGuid = "", rowName = ""; |
| | | (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_userName, gridView1); |
| | | if (string.IsNullOrEmpty(rowGuid)) |
| | | { |
| | | ToolBox.MsgHelper.Warning("请先选择你要操作的行!"); |
| | | return; |
| | | } |
| | | getModel(dr["guid"].ToString(), true, 1); |
| | | Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 3); |
| | | if (xtraTabControl1.SelectedTabPageIndex == 1) |
| | | { |
| | | getModel(rowGuid); |
| | | } |
| | | else |
| | | { |
| | | UtilityHelper.ChangeEnableByControl(this.layoutMx1.Controls, true); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 新增事件 |
| | | /// 新增事件 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnAddClick(object sender, EventArgs e) |
| | | { |
| | | UtilityHelper.ChangeTab(xtraTabControl1, 1); |
| | | lbGuid.Text = ""; |
| | | UtilityHelper.CleanValue(this.panel1.Controls, true); |
| | | txt_password.Visible = lbPwd.Visible = true; |
| | | Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 4); |
| | | UtilityHelper.CleanValueByControl(this.layoutMx1.Controls, true); |
| | | txt_password.Enabled = true; |
| | | txt_account.Enabled = txt_password.Enabled = true; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 保存事件 |
| | | /// 保存事件 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | |
| | | toolBarMenu1.isSetBtn = false; |
| | | if (string.IsNullOrEmpty(txt_account.Text.Trim())) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("登录账号不能为空!"); |
| | | MsgHelper.Warning("登录账号不能为空!"); |
| | | txt_account.Focus(); |
| | | return; |
| | | } |
| | | |
| | | if (string.IsNullOrEmpty(txt_password.Text.Trim())) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("密码不能为空!"); |
| | | MsgHelper.Warning("密码不能为空!"); |
| | | txt_password.Focus(); |
| | | return; |
| | | } |
| | | |
| | | if (string.IsNullOrEmpty(txt_userName.Text.Trim())) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("姓名不能为空!"); |
| | | MsgHelper.Warning("姓名不能为空!"); |
| | | txt_userName.Focus(); |
| | | return; |
| | | } |
| | | if (txt_isLocked.SelectedIndex <= 0) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("状态不能为空!"); |
| | | txt_isLocked.Focus(); |
| | | return; |
| | | } |
| | | |
| | | var _obj = new |
| | | { |
| | | guid = lbGuid.Text.Trim(),//主建 |
| | | Guid = UtilityHelper.ToGuid(lbGuid.Text.Trim()), //主建 |
| | | account = txt_account.Text.Trim(), |
| | | password = txt_password.Text.Trim(), |
| | | userName = txt_userName.Text.Trim(), |
| | | address = txt_address.Text.Trim(), |
| | | tel = txt_tel.Text.Trim(), |
| | | email = txt_email.Text.Trim(), |
| | | isLocked = txt_isLocked.SelectedIndex, |
| | | flagAdmin = 0, |
| | | flagOnline = 0, |
| | | loginCounter = 0, |
| | | workerID = "", |
| | | isStatus = txt_isStatus.Checked, |
| | | remark = txt_remark.Text.Trim(), |
| | | departGuid = "", |
| | | isSys = 0 |
| | | isSys = 0, |
| | | staffId = txt_staffId.GetId() |
| | | }; |
| | | try |
| | | { |
| | | string strJson = UtilityHelper.HttpPost("", "User/EditModel", JsonConvert.SerializeObject(_obj)); |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.GetDataByJson(strJson); |
| | | ToolBox.MsgHelper.Warning("提示:" + _rtn.rtnMsg); |
| | | var strJson = UtilityHelper.HttpPost("", "User/EditModel", |
| | | JsonConvert.SerializeObject(_obj)); |
| | | var _rtn = UtilityHelper.ReturnToDynamic(strJson); |
| | | MsgHelper.Warning("提示:" + _rtn.rtnMsg); |
| | | if (_rtn.rtnCode > 0) |
| | | { |
| | | lbGuid.Text = _rtn.rtnData; |
| | | toolBarMenu1.isSetBtn = true; |
| | | UtilityHelper.ChangeEnable(this.panel1.Controls, false); |
| | | UtilityHelper.ChangeEnableByControl(this.layoutMx1.Controls, false); |
| | | toolBarMenu1.currentAction = ""; |
| | | Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 6); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | ToolBox.MsgHelper.Warning("提示:" + ex.Message); |
| | | MsgHelper.Warning("提示:" + ex.Message); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <param name="curPage">第几页</param> |
| | | /// <param name="pageSize">每页几条</param> |
| | | private void getPageList(int curPage, int pageSize) |
| | | private void getPageList(int curPage) |
| | | { |
| | | PageQueryModel pgq = new PageQueryModel(curPage, pageSize, "createTime", "asc", "", ""); |
| | | string json = JsonConvert.SerializeObject(pgq); |
| | | var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList); |
| | | var pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "a.ACCOUNT asc ,a.CREATE_TIME", |
| | | "desc", "", _sbSqlWhere.ToString()); |
| | | var json = JsonConvert.SerializeObject(pgq); |
| | | try |
| | | { |
| | | string strReturn = UtilityHelper.HttpPost("", "User/GetListPage", json); |
| | | ReturnModel<PageListModel> dd = UtilityHelper.GetTableByJson(strReturn); |
| | | DataTable dt = dd.rtnData.list; |
| | | gcMain.BindingContext = new BindingContext(); |
| | | gcMain.DataSource = dt; |
| | | gcMain.ForceInitialize(); |
| | | int dddd = dd.rtnData.pages;//总页 |
| | | pageBar1.TotalPages = dddd; |
| | | pageBar1.RecordCount = dd.rtnData.total;//记录总数 |
| | | pageBar1.CurrentPage = curPage;//当前页 |
| | | pageBar1.RowsCount = pageSize;//每页显示 |
| | | pageBar1.setTxt(); |
| | | var strReturn = |
| | | UtilityHelper.HttpPost("", "User/GetListPage", json); |
| | | var dd = UtilityHelper.ReturnToTablePage(strReturn); |
| | | if (dd.rtnCode > 0) |
| | | { |
| | | DataTable dt = dd.rtnData.list; |
| | | gcMain1.BindingContext = new BindingContext(); |
| | | gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged; |
| | | if (dt.Rows.Count > 0) |
| | | { |
| | | gcMain1.DataSource = dt; |
| | | gcMain1.ForceInitialize(); |
| | | gridView1.BestFitColumns(); Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gridView1); |
| | | } |
| | | else |
| | | UtilityHelper.SetDefaultTable(gcMain1, gridView1); |
| | | gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged; |
| | | pageBar1.TotalPages = dd.rtnData.pages;//总页 |
| | | pageBar1.CurrentPage = curPage;//当前页 |
| | | pageBar1.RecordCount = dd.rtnData.total;//总记录数 |
| | | } |
| | | else |
| | | { |
| | | ToolBox.MsgHelper.ShowError("提示:" + dd.rtnMsg); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | ToolBox.MsgHelper.Warning("提示:" + ex.Message); |
| | | MsgHelper.Warning("提示:" + ex.Message); |
| | | } |
| | | } |
| | | private void getModel(string strGuid, bool isEdit, int tabIdx) |
| | | |
| | | private void getModel(string strGuid) |
| | | { |
| | | bool isEdit = false; |
| | | if (toolBarMenu1.currentAction == "add") return; |
| | | if (toolBarMenu1.currentAction == "edit") isEdit = true; |
| | | if (string.IsNullOrEmpty(strGuid)) |
| | | { |
| | | ToolBox.MsgHelper.Warning("请先选择你要操作的行!"); |
| | | MsgHelper.Warning("请先选择你要操作的行!"); |
| | | return; |
| | | } |
| | | UtilityHelper.ChangeTab(xtraTabControl1, tabIdx); |
| | | var _obj = new |
| | | { |
| | | guid = strGuid,//主建 |
| | | guid = strGuid //主建 |
| | | }; |
| | | try |
| | | { |
| | | string strJson = UtilityHelper.HttpPost("", "User/GetModel", JsonConvert.SerializeObject(_obj)); |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.GetDataByJson(strJson); |
| | | var strJson = UtilityHelper.HttpPost("", "User/GetModel", |
| | | JsonConvert.SerializeObject(_obj)); |
| | | var _rtn = UtilityHelper.ReturnToDynamic(strJson); |
| | | if (_rtn.rtnCode > 0) |
| | | { |
| | | dynamic dy = _rtn.rtnData; |
| | | var dy = _rtn.rtnData; |
| | | lbGuid.Text = strGuid; |
| | | UtilityHelper.SetValueByObj(this.panel1.Controls, dy, isEdit); |
| | | txt_account.Enabled = false; |
| | | txt_password.Enabled = txt_password.Visible = lbPwd.Visible = tipPwd.Visible = false; |
| | | UtilityHelper.SetValueByObj(this.layoutMx1.Controls, dy, isEdit); |
| | | txt_account.Enabled = txt_password.Enabled = txt_password.Enabled = false; |
| | | } |
| | | else |
| | | ToolBox.MsgHelper.Warning("提示:" + _rtn.rtnMsg); |
| | | { |
| | | MsgHelper.Warning("提示:" + _rtn.rtnMsg); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | ToolBox.MsgHelper.Warning("提示:" + ex.Message); |
| | | MsgHelper.Warning("提示:" + ex.Message); |
| | | } |
| | | } |
| | | private void repositoryItemButtonEdit1_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) |
| | | /// <summary> |
| | | /// 角色 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | | private void repositoryItemButtonEdit1_ButtonClick(object sender, |
| | | ButtonPressedEventArgs e) |
| | | { |
| | | if (e.Button.Index == 0) |
| | | { |
| | | int rowhandle = gridView1.FocusedRowHandle; |
| | | DataRow dr = gridView1.GetDataRow(rowhandle); |
| | | string userGuid = dr["guid"].ToString(); |
| | | UserSelectRole frm = new UserSelectRole(userGuid); |
| | | var rowhandle = gridView1.FocusedRowHandle; |
| | | var dr = gridView1.GetDataRow(rowhandle); |
| | | var userGuid = dr["guid"].ToString(); |
| | | var frm = new UserSelectRole(userGuid); |
| | | frm.ShowDialog(); |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// 密码 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | | private void repositoryItemButtonEdit2_ButtonClick(object sender, |
| | | ButtonPressedEventArgs e) |
| | | { |
| | | if (e.Button.Index == 0) |
| | | { |
| | | var rowhandle = gridView1.FocusedRowHandle; |
| | | var dr = gridView1.GetDataRow(rowhandle); |
| | | var userGuid = dr["guid"].ToString(); |
| | | var frm = new UserSetPwd(userGuid); |
| | | frm.ShowDialog(); |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// 个人权限 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | | private void repositoryItemButtonEdit3_ButtonClick(object sender, ButtonPressedEventArgs e) |
| | | { |
| | | if (e.Button.Index == 0) |
| | | { |
| | | var rowhandle = gridView1.FocusedRowHandle; |
| | | var dr = gridView1.GetDataRow(rowhandle); |
| | | var userGuid = dr["guid"].ToString(); |
| | | var frm = new RoleSelectAction(userGuid); |
| | | frm.ShowDialog(); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 权限集合 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | | private void repositoryItemButtonEdit4_ButtonClick(object sender, ButtonPressedEventArgs e) |
| | | { |
| | | if (e.Button.Index == 0) |
| | | { |
| | | var rowhandle = gridView1.FocusedRowHandle; |
| | | var dr = gridView1.GetDataRow(rowhandle); |
| | | var userGuid = dr["guid"].ToString(); |
| | | var frm = new ViewRole(userGuid); |
| | | frm.ShowDialog(); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |