lu
2025-03-21 2a99e99dc28b76ff41c7c66a0bdb0ea68ae86ee9
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();
            }
        }
    }
}