From b73c48f8aac079b85551d6fc05772c3b335c917f Mon Sep 17 00:00:00 2001 From: lu <99954486@qq.com> Date: 星期四, 20 三月 2025 17:18:53 +0800 Subject: [PATCH] 用户管理 --- DevApp/Gs.DevApp/DevFrm/User/User.cs | 63 ++++++++++++++++++++++++++----- 1 files changed, 52 insertions(+), 11 deletions(-) diff --git a/DevApp/Gs.DevApp/DevFrm/User/User.cs b/DevApp/Gs.DevApp/DevFrm/User/User.cs index 3fcc6a4..7f39b92 100644 --- a/DevApp/Gs.DevApp/DevFrm/User/User.cs +++ b/DevApp/Gs.DevApp/DevFrm/User/User.cs @@ -176,7 +176,7 @@ return; } Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 3); - UtilityHelper.ChangeEnableByControl(panel1.Controls, true); + UtilityHelper.ChangeEnableByControl(this.layoutMx1.Controls, true); } /// <summary> @@ -188,8 +188,8 @@ { lbGuid.Text = ""; Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 4); - UtilityHelper.CleanValueByControl(panel1.Controls, true); - txt_password.Visible = lbPwd.Visible = true; + UtilityHelper.CleanValueByControl(this.layoutMx1.Controls, true); + //txt_password.Visible = lbPwd.Visible = true; txt_account.Enabled = txt_password.Enabled = true; } @@ -246,7 +246,7 @@ { lbGuid.Text = _rtn.rtnData; toolBarMenu1.isSetBtn = true; - UtilityHelper.ChangeEnableByControl(panel1.Controls, false); + UtilityHelper.ChangeEnableByControl(this.layoutMx1.Controls, false); } } catch (Exception ex) @@ -279,7 +279,7 @@ { gcMain.DataSource = dt; gcMain.ForceInitialize(); - gridView1.BestFitColumns(); + gridView1.BestFitColumns(); Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gridView1); } else UtilityHelper.SetDefaultTable(gcMain, gridView1); @@ -323,10 +323,10 @@ { var dy = _rtn.rtnData; lbGuid.Text = strGuid; - UtilityHelper.SetValueByObj(panel1.Controls, dy, isEdit); - txt_account.Enabled = 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.Visible = + // lbPwd.Visible = tipPwd.Visible = false; } else { @@ -338,7 +338,11 @@ MsgHelper.Warning("鎻愮ず锛�" + ex.Message); } } - + /// <summary> + /// 瑙掕壊 + /// </summary> + /// <param name="sender"></param> + /// <param name="e"></param> private void repositoryItemButtonEdit1_ButtonClick(object sender, ButtonPressedEventArgs e) { @@ -351,7 +355,11 @@ frm.ShowDialog(); } } - + /// <summary> + /// 瀵嗙爜 + /// </summary> + /// <param name="sender"></param> + /// <param name="e"></param> private void repositoryItemButtonEdit2_ButtonClick(object sender, ButtonPressedEventArgs e) { @@ -364,5 +372,38 @@ 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(); + } + } } } \ No newline at end of file -- Gitblit v1.9.3