提交rbac
提交设置右键错位的bug
This commit is contained in:
691
DH.RBAC/Views/Sys/User/AddUserForm.Designer.cs
generated
Normal file
691
DH.RBAC/Views/Sys/User/AddUserForm.Designer.cs
generated
Normal file
@ -0,0 +1,691 @@
|
||||
namespace DH.RBAC.Page.Sys.User
|
||||
{
|
||||
partial class AddUserForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AddUserForm));
|
||||
uiPanel1 = new Sunny.UI.UIPanel();
|
||||
titlePanel = new System.Windows.Forms.Panel();
|
||||
lblTitle = new Sunny.UI.UILabel();
|
||||
btnClose = new Sunny.UI.UISymbolLabel();
|
||||
panel1 = new System.Windows.Forms.Panel();
|
||||
uiIntegerUpDown1 = new Sunny.UI.UIIntegerUpDown();
|
||||
btnConfirm = new Sunny.UI.UIButton();
|
||||
uiLabel12 = new Sunny.UI.UILabel();
|
||||
uiTransfer1 = new Sunny.UI.UITransfer();
|
||||
comboDept = new Sunny.UI.UIComboBox();
|
||||
uiLabel11 = new Sunny.UI.UILabel();
|
||||
txtPassword = new Sunny.UI.UITextBox();
|
||||
uiLabel10 = new Sunny.UI.UILabel();
|
||||
txtBirthday = new Sunny.UI.UIDatePicker();
|
||||
uiLabel9 = new Sunny.UI.UILabel();
|
||||
txtAddress = new Sunny.UI.UITextBox();
|
||||
uiLabel7 = new Sunny.UI.UILabel();
|
||||
txtTel = new Sunny.UI.UITextBox();
|
||||
uiLabel8 = new Sunny.UI.UILabel();
|
||||
txtEmail = new Sunny.UI.UITextBox();
|
||||
uiLabel5 = new Sunny.UI.UILabel();
|
||||
uiLabel6 = new Sunny.UI.UILabel();
|
||||
rdFemale = new Sunny.UI.UIRadioButton();
|
||||
rdMale = new Sunny.UI.UIRadioButton();
|
||||
txtNickName = new Sunny.UI.UITextBox();
|
||||
uiLabel3 = new Sunny.UI.UILabel();
|
||||
uiLabel2 = new Sunny.UI.UILabel();
|
||||
txtName = new Sunny.UI.UITextBox();
|
||||
uiLabel4 = new Sunny.UI.UILabel();
|
||||
txtAccount = new Sunny.UI.UITextBox();
|
||||
uiLabel1 = new Sunny.UI.UILabel();
|
||||
uiPanel1.SuspendLayout();
|
||||
titlePanel.SuspendLayout();
|
||||
panel1.SuspendLayout();
|
||||
SuspendLayout();
|
||||
//
|
||||
// uiPanel1
|
||||
//
|
||||
uiPanel1.Controls.Add(titlePanel);
|
||||
uiPanel1.Controls.Add(panel1);
|
||||
uiPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
uiPanel1.FillColor = System.Drawing.Color.FromArgb(235, 241, 243);
|
||||
uiPanel1.Font = new System.Drawing.Font("微软雅黑", 12F);
|
||||
uiPanel1.Location = new System.Drawing.Point(0, 0);
|
||||
uiPanel1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
uiPanel1.MinimumSize = new System.Drawing.Size(1, 1);
|
||||
uiPanel1.Name = "uiPanel1";
|
||||
uiPanel1.RectColor = System.Drawing.Color.Silver;
|
||||
uiPanel1.Size = new System.Drawing.Size(1031, 558);
|
||||
uiPanel1.Style = Sunny.UI.UIStyle.Custom;
|
||||
uiPanel1.StyleCustomMode = true;
|
||||
uiPanel1.TabIndex = 6;
|
||||
uiPanel1.Text = null;
|
||||
uiPanel1.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// titlePanel
|
||||
//
|
||||
titlePanel.BackColor = System.Drawing.Color.FromArgb(216, 219, 227);
|
||||
titlePanel.Controls.Add(lblTitle);
|
||||
titlePanel.Controls.Add(btnClose);
|
||||
titlePanel.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
titlePanel.Location = new System.Drawing.Point(0, 0);
|
||||
titlePanel.Name = "titlePanel";
|
||||
titlePanel.Size = new System.Drawing.Size(1031, 43);
|
||||
titlePanel.TabIndex = 7;
|
||||
titlePanel.MouseDown += titlePanel_MouseDown;
|
||||
titlePanel.MouseMove += titlePanel_MouseMove;
|
||||
//
|
||||
// lblTitle
|
||||
//
|
||||
lblTitle.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
lblTitle.Font = new System.Drawing.Font("微软雅黑", 12F);
|
||||
lblTitle.Location = new System.Drawing.Point(0, 0);
|
||||
lblTitle.Name = "lblTitle";
|
||||
lblTitle.Size = new System.Drawing.Size(986, 43);
|
||||
lblTitle.Style = Sunny.UI.UIStyle.Custom;
|
||||
lblTitle.TabIndex = 1;
|
||||
lblTitle.Text = "新增用户";
|
||||
lblTitle.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
lblTitle.MouseDown += titlePanel_MouseDown;
|
||||
lblTitle.MouseMove += titlePanel_MouseMove;
|
||||
//
|
||||
// btnClose
|
||||
//
|
||||
btnClose.Dock = System.Windows.Forms.DockStyle.Right;
|
||||
btnClose.Font = new System.Drawing.Font("微软雅黑", 12F);
|
||||
btnClose.Location = new System.Drawing.Point(986, 0);
|
||||
btnClose.MinimumSize = new System.Drawing.Size(1, 1);
|
||||
btnClose.Name = "btnClose";
|
||||
btnClose.Padding = new System.Windows.Forms.Padding(64, 0, 0, 0);
|
||||
btnClose.Size = new System.Drawing.Size(45, 43);
|
||||
btnClose.Style = Sunny.UI.UIStyle.Custom;
|
||||
btnClose.Symbol = 77;
|
||||
btnClose.SymbolSize = 60;
|
||||
btnClose.TabIndex = 0;
|
||||
btnClose.Click += btnClose_Click;
|
||||
btnClose.MouseEnter += btnClose_MouseEnter;
|
||||
btnClose.MouseLeave += btnClose_MouseLeave;
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
panel1.BackColor = System.Drawing.Color.White;
|
||||
panel1.Controls.Add(uiIntegerUpDown1);
|
||||
panel1.Controls.Add(btnConfirm);
|
||||
panel1.Controls.Add(uiLabel12);
|
||||
panel1.Controls.Add(uiTransfer1);
|
||||
panel1.Controls.Add(comboDept);
|
||||
panel1.Controls.Add(uiLabel11);
|
||||
panel1.Controls.Add(txtPassword);
|
||||
panel1.Controls.Add(uiLabel10);
|
||||
panel1.Controls.Add(txtBirthday);
|
||||
panel1.Controls.Add(uiLabel9);
|
||||
panel1.Controls.Add(txtAddress);
|
||||
panel1.Controls.Add(uiLabel7);
|
||||
panel1.Controls.Add(txtTel);
|
||||
panel1.Controls.Add(uiLabel8);
|
||||
panel1.Controls.Add(txtEmail);
|
||||
panel1.Controls.Add(uiLabel5);
|
||||
panel1.Controls.Add(uiLabel6);
|
||||
panel1.Controls.Add(rdFemale);
|
||||
panel1.Controls.Add(rdMale);
|
||||
panel1.Controls.Add(txtNickName);
|
||||
panel1.Controls.Add(uiLabel3);
|
||||
panel1.Controls.Add(uiLabel2);
|
||||
panel1.Controls.Add(txtName);
|
||||
panel1.Controls.Add(uiLabel4);
|
||||
panel1.Controls.Add(txtAccount);
|
||||
panel1.Controls.Add(uiLabel1);
|
||||
panel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
panel1.Location = new System.Drawing.Point(0, 0);
|
||||
panel1.Name = "panel1";
|
||||
panel1.Size = new System.Drawing.Size(1031, 558);
|
||||
panel1.TabIndex = 6;
|
||||
//
|
||||
// uiIntegerUpDown1
|
||||
//
|
||||
uiIntegerUpDown1.FillColor = System.Drawing.Color.White;
|
||||
uiIntegerUpDown1.FillColor2 = System.Drawing.Color.White;
|
||||
uiIntegerUpDown1.Font = new System.Drawing.Font("微软雅黑", 12F);
|
||||
uiIntegerUpDown1.Location = new System.Drawing.Point(445, 247);
|
||||
uiIntegerUpDown1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
uiIntegerUpDown1.MinimumSize = new System.Drawing.Size(100, 0);
|
||||
uiIntegerUpDown1.Name = "uiIntegerUpDown1";
|
||||
uiIntegerUpDown1.RectColor = System.Drawing.Color.FromArgb(216, 219, 227);
|
||||
uiIntegerUpDown1.Size = new System.Drawing.Size(188, 36);
|
||||
|
||||
uiIntegerUpDown1.StyleCustomMode = true;
|
||||
uiIntegerUpDown1.TabIndex = 12;
|
||||
uiIntegerUpDown1.Text = "txtSortCode";
|
||||
uiIntegerUpDown1.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// btnConfirm
|
||||
//
|
||||
btnConfirm.Anchor = System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right;
|
||||
btnConfirm.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
btnConfirm.FillColor = System.Drawing.Color.White;
|
||||
btnConfirm.FillColor2 = System.Drawing.Color.White;
|
||||
btnConfirm.FillHoverColor = System.Drawing.Color.FromArgb(235, 243, 255);
|
||||
btnConfirm.FillPressColor = System.Drawing.Color.FromArgb(235, 243, 255);
|
||||
btnConfirm.FillSelectedColor = System.Drawing.Color.FromArgb(235, 243, 255);
|
||||
btnConfirm.Font = new System.Drawing.Font("微软雅黑", 12F);
|
||||
btnConfirm.ForeColor = System.Drawing.Color.FromArgb(96, 98, 102);
|
||||
btnConfirm.ForeHoverColor = System.Drawing.Color.FromArgb(80, 160, 255);
|
||||
btnConfirm.ForePressColor = System.Drawing.Color.FromArgb(74, 131, 229);
|
||||
btnConfirm.ForeSelectedColor = System.Drawing.Color.FromArgb(74, 131, 229);
|
||||
btnConfirm.Location = new System.Drawing.Point(882, 502);
|
||||
btnConfirm.MinimumSize = new System.Drawing.Size(1, 1);
|
||||
btnConfirm.Name = "btnConfirm";
|
||||
btnConfirm.RectColor = System.Drawing.Color.FromArgb(216, 219, 227);
|
||||
btnConfirm.RectHoverColor = System.Drawing.Color.FromArgb(197, 222, 255);
|
||||
btnConfirm.Size = new System.Drawing.Size(125, 44);
|
||||
|
||||
btnConfirm.StyleCustomMode = true;
|
||||
btnConfirm.TabIndex = 14;
|
||||
btnConfirm.Text = "确定";
|
||||
btnConfirm.TipsFont = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
|
||||
btnConfirm.Click += btnConfirm_Click;
|
||||
//
|
||||
// uiLabel12
|
||||
//
|
||||
uiLabel12.Font = new System.Drawing.Font("微软雅黑", 12F);
|
||||
uiLabel12.Location = new System.Drawing.Point(331, 253);
|
||||
uiLabel12.Name = "uiLabel12";
|
||||
uiLabel12.Size = new System.Drawing.Size(107, 29);
|
||||
uiLabel12.Style = Sunny.UI.UIStyle.Custom;
|
||||
uiLabel12.TabIndex = 45;
|
||||
uiLabel12.Text = "排序号";
|
||||
uiLabel12.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// uiTransfer1
|
||||
//
|
||||
uiTransfer1.FillColor = System.Drawing.Color.White;
|
||||
uiTransfer1.FillColor2 = System.Drawing.Color.White;
|
||||
uiTransfer1.Font = new System.Drawing.Font("微软雅黑", 12F);
|
||||
uiTransfer1.Location = new System.Drawing.Point(129, 302);
|
||||
uiTransfer1.Margin = new System.Windows.Forms.Padding(7, 9, 7, 9);
|
||||
uiTransfer1.MinimumSize = new System.Drawing.Size(1, 1);
|
||||
uiTransfer1.Name = "uiTransfer1";
|
||||
uiTransfer1.Padding = new System.Windows.Forms.Padding(1);
|
||||
uiTransfer1.RadiusSides = Sunny.UI.UICornerRadiusSides.None;
|
||||
uiTransfer1.RectColor = System.Drawing.Color.FromArgb(216, 219, 227);
|
||||
uiTransfer1.RectSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.None;
|
||||
uiTransfer1.Size = new System.Drawing.Size(417, 238);
|
||||
|
||||
uiTransfer1.StyleCustomMode = true;
|
||||
uiTransfer1.TabIndex = 13;
|
||||
uiTransfer1.Text = "uiTransfer1";
|
||||
uiTransfer1.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// comboDept
|
||||
//
|
||||
comboDept.DataSource = null;
|
||||
comboDept.FillColor = System.Drawing.Color.White;
|
||||
comboDept.FillColor2 = System.Drawing.Color.White;
|
||||
comboDept.Font = new System.Drawing.Font("微软雅黑", 12F);
|
||||
comboDept.ItemHoverColor = System.Drawing.Color.FromArgb(155, 200, 255);
|
||||
comboDept.ItemSelectBackColor = System.Drawing.Color.FromArgb(216, 219, 227);
|
||||
comboDept.ItemSelectForeColor = System.Drawing.Color.White;
|
||||
comboDept.Location = new System.Drawing.Point(445, 192);
|
||||
comboDept.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
comboDept.MinimumSize = new System.Drawing.Size(63, 0);
|
||||
comboDept.Name = "comboDept";
|
||||
comboDept.Padding = new System.Windows.Forms.Padding(0, 0, 30, 2);
|
||||
comboDept.RectColor = System.Drawing.Color.FromArgb(216, 219, 227);
|
||||
comboDept.Size = new System.Drawing.Size(188, 36);
|
||||
|
||||
comboDept.StyleCustomMode = true;
|
||||
comboDept.TabIndex = 9;
|
||||
comboDept.Text = "uiComboBox1";
|
||||
comboDept.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// uiLabel11
|
||||
//
|
||||
uiLabel11.Font = new System.Drawing.Font("微软雅黑", 12F);
|
||||
uiLabel11.Location = new System.Drawing.Point(328, 193);
|
||||
uiLabel11.Name = "uiLabel11";
|
||||
uiLabel11.Size = new System.Drawing.Size(110, 29);
|
||||
uiLabel11.Style = Sunny.UI.UIStyle.Custom;
|
||||
uiLabel11.TabIndex = 42;
|
||||
uiLabel11.Text = "所属部门";
|
||||
uiLabel11.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// txtPassword
|
||||
//
|
||||
txtPassword.ButtonFillColor = System.Drawing.Color.White;
|
||||
txtPassword.ButtonFillHoverColor = System.Drawing.Color.FromArgb(235, 243, 255);
|
||||
txtPassword.ButtonFillPressColor = System.Drawing.Color.FromArgb(235, 243, 255);
|
||||
txtPassword.ButtonForeColor = System.Drawing.Color.FromArgb(96, 98, 102);
|
||||
txtPassword.ButtonForeHoverColor = System.Drawing.Color.FromArgb(80, 160, 255);
|
||||
txtPassword.ButtonForePressColor = System.Drawing.Color.FromArgb(74, 131, 229);
|
||||
txtPassword.ButtonRectColor = System.Drawing.Color.FromArgb(216, 219, 227);
|
||||
txtPassword.ButtonRectHoverColor = System.Drawing.Color.FromArgb(197, 222, 255);
|
||||
txtPassword.ButtonSymbol = 61761;
|
||||
txtPassword.Cursor = System.Windows.Forms.Cursors.IBeam;
|
||||
txtPassword.FillColor2 = System.Drawing.Color.White;
|
||||
txtPassword.Font = new System.Drawing.Font("微软雅黑", 12F);
|
||||
txtPassword.Location = new System.Drawing.Point(782, 67);
|
||||
txtPassword.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
txtPassword.Maximum = 2147483647D;
|
||||
txtPassword.MaxLength = 60;
|
||||
txtPassword.Minimum = -2147483648D;
|
||||
txtPassword.MinimumSize = new System.Drawing.Size(1, 16);
|
||||
txtPassword.Name = "txtPassword";
|
||||
txtPassword.PasswordChar = '*';
|
||||
txtPassword.RectColor = System.Drawing.Color.FromArgb(216, 219, 227);
|
||||
txtPassword.Size = new System.Drawing.Size(188, 42);
|
||||
|
||||
txtPassword.StyleCustomMode = true;
|
||||
txtPassword.TabIndex = 3;
|
||||
txtPassword.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// uiLabel10
|
||||
//
|
||||
uiLabel10.Font = new System.Drawing.Font("微软雅黑", 12F);
|
||||
uiLabel10.Location = new System.Drawing.Point(665, 73);
|
||||
uiLabel10.Name = "uiLabel10";
|
||||
uiLabel10.Size = new System.Drawing.Size(110, 29);
|
||||
uiLabel10.Style = Sunny.UI.UIStyle.Custom;
|
||||
uiLabel10.TabIndex = 40;
|
||||
uiLabel10.Text = "初始密码";
|
||||
uiLabel10.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// txtBirthday
|
||||
//
|
||||
txtBirthday.FillColor = System.Drawing.Color.White;
|
||||
txtBirthday.FillColor2 = System.Drawing.Color.White;
|
||||
txtBirthday.Font = new System.Drawing.Font("微软雅黑", 12F);
|
||||
txtBirthday.Location = new System.Drawing.Point(445, 129);
|
||||
txtBirthday.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
txtBirthday.MaxLength = 10;
|
||||
txtBirthday.MinimumSize = new System.Drawing.Size(63, 0);
|
||||
txtBirthday.Name = "txtBirthday";
|
||||
txtBirthday.Padding = new System.Windows.Forms.Padding(0, 0, 30, 2);
|
||||
txtBirthday.RectColor = System.Drawing.Color.FromArgb(216, 219, 227);
|
||||
txtBirthday.Size = new System.Drawing.Size(188, 36);
|
||||
|
||||
txtBirthday.StyleCustomMode = true;
|
||||
txtBirthday.SymbolDropDown = 61555;
|
||||
txtBirthday.SymbolNormal = 61555;
|
||||
txtBirthday.TabIndex = 5;
|
||||
txtBirthday.Text = "2021-12-29";
|
||||
txtBirthday.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
txtBirthday.Value = new System.DateTime(2021, 12, 29, 0, 0, 0, 0);
|
||||
//
|
||||
// uiLabel9
|
||||
//
|
||||
uiLabel9.Font = new System.Drawing.Font("微软雅黑", 12F);
|
||||
uiLabel9.Location = new System.Drawing.Point(15, 307);
|
||||
uiLabel9.Name = "uiLabel9";
|
||||
uiLabel9.Size = new System.Drawing.Size(107, 29);
|
||||
uiLabel9.Style = Sunny.UI.UIStyle.Custom;
|
||||
uiLabel9.TabIndex = 37;
|
||||
uiLabel9.Text = "角色";
|
||||
uiLabel9.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// txtAddress
|
||||
//
|
||||
txtAddress.ButtonFillColor = System.Drawing.Color.White;
|
||||
txtAddress.ButtonFillHoverColor = System.Drawing.Color.FromArgb(235, 243, 255);
|
||||
txtAddress.ButtonFillPressColor = System.Drawing.Color.FromArgb(235, 243, 255);
|
||||
txtAddress.ButtonForeColor = System.Drawing.Color.FromArgb(96, 98, 102);
|
||||
txtAddress.ButtonForeHoverColor = System.Drawing.Color.FromArgb(80, 160, 255);
|
||||
txtAddress.ButtonForePressColor = System.Drawing.Color.FromArgb(74, 131, 229);
|
||||
txtAddress.ButtonRectColor = System.Drawing.Color.FromArgb(216, 219, 227);
|
||||
txtAddress.ButtonRectHoverColor = System.Drawing.Color.FromArgb(197, 222, 255);
|
||||
txtAddress.ButtonSymbol = 61761;
|
||||
txtAddress.Cursor = System.Windows.Forms.Cursors.IBeam;
|
||||
txtAddress.FillColor2 = System.Drawing.Color.White;
|
||||
txtAddress.Font = new System.Drawing.Font("微软雅黑", 12F);
|
||||
txtAddress.Location = new System.Drawing.Point(129, 252);
|
||||
txtAddress.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
txtAddress.Maximum = 2147483647D;
|
||||
txtAddress.MaxLength = 128;
|
||||
txtAddress.Minimum = -2147483648D;
|
||||
txtAddress.MinimumSize = new System.Drawing.Size(1, 16);
|
||||
txtAddress.Name = "txtAddress";
|
||||
txtAddress.RectColor = System.Drawing.Color.FromArgb(216, 219, 227);
|
||||
txtAddress.Size = new System.Drawing.Size(188, 42);
|
||||
|
||||
txtAddress.StyleCustomMode = true;
|
||||
txtAddress.TabIndex = 11;
|
||||
txtAddress.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// uiLabel7
|
||||
//
|
||||
uiLabel7.Font = new System.Drawing.Font("微软雅黑", 12F);
|
||||
uiLabel7.Location = new System.Drawing.Point(12, 258);
|
||||
uiLabel7.Name = "uiLabel7";
|
||||
uiLabel7.Size = new System.Drawing.Size(110, 29);
|
||||
uiLabel7.Style = Sunny.UI.UIStyle.Custom;
|
||||
uiLabel7.TabIndex = 35;
|
||||
uiLabel7.Text = "联系地址";
|
||||
uiLabel7.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// txtTel
|
||||
//
|
||||
txtTel.ButtonFillColor = System.Drawing.Color.White;
|
||||
txtTel.ButtonFillHoverColor = System.Drawing.Color.FromArgb(235, 243, 255);
|
||||
txtTel.ButtonFillPressColor = System.Drawing.Color.FromArgb(235, 243, 255);
|
||||
txtTel.ButtonForeColor = System.Drawing.Color.FromArgb(96, 98, 102);
|
||||
txtTel.ButtonForeHoverColor = System.Drawing.Color.FromArgb(80, 160, 255);
|
||||
txtTel.ButtonForePressColor = System.Drawing.Color.FromArgb(74, 131, 229);
|
||||
txtTel.ButtonRectColor = System.Drawing.Color.FromArgb(216, 219, 227);
|
||||
txtTel.ButtonRectHoverColor = System.Drawing.Color.FromArgb(197, 222, 255);
|
||||
txtTel.ButtonSymbol = 61761;
|
||||
txtTel.Cursor = System.Windows.Forms.Cursors.IBeam;
|
||||
txtTel.FillColor2 = System.Drawing.Color.White;
|
||||
txtTel.Font = new System.Drawing.Font("微软雅黑", 12F);
|
||||
txtTel.Location = new System.Drawing.Point(782, 187);
|
||||
txtTel.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
txtTel.Maximum = 2147483647D;
|
||||
txtTel.MaxLength = 20;
|
||||
txtTel.Minimum = -2147483648D;
|
||||
txtTel.MinimumSize = new System.Drawing.Size(1, 16);
|
||||
txtTel.Name = "txtTel";
|
||||
txtTel.RectColor = System.Drawing.Color.FromArgb(216, 219, 227);
|
||||
txtTel.Size = new System.Drawing.Size(188, 42);
|
||||
|
||||
txtTel.StyleCustomMode = true;
|
||||
txtTel.TabIndex = 10;
|
||||
txtTel.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// uiLabel8
|
||||
//
|
||||
uiLabel8.Font = new System.Drawing.Font("微软雅黑", 12F);
|
||||
uiLabel8.Location = new System.Drawing.Point(668, 193);
|
||||
uiLabel8.Name = "uiLabel8";
|
||||
uiLabel8.Size = new System.Drawing.Size(107, 29);
|
||||
uiLabel8.Style = Sunny.UI.UIStyle.Custom;
|
||||
uiLabel8.TabIndex = 33;
|
||||
uiLabel8.Text = "移动电话";
|
||||
uiLabel8.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// txtEmail
|
||||
//
|
||||
txtEmail.ButtonFillColor = System.Drawing.Color.White;
|
||||
txtEmail.ButtonFillHoverColor = System.Drawing.Color.FromArgb(235, 243, 255);
|
||||
txtEmail.ButtonFillPressColor = System.Drawing.Color.FromArgb(235, 243, 255);
|
||||
txtEmail.ButtonForeColor = System.Drawing.Color.FromArgb(96, 98, 102);
|
||||
txtEmail.ButtonForeHoverColor = System.Drawing.Color.FromArgb(80, 160, 255);
|
||||
txtEmail.ButtonForePressColor = System.Drawing.Color.FromArgb(74, 131, 229);
|
||||
txtEmail.ButtonRectColor = System.Drawing.Color.FromArgb(216, 219, 227);
|
||||
txtEmail.ButtonRectHoverColor = System.Drawing.Color.FromArgb(197, 222, 255);
|
||||
txtEmail.ButtonSymbol = 61761;
|
||||
txtEmail.Cursor = System.Windows.Forms.Cursors.IBeam;
|
||||
txtEmail.FillColor2 = System.Drawing.Color.White;
|
||||
txtEmail.Font = new System.Drawing.Font("微软雅黑", 12F);
|
||||
txtEmail.Location = new System.Drawing.Point(129, 192);
|
||||
txtEmail.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
txtEmail.Maximum = 2147483647D;
|
||||
txtEmail.MaxLength = 60;
|
||||
txtEmail.Minimum = -2147483648D;
|
||||
txtEmail.MinimumSize = new System.Drawing.Size(1, 16);
|
||||
txtEmail.Name = "txtEmail";
|
||||
txtEmail.RectColor = System.Drawing.Color.FromArgb(216, 219, 227);
|
||||
txtEmail.Size = new System.Drawing.Size(188, 42);
|
||||
|
||||
txtEmail.StyleCustomMode = true;
|
||||
txtEmail.TabIndex = 8;
|
||||
txtEmail.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// uiLabel5
|
||||
//
|
||||
uiLabel5.Font = new System.Drawing.Font("微软雅黑", 12F);
|
||||
uiLabel5.Location = new System.Drawing.Point(57, 199);
|
||||
uiLabel5.Name = "uiLabel5";
|
||||
uiLabel5.Size = new System.Drawing.Size(65, 29);
|
||||
uiLabel5.Style = Sunny.UI.UIStyle.Custom;
|
||||
uiLabel5.TabIndex = 31;
|
||||
uiLabel5.Text = "邮箱";
|
||||
uiLabel5.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// uiLabel6
|
||||
//
|
||||
uiLabel6.Font = new System.Drawing.Font("微软雅黑", 12F);
|
||||
uiLabel6.Location = new System.Drawing.Point(331, 133);
|
||||
uiLabel6.Name = "uiLabel6";
|
||||
uiLabel6.Size = new System.Drawing.Size(107, 29);
|
||||
uiLabel6.Style = Sunny.UI.UIStyle.Custom;
|
||||
uiLabel6.TabIndex = 30;
|
||||
uiLabel6.Text = "出生日期";
|
||||
uiLabel6.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// rdFemale
|
||||
//
|
||||
rdFemale.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
rdFemale.Font = new System.Drawing.Font("微软雅黑", 12F);
|
||||
rdFemale.Location = new System.Drawing.Point(854, 126);
|
||||
rdFemale.MinimumSize = new System.Drawing.Size(1, 1);
|
||||
rdFemale.Name = "rdFemale";
|
||||
rdFemale.Padding = new System.Windows.Forms.Padding(22, 0, 0, 0);
|
||||
rdFemale.Size = new System.Drawing.Size(57, 36);
|
||||
rdFemale.StyleCustomMode = true;
|
||||
rdFemale.TabIndex = 7;
|
||||
rdFemale.Text = "女";
|
||||
//
|
||||
// rdMale
|
||||
//
|
||||
rdMale.Checked = true;
|
||||
rdMale.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
rdMale.Font = new System.Drawing.Font("微软雅黑", 12F);
|
||||
rdMale.Location = new System.Drawing.Point(786, 126);
|
||||
rdMale.MinimumSize = new System.Drawing.Size(1, 1);
|
||||
rdMale.Name = "rdMale";
|
||||
rdMale.Padding = new System.Windows.Forms.Padding(22, 0, 0, 0);
|
||||
rdMale.Size = new System.Drawing.Size(57, 36);
|
||||
rdMale.StyleCustomMode = true;
|
||||
rdMale.TabIndex = 6;
|
||||
rdMale.Text = "男";
|
||||
//
|
||||
// txtNickName
|
||||
//
|
||||
txtNickName.ButtonFillColor = System.Drawing.Color.White;
|
||||
txtNickName.ButtonFillHoverColor = System.Drawing.Color.FromArgb(235, 243, 255);
|
||||
txtNickName.ButtonFillPressColor = System.Drawing.Color.FromArgb(235, 243, 255);
|
||||
txtNickName.ButtonForeColor = System.Drawing.Color.FromArgb(96, 98, 102);
|
||||
txtNickName.ButtonForeHoverColor = System.Drawing.Color.FromArgb(80, 160, 255);
|
||||
txtNickName.ButtonForePressColor = System.Drawing.Color.FromArgb(74, 131, 229);
|
||||
txtNickName.ButtonRectColor = System.Drawing.Color.FromArgb(216, 219, 227);
|
||||
txtNickName.ButtonRectHoverColor = System.Drawing.Color.FromArgb(197, 222, 255);
|
||||
txtNickName.ButtonSymbol = 61761;
|
||||
txtNickName.Cursor = System.Windows.Forms.Cursors.IBeam;
|
||||
txtNickName.FillColor2 = System.Drawing.Color.White;
|
||||
txtNickName.Font = new System.Drawing.Font("微软雅黑", 12F);
|
||||
txtNickName.Location = new System.Drawing.Point(445, 66);
|
||||
txtNickName.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
txtNickName.Maximum = 2147483647D;
|
||||
txtNickName.MaxLength = 20;
|
||||
txtNickName.Minimum = -2147483648D;
|
||||
txtNickName.MinimumSize = new System.Drawing.Size(1, 16);
|
||||
txtNickName.Name = "txtNickName";
|
||||
txtNickName.RectColor = System.Drawing.Color.FromArgb(216, 219, 227);
|
||||
txtNickName.Size = new System.Drawing.Size(188, 42);
|
||||
|
||||
txtNickName.StyleCustomMode = true;
|
||||
txtNickName.TabIndex = 2;
|
||||
txtNickName.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// uiLabel3
|
||||
//
|
||||
uiLabel3.Font = new System.Drawing.Font("微软雅黑", 12F);
|
||||
uiLabel3.Location = new System.Drawing.Point(710, 129);
|
||||
uiLabel3.Name = "uiLabel3";
|
||||
uiLabel3.Size = new System.Drawing.Size(65, 29);
|
||||
uiLabel3.Style = Sunny.UI.UIStyle.Custom;
|
||||
uiLabel3.TabIndex = 27;
|
||||
uiLabel3.Text = "性别";
|
||||
uiLabel3.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// uiLabel2
|
||||
//
|
||||
uiLabel2.Font = new System.Drawing.Font("微软雅黑", 12F);
|
||||
uiLabel2.Location = new System.Drawing.Point(373, 73);
|
||||
uiLabel2.Name = "uiLabel2";
|
||||
uiLabel2.Size = new System.Drawing.Size(65, 29);
|
||||
uiLabel2.Style = Sunny.UI.UIStyle.Custom;
|
||||
uiLabel2.TabIndex = 23;
|
||||
uiLabel2.Text = "昵称";
|
||||
uiLabel2.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// txtName
|
||||
//
|
||||
txtName.ButtonFillColor = System.Drawing.Color.White;
|
||||
txtName.ButtonFillHoverColor = System.Drawing.Color.FromArgb(235, 243, 255);
|
||||
txtName.ButtonFillPressColor = System.Drawing.Color.FromArgb(235, 243, 255);
|
||||
txtName.ButtonForeColor = System.Drawing.Color.FromArgb(96, 98, 102);
|
||||
txtName.ButtonForeHoverColor = System.Drawing.Color.FromArgb(80, 160, 255);
|
||||
txtName.ButtonForePressColor = System.Drawing.Color.FromArgb(74, 131, 229);
|
||||
txtName.ButtonRectColor = System.Drawing.Color.FromArgb(216, 219, 227);
|
||||
txtName.ButtonRectHoverColor = System.Drawing.Color.FromArgb(197, 222, 255);
|
||||
txtName.ButtonSymbol = 61761;
|
||||
txtName.Cursor = System.Windows.Forms.Cursors.IBeam;
|
||||
txtName.FillColor2 = System.Drawing.Color.White;
|
||||
txtName.Font = new System.Drawing.Font("微软雅黑", 12F);
|
||||
txtName.Location = new System.Drawing.Point(129, 129);
|
||||
txtName.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
txtName.Maximum = 2147483647D;
|
||||
txtName.MaxLength = 20;
|
||||
txtName.Minimum = -2147483648D;
|
||||
txtName.MinimumSize = new System.Drawing.Size(1, 16);
|
||||
txtName.Name = "txtName";
|
||||
txtName.RectColor = System.Drawing.Color.FromArgb(216, 219, 227);
|
||||
txtName.Size = new System.Drawing.Size(188, 42);
|
||||
|
||||
txtName.StyleCustomMode = true;
|
||||
txtName.TabIndex = 4;
|
||||
txtName.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// uiLabel4
|
||||
//
|
||||
uiLabel4.Font = new System.Drawing.Font("微软雅黑", 12F);
|
||||
uiLabel4.Location = new System.Drawing.Point(57, 136);
|
||||
uiLabel4.Name = "uiLabel4";
|
||||
uiLabel4.Size = new System.Drawing.Size(65, 29);
|
||||
uiLabel4.Style = Sunny.UI.UIStyle.Custom;
|
||||
uiLabel4.TabIndex = 25;
|
||||
uiLabel4.Text = "姓名";
|
||||
uiLabel4.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// txtAccount
|
||||
//
|
||||
txtAccount.ButtonFillColor = System.Drawing.Color.White;
|
||||
txtAccount.ButtonFillHoverColor = System.Drawing.Color.FromArgb(235, 243, 255);
|
||||
txtAccount.ButtonFillPressColor = System.Drawing.Color.FromArgb(235, 243, 255);
|
||||
txtAccount.ButtonForeColor = System.Drawing.Color.FromArgb(96, 98, 102);
|
||||
txtAccount.ButtonForeHoverColor = System.Drawing.Color.FromArgb(80, 160, 255);
|
||||
txtAccount.ButtonForePressColor = System.Drawing.Color.FromArgb(74, 131, 229);
|
||||
txtAccount.ButtonRectColor = System.Drawing.Color.FromArgb(216, 219, 227);
|
||||
txtAccount.ButtonRectHoverColor = System.Drawing.Color.FromArgb(197, 222, 255);
|
||||
txtAccount.ButtonSymbol = 61761;
|
||||
txtAccount.Cursor = System.Windows.Forms.Cursors.IBeam;
|
||||
txtAccount.FillColor2 = System.Drawing.Color.White;
|
||||
txtAccount.Font = new System.Drawing.Font("微软雅黑", 12F);
|
||||
txtAccount.Location = new System.Drawing.Point(129, 66);
|
||||
txtAccount.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
txtAccount.Maximum = 2147483647D;
|
||||
txtAccount.MaxLength = 20;
|
||||
txtAccount.Minimum = -2147483648D;
|
||||
txtAccount.MinimumSize = new System.Drawing.Size(1, 16);
|
||||
txtAccount.Name = "txtAccount";
|
||||
txtAccount.RectColor = System.Drawing.Color.FromArgb(216, 219, 227);
|
||||
txtAccount.Size = new System.Drawing.Size(188, 42);
|
||||
|
||||
txtAccount.StyleCustomMode = true;
|
||||
txtAccount.TabIndex = 1;
|
||||
txtAccount.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// uiLabel1
|
||||
//
|
||||
uiLabel1.Font = new System.Drawing.Font("微软雅黑", 12F);
|
||||
uiLabel1.Location = new System.Drawing.Point(57, 73);
|
||||
uiLabel1.Name = "uiLabel1";
|
||||
uiLabel1.Size = new System.Drawing.Size(65, 29);
|
||||
uiLabel1.Style = Sunny.UI.UIStyle.Custom;
|
||||
uiLabel1.TabIndex = 21;
|
||||
uiLabel1.Text = "账号";
|
||||
uiLabel1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// AddUserForm
|
||||
//
|
||||
AllowShowTitle = false;
|
||||
AutoScaleDimensions = new System.Drawing.SizeF(12F, 27F);
|
||||
AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
ClientSize = new System.Drawing.Size(1031, 558);
|
||||
Controls.Add(uiPanel1);
|
||||
Icon = (System.Drawing.Icon)resources.GetObject("$this.Icon");
|
||||
MaximizeBox = false;
|
||||
MinimizeBox = false;
|
||||
Name = "AddUserForm";
|
||||
Padding = new System.Windows.Forms.Padding(0);
|
||||
RectColor = System.Drawing.Color.FromArgb(216, 219, 227);
|
||||
ShowTitle = false;
|
||||
ShowTitleIcon = true;
|
||||
Style = Sunny.UI.UIStyle.Custom;
|
||||
StyleCustomMode = true;
|
||||
Text = "新增用户";
|
||||
TitleColor = System.Drawing.Color.FromArgb(216, 219, 227);
|
||||
TitleForeColor = System.Drawing.Color.FromArgb(96, 98, 102);
|
||||
TopMost = true;
|
||||
Load += AddUserForm_Load;
|
||||
uiPanel1.ResumeLayout(false);
|
||||
titlePanel.ResumeLayout(false);
|
||||
panel1.ResumeLayout(false);
|
||||
ResumeLayout(false);
|
||||
}
|
||||
|
||||
#endregion
|
||||
private Sunny.UI.UIPanel uiPanel1;
|
||||
private System.Windows.Forms.Panel titlePanel;
|
||||
private Sunny.UI.UILabel lblTitle;
|
||||
private Sunny.UI.UISymbolLabel btnClose;
|
||||
private System.Windows.Forms.Panel panel1;
|
||||
private Sunny.UI.UITextBox txtPassword;
|
||||
private Sunny.UI.UILabel uiLabel10;
|
||||
private Sunny.UI.UIDatePicker txtBirthday;
|
||||
private Sunny.UI.UILabel uiLabel9;
|
||||
private Sunny.UI.UITextBox txtAddress;
|
||||
private Sunny.UI.UILabel uiLabel7;
|
||||
private Sunny.UI.UITextBox txtTel;
|
||||
private Sunny.UI.UILabel uiLabel8;
|
||||
private Sunny.UI.UITextBox txtEmail;
|
||||
private Sunny.UI.UILabel uiLabel5;
|
||||
private Sunny.UI.UILabel uiLabel6;
|
||||
private Sunny.UI.UIRadioButton rdFemale;
|
||||
private Sunny.UI.UIRadioButton rdMale;
|
||||
private Sunny.UI.UITextBox txtNickName;
|
||||
private Sunny.UI.UILabel uiLabel3;
|
||||
private Sunny.UI.UILabel uiLabel2;
|
||||
private Sunny.UI.UITextBox txtName;
|
||||
private Sunny.UI.UILabel uiLabel4;
|
||||
private Sunny.UI.UITextBox txtAccount;
|
||||
private Sunny.UI.UILabel uiLabel1;
|
||||
private Sunny.UI.UILabel uiLabel11;
|
||||
private Sunny.UI.UIComboBox comboDept;
|
||||
private Sunny.UI.UITransfer uiTransfer1;
|
||||
private Sunny.UI.UILabel uiLabel12;
|
||||
private Sunny.UI.UIButton btnConfirm;
|
||||
private Sunny.UI.UIIntegerUpDown uiIntegerUpDown1;
|
||||
}
|
||||
}
|
428
DH.RBAC/Views/Sys/User/AddUserForm.cs
Normal file
428
DH.RBAC/Views/Sys/User/AddUserForm.cs
Normal file
@ -0,0 +1,428 @@
|
||||
using Sunny.UI;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
|
||||
using DH.RBAC.Common;
|
||||
using DH.RBAC.Logic.Sys;
|
||||
using DH.RBAC.Utility.Other;
|
||||
using DH.RBAC.Model.Sys;
|
||||
|
||||
|
||||
namespace DH.RBAC.Page.Sys.User
|
||||
{
|
||||
public partial class AddUserForm : UIForm
|
||||
{
|
||||
private SysUserLogic userLogic;
|
||||
private SysUserRoleRelationLogic userRoleRelationLogic;
|
||||
private SysUserLogOnLogic userLogOnLogic;
|
||||
private SysRoleLogic roleLogic;
|
||||
private SysOrganizeLogic organizeLogic;
|
||||
|
||||
public AddUserForm()
|
||||
{
|
||||
|
||||
InitializeComponent();
|
||||
userLogic = new SysUserLogic();
|
||||
userRoleRelationLogic = new SysUserRoleRelationLogic();
|
||||
userLogOnLogic = new SysUserLogOnLogic();
|
||||
roleLogic = new SysRoleLogic();
|
||||
organizeLogic = new SysOrganizeLogic();
|
||||
}
|
||||
#region 标题栏
|
||||
private void btnClose_Click(object sender, EventArgs e)
|
||||
{
|
||||
FormHelper.subForm = null;
|
||||
ParentPage.btnQuery_Click(null, null);
|
||||
this.Close();
|
||||
}
|
||||
private Point mPoint;
|
||||
private void titlePanel_MouseDown(object sender, MouseEventArgs e)
|
||||
{
|
||||
mPoint = new Point(e.X, e.Y);
|
||||
}
|
||||
|
||||
private void titlePanel_MouseMove(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (e.Button == MouseButtons.Left)
|
||||
{
|
||||
this.Location = new Point(this.Location.X + e.X - mPoint.X, this.Location.Y + e.Y - mPoint.Y);
|
||||
}
|
||||
}
|
||||
|
||||
private void btnClose_MouseEnter(object sender, EventArgs e)
|
||||
{
|
||||
btnClose.BackColor = Color.FromArgb(231, 231, 231);
|
||||
}
|
||||
|
||||
private void btnClose_MouseLeave(object sender, EventArgs e)
|
||||
{
|
||||
btnClose.BackColor = Color.Transparent;
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
public UserPage ParentPage { get; set; }
|
||||
public string Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 画面加载,读取用户信息,显示在界面上
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void AddUserForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (StringHelper.IsNullOrEmpty(Id))
|
||||
{
|
||||
lblTitle.Text = "新增用户";
|
||||
txtAccount.Enabled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
lblTitle.Text = "修改用户";
|
||||
txtAccount.Enabled = false;
|
||||
txtPassword.Enabled = false;
|
||||
}
|
||||
//获取部门下拉列表的值
|
||||
bool flag = GetDepartmentCombox();
|
||||
if (!flag)
|
||||
{
|
||||
btnClose_Click(null, null);
|
||||
return;
|
||||
}
|
||||
flag = GetRoleTrans();
|
||||
if (!flag)
|
||||
{
|
||||
btnClose_Click(null, null);
|
||||
return;
|
||||
}
|
||||
if (StringHelper.IsNullOrEmpty(Id))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
SysUser entity = userLogic.Get(Id);
|
||||
entity.StrBirthday = entity.Birthday.Value.ToString("yyyy-MM-dd");
|
||||
entity.RoleId = userRoleRelationLogic.GetList(entity.Id).Select(c => c.RoleId).ToList();
|
||||
|
||||
|
||||
|
||||
if (entity == null)
|
||||
{
|
||||
AntdUI.Message.warn(this, "用户信息不存在!", autoClose: 3);
|
||||
|
||||
btnClose_Click(null, null);
|
||||
return;
|
||||
}
|
||||
|
||||
//给文本框赋值
|
||||
txtAccount.Text = entity.Account;
|
||||
txtNickName.Text = entity.NickName;
|
||||
txtName.Text = entity.RealName;
|
||||
txtBirthday.Text = entity.StrBirthday;
|
||||
if (entity.Gender == "1")
|
||||
rdMale.Checked = true;
|
||||
else
|
||||
rdFemale.Checked = true;
|
||||
txtEmail.Text = entity.Email;
|
||||
comboDept.SelectedValue = entity.DepartmentId;
|
||||
txtTel.Text = entity.MobilePhone;
|
||||
txtAddress.Text = entity.Address;
|
||||
uiIntegerUpDown1.Value = entity.SortCode.Value;
|
||||
//左边删除已存在的,右边新增这些
|
||||
foreach (string id in entity.RoleId)
|
||||
{
|
||||
string name = roleIdDict[id];
|
||||
if (uiTransfer1.ItemsLeft.Contains(name))
|
||||
{
|
||||
uiTransfer1.ItemsLeft.Remove(name);
|
||||
}
|
||||
uiTransfer1.ItemsRight.Add(name);
|
||||
}
|
||||
}
|
||||
|
||||
Dictionary<string, string> roleNameDict = new Dictionary<string, string>();
|
||||
Dictionary<string, string> roleIdDict = new Dictionary<string, string>();
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获得角色
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private bool GetRoleTrans()
|
||||
{
|
||||
List<SysRole> listRole = roleLogic.GetList();
|
||||
var listTree = new List<TreeSelect>();
|
||||
foreach (var item in listRole)
|
||||
{
|
||||
TreeSelect model = new TreeSelect();
|
||||
model.id = item.Id;
|
||||
model.text = item.Name;
|
||||
listTree.Add(model);
|
||||
}
|
||||
foreach (TreeSelect select in listTree)
|
||||
{
|
||||
uiTransfer1.ItemsLeft.Add(select.text);
|
||||
roleIdDict.Add(select.id, select.text);
|
||||
roleNameDict.Add(select.text, select.id);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获得部门下拉列表数据
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private bool GetDepartmentCombox()
|
||||
{
|
||||
var data = organizeLogic.GetList();
|
||||
var treeList = new List<TreeSelect>();
|
||||
foreach (SysOrganize item in data)
|
||||
{
|
||||
TreeSelect model = new TreeSelect();
|
||||
model.id = item.Id;
|
||||
model.text = item.FullName;
|
||||
model.parentId = item.ParentId;
|
||||
treeList.Add(model);
|
||||
}
|
||||
List<TreeSelect> list2 = treeList.Where(it => it.parentId != "0").ToList();
|
||||
comboDept.ValueMember = "id";
|
||||
comboDept.DisplayMember = "text";
|
||||
comboDept.DataSource = list2;
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 确认按钮点击事件处理
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void btnConfirm_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (StringHelper.IsNullOrEmpty(Id))
|
||||
{
|
||||
DoAdd();
|
||||
}
|
||||
else
|
||||
{
|
||||
DoUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 执行更新操作
|
||||
/// </summary>
|
||||
private void DoUpdate()
|
||||
{
|
||||
bool flag = ChechEmpty(false);
|
||||
if (!flag)
|
||||
{
|
||||
return;
|
||||
}
|
||||
SysUser model = new SysUser();
|
||||
model.Id = Id;
|
||||
model.Account = txtAccount.Text;
|
||||
model.NickName = txtNickName.Text;
|
||||
model.RealName = txtName.Text;
|
||||
model.StrBirthday = txtBirthday.Text;
|
||||
model.Gender = rdMale.Checked ? "1" : "0";
|
||||
|
||||
model.Email = txtEmail.Text;
|
||||
model.DepartmentId = comboDept.SelectedValue.ToString();
|
||||
model.MobilePhone = txtTel.Text;
|
||||
model.Address = txtAddress.Text;
|
||||
model.SortCode = uiIntegerUpDown1.Value;
|
||||
|
||||
List<string> ids = new List<string>();
|
||||
foreach (string item in uiTransfer1.ItemsRight)
|
||||
{
|
||||
ids.Add(roleNameDict[item]);
|
||||
}
|
||||
string roleIds = StringHelper.GetStrArray(ids);
|
||||
model.roleIds = roleIds;
|
||||
model.ModifyUserId = GlobalConfig.CurrentUser.Id;
|
||||
|
||||
DateTime defaultDt = DateTime.Today;
|
||||
DateTime.TryParse(model.StrBirthday + " 00:00:00", out defaultDt);
|
||||
model.Birthday = defaultDt;
|
||||
if (model.roleIds == "")
|
||||
{
|
||||
AntdUI.Message.warn(this, "请选择角色!", autoClose: 3);
|
||||
|
||||
return;
|
||||
}
|
||||
//更新用户基本信息。
|
||||
int row = userLogic.AppUpdateAndSetRole(model, model.roleIds.SplitToList().ToArray(), model.ModifyUserId);
|
||||
//更新用户角色信息。
|
||||
if (row == 0)
|
||||
{
|
||||
AntdUI.Message.warn(this, "对不起,操作失败!", autoClose: 3);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
//ParentPage.Init();
|
||||
btnClose_Click(null, null);
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 数据校验
|
||||
/// </summary>
|
||||
/// <param name="checkPassword"></param>
|
||||
/// <returns></returns>
|
||||
private bool ChechEmpty(bool checkPassword)
|
||||
{
|
||||
if (StringHelper.IsNullOrEmpty(txtAccount.Text))
|
||||
{
|
||||
AntdUI.Message.warn(this, "账号不能为空!", autoClose: 3);
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
if (StringHelper.IsNullOrEmpty(txtNickName.Text))
|
||||
{
|
||||
AntdUI.Message.warn(this, "昵称不能为空!", autoClose: 3);
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
if (checkPassword)
|
||||
{
|
||||
if (StringHelper.IsNullOrEmpty(txtPassword.Text))
|
||||
{
|
||||
AntdUI.Message.warn(this, "初始密码不能为空!", autoClose: 3);
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if (comboDept.SelectedItem == null)
|
||||
{
|
||||
AntdUI.Message.warn(this, "所属部门不能为空!", autoClose: 3);
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
if (StringHelper.IsNullOrEmpty(comboDept.SelectedItem.ToString()))
|
||||
{
|
||||
AntdUI.Message.warn(this, "所属部门不能为空!", autoClose: 3);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (StringHelper.IsNullOrEmpty(uiIntegerUpDown1.Text))
|
||||
{
|
||||
AntdUI.Message.warn(this, "排序号不能为空!", autoClose: 3);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
if (comboDept.SelectedItem == null)
|
||||
{
|
||||
AntdUI.Message.warn(this, "所属部门不能为空!", autoClose: 3);
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
if (StringHelper.IsNullOrEmpty(comboDept.SelectedItem.ToString()))
|
||||
{
|
||||
AntdUI.Message.warn(this, "所属部门不能为空!", autoClose: 3);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
if (uiTransfer1.ItemsRight == null)
|
||||
{
|
||||
AntdUI.Message.warn(this, "角色不能为空!", autoClose: 3);
|
||||
|
||||
return false;
|
||||
}
|
||||
if (uiTransfer1.ItemsRight.Count == 0)
|
||||
{
|
||||
AntdUI.Message.warn(this, "角色不能为空!", autoClose: 3);
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 执行新增操作
|
||||
/// </summary>
|
||||
private void DoAdd()
|
||||
{
|
||||
bool flag = ChechEmpty(true);
|
||||
if (!flag)
|
||||
return;
|
||||
SysUser model = new SysUser();
|
||||
model.Account = txtAccount.Text;
|
||||
model.NickName = txtNickName.Text;
|
||||
model.password = txtPassword.Text.MD5Encrypt();
|
||||
model.RealName = txtName.Text;
|
||||
model.StrBirthday = txtBirthday.Text;
|
||||
|
||||
model.Gender = rdMale.Checked ? "1" : "0";
|
||||
|
||||
model.Email = txtEmail.Text;
|
||||
model.DepartmentId = comboDept.SelectedValue.ToString();
|
||||
model.MobilePhone = txtTel.Text;
|
||||
model.Address = txtAddress.Text;
|
||||
model.SortCode = uiIntegerUpDown1.Value;
|
||||
model.CreateUserId = GlobalConfig.CurrentUser.Id;
|
||||
|
||||
List<string> ids = new List<string>();
|
||||
foreach (string item in uiTransfer1.ItemsRight)
|
||||
{
|
||||
ids.Add(roleNameDict[item]);
|
||||
}
|
||||
string roleIds = StringHelper.GetStrArray(ids);
|
||||
model.roleIds = roleIds;
|
||||
|
||||
|
||||
|
||||
var userEntity = userLogic.GetByUserName(model.Account);
|
||||
if (userEntity != null)
|
||||
{
|
||||
AntdUI.Message.warn(this, "已存在当前用户名,请重新输入!", autoClose: 3);
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
DateTime defaultDt = DateTime.Today;
|
||||
DateTime.TryParse(model.StrBirthday + " 00:00:00", out defaultDt);
|
||||
model.Birthday = defaultDt;
|
||||
if (model.roleIds == "")
|
||||
{
|
||||
AntdUI.Message.warn(this, "请选择角色!", autoClose: 3);
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
int row = userLogic.AppInsert(model, model.password, model.roleIds.SplitToList().ToArray(), model.CreateUserId);
|
||||
if (row == 0)
|
||||
{
|
||||
AntdUI.Message.warn(this, "对不起,操作失败!", autoClose: 3);
|
||||
|
||||
;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
btnClose_Click(null, null);
|
||||
}
|
||||
}
|
||||
}
|
1221
DH.RBAC/Views/Sys/User/AddUserForm.resx
Normal file
1221
DH.RBAC/Views/Sys/User/AddUserForm.resx
Normal file
File diff suppressed because it is too large
Load Diff
435
DH.RBAC/Views/Sys/User/UserPage.Designer.cs
generated
Normal file
435
DH.RBAC/Views/Sys/User/UserPage.Designer.cs
generated
Normal file
@ -0,0 +1,435 @@
|
||||
namespace DH.RBAC.Page.Sys.User
|
||||
{
|
||||
partial class UserPage
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
panel2 = new System.Windows.Forms.Panel();
|
||||
panel5 = new System.Windows.Forms.Panel();
|
||||
panel1 = new System.Windows.Forms.Panel();
|
||||
dataGridView = new Sunny.UI.UIDataGridView();
|
||||
UserId = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
UserAccount = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
UserName = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
UserGender = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
UserTel = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
UserDepartment = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
pagination = new Sunny.UI.UIPagination();
|
||||
panel6 = new System.Windows.Forms.Panel();
|
||||
btnPwd = new AntdUI.Button();
|
||||
btnDelete = new AntdUI.Button();
|
||||
btnUpdate = new AntdUI.Button();
|
||||
btnAdd = new AntdUI.Button();
|
||||
panel7 = new System.Windows.Forms.Panel();
|
||||
txtKeywords = new Sunny.UI.UITextBox();
|
||||
btnQuery = new Sunny.UI.UISymbolButton();
|
||||
panel4 = new System.Windows.Forms.Panel();
|
||||
panel3 = new System.Windows.Forms.Panel();
|
||||
panel2.SuspendLayout();
|
||||
panel5.SuspendLayout();
|
||||
panel1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)dataGridView).BeginInit();
|
||||
panel6.SuspendLayout();
|
||||
panel7.SuspendLayout();
|
||||
SuspendLayout();
|
||||
//
|
||||
// panel2
|
||||
//
|
||||
panel2.Controls.Add(panel5);
|
||||
panel2.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
panel2.Location = new System.Drawing.Point(0, 0);
|
||||
panel2.Margin = new System.Windows.Forms.Padding(2);
|
||||
panel2.Name = "panel2";
|
||||
panel2.Size = new System.Drawing.Size(816, 397);
|
||||
panel2.TabIndex = 3;
|
||||
//
|
||||
// panel5
|
||||
//
|
||||
panel5.Controls.Add(panel1);
|
||||
panel5.Controls.Add(panel6);
|
||||
panel5.Controls.Add(panel4);
|
||||
panel5.Controls.Add(panel3);
|
||||
panel5.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
panel5.Location = new System.Drawing.Point(0, 0);
|
||||
panel5.Margin = new System.Windows.Forms.Padding(2);
|
||||
panel5.Name = "panel5";
|
||||
panel5.Size = new System.Drawing.Size(816, 397);
|
||||
panel5.TabIndex = 7;
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
panel1.Controls.Add(dataGridView);
|
||||
panel1.Controls.Add(pagination);
|
||||
panel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
panel1.Location = new System.Drawing.Point(18, 52);
|
||||
panel1.Margin = new System.Windows.Forms.Padding(2);
|
||||
panel1.Name = "panel1";
|
||||
panel1.Size = new System.Drawing.Size(780, 345);
|
||||
panel1.TabIndex = 13;
|
||||
//
|
||||
// dataGridView
|
||||
//
|
||||
dataGridView.AllowUserToAddRows = false;
|
||||
dataGridView.AllowUserToDeleteRows = false;
|
||||
dataGridView.AllowUserToResizeRows = false;
|
||||
dataGridViewCellStyle1.BackColor = System.Drawing.Color.White;
|
||||
dataGridView.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
|
||||
dataGridView.BackgroundColor = System.Drawing.Color.White;
|
||||
dataGridView.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single;
|
||||
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
|
||||
dataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(216, 219, 227);
|
||||
dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 12F);
|
||||
dataGridViewCellStyle2.ForeColor = System.Drawing.Color.FromArgb(96, 98, 102);
|
||||
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.Color.FromArgb(216, 219, 227);
|
||||
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
|
||||
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
dataGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
|
||||
dataGridView.ColumnHeadersHeight = 32;
|
||||
dataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
|
||||
dataGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { UserId, UserAccount, UserName, UserGender, UserTel, UserDepartment });
|
||||
dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
|
||||
dataGridViewCellStyle8.BackColor = System.Drawing.SystemColors.Window;
|
||||
dataGridViewCellStyle8.Font = new System.Drawing.Font("微软雅黑", 12F);
|
||||
dataGridViewCellStyle8.ForeColor = System.Drawing.Color.FromArgb(48, 48, 48);
|
||||
dataGridViewCellStyle8.SelectionBackColor = System.Drawing.Color.FromArgb(155, 200, 255);
|
||||
dataGridViewCellStyle8.SelectionForeColor = System.Drawing.Color.FromArgb(48, 48, 48);
|
||||
dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
|
||||
dataGridView.DefaultCellStyle = dataGridViewCellStyle8;
|
||||
dataGridView.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
dataGridView.EnableHeadersVisualStyles = false;
|
||||
dataGridView.Font = new System.Drawing.Font("微软雅黑", 12F);
|
||||
dataGridView.GridColor = System.Drawing.Color.FromArgb(216, 219, 227);
|
||||
dataGridView.Location = new System.Drawing.Point(0, 0);
|
||||
dataGridView.Margin = new System.Windows.Forms.Padding(2);
|
||||
dataGridView.MultiSelect = false;
|
||||
dataGridView.Name = "dataGridView";
|
||||
dataGridView.ReadOnly = true;
|
||||
dataGridView.RectColor = System.Drawing.Color.FromArgb(216, 219, 227);
|
||||
dataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
|
||||
dataGridViewCellStyle9.BackColor = System.Drawing.Color.White;
|
||||
dataGridViewCellStyle9.Font = new System.Drawing.Font("微软雅黑", 12F);
|
||||
dataGridViewCellStyle9.ForeColor = System.Drawing.Color.FromArgb(48, 48, 48);
|
||||
dataGridViewCellStyle9.SelectionBackColor = System.Drawing.Color.FromArgb(216, 219, 227);
|
||||
dataGridViewCellStyle9.SelectionForeColor = System.Drawing.Color.White;
|
||||
dataGridViewCellStyle9.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
dataGridView.RowHeadersDefaultCellStyle = dataGridViewCellStyle9;
|
||||
dataGridView.RowHeadersVisible = false;
|
||||
dataGridView.RowHeadersWidth = 51;
|
||||
dataGridViewCellStyle10.BackColor = System.Drawing.Color.White;
|
||||
dataGridView.RowsDefaultCellStyle = dataGridViewCellStyle10;
|
||||
dataGridView.SelectedIndex = -1;
|
||||
dataGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
|
||||
dataGridView.Size = new System.Drawing.Size(780, 319);
|
||||
dataGridView.StripeOddColor = System.Drawing.Color.White;
|
||||
dataGridView.StyleCustomMode = true;
|
||||
dataGridView.TabIndex = 12;
|
||||
//
|
||||
// UserId
|
||||
//
|
||||
UserId.DataPropertyName = "Id";
|
||||
UserId.HeaderText = "Id";
|
||||
UserId.MinimumWidth = 6;
|
||||
UserId.Name = "UserId";
|
||||
UserId.ReadOnly = true;
|
||||
UserId.Visible = false;
|
||||
UserId.Width = 125;
|
||||
//
|
||||
// UserAccount
|
||||
//
|
||||
UserAccount.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
|
||||
UserAccount.DataPropertyName = "Account";
|
||||
dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
|
||||
dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
UserAccount.DefaultCellStyle = dataGridViewCellStyle3;
|
||||
UserAccount.HeaderText = "账号";
|
||||
UserAccount.MinimumWidth = 6;
|
||||
UserAccount.Name = "UserAccount";
|
||||
UserAccount.ReadOnly = true;
|
||||
UserAccount.Resizable = System.Windows.Forms.DataGridViewTriState.True;
|
||||
UserAccount.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
|
||||
//
|
||||
// UserName
|
||||
//
|
||||
UserName.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
|
||||
UserName.DataPropertyName = "RealName";
|
||||
dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
|
||||
dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
UserName.DefaultCellStyle = dataGridViewCellStyle4;
|
||||
UserName.HeaderText = "姓名";
|
||||
UserName.MinimumWidth = 6;
|
||||
UserName.Name = "UserName";
|
||||
UserName.ReadOnly = true;
|
||||
UserName.Resizable = System.Windows.Forms.DataGridViewTriState.True;
|
||||
UserName.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
|
||||
//
|
||||
// UserGender
|
||||
//
|
||||
UserGender.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
|
||||
UserGender.DataPropertyName = "GenderStr";
|
||||
dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
|
||||
dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
UserGender.DefaultCellStyle = dataGridViewCellStyle5;
|
||||
UserGender.HeaderText = "性别";
|
||||
UserGender.MinimumWidth = 6;
|
||||
UserGender.Name = "UserGender";
|
||||
UserGender.ReadOnly = true;
|
||||
UserGender.Resizable = System.Windows.Forms.DataGridViewTriState.True;
|
||||
UserGender.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
|
||||
//
|
||||
// UserTel
|
||||
//
|
||||
UserTel.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
|
||||
UserTel.DataPropertyName = "MobilePhone";
|
||||
dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.BottomCenter;
|
||||
dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
UserTel.DefaultCellStyle = dataGridViewCellStyle6;
|
||||
UserTel.HeaderText = "手机";
|
||||
UserTel.MinimumWidth = 6;
|
||||
UserTel.Name = "UserTel";
|
||||
UserTel.ReadOnly = true;
|
||||
UserTel.Resizable = System.Windows.Forms.DataGridViewTriState.True;
|
||||
UserTel.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
|
||||
//
|
||||
// UserDepartment
|
||||
//
|
||||
UserDepartment.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
|
||||
UserDepartment.DataPropertyName = "DeptName";
|
||||
dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
|
||||
dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
UserDepartment.DefaultCellStyle = dataGridViewCellStyle7;
|
||||
UserDepartment.HeaderText = "部门";
|
||||
UserDepartment.MinimumWidth = 6;
|
||||
UserDepartment.Name = "UserDepartment";
|
||||
UserDepartment.ReadOnly = true;
|
||||
UserDepartment.Resizable = System.Windows.Forms.DataGridViewTriState.True;
|
||||
UserDepartment.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
|
||||
//
|
||||
// pagination
|
||||
//
|
||||
pagination.ButtonFillSelectedColor = System.Drawing.Color.FromArgb(64, 128, 204);
|
||||
pagination.ButtonStyleInherited = false;
|
||||
pagination.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
pagination.FillColor = System.Drawing.Color.White;
|
||||
pagination.FillColor2 = System.Drawing.Color.White;
|
||||
pagination.Font = new System.Drawing.Font("微软雅黑", 12F);
|
||||
pagination.Location = new System.Drawing.Point(0, 319);
|
||||
pagination.Margin = new System.Windows.Forms.Padding(2, 3, 2, 3);
|
||||
pagination.MinimumSize = new System.Drawing.Size(1, 1);
|
||||
pagination.Name = "pagination";
|
||||
pagination.PagerCount = 5;
|
||||
pagination.PageSize = 10;
|
||||
pagination.RectColor = System.Drawing.Color.FromArgb(216, 219, 227);
|
||||
pagination.RectSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.None;
|
||||
pagination.ShowText = false;
|
||||
pagination.Size = new System.Drawing.Size(780, 26);
|
||||
pagination.StyleCustomMode = true;
|
||||
pagination.TabIndex = 11;
|
||||
pagination.Text = "uiPagination1";
|
||||
pagination.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
pagination.PageChanged += pagination_PageChanged;
|
||||
//
|
||||
// panel6
|
||||
//
|
||||
panel6.Controls.Add(btnPwd);
|
||||
panel6.Controls.Add(btnDelete);
|
||||
panel6.Controls.Add(btnUpdate);
|
||||
panel6.Controls.Add(btnAdd);
|
||||
panel6.Controls.Add(panel7);
|
||||
panel6.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
panel6.Location = new System.Drawing.Point(18, 0);
|
||||
panel6.Margin = new System.Windows.Forms.Padding(2);
|
||||
panel6.Name = "panel6";
|
||||
panel6.Size = new System.Drawing.Size(780, 52);
|
||||
panel6.TabIndex = 12;
|
||||
//
|
||||
// btnPwd
|
||||
//
|
||||
btnPwd.Location = new System.Drawing.Point(352, 9);
|
||||
btnPwd.Name = "btnPwd";
|
||||
btnPwd.Size = new System.Drawing.Size(98, 38);
|
||||
btnPwd.TabIndex = 7;
|
||||
btnPwd.Tag = "reset_password";
|
||||
btnPwd.Text = "重置密码";
|
||||
btnPwd.Visible = false;
|
||||
//
|
||||
// btnDelete
|
||||
//
|
||||
btnDelete.Location = new System.Drawing.Point(235, 9);
|
||||
btnDelete.Name = "btnDelete";
|
||||
btnDelete.Size = new System.Drawing.Size(98, 38);
|
||||
btnDelete.TabIndex = 6;
|
||||
btnDelete.Tag = "user-delete";
|
||||
btnDelete.Text = "删除用户";
|
||||
btnDelete.Visible = false;
|
||||
//
|
||||
// btnUpdate
|
||||
//
|
||||
btnUpdate.Location = new System.Drawing.Point(118, 9);
|
||||
btnUpdate.Name = "btnUpdate";
|
||||
btnUpdate.Size = new System.Drawing.Size(98, 38);
|
||||
btnUpdate.TabIndex = 5;
|
||||
btnUpdate.Tag = "user-edit";
|
||||
btnUpdate.Text = "修改用户";
|
||||
btnUpdate.Visible = false;
|
||||
//
|
||||
// btnAdd
|
||||
//
|
||||
btnAdd.Location = new System.Drawing.Point(5, 9);
|
||||
btnAdd.Name = "btnAdd";
|
||||
btnAdd.Size = new System.Drawing.Size(98, 38);
|
||||
btnAdd.TabIndex = 4;
|
||||
btnAdd.Tag = "user-add";
|
||||
btnAdd.Text = "新增用户";
|
||||
btnAdd.Visible = false;
|
||||
//
|
||||
// panel7
|
||||
//
|
||||
panel7.Controls.Add(txtKeywords);
|
||||
panel7.Controls.Add(btnQuery);
|
||||
panel7.Dock = System.Windows.Forms.DockStyle.Right;
|
||||
panel7.Location = new System.Drawing.Point(559, 0);
|
||||
panel7.Margin = new System.Windows.Forms.Padding(2);
|
||||
panel7.Name = "panel7";
|
||||
panel7.Size = new System.Drawing.Size(221, 52);
|
||||
panel7.TabIndex = 3;
|
||||
//
|
||||
// txtKeywords
|
||||
//
|
||||
txtKeywords.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right;
|
||||
txtKeywords.ButtonFillColor = System.Drawing.Color.White;
|
||||
txtKeywords.ButtonFillHoverColor = System.Drawing.Color.FromArgb(235, 243, 255);
|
||||
txtKeywords.ButtonFillPressColor = System.Drawing.Color.FromArgb(235, 243, 255);
|
||||
txtKeywords.ButtonForeColor = System.Drawing.Color.FromArgb(96, 98, 102);
|
||||
txtKeywords.ButtonForeHoverColor = System.Drawing.Color.FromArgb(80, 160, 255);
|
||||
txtKeywords.ButtonForePressColor = System.Drawing.Color.FromArgb(74, 131, 229);
|
||||
txtKeywords.ButtonRectColor = System.Drawing.Color.FromArgb(216, 219, 227);
|
||||
txtKeywords.ButtonRectHoverColor = System.Drawing.Color.FromArgb(197, 222, 255);
|
||||
txtKeywords.ButtonStyleInherited = false;
|
||||
txtKeywords.ButtonSymbol = 61761;
|
||||
txtKeywords.Cursor = System.Windows.Forms.Cursors.IBeam;
|
||||
txtKeywords.FillColor2 = System.Drawing.Color.White;
|
||||
txtKeywords.Font = new System.Drawing.Font("微软雅黑", 12F);
|
||||
txtKeywords.Location = new System.Drawing.Point(12, 9);
|
||||
txtKeywords.Margin = new System.Windows.Forms.Padding(2, 3, 2, 3);
|
||||
txtKeywords.MinimumSize = new System.Drawing.Size(1, 10);
|
||||
txtKeywords.Name = "txtKeywords";
|
||||
txtKeywords.Padding = new System.Windows.Forms.Padding(3);
|
||||
txtKeywords.RectColor = System.Drawing.Color.FromArgb(216, 219, 227);
|
||||
txtKeywords.ShowText = false;
|
||||
txtKeywords.Size = new System.Drawing.Size(176, 38);
|
||||
txtKeywords.StyleCustomMode = true;
|
||||
txtKeywords.TabIndex = 2;
|
||||
txtKeywords.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
txtKeywords.Watermark = "用户账号或姓名";
|
||||
txtKeywords.KeyDown += txtKeywords_KeyDown;
|
||||
//
|
||||
// btnQuery
|
||||
//
|
||||
btnQuery.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right;
|
||||
btnQuery.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
btnQuery.Font = new System.Drawing.Font("微软雅黑", 12F);
|
||||
btnQuery.Location = new System.Drawing.Point(192, 9);
|
||||
btnQuery.Margin = new System.Windows.Forms.Padding(2);
|
||||
btnQuery.MinimumSize = new System.Drawing.Size(1, 1);
|
||||
btnQuery.Name = "btnQuery";
|
||||
btnQuery.Size = new System.Drawing.Size(25, 38);
|
||||
btnQuery.StyleCustomMode = true;
|
||||
btnQuery.Symbol = 61442;
|
||||
btnQuery.SymbolSize = 30;
|
||||
btnQuery.TabIndex = 3;
|
||||
btnQuery.TipsFont = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
|
||||
//
|
||||
// panel4
|
||||
//
|
||||
panel4.Dock = System.Windows.Forms.DockStyle.Right;
|
||||
panel4.Location = new System.Drawing.Point(798, 0);
|
||||
panel4.Margin = new System.Windows.Forms.Padding(2);
|
||||
panel4.Name = "panel4";
|
||||
panel4.Size = new System.Drawing.Size(18, 397);
|
||||
panel4.TabIndex = 5;
|
||||
//
|
||||
// panel3
|
||||
//
|
||||
panel3.Dock = System.Windows.Forms.DockStyle.Left;
|
||||
panel3.Location = new System.Drawing.Point(0, 0);
|
||||
panel3.Margin = new System.Windows.Forms.Padding(2);
|
||||
panel3.Name = "panel3";
|
||||
panel3.Size = new System.Drawing.Size(18, 397);
|
||||
panel3.TabIndex = 4;
|
||||
//
|
||||
// UserPage
|
||||
//
|
||||
AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
|
||||
AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
BackColor = System.Drawing.Color.FromArgb(235, 241, 243);
|
||||
Controls.Add(panel2);
|
||||
Margin = new System.Windows.Forms.Padding(2);
|
||||
Name = "UserPage";
|
||||
Size = new System.Drawing.Size(816, 397);
|
||||
panel2.ResumeLayout(false);
|
||||
panel5.ResumeLayout(false);
|
||||
panel1.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)dataGridView).EndInit();
|
||||
panel6.ResumeLayout(false);
|
||||
panel7.ResumeLayout(false);
|
||||
ResumeLayout(false);
|
||||
}
|
||||
|
||||
#endregion
|
||||
private System.Windows.Forms.Panel panel2;
|
||||
private System.Windows.Forms.Panel panel4;
|
||||
private System.Windows.Forms.Panel panel3;
|
||||
private System.Windows.Forms.Panel panel5;
|
||||
private System.Windows.Forms.Panel panel7;
|
||||
private Sunny.UI.UIPagination pagination;
|
||||
private Sunny.UI.UISymbolButton btnQuery;
|
||||
private Sunny.UI.UITextBox txtKeywords;
|
||||
private System.Windows.Forms.Panel panel6;
|
||||
private System.Windows.Forms.Panel panel1;
|
||||
private Sunny.UI.UIDataGridView dataGridView;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn UserId;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn UserAccount;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn UserName;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn UserGender;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn UserTel;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn UserDepartment;
|
||||
private AntdUI.Button btnPwd;
|
||||
private AntdUI.Button btnDelete;
|
||||
private AntdUI.Button btnUpdate;
|
||||
private AntdUI.Button btnAdd;
|
||||
}
|
||||
}
|
253
DH.RBAC/Views/Sys/User/UserPage.cs
Normal file
253
DH.RBAC/Views/Sys/User/UserPage.cs
Normal file
@ -0,0 +1,253 @@
|
||||
using AntdUI;
|
||||
using DH.RBAC.Common;
|
||||
using DH.RBAC.Logic.Sys;
|
||||
using DH.RBAC.Model.Sys;
|
||||
using DH.RBAC.Page;
|
||||
using DH.RBAC.Utility.Other;
|
||||
using Sunny.UI;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace DH.RBAC.Page.Sys.User
|
||||
{
|
||||
|
||||
[PageCode("sys-user")]
|
||||
public partial class UserPage : MyPage
|
||||
{
|
||||
Window window;
|
||||
private SysUserLogic userLogic;
|
||||
private SysUserRoleRelationLogic userRoleRelationLogic;
|
||||
private SysUserLogOnLogic userLogOnLogic;
|
||||
public UserPage(Window _window)
|
||||
{
|
||||
window = _window;
|
||||
InitializeComponent();
|
||||
userLogic = new SysUserLogic();
|
||||
userRoleRelationLogic = new SysUserRoleRelationLogic();
|
||||
userLogOnLogic = new SysUserLogOnLogic();
|
||||
dataGridView.AutoGenerateColumns = false;
|
||||
Load += UserPage_Initialize;
|
||||
btnAdd.Click += btnAdd_Click;
|
||||
btnUpdate.Click += btnModify_Click;
|
||||
btnDelete.Click += btnDelete_Click;
|
||||
btnPwd.Click += uiSymbolButton1_Click;
|
||||
btnQuery.Click += btnQuery_Click;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 画面初始化
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void UserPage_Initialize(object sender, EventArgs e)
|
||||
{
|
||||
btnQuery_Click(sender, e);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询按钮事件处理
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
public void btnQuery_Click(object sender, EventArgs e)
|
||||
{
|
||||
int totalCount = 0;
|
||||
List<SysUser> list = userLogic.GetList(pagination.ActivePage, pagination.PageSize, txtKeywords.Text, ref totalCount);
|
||||
pagination.TotalCount = totalCount;
|
||||
dataGridView.DataSource = list;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 关键字Enter键处理
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void txtKeywords_KeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
if (e.KeyCode == Keys.Enter)
|
||||
btnQuery_Click(sender, null);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 新增用户按钮事件处理
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
|
||||
private void btnAdd_Click(object sender, EventArgs e)
|
||||
{
|
||||
AddUserForm form = new AddUserForm();
|
||||
form.ParentPage = this;
|
||||
form.Id = string.Empty;
|
||||
|
||||
FormHelper.ShowSubForm(form);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 修改用户按钮事件处理
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void btnModify_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (dataGridView.SelectedRows.Count == 0)
|
||||
{
|
||||
AntdUI.Message.warn(window, "请选择一行数据进行修改!", autoClose: 3);
|
||||
|
||||
return;
|
||||
}
|
||||
int index = dataGridView.SelectedIndex;
|
||||
if (index < 0)
|
||||
{
|
||||
AntdUI.Message.warn(window, "请选择一行数据进行修改!", autoClose: 3);
|
||||
return;
|
||||
}
|
||||
string id = dataGridView.Rows[index].Cells["UserId"].Value.ToString();
|
||||
AddUserForm form = new AddUserForm();
|
||||
form.ParentPage = this;
|
||||
form.Id = id;
|
||||
FormHelper.ShowSubForm(form);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除用户按钮事件处理
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void btnDelete_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (dataGridView.SelectedRows.Count == 0)
|
||||
{
|
||||
AntdUI.Message.warn(window, "请选择一行数据进行删除!", autoClose: 3);
|
||||
|
||||
return;
|
||||
}
|
||||
int index = dataGridView.SelectedIndex;
|
||||
if (index < 0)
|
||||
{
|
||||
AntdUI.Message.warn(window, "请选择一行数据进行删除!", autoClose: 3);
|
||||
|
||||
return;
|
||||
}
|
||||
string id = dataGridView.Rows[index].Cells["UserId"].Value.ToString();
|
||||
var result = AntdUI.Modal.open(window, "删除警告!", "您是否确定要删除该用户?", TType.Warn);
|
||||
if (result == DialogResult.OK)
|
||||
{
|
||||
|
||||
try
|
||||
{
|
||||
//多用户删除。
|
||||
List<string> userIdList = id.SplitToList();
|
||||
//过滤系统管理员
|
||||
if (userLogic.ContainsUser("admin", userIdList.ToArray()))
|
||||
{
|
||||
AntdUI.Message.warn(window, "系统管理员用户不能删除!", autoClose: 3);
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
if (userIdList.Contains(GlobalConfig.CurrentUser.Id))
|
||||
{
|
||||
AntdUI.Message.warn(window, "不能删除自己!", autoClose: 3);
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
//多用户删除。
|
||||
int row = userLogic.Delete(userIdList);
|
||||
userRoleRelationLogic.Delete(userIdList);
|
||||
userLogOnLogic.Delete(userIdList);
|
||||
|
||||
if (row == 0)
|
||||
{
|
||||
|
||||
AntdUI.Message.warn(window, "对不起,操作失败!", autoClose: 3);
|
||||
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
//重新查询
|
||||
btnQuery_Click(null, null);
|
||||
}
|
||||
catch
|
||||
{
|
||||
AntdUI.Message.warn(window, "网络或服务器异常,请稍后再试!", autoClose: 3);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 页码发生改变
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="pagingSource"></param>
|
||||
/// <param name="pageIndex"></param>
|
||||
/// <param name="count"></param>
|
||||
private void pagination_PageChanged(object sender, object pagingSource, int pageIndex, int count)
|
||||
{
|
||||
btnQuery_Click(null, null);
|
||||
}
|
||||
|
||||
|
||||
private void uiSymbolButton1_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (dataGridView.SelectedRows.Count == 0)
|
||||
{
|
||||
AntdUI.Message.warn(window, "请选择一行数据进行重置密码!", autoClose: 3);
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
int index = dataGridView.SelectedIndex;
|
||||
if (index < 0)
|
||||
{
|
||||
AntdUI.Message.warn(window, "请选择一行数据进行重置密码!", autoClose: 3);
|
||||
return;
|
||||
}
|
||||
string id = dataGridView.Rows[index].Cells["UserId"].Value.ToString();
|
||||
string[] userIdList = new string[] { id };
|
||||
if (userLogic.ContainsUser("admin", new string[] { id }))
|
||||
{
|
||||
AntdUI.Message.warn(window, "不能重置系统管理员密码!", autoClose: 3);
|
||||
|
||||
return;
|
||||
}
|
||||
if (userIdList.Contains(GlobalConfig.CurrentUser.Id))
|
||||
{
|
||||
AntdUI.Message.warn(window, "不能重置自己密码,请从账号管理中修改密码!", autoClose: 3);
|
||||
|
||||
return;
|
||||
}
|
||||
//重置密码
|
||||
SysUserLogOn sysUserLogOn = userLogOnLogic.GetByAccount(id);
|
||||
sysUserLogOn.Password = "123456".MD5Encrypt().DESEncrypt(sysUserLogOn.SecretKey).MD5Encrypt();
|
||||
int row = userLogOnLogic.UpdatePassword(sysUserLogOn);
|
||||
if (row > 0)
|
||||
{
|
||||
AntdUI.Message.success(window, "该用户密码已重置为123456!", autoClose: 3);
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
AntdUI.Message.warn(window, "重置失败!", autoClose: 3);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
138
DH.RBAC/Views/Sys/User/UserPage.resx
Normal file
138
DH.RBAC/Views/Sys/User/UserPage.resx
Normal file
@ -0,0 +1,138 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="UserId.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="UserAccount.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="UserName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="UserGender.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="UserTel.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="UserDepartment.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
</root>
|
Reference in New Issue
Block a user