提交rbac
提交设置右键错位的bug
This commit is contained in:
553
DH.RBAC/Views/Sys/Permission/AddPermissionForm.Designer.cs
generated
Normal file
553
DH.RBAC/Views/Sys/Permission/AddPermissionForm.Designer.cs
generated
Normal file
@ -0,0 +1,553 @@
|
||||
namespace DH.RBAC.Page.Sys.Permission
|
||||
{
|
||||
partial class AddPermissionForm
|
||||
{
|
||||
/// <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(AddPermissionForm));
|
||||
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();
|
||||
uiComboTreeView1 = new Sunny.UI.UIComboTreeView();
|
||||
btnSelectIcon = new Sunny.UI.UISymbolButton();
|
||||
uiLabel9 = new Sunny.UI.UILabel();
|
||||
txtType = new Sunny.UI.UIComboBox();
|
||||
uiLabel14 = new Sunny.UI.UILabel();
|
||||
uiLabel13 = new Sunny.UI.UILabel();
|
||||
uiLabel11 = new Sunny.UI.UILabel();
|
||||
txtIcon = new Sunny.UI.UITextBox();
|
||||
uiLabel8 = new Sunny.UI.UILabel();
|
||||
uiLabel5 = new Sunny.UI.UILabel();
|
||||
txtSortCode = new Sunny.UI.UIIntegerUpDown();
|
||||
btnConfirm = new Sunny.UI.UIButton();
|
||||
uiLabel12 = new Sunny.UI.UILabel();
|
||||
txtRemark = new Sunny.UI.UITextBox();
|
||||
uiLabel7 = new Sunny.UI.UILabel();
|
||||
txtName = new Sunny.UI.UITextBox();
|
||||
uiLabel2 = new Sunny.UI.UILabel();
|
||||
uiLabel4 = new Sunny.UI.UILabel();
|
||||
txtEnCode = 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, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
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(795, 482);
|
||||
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(795, 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, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
lblTitle.Location = new System.Drawing.Point(0, 0);
|
||||
lblTitle.Name = "lblTitle";
|
||||
lblTitle.Size = new System.Drawing.Size(750, 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, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
btnClose.Location = new System.Drawing.Point(750, 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(uiComboTreeView1);
|
||||
panel1.Controls.Add(btnSelectIcon);
|
||||
panel1.Controls.Add(uiLabel9);
|
||||
panel1.Controls.Add(txtType);
|
||||
panel1.Controls.Add(uiLabel14);
|
||||
panel1.Controls.Add(uiLabel13);
|
||||
panel1.Controls.Add(uiLabel11);
|
||||
panel1.Controls.Add(txtIcon);
|
||||
panel1.Controls.Add(uiLabel8);
|
||||
panel1.Controls.Add(uiLabel5);
|
||||
panel1.Controls.Add(txtSortCode);
|
||||
panel1.Controls.Add(btnConfirm);
|
||||
panel1.Controls.Add(uiLabel12);
|
||||
panel1.Controls.Add(txtRemark);
|
||||
panel1.Controls.Add(uiLabel7);
|
||||
panel1.Controls.Add(txtName);
|
||||
panel1.Controls.Add(uiLabel2);
|
||||
panel1.Controls.Add(uiLabel4);
|
||||
panel1.Controls.Add(txtEnCode);
|
||||
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(795, 482);
|
||||
panel1.TabIndex = 6;
|
||||
//
|
||||
// uiComboTreeView1
|
||||
//
|
||||
uiComboTreeView1.CanSelectRootNode = true;
|
||||
uiComboTreeView1.DropDownStyle = Sunny.UI.UIDropDownStyle.DropDownList;
|
||||
uiComboTreeView1.FillColor = System.Drawing.Color.White;
|
||||
uiComboTreeView1.FillColor2 = System.Drawing.Color.White;
|
||||
uiComboTreeView1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
uiComboTreeView1.Location = new System.Drawing.Point(129, 138);
|
||||
uiComboTreeView1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
uiComboTreeView1.MinimumSize = new System.Drawing.Size(63, 0);
|
||||
uiComboTreeView1.Name = "uiComboTreeView1";
|
||||
uiComboTreeView1.Padding = new System.Windows.Forms.Padding(0, 0, 30, 2);
|
||||
uiComboTreeView1.RectColor = System.Drawing.Color.FromArgb(216, 219, 227);
|
||||
uiComboTreeView1.ShowLines = true;
|
||||
uiComboTreeView1.Size = new System.Drawing.Size(265, 36);
|
||||
|
||||
uiComboTreeView1.StyleCustomMode = true;
|
||||
uiComboTreeView1.TabIndex = 3;
|
||||
uiComboTreeView1.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// btnSelectIcon
|
||||
//
|
||||
btnSelectIcon.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right;
|
||||
btnSelectIcon.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
btnSelectIcon.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
btnSelectIcon.Location = new System.Drawing.Point(351, 211);
|
||||
btnSelectIcon.MinimumSize = new System.Drawing.Size(1, 1);
|
||||
btnSelectIcon.Name = "btnSelectIcon";
|
||||
btnSelectIcon.Size = new System.Drawing.Size(43, 43);
|
||||
btnSelectIcon.StyleCustomMode = true;
|
||||
btnSelectIcon.Symbol = 61442;
|
||||
btnSelectIcon.SymbolSize = 30;
|
||||
btnSelectIcon.TabIndex = 8;
|
||||
btnSelectIcon.TipsFont = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
btnSelectIcon.Click += btnSelectIcon_Click;
|
||||
//
|
||||
// uiLabel9
|
||||
//
|
||||
uiLabel9.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
uiLabel9.ForeColor = System.Drawing.Color.Red;
|
||||
uiLabel9.Location = new System.Drawing.Point(442, 142);
|
||||
uiLabel9.Name = "uiLabel9";
|
||||
uiLabel9.Size = new System.Drawing.Size(21, 29);
|
||||
uiLabel9.Style = Sunny.UI.UIStyle.Custom;
|
||||
uiLabel9.StyleCustomMode = true;
|
||||
uiLabel9.TabIndex = 60;
|
||||
uiLabel9.Text = "*";
|
||||
uiLabel9.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// txtType
|
||||
//
|
||||
txtType.DataSource = null;
|
||||
txtType.FillColor = System.Drawing.Color.White;
|
||||
txtType.FillColor2 = System.Drawing.Color.White;
|
||||
txtType.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
txtType.ItemHoverColor = System.Drawing.Color.FromArgb(155, 200, 255);
|
||||
txtType.ItemSelectBackColor = System.Drawing.Color.FromArgb(216, 219, 227);
|
||||
txtType.ItemSelectForeColor = System.Drawing.Color.White;
|
||||
txtType.Location = new System.Drawing.Point(518, 138);
|
||||
txtType.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
txtType.MinimumSize = new System.Drawing.Size(63, 0);
|
||||
txtType.Name = "txtType";
|
||||
txtType.Padding = new System.Windows.Forms.Padding(0, 0, 30, 2);
|
||||
txtType.RectColor = System.Drawing.Color.FromArgb(216, 219, 227);
|
||||
txtType.Size = new System.Drawing.Size(227, 36);
|
||||
|
||||
txtType.StyleCustomMode = true;
|
||||
txtType.TabIndex = 5;
|
||||
txtType.Text = "uiComboBox1";
|
||||
txtType.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// uiLabel14
|
||||
//
|
||||
uiLabel14.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
uiLabel14.ForeColor = System.Drawing.Color.Red;
|
||||
uiLabel14.Location = new System.Drawing.Point(53, 142);
|
||||
uiLabel14.Name = "uiLabel14";
|
||||
uiLabel14.Size = new System.Drawing.Size(21, 29);
|
||||
uiLabel14.Style = Sunny.UI.UIStyle.Custom;
|
||||
uiLabel14.StyleCustomMode = true;
|
||||
uiLabel14.TabIndex = 59;
|
||||
uiLabel14.Text = "*";
|
||||
uiLabel14.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// uiLabel13
|
||||
//
|
||||
uiLabel13.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
uiLabel13.ForeColor = System.Drawing.Color.Red;
|
||||
uiLabel13.Location = new System.Drawing.Point(451, 73);
|
||||
uiLabel13.Name = "uiLabel13";
|
||||
uiLabel13.Size = new System.Drawing.Size(21, 29);
|
||||
uiLabel13.Style = Sunny.UI.UIStyle.Custom;
|
||||
uiLabel13.StyleCustomMode = true;
|
||||
uiLabel13.TabIndex = 58;
|
||||
uiLabel13.Text = "*";
|
||||
uiLabel13.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// uiLabel11
|
||||
//
|
||||
uiLabel11.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
uiLabel11.ForeColor = System.Drawing.Color.Red;
|
||||
uiLabel11.Location = new System.Drawing.Point(53, 73);
|
||||
uiLabel11.Name = "uiLabel11";
|
||||
uiLabel11.Size = new System.Drawing.Size(21, 29);
|
||||
uiLabel11.Style = Sunny.UI.UIStyle.Custom;
|
||||
uiLabel11.StyleCustomMode = true;
|
||||
uiLabel11.TabIndex = 57;
|
||||
uiLabel11.Text = "*";
|
||||
uiLabel11.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// txtIcon
|
||||
//
|
||||
txtIcon.ButtonFillColor = System.Drawing.Color.White;
|
||||
txtIcon.ButtonFillHoverColor = System.Drawing.Color.FromArgb(235, 243, 255);
|
||||
txtIcon.ButtonFillPressColor = System.Drawing.Color.FromArgb(235, 243, 255);
|
||||
txtIcon.ButtonForeColor = System.Drawing.Color.FromArgb(96, 98, 102);
|
||||
txtIcon.ButtonForeHoverColor = System.Drawing.Color.FromArgb(80, 160, 255);
|
||||
txtIcon.ButtonForePressColor = System.Drawing.Color.FromArgb(74, 131, 229);
|
||||
txtIcon.ButtonRectColor = System.Drawing.Color.FromArgb(216, 219, 227);
|
||||
txtIcon.ButtonRectHoverColor = System.Drawing.Color.FromArgb(197, 222, 255);
|
||||
txtIcon.ButtonSymbol = 61761;
|
||||
txtIcon.Cursor = System.Windows.Forms.Cursors.IBeam;
|
||||
txtIcon.FillColor2 = System.Drawing.Color.White;
|
||||
txtIcon.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
txtIcon.Location = new System.Drawing.Point(129, 211);
|
||||
txtIcon.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
txtIcon.Maximum = 2147483647D;
|
||||
txtIcon.MaxLength = 20;
|
||||
txtIcon.Minimum = -2147483648D;
|
||||
txtIcon.MinimumSize = new System.Drawing.Size(1, 16);
|
||||
txtIcon.Name = "txtIcon";
|
||||
txtIcon.RectColor = System.Drawing.Color.FromArgb(216, 219, 227);
|
||||
txtIcon.Size = new System.Drawing.Size(215, 42);
|
||||
|
||||
txtIcon.StyleCustomMode = true;
|
||||
txtIcon.TabIndex = 7;
|
||||
txtIcon.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// uiLabel8
|
||||
//
|
||||
uiLabel8.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
uiLabel8.Location = new System.Drawing.Point(57, 218);
|
||||
uiLabel8.Name = "uiLabel8";
|
||||
uiLabel8.Size = new System.Drawing.Size(65, 29);
|
||||
uiLabel8.Style = Sunny.UI.UIStyle.Custom;
|
||||
uiLabel8.TabIndex = 54;
|
||||
uiLabel8.Text = "图标";
|
||||
uiLabel8.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// uiLabel5
|
||||
//
|
||||
uiLabel5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
uiLabel5.Location = new System.Drawing.Point(401, 142);
|
||||
uiLabel5.Name = "uiLabel5";
|
||||
uiLabel5.Size = new System.Drawing.Size(110, 29);
|
||||
uiLabel5.Style = Sunny.UI.UIStyle.Custom;
|
||||
uiLabel5.TabIndex = 50;
|
||||
uiLabel5.Text = "类型";
|
||||
uiLabel5.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// txtSortCode
|
||||
//
|
||||
txtSortCode.FillColor = System.Drawing.Color.White;
|
||||
txtSortCode.FillColor2 = System.Drawing.Color.White;
|
||||
txtSortCode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
txtSortCode.Location = new System.Drawing.Point(523, 214);
|
||||
txtSortCode.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
txtSortCode.MinimumSize = new System.Drawing.Size(100, 0);
|
||||
txtSortCode.Name = "txtSortCode";
|
||||
txtSortCode.RectColor = System.Drawing.Color.FromArgb(216, 219, 227);
|
||||
txtSortCode.Size = new System.Drawing.Size(222, 36);
|
||||
|
||||
txtSortCode.StyleCustomMode = true;
|
||||
txtSortCode.TabIndex = 9;
|
||||
txtSortCode.Text = "txtSortCode";
|
||||
txtSortCode.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, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
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(658, 423);
|
||||
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 = 11;
|
||||
btnConfirm.Text = "确定";
|
||||
btnConfirm.TipsFont = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
btnConfirm.Click += btnConfirm_Click;
|
||||
//
|
||||
// uiLabel12
|
||||
//
|
||||
uiLabel12.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
uiLabel12.Location = new System.Drawing.Point(410, 218);
|
||||
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;
|
||||
//
|
||||
// txtRemark
|
||||
//
|
||||
txtRemark.ButtonFillColor = System.Drawing.Color.White;
|
||||
txtRemark.ButtonFillHoverColor = System.Drawing.Color.FromArgb(235, 243, 255);
|
||||
txtRemark.ButtonFillPressColor = System.Drawing.Color.FromArgb(235, 243, 255);
|
||||
txtRemark.ButtonForeColor = System.Drawing.Color.FromArgb(96, 98, 102);
|
||||
txtRemark.ButtonForeHoverColor = System.Drawing.Color.FromArgb(80, 160, 255);
|
||||
txtRemark.ButtonForePressColor = System.Drawing.Color.FromArgb(74, 131, 229);
|
||||
txtRemark.ButtonRectColor = System.Drawing.Color.FromArgb(216, 219, 227);
|
||||
txtRemark.ButtonRectHoverColor = System.Drawing.Color.FromArgb(197, 222, 255);
|
||||
txtRemark.ButtonSymbol = 61761;
|
||||
txtRemark.Cursor = System.Windows.Forms.Cursors.IBeam;
|
||||
txtRemark.FillColor2 = System.Drawing.Color.White;
|
||||
txtRemark.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
txtRemark.Location = new System.Drawing.Point(129, 294);
|
||||
txtRemark.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
txtRemark.Maximum = 2147483647D;
|
||||
txtRemark.MaxLength = 128;
|
||||
txtRemark.Minimum = -2147483648D;
|
||||
txtRemark.MinimumSize = new System.Drawing.Size(1, 16);
|
||||
txtRemark.Multiline = true;
|
||||
txtRemark.Name = "txtRemark";
|
||||
txtRemark.RectColor = System.Drawing.Color.FromArgb(216, 219, 227);
|
||||
txtRemark.Size = new System.Drawing.Size(616, 90);
|
||||
|
||||
txtRemark.StyleCustomMode = true;
|
||||
txtRemark.TabIndex = 10;
|
||||
txtRemark.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
txtRemark.Watermark = "请输入内容 ";
|
||||
//
|
||||
// uiLabel7
|
||||
//
|
||||
uiLabel7.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
uiLabel7.Location = new System.Drawing.Point(12, 294);
|
||||
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;
|
||||
//
|
||||
// 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, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
txtName.Location = new System.Drawing.Point(523, 66);
|
||||
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(222, 42);
|
||||
|
||||
txtName.StyleCustomMode = true;
|
||||
txtName.TabIndex = 2;
|
||||
txtName.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// uiLabel2
|
||||
//
|
||||
uiLabel2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
uiLabel2.Location = new System.Drawing.Point(452, 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;
|
||||
//
|
||||
// uiLabel4
|
||||
//
|
||||
uiLabel4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
uiLabel4.Location = new System.Drawing.Point(56, 142);
|
||||
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;
|
||||
//
|
||||
// txtEnCode
|
||||
//
|
||||
txtEnCode.ButtonFillColor = System.Drawing.Color.White;
|
||||
txtEnCode.ButtonFillHoverColor = System.Drawing.Color.FromArgb(235, 243, 255);
|
||||
txtEnCode.ButtonFillPressColor = System.Drawing.Color.FromArgb(235, 243, 255);
|
||||
txtEnCode.ButtonForeColor = System.Drawing.Color.FromArgb(96, 98, 102);
|
||||
txtEnCode.ButtonForeHoverColor = System.Drawing.Color.FromArgb(80, 160, 255);
|
||||
txtEnCode.ButtonForePressColor = System.Drawing.Color.FromArgb(74, 131, 229);
|
||||
txtEnCode.ButtonRectColor = System.Drawing.Color.FromArgb(216, 219, 227);
|
||||
txtEnCode.ButtonRectHoverColor = System.Drawing.Color.FromArgb(197, 222, 255);
|
||||
txtEnCode.ButtonSymbol = 61761;
|
||||
txtEnCode.Cursor = System.Windows.Forms.Cursors.IBeam;
|
||||
txtEnCode.FillColor2 = System.Drawing.Color.White;
|
||||
txtEnCode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
txtEnCode.Location = new System.Drawing.Point(129, 66);
|
||||
txtEnCode.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
txtEnCode.Maximum = 2147483647D;
|
||||
txtEnCode.MaxLength = 20;
|
||||
txtEnCode.Minimum = -2147483648D;
|
||||
txtEnCode.MinimumSize = new System.Drawing.Size(1, 16);
|
||||
txtEnCode.Name = "txtEnCode";
|
||||
txtEnCode.RectColor = System.Drawing.Color.FromArgb(216, 219, 227);
|
||||
txtEnCode.Size = new System.Drawing.Size(265, 42);
|
||||
|
||||
txtEnCode.StyleCustomMode = true;
|
||||
txtEnCode.TabIndex = 1;
|
||||
txtEnCode.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// uiLabel1
|
||||
//
|
||||
uiLabel1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
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;
|
||||
//
|
||||
// AddPermissionForm
|
||||
//
|
||||
AllowShowTitle = false;
|
||||
AutoScaleDimensions = new System.Drawing.SizeF(12F, 27F);
|
||||
AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
ClientSize = new System.Drawing.Size(795, 482);
|
||||
Controls.Add(uiPanel1);
|
||||
Icon = (System.Drawing.Icon)resources.GetObject("$this.Icon");
|
||||
MaximizeBox = false;
|
||||
MinimizeBox = false;
|
||||
Name = "AddPermissionForm";
|
||||
Padding = new System.Windows.Forms.Padding(0);
|
||||
RectColor = System.Drawing.Color.FromArgb(248, 248, 248);
|
||||
ShowTitle = false;
|
||||
ShowTitleIcon = true;
|
||||
Style = Sunny.UI.UIStyle.Custom;
|
||||
Text = "新增用户";
|
||||
TitleColor = System.Drawing.Color.FromArgb(248, 248, 248);
|
||||
TitleForeColor = System.Drawing.Color.DimGray;
|
||||
TopMost = true;
|
||||
Load += AddPermissionForm_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 System.Windows.Forms.Panel panel1;
|
||||
private Sunny.UI.UITextBox txtRemark;
|
||||
private Sunny.UI.UILabel uiLabel7;
|
||||
private Sunny.UI.UITextBox txtName;
|
||||
private Sunny.UI.UILabel uiLabel2;
|
||||
private Sunny.UI.UITextBox txtEnCode;
|
||||
private Sunny.UI.UILabel uiLabel1;
|
||||
private Sunny.UI.UILabel uiLabel12;
|
||||
private Sunny.UI.UIButton btnConfirm;
|
||||
private Sunny.UI.UIIntegerUpDown txtSortCode;
|
||||
private Sunny.UI.UILabel uiLabel4;
|
||||
private Sunny.UI.UILabel uiLabel5;
|
||||
private Sunny.UI.UITextBox txtIcon;
|
||||
private Sunny.UI.UILabel uiLabel8;
|
||||
private Sunny.UI.UILabel uiLabel11;
|
||||
private Sunny.UI.UILabel uiLabel14;
|
||||
private Sunny.UI.UILabel uiLabel13;
|
||||
private Sunny.UI.UIComboBox txtType;
|
||||
private Sunny.UI.UILabel uiLabel9;
|
||||
private Sunny.UI.UISymbolButton btnSelectIcon;
|
||||
private Sunny.UI.UIComboTreeView uiComboTreeView1;
|
||||
private Sunny.UI.UISymbolLabel btnClose;
|
||||
}
|
||||
}
|
423
DH.RBAC/Views/Sys/Permission/AddPermissionForm.cs
Normal file
423
DH.RBAC/Views/Sys/Permission/AddPermissionForm.cs
Normal file
@ -0,0 +1,423 @@
|
||||
using DH.RBAC.Common;
|
||||
using DH.RBAC.Logic.Sys;
|
||||
using DH.RBAC.Model.Sys;
|
||||
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.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace DH.RBAC.Page.Sys.Permission
|
||||
{
|
||||
public partial class AddPermissionForm : UIForm
|
||||
{
|
||||
private SysPermissionLogic permissionLogic;
|
||||
|
||||
|
||||
public AddPermissionForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
permissionLogic = new SysPermissionLogic();
|
||||
}
|
||||
|
||||
#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 PermissionPage ParentPage { get; set; }
|
||||
public string Id { get; set; }
|
||||
|
||||
private int symbolIndex;
|
||||
|
||||
Dictionary<string, TreeNode> nodeDict = new Dictionary<string, TreeNode>();
|
||||
/// <summary>
|
||||
/// 画面加载,读取用户信息,显示在界面上
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void AddPermissionForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
txtType.Items.Add("请选择");
|
||||
txtType.Items.Add("主菜单");
|
||||
txtType.Items.Add("子菜单");
|
||||
txtType.Items.Add("按钮");
|
||||
txtType.SelectedIndex = 0;
|
||||
//获取部门下拉列表的值
|
||||
bool flag = GetPermissionCombox();
|
||||
if (!flag)
|
||||
{
|
||||
btnClose_Click(null, null);
|
||||
return;
|
||||
}
|
||||
if (StringHelper.IsNullOrEmpty(Id))
|
||||
{
|
||||
lblTitle.Text = "新增权限";
|
||||
txtEnCode.Enabled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
lblTitle.Text = "修改权限";
|
||||
txtEnCode.Enabled = false;
|
||||
}
|
||||
//获取部门下拉列表的值
|
||||
if (StringHelper.IsNullOrEmpty(Id))
|
||||
{
|
||||
return;
|
||||
}
|
||||
//获得用户信息
|
||||
SysPermission entity = permissionLogic.Get(Id);
|
||||
if (entity == null)
|
||||
{
|
||||
AntdUI.Message.warn(this, "权限信息不存在!", autoClose: 3);
|
||||
|
||||
btnClose_Click(null, null);
|
||||
return;
|
||||
}
|
||||
//给文本框赋值
|
||||
txtEnCode.Text = entity.EnCode;
|
||||
txtName.Text = entity.Name;
|
||||
uiComboTreeView1.SelectedNode = GetNode(entity.ParentId);
|
||||
txtType.SelectedIndex = entity.Type.Value == 2 ? 1 : entity.Type.Value == 0 ? 2 : 3;
|
||||
txtIcon.Text = entity.Icon;
|
||||
symbolIndex = entity.SymbolIndex;
|
||||
txtSortCode.Value = entity.SortCode.Value;
|
||||
txtRemark.Text = entity.Remark;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获得节点
|
||||
/// </summary>
|
||||
/// <param name="parentId"></param>
|
||||
/// <returns></returns>
|
||||
private TreeNode GetNode(string parentId)
|
||||
{
|
||||
if (nodeDict.ContainsKey(parentId))
|
||||
{
|
||||
return nodeDict[parentId];
|
||||
}
|
||||
return nodeDict.FirstOrDefault().Value;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获得权限下拉列表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private bool GetPermissionCombox()
|
||||
{
|
||||
|
||||
try
|
||||
{
|
||||
var data = permissionLogic.GetList();
|
||||
var treeList = new List<TreeSelect>();
|
||||
foreach (SysPermission item in data)
|
||||
{
|
||||
TreeSelect model = new TreeSelect();
|
||||
model.id = item.Id;
|
||||
model.text = item.Name;
|
||||
model.parentId = item.ParentId;
|
||||
treeList.Add(model);
|
||||
}
|
||||
BindData(uiComboTreeView1, treeList);
|
||||
return true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
AntdUI.Message.warn(this, "网络或服务器异常,请稍后重试!", autoClose: 3);
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 绑定TreeView数据
|
||||
/// </summary>
|
||||
/// <param name="treeView"></param>
|
||||
/// <param name="list"></param>
|
||||
private void BindData(UIComboTreeView treeView, List<TreeSelect> list)
|
||||
{
|
||||
bool first = true;
|
||||
List<TreeSelect> list2 = list.Where(it => it.parentId == "0").ToList();
|
||||
foreach (TreeSelect select in list2)
|
||||
{
|
||||
TreeNode rootNode = new TreeNode();
|
||||
rootNode.Name = select.id;
|
||||
rootNode.Tag = select.id;
|
||||
rootNode.Text = select.text;
|
||||
treeView.Nodes.Add(rootNode);
|
||||
nodeDict.Add(select.id, rootNode);
|
||||
if (first)
|
||||
{
|
||||
treeView.SelectedNode = rootNode;
|
||||
first = false;
|
||||
}
|
||||
BindChildAreas(rootNode, list);//调用添加子节点的方法
|
||||
}
|
||||
}
|
||||
|
||||
private void BindChildAreas(TreeNode fNode, List<TreeSelect> list)
|
||||
{
|
||||
string fAreaId = fNode.Name; //父id
|
||||
List<TreeSelect> list2 = list.Where(it => it.parentId == fAreaId).ToList();
|
||||
if (list2.IsNullOrEmpty()) //递归终止,区域不包含子区域时
|
||||
{
|
||||
return;
|
||||
}
|
||||
foreach (TreeSelect select in list2)
|
||||
{
|
||||
TreeNode node = new TreeNode();
|
||||
node.Name = select.id;
|
||||
node.Tag = select.id; ;
|
||||
node.Text = select.text;
|
||||
//添加子节点
|
||||
fNode.Nodes.Add(node);
|
||||
nodeDict.Add(select.id, node);
|
||||
BindChildAreas(node, list);
|
||||
}
|
||||
}
|
||||
|
||||
/// <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();
|
||||
if (!flag)
|
||||
{
|
||||
return;
|
||||
}
|
||||
SysPermission model = new SysPermission();
|
||||
model.Id = Id;
|
||||
model.ParentId = uiComboTreeView1.SelectedNode.Name;
|
||||
model.EnCode = txtEnCode.Text;
|
||||
model.Name = txtName.Text;
|
||||
model.Icon = txtIcon.Text;
|
||||
model.SymbolIndex = symbolIndex;
|
||||
model.Remark = txtRemark.Text;
|
||||
model.Type = Convert.ToInt32(GetPermissionType());
|
||||
model.SortCode = txtSortCode.Value;
|
||||
model.ModifyUserId = GlobalConfig.CurrentUser.Id;
|
||||
|
||||
SysPermissionLogic pLogic = new SysPermissionLogic();
|
||||
//当前类型是啥
|
||||
if (model.Type == 2)
|
||||
{
|
||||
model.ParentId = "0";
|
||||
}
|
||||
else if (model.Type == 0)
|
||||
{
|
||||
SysPermission permission = pLogic.Get(model.ParentId);
|
||||
if (permission.Type != 2)
|
||||
{
|
||||
AntdUI.Message.warn(this, "当前类型的父级必须为主菜单!", autoClose: 3);
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
SysPermission permission = pLogic.Get(model.ParentId);
|
||||
if (permission.Type != 0)
|
||||
{
|
||||
AntdUI.Message.warn(this, "当前类型的父级必须为子菜单!", autoClose: 3);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
int row = permissionLogic.AppUpdate(model, model.ModifyUserId);
|
||||
if (row == 0)
|
||||
{
|
||||
AntdUI.Message.warn(this, "对不起,操作失败!", autoClose: 3);
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
btnClose_Click(null, null);
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 数据校验
|
||||
/// </summary>
|
||||
/// <param name="checkPassword"></param>
|
||||
/// <returns></returns>
|
||||
private bool ChechEmpty()
|
||||
{
|
||||
if (StringHelper.IsNullOrEmpty(txtEnCode.Text))
|
||||
{
|
||||
AntdUI.Message.warn(this, "编码不能为空!", autoClose: 3);
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
if (StringHelper.IsNullOrEmpty(txtName.Text))
|
||||
{
|
||||
AntdUI.Message.warn(this, "名称不能为空!", autoClose: 3);
|
||||
|
||||
return false;
|
||||
}
|
||||
if (uiComboTreeView1.SelectedNode == null)
|
||||
{
|
||||
AntdUI.Message.warn(this, "父级不能为空!", autoClose: 3);
|
||||
|
||||
return false;
|
||||
}
|
||||
if (txtType.SelectedIndex == 0)
|
||||
{
|
||||
AntdUI.Message.warn(this, "类型不能为空!", autoClose: 3);
|
||||
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 执行新增操作
|
||||
/// </summary>
|
||||
private void DoAdd()
|
||||
{
|
||||
bool flag = ChechEmpty();
|
||||
if (!flag)
|
||||
return;
|
||||
SysPermission model = new SysPermission();
|
||||
model.ParentId = uiComboTreeView1.SelectedNode.Name;
|
||||
model.EnCode = txtEnCode.Text;
|
||||
model.Name = txtName.Text;
|
||||
model.Icon = txtIcon.Text;
|
||||
model.SymbolIndex = symbolIndex;
|
||||
model.Remark = txtRemark.Text;
|
||||
model.Type = Convert.ToInt32(GetPermissionType());
|
||||
model.SortCode = txtSortCode.Value;
|
||||
model.CreateUserId = GlobalConfig.CurrentUser.Id;
|
||||
|
||||
SysPermissionLogic pLogic = new SysPermissionLogic();
|
||||
//当前类型是啥
|
||||
if (model.Type == 2)
|
||||
{
|
||||
model.ParentId = "0";
|
||||
}
|
||||
else if (model.Type == 0)
|
||||
{
|
||||
SysPermission permission = pLogic.Get(model.ParentId);
|
||||
if (permission.Type != 2)
|
||||
{
|
||||
AntdUI.Message.warn(this, "当前类型的父级必须为主菜单!", autoClose: 3);
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
SysPermission permission = pLogic.Get(model.ParentId);
|
||||
if (permission.Type != 0)
|
||||
{
|
||||
AntdUI.Message.warn(this, "当前类型的父级必须为子菜单!", autoClose: 3);
|
||||
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
int row = permissionLogic.AppInsert(model, model.CreateUserId);
|
||||
if (row == 0)
|
||||
{
|
||||
AntdUI.Message.warn(this, "对不起,操作失败!", autoClose: 3);
|
||||
;
|
||||
return;
|
||||
}
|
||||
|
||||
btnClose_Click(null, null);
|
||||
|
||||
}
|
||||
|
||||
private string GetPermissionType()
|
||||
{
|
||||
if (txtType.SelectedIndex == 1)
|
||||
{
|
||||
return "2";
|
||||
}
|
||||
if (txtType.SelectedIndex == 2)
|
||||
{
|
||||
return "0";
|
||||
}
|
||||
if (txtType.SelectedIndex == 3)
|
||||
{
|
||||
return "1";
|
||||
}
|
||||
return "0";
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 设置图标
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void btnSelectIcon_Click(object sender, EventArgs e)
|
||||
{
|
||||
IconForm form = new IconForm();
|
||||
if (form.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
txtIcon.Text = form.IconName;
|
||||
symbolIndex = form.SymbolIndex;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
1161
DH.RBAC/Views/Sys/Permission/AddPermissionForm.resx
Normal file
1161
DH.RBAC/Views/Sys/Permission/AddPermissionForm.resx
Normal file
File diff suppressed because it is too large
Load Diff
216
DH.RBAC/Views/Sys/Permission/IconForm.Designer.cs
generated
Normal file
216
DH.RBAC/Views/Sys/Permission/IconForm.Designer.cs
generated
Normal file
@ -0,0 +1,216 @@
|
||||
namespace DH.RBAC.Page.Sys.Permission
|
||||
{
|
||||
partial class IconForm
|
||||
{
|
||||
/// <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()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(IconForm));
|
||||
this.uiPanel1 = new Sunny.UI.UIPanel();
|
||||
this.titlePanel = new System.Windows.Forms.Panel();
|
||||
this.lblTitle = new Sunny.UI.UILabel();
|
||||
this.btnClose = new Sunny.UI.UISymbolLabel();
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
|
||||
this.panel3 = new System.Windows.Forms.Panel();
|
||||
this.btnConfirm = new Sunny.UI.UIButton();
|
||||
this.backgroundWorker1 = new System.ComponentModel.BackgroundWorker();
|
||||
this.timer1 = new System.Windows.Forms.Timer(this.components);
|
||||
this.uiPanel1.SuspendLayout();
|
||||
this.titlePanel.SuspendLayout();
|
||||
this.panel1.SuspendLayout();
|
||||
this.panel3.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// uiPanel1
|
||||
//
|
||||
this.uiPanel1.Controls.Add(this.titlePanel);
|
||||
this.uiPanel1.Controls.Add(this.panel1);
|
||||
this.uiPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.uiPanel1.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(241)))), ((int)(((byte)(243)))));
|
||||
this.uiPanel1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
this.uiPanel1.Location = new System.Drawing.Point(0, 0);
|
||||
this.uiPanel1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
this.uiPanel1.MinimumSize = new System.Drawing.Size(1, 1);
|
||||
this.uiPanel1.Name = "uiPanel1";
|
||||
this.uiPanel1.RectColor = System.Drawing.Color.Silver;
|
||||
this.uiPanel1.Size = new System.Drawing.Size(910, 546);
|
||||
this.uiPanel1.Style = Sunny.UI.UIStyle.Custom;
|
||||
this.uiPanel1.StyleCustomMode = true;
|
||||
this.uiPanel1.TabIndex = 6;
|
||||
this.uiPanel1.Text = null;
|
||||
this.uiPanel1.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// titlePanel
|
||||
//
|
||||
this.titlePanel.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(216)))), ((int)(((byte)(219)))), ((int)(((byte)(227)))));
|
||||
this.titlePanel.Controls.Add(this.lblTitle);
|
||||
this.titlePanel.Controls.Add(this.btnClose);
|
||||
this.titlePanel.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.titlePanel.Location = new System.Drawing.Point(0, 0);
|
||||
this.titlePanel.Name = "titlePanel";
|
||||
this.titlePanel.Size = new System.Drawing.Size(910, 43);
|
||||
this.titlePanel.TabIndex = 7;
|
||||
this.titlePanel.MouseDown += new System.Windows.Forms.MouseEventHandler(this.titlePanel_MouseDown);
|
||||
this.titlePanel.MouseMove += new System.Windows.Forms.MouseEventHandler(this.titlePanel_MouseMove);
|
||||
//
|
||||
// lblTitle
|
||||
//
|
||||
this.lblTitle.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.lblTitle.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
this.lblTitle.Location = new System.Drawing.Point(0, 0);
|
||||
this.lblTitle.Name = "lblTitle";
|
||||
this.lblTitle.Size = new System.Drawing.Size(865, 43);
|
||||
this.lblTitle.Style = Sunny.UI.UIStyle.Custom;
|
||||
this.lblTitle.TabIndex = 1;
|
||||
this.lblTitle.Text = "图标选择";
|
||||
this.lblTitle.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
this.lblTitle.MouseDown += new System.Windows.Forms.MouseEventHandler(this.titlePanel_MouseDown);
|
||||
this.lblTitle.MouseMove += new System.Windows.Forms.MouseEventHandler(this.titlePanel_MouseMove);
|
||||
//
|
||||
// btnClose
|
||||
//
|
||||
this.btnClose.Dock = System.Windows.Forms.DockStyle.Right;
|
||||
this.btnClose.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
this.btnClose.Location = new System.Drawing.Point(865, 0);
|
||||
this.btnClose.MinimumSize = new System.Drawing.Size(1, 1);
|
||||
this.btnClose.Name = "btnClose";
|
||||
this.btnClose.Padding = new System.Windows.Forms.Padding(64, 0, 0, 0);
|
||||
this.btnClose.Size = new System.Drawing.Size(45, 43);
|
||||
this.btnClose.Style = Sunny.UI.UIStyle.Custom;
|
||||
this.btnClose.Symbol = 77;
|
||||
this.btnClose.SymbolSize = 60;
|
||||
this.btnClose.TabIndex = 0;
|
||||
this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
|
||||
this.btnClose.MouseEnter += new System.EventHandler(this.btnClose_MouseEnter);
|
||||
this.btnClose.MouseLeave += new System.EventHandler(this.btnClose_MouseLeave);
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
this.panel1.BackColor = System.Drawing.Color.White;
|
||||
this.panel1.Controls.Add(this.flowLayoutPanel1);
|
||||
this.panel1.Controls.Add(this.panel3);
|
||||
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.panel1.Location = new System.Drawing.Point(0, 0);
|
||||
this.panel1.Name = "panel1";
|
||||
this.panel1.Size = new System.Drawing.Size(910, 546);
|
||||
this.panel1.TabIndex = 6;
|
||||
//
|
||||
// flowLayoutPanel1
|
||||
//
|
||||
this.flowLayoutPanel1.AutoScroll = true;
|
||||
this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.flowLayoutPanel1.Location = new System.Drawing.Point(0, 0);
|
||||
this.flowLayoutPanel1.Name = "flowLayoutPanel1";
|
||||
this.flowLayoutPanel1.Size = new System.Drawing.Size(910, 475);
|
||||
this.flowLayoutPanel1.TabIndex = 17;
|
||||
//
|
||||
// panel3
|
||||
//
|
||||
this.panel3.Controls.Add(this.btnConfirm);
|
||||
this.panel3.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
this.panel3.Location = new System.Drawing.Point(0, 475);
|
||||
this.panel3.Name = "panel3";
|
||||
this.panel3.Size = new System.Drawing.Size(910, 71);
|
||||
this.panel3.TabIndex = 16;
|
||||
//
|
||||
// btnConfirm
|
||||
//
|
||||
this.btnConfirm.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnConfirm.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.btnConfirm.FillColor = System.Drawing.Color.White;
|
||||
this.btnConfirm.FillColor2 = System.Drawing.Color.White;
|
||||
this.btnConfirm.FillHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
|
||||
this.btnConfirm.FillPressColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
|
||||
this.btnConfirm.FillSelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
|
||||
this.btnConfirm.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
this.btnConfirm.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(96)))), ((int)(((byte)(98)))), ((int)(((byte)(102)))));
|
||||
this.btnConfirm.ForeHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
|
||||
this.btnConfirm.ForePressColor = System.Drawing.Color.FromArgb(((int)(((byte)(74)))), ((int)(((byte)(131)))), ((int)(((byte)(229)))));
|
||||
this.btnConfirm.ForeSelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(74)))), ((int)(((byte)(131)))), ((int)(((byte)(229)))));
|
||||
this.btnConfirm.Location = new System.Drawing.Point(763, 15);
|
||||
this.btnConfirm.MinimumSize = new System.Drawing.Size(1, 1);
|
||||
this.btnConfirm.Name = "btnConfirm";
|
||||
this.btnConfirm.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(216)))), ((int)(((byte)(219)))), ((int)(((byte)(227)))));
|
||||
this.btnConfirm.RectHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(197)))), ((int)(((byte)(222)))), ((int)(((byte)(255)))));
|
||||
this.btnConfirm.Size = new System.Drawing.Size(125, 44);
|
||||
|
||||
this.btnConfirm.StyleCustomMode = true;
|
||||
this.btnConfirm.TabIndex = 14;
|
||||
this.btnConfirm.Text = "确定";
|
||||
this.btnConfirm.Click += new System.EventHandler(this.btnConfirm_Click);
|
||||
//
|
||||
// backgroundWorker1
|
||||
//
|
||||
this.backgroundWorker1.DoWork += new System.ComponentModel.DoWorkEventHandler(this.backgroundWorker1_DoWork);
|
||||
//
|
||||
// timer1
|
||||
//
|
||||
this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
|
||||
//
|
||||
// IconForm
|
||||
//
|
||||
this.AllowShowTitle = false;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 27F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(910, 546);
|
||||
this.Controls.Add(this.uiPanel1);
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "IconForm";
|
||||
this.Padding = new System.Windows.Forms.Padding(0);
|
||||
this.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(248)))), ((int)(((byte)(248)))), ((int)(((byte)(248)))));
|
||||
this.ShowTitle = false;
|
||||
this.ShowTitleIcon = true;
|
||||
this.Style = Sunny.UI.UIStyle.Custom;
|
||||
this.Text = "新增用户";
|
||||
this.TitleColor = System.Drawing.Color.FromArgb(((int)(((byte)(248)))), ((int)(((byte)(248)))), ((int)(((byte)(248)))));
|
||||
this.TitleForeColor = System.Drawing.Color.DimGray;
|
||||
this.TopMost = true;
|
||||
this.Load += new System.EventHandler(this.IconForm_Load);
|
||||
this.uiPanel1.ResumeLayout(false);
|
||||
this.titlePanel.ResumeLayout(false);
|
||||
this.panel1.ResumeLayout(false);
|
||||
this.panel3.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
private Sunny.UI.UIPanel uiPanel1;
|
||||
private System.Windows.Forms.Panel titlePanel;
|
||||
private Sunny.UI.UILabel lblTitle;
|
||||
private System.Windows.Forms.Panel panel1;
|
||||
private Sunny.UI.UIButton btnConfirm;
|
||||
private Sunny.UI.UISymbolLabel btnClose;
|
||||
private System.Windows.Forms.Panel panel3;
|
||||
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
|
||||
private System.Windows.Forms.Timer timer1;
|
||||
protected System.ComponentModel.BackgroundWorker backgroundWorker1;
|
||||
}
|
||||
}
|
163
DH.RBAC/Views/Sys/Permission/IconForm.cs
Normal file
163
DH.RBAC/Views/Sys/Permission/IconForm.cs
Normal file
@ -0,0 +1,163 @@
|
||||
|
||||
using DH.RBAC.Common;
|
||||
using DH.RBAC.Utility.Other;
|
||||
using Sunny.UI;
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace DH.RBAC.Page.Sys.Permission
|
||||
{
|
||||
public partial class IconForm : UIForm
|
||||
{
|
||||
public IconForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
#region 标题栏
|
||||
private void btnClose_Click(object sender, EventArgs e)
|
||||
{
|
||||
FormHelper.subForm = 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
|
||||
|
||||
/// <summary>
|
||||
/// 画面加载,读取用户信息,显示在界面上
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void IconForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
backgroundWorker1.RunWorkerAsync();
|
||||
timer1.Start();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 确定按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void btnConfirm_Click(object sender, EventArgs e)
|
||||
{
|
||||
DialogResult = DialogResult.OK;
|
||||
}
|
||||
|
||||
|
||||
private readonly ConcurrentQueue<Label> FontAwesomeV4Labels = new ConcurrentQueue<Label>();
|
||||
|
||||
/// <summary>
|
||||
/// 后台加载Label
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e)
|
||||
{
|
||||
foreach (KeyValuePair<string, int> keyValue in IconDict.MyIconDict)
|
||||
{
|
||||
FontAwesomeV4Labels.Enqueue(CreateLabel(keyValue.Key, keyValue.Value));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 创建Label
|
||||
/// </summary>
|
||||
/// <param name="name"></param>
|
||||
/// <param name="icon"></param>
|
||||
/// <returns></returns>
|
||||
private Label CreateLabel(string name, int icon)
|
||||
{
|
||||
Label lbl = new Label
|
||||
{
|
||||
Name = name,
|
||||
AutoSize = false,
|
||||
Size = new Size(45, 45),
|
||||
ForeColor = UIColor.Blue,
|
||||
Image = FontImageHelper.CreateImage(icon, 40, UIFontColor.Primary),
|
||||
ImageAlign = ContentAlignment.MiddleCenter,
|
||||
TextAlign = ContentAlignment.MiddleLeft,
|
||||
Margin = new Padding(2),
|
||||
Tag = icon
|
||||
};
|
||||
lbl.MouseDown += lbl_MouseDown;
|
||||
return lbl;
|
||||
}
|
||||
|
||||
public string IconName { get; set; }
|
||||
public int SymbolIndex { get; set; }
|
||||
private Label lastLabel;
|
||||
|
||||
/// <summary>
|
||||
/// Label点击事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void lbl_MouseDown(object sender, EventArgs e)
|
||||
{
|
||||
if (sender is Label lbl)
|
||||
{
|
||||
IconName = lbl.Name;
|
||||
SymbolIndex = (int)lbl.Tag;
|
||||
if (lastLabel != null)
|
||||
{
|
||||
lastLabel.Image = FontImageHelper.CreateImage((int)lastLabel.Tag, 40, UIFontColor.Primary);
|
||||
}
|
||||
lastLabel = lbl;
|
||||
lastLabel.Image = FontImageHelper.CreateImage((int)lastLabel.Tag, 40, UIColor.Blue);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 定时器从队列中加载到界面上
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void timer1_Tick(object sender, EventArgs e)
|
||||
{
|
||||
timer1.Stop();
|
||||
while (!FontAwesomeV4Labels.IsEmpty)
|
||||
{
|
||||
if (FontAwesomeV4Labels.TryDequeue(out Label lbl))
|
||||
{
|
||||
flowLayoutPanel1.Controls.Add(lbl);
|
||||
}
|
||||
}
|
||||
timer1.Start();
|
||||
}
|
||||
}
|
||||
}
|
1167
DH.RBAC/Views/Sys/Permission/IconForm.resx
Normal file
1167
DH.RBAC/Views/Sys/Permission/IconForm.resx
Normal file
File diff suppressed because it is too large
Load Diff
462
DH.RBAC/Views/Sys/Permission/PermissionPage.Designer.cs
generated
Normal file
462
DH.RBAC/Views/Sys/Permission/PermissionPage.Designer.cs
generated
Normal file
@ -0,0 +1,462 @@
|
||||
namespace DH.RBAC.Page.Sys.Permission
|
||||
{
|
||||
partial class PermissionPage
|
||||
{
|
||||
/// <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 dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle20 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle21 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle22 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle15 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PermissionPage));
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle16 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle17 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle18 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle19 = 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();
|
||||
PermissionId = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
Encode = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
Symbols = new System.Windows.Forms.DataGridViewImageColumn();
|
||||
Icons = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
PermissionName = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
TypeName = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
SortCode = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
Remark = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
pagination = new Sunny.UI.UIPagination();
|
||||
panel6 = new System.Windows.Forms.Panel();
|
||||
btnDelete = new AntdUI.Button();
|
||||
btnUpdate = new AntdUI.Button();
|
||||
btnAdd = new AntdUI.Button();
|
||||
panel7 = new System.Windows.Forms.Panel();
|
||||
btnQuery = new Sunny.UI.UISymbolButton();
|
||||
txtKeywords = new Sunny.UI.UITextBox();
|
||||
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(923, 568);
|
||||
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(923, 568);
|
||||
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(887, 516);
|
||||
panel1.TabIndex = 12;
|
||||
//
|
||||
// dataGridView
|
||||
//
|
||||
dataGridView.AllowUserToAddRows = false;
|
||||
dataGridView.AllowUserToDeleteRows = false;
|
||||
dataGridView.AllowUserToResizeRows = false;
|
||||
dataGridViewCellStyle12.BackColor = System.Drawing.Color.White;
|
||||
dataGridView.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle12;
|
||||
dataGridView.BackgroundColor = System.Drawing.Color.White;
|
||||
dataGridView.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single;
|
||||
dataGridViewCellStyle13.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
|
||||
dataGridViewCellStyle13.BackColor = System.Drawing.Color.FromArgb(216, 219, 227);
|
||||
dataGridViewCellStyle13.Font = new System.Drawing.Font("微软雅黑", 12F);
|
||||
dataGridViewCellStyle13.ForeColor = System.Drawing.Color.FromArgb(96, 98, 102);
|
||||
dataGridViewCellStyle13.SelectionBackColor = System.Drawing.Color.FromArgb(216, 219, 227);
|
||||
dataGridViewCellStyle13.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
|
||||
dataGridViewCellStyle13.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
dataGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle13;
|
||||
dataGridView.ColumnHeadersHeight = 32;
|
||||
dataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
|
||||
dataGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { PermissionId, Encode, Symbols, Icons, PermissionName, TypeName, SortCode, Remark, Column1 });
|
||||
dataGridViewCellStyle20.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
|
||||
dataGridViewCellStyle20.BackColor = System.Drawing.SystemColors.Window;
|
||||
dataGridViewCellStyle20.Font = new System.Drawing.Font("微软雅黑", 12F);
|
||||
dataGridViewCellStyle20.ForeColor = System.Drawing.Color.FromArgb(48, 48, 48);
|
||||
dataGridViewCellStyle20.SelectionBackColor = System.Drawing.Color.FromArgb(155, 200, 255);
|
||||
dataGridViewCellStyle20.SelectionForeColor = System.Drawing.Color.FromArgb(48, 48, 48);
|
||||
dataGridViewCellStyle20.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
|
||||
dataGridView.DefaultCellStyle = dataGridViewCellStyle20;
|
||||
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);
|
||||
dataGridViewCellStyle21.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
|
||||
dataGridViewCellStyle21.BackColor = System.Drawing.Color.White;
|
||||
dataGridViewCellStyle21.Font = new System.Drawing.Font("微软雅黑", 12F);
|
||||
dataGridViewCellStyle21.ForeColor = System.Drawing.Color.FromArgb(48, 48, 48);
|
||||
dataGridViewCellStyle21.SelectionBackColor = System.Drawing.Color.FromArgb(216, 219, 227);
|
||||
dataGridViewCellStyle21.SelectionForeColor = System.Drawing.Color.White;
|
||||
dataGridViewCellStyle21.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
dataGridView.RowHeadersDefaultCellStyle = dataGridViewCellStyle21;
|
||||
dataGridView.RowHeadersVisible = false;
|
||||
dataGridView.RowHeadersWidth = 51;
|
||||
dataGridViewCellStyle22.BackColor = System.Drawing.Color.White;
|
||||
dataGridView.RowsDefaultCellStyle = dataGridViewCellStyle22;
|
||||
dataGridView.RowTemplate.Height = 29;
|
||||
dataGridView.SelectedIndex = -1;
|
||||
dataGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
|
||||
dataGridView.Size = new System.Drawing.Size(887, 490);
|
||||
dataGridView.StripeOddColor = System.Drawing.Color.White;
|
||||
dataGridView.StyleCustomMode = true;
|
||||
dataGridView.TabIndex = 12;
|
||||
//
|
||||
// PermissionId
|
||||
//
|
||||
PermissionId.DataPropertyName = "Id";
|
||||
PermissionId.HeaderText = "Id";
|
||||
PermissionId.MinimumWidth = 6;
|
||||
PermissionId.Name = "PermissionId";
|
||||
PermissionId.ReadOnly = true;
|
||||
PermissionId.Visible = false;
|
||||
PermissionId.Width = 125;
|
||||
//
|
||||
// Encode
|
||||
//
|
||||
Encode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
|
||||
Encode.DataPropertyName = "EnCode";
|
||||
dataGridViewCellStyle14.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
|
||||
dataGridViewCellStyle14.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
Encode.DefaultCellStyle = dataGridViewCellStyle14;
|
||||
Encode.HeaderText = "编码";
|
||||
Encode.MinimumWidth = 6;
|
||||
Encode.Name = "Encode";
|
||||
Encode.ReadOnly = true;
|
||||
Encode.Resizable = System.Windows.Forms.DataGridViewTriState.True;
|
||||
Encode.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
|
||||
//
|
||||
// Symbols
|
||||
//
|
||||
Symbols.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader;
|
||||
dataGridViewCellStyle15.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
|
||||
dataGridViewCellStyle15.NullValue = resources.GetObject("dataGridViewCellStyle15.NullValue");
|
||||
dataGridViewCellStyle15.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
Symbols.DefaultCellStyle = dataGridViewCellStyle15;
|
||||
Symbols.HeaderText = "图标";
|
||||
Symbols.MinimumWidth = 6;
|
||||
Symbols.Name = "Symbols";
|
||||
Symbols.ReadOnly = true;
|
||||
Symbols.Resizable = System.Windows.Forms.DataGridViewTriState.True;
|
||||
Symbols.Width = 47;
|
||||
//
|
||||
// Icons
|
||||
//
|
||||
Icons.DataPropertyName = "SymbolIndex";
|
||||
Icons.HeaderText = "IconHidden";
|
||||
Icons.MinimumWidth = 6;
|
||||
Icons.Name = "Icons";
|
||||
Icons.ReadOnly = true;
|
||||
Icons.Visible = false;
|
||||
Icons.Width = 125;
|
||||
//
|
||||
// PermissionName
|
||||
//
|
||||
PermissionName.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
|
||||
PermissionName.DataPropertyName = "Name";
|
||||
dataGridViewCellStyle16.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
|
||||
dataGridViewCellStyle16.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
PermissionName.DefaultCellStyle = dataGridViewCellStyle16;
|
||||
PermissionName.HeaderText = "名称";
|
||||
PermissionName.MinimumWidth = 6;
|
||||
PermissionName.Name = "PermissionName";
|
||||
PermissionName.ReadOnly = true;
|
||||
PermissionName.Resizable = System.Windows.Forms.DataGridViewTriState.True;
|
||||
PermissionName.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
|
||||
//
|
||||
// TypeName
|
||||
//
|
||||
TypeName.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
|
||||
TypeName.DataPropertyName = "TypeName";
|
||||
dataGridViewCellStyle17.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
|
||||
dataGridViewCellStyle17.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
TypeName.DefaultCellStyle = dataGridViewCellStyle17;
|
||||
TypeName.HeaderText = "类型";
|
||||
TypeName.MinimumWidth = 6;
|
||||
TypeName.Name = "TypeName";
|
||||
TypeName.ReadOnly = true;
|
||||
TypeName.Resizable = System.Windows.Forms.DataGridViewTriState.True;
|
||||
TypeName.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
|
||||
//
|
||||
// SortCode
|
||||
//
|
||||
SortCode.DataPropertyName = "SortCode";
|
||||
dataGridViewCellStyle18.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
|
||||
SortCode.DefaultCellStyle = dataGridViewCellStyle18;
|
||||
SortCode.HeaderText = "排序码";
|
||||
SortCode.MinimumWidth = 6;
|
||||
SortCode.Name = "SortCode";
|
||||
SortCode.ReadOnly = true;
|
||||
SortCode.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
|
||||
SortCode.Width = 125;
|
||||
//
|
||||
// Remark
|
||||
//
|
||||
Remark.DataPropertyName = "Remark";
|
||||
dataGridViewCellStyle19.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
|
||||
Remark.DefaultCellStyle = dataGridViewCellStyle19;
|
||||
Remark.HeaderText = "备注";
|
||||
Remark.MinimumWidth = 6;
|
||||
Remark.Name = "Remark";
|
||||
Remark.ReadOnly = true;
|
||||
Remark.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
|
||||
Remark.Width = 125;
|
||||
//
|
||||
// Column1
|
||||
//
|
||||
Column1.DataPropertyName = "StrDynamicPage";
|
||||
Column1.HeaderText = "动态页面";
|
||||
Column1.MinimumWidth = 6;
|
||||
Column1.Name = "Column1";
|
||||
Column1.ReadOnly = true;
|
||||
Column1.Resizable = System.Windows.Forms.DataGridViewTriState.True;
|
||||
Column1.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
|
||||
Column1.Width = 125;
|
||||
//
|
||||
// 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, 490);
|
||||
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(887, 26);
|
||||
pagination.StyleCustomMode = true;
|
||||
pagination.TabIndex = 11;
|
||||
pagination.Text = "uiPagination1";
|
||||
pagination.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
pagination.PageChanged += pagination_PageChanged;
|
||||
//
|
||||
// panel6
|
||||
//
|
||||
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(887, 52);
|
||||
panel6.TabIndex = 9;
|
||||
//
|
||||
// btnDelete
|
||||
//
|
||||
btnDelete.Location = new System.Drawing.Point(235, 8);
|
||||
btnDelete.Name = "btnDelete";
|
||||
btnDelete.Size = new System.Drawing.Size(98, 38);
|
||||
btnDelete.TabIndex = 14;
|
||||
btnDelete.Tag = "per-delete";
|
||||
btnDelete.Text = "删除权限";
|
||||
btnDelete.Visible = false;
|
||||
//
|
||||
// btnUpdate
|
||||
//
|
||||
btnUpdate.Location = new System.Drawing.Point(118, 8);
|
||||
btnUpdate.Name = "btnUpdate";
|
||||
btnUpdate.Size = new System.Drawing.Size(98, 38);
|
||||
btnUpdate.TabIndex = 13;
|
||||
btnUpdate.Tag = "per-edit";
|
||||
btnUpdate.Text = "修改权限";
|
||||
btnUpdate.Visible = false;
|
||||
//
|
||||
// btnAdd
|
||||
//
|
||||
btnAdd.Location = new System.Drawing.Point(5, 8);
|
||||
btnAdd.Name = "btnAdd";
|
||||
btnAdd.Size = new System.Drawing.Size(98, 38);
|
||||
btnAdd.TabIndex = 12;
|
||||
btnAdd.Tag = "per-add";
|
||||
btnAdd.Text = "新增权限";
|
||||
btnAdd.Visible = false;
|
||||
//
|
||||
// panel7
|
||||
//
|
||||
panel7.Controls.Add(btnQuery);
|
||||
panel7.Controls.Add(txtKeywords);
|
||||
panel7.Dock = System.Windows.Forms.DockStyle.Right;
|
||||
panel7.Location = new System.Drawing.Point(664, 0);
|
||||
panel7.Margin = new System.Windows.Forms.Padding(2);
|
||||
panel7.Name = "panel7";
|
||||
panel7.Size = new System.Drawing.Size(223, 52);
|
||||
panel7.TabIndex = 3;
|
||||
//
|
||||
// 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(196, 8);
|
||||
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, 39);
|
||||
btnQuery.StyleCustomMode = true;
|
||||
btnQuery.Symbol = 61442;
|
||||
btnQuery.SymbolSize = 30;
|
||||
btnQuery.TabIndex = 1;
|
||||
btnQuery.TipsFont = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
|
||||
//
|
||||
// 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(2, 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(192, 38);
|
||||
txtKeywords.StyleCustomMode = true;
|
||||
txtKeywords.TabIndex = 0;
|
||||
txtKeywords.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
txtKeywords.Watermark = "权限名称或编码";
|
||||
txtKeywords.KeyDown += txtKeywords_KeyDown;
|
||||
//
|
||||
// panel4
|
||||
//
|
||||
panel4.Dock = System.Windows.Forms.DockStyle.Right;
|
||||
panel4.Location = new System.Drawing.Point(905, 0);
|
||||
panel4.Margin = new System.Windows.Forms.Padding(2);
|
||||
panel4.Name = "panel4";
|
||||
panel4.Size = new System.Drawing.Size(18, 568);
|
||||
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, 568);
|
||||
panel3.TabIndex = 4;
|
||||
//
|
||||
// PermissionPage
|
||||
//
|
||||
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 = "PermissionPage";
|
||||
Size = new System.Drawing.Size(923, 568);
|
||||
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 panel6;
|
||||
private System.Windows.Forms.Panel panel7;
|
||||
private Sunny.UI.UIPagination pagination;
|
||||
private Sunny.UI.UITextBox txtKeywords;
|
||||
private Sunny.UI.UISymbolButton btnQuery;
|
||||
private System.Windows.Forms.Panel panel1;
|
||||
private Sunny.UI.UIDataGridView dataGridView;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn PermissionId;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn Encode;
|
||||
private System.Windows.Forms.DataGridViewImageColumn Symbols;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn Icons;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn PermissionName;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn TypeName;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn SortCode;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn Remark;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn Column1;
|
||||
private AntdUI.Button btnDelete;
|
||||
private AntdUI.Button btnUpdate;
|
||||
private AntdUI.Button btnAdd;
|
||||
}
|
||||
}
|
203
DH.RBAC/Views/Sys/Permission/PermissionPage.cs
Normal file
203
DH.RBAC/Views/Sys/Permission/PermissionPage.cs
Normal file
@ -0,0 +1,203 @@
|
||||
|
||||
using DH.RBAC.Common;
|
||||
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;
|
||||
using DH.RBAC.Logic.Sys;
|
||||
using DH.RBAC.Model.Sys;
|
||||
using DH.RBAC.Utility.Other;
|
||||
using AntdUI;
|
||||
|
||||
|
||||
namespace DH.RBAC.Page.Sys.Permission
|
||||
{
|
||||
[PageCode("sys-permission")]
|
||||
public partial class PermissionPage : MyPage
|
||||
{
|
||||
Window window;
|
||||
private SysPermissionLogic permissionLogic;
|
||||
public PermissionPage(Window _window)
|
||||
{
|
||||
window= _window;
|
||||
InitializeComponent();
|
||||
permissionLogic = new SysPermissionLogic();
|
||||
dataGridView.AutoGenerateColumns = false;
|
||||
Load += UserPage_Initialize;
|
||||
btnAdd.Click += btnAdd_Click;
|
||||
btnDelete.Click += btnDelete_Click;
|
||||
btnUpdate.Click += btnModify_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<SysPermission> list = permissionLogic.GetList(pagination.ActivePage, pagination.PageSize, txtKeywords.Text, ref totalCount);
|
||||
pagination.TotalCount = totalCount;
|
||||
dataGridView.DataSource = list;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 图标渲染
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void dataGridView_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
|
||||
{
|
||||
if (dataGridView.Columns[e.ColumnIndex].Name == ("Symbols"))
|
||||
{
|
||||
int symbolIndex = Convert.ToInt32(dataGridView.Rows[e.RowIndex].Cells["Icons"].Value.ToString());
|
||||
e.Value = FontImageHelper.CreateImage(symbolIndex, 18, Color.Black);
|
||||
}
|
||||
}
|
||||
|
||||
/// <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)
|
||||
{
|
||||
AddPermissionForm form = new AddPermissionForm();
|
||||
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["PermissionId"].Value.ToString();
|
||||
AddPermissionForm form = new AddPermissionForm();
|
||||
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["PermissionId"].Value.ToString();
|
||||
|
||||
var result =AntdUI. Modal.open(window, "删除警告!", "您是否确定要删除该权限?", TType.Warn);
|
||||
if (result == DialogResult.OK)
|
||||
{
|
||||
try
|
||||
{
|
||||
long count = permissionLogic.GetChildCount(id);
|
||||
if (count > 0)
|
||||
{
|
||||
AntdUI.Message.warn(window, $"操作失败,请先删除该项的{count}个子级权限。", autoClose: 3);
|
||||
|
||||
|
||||
return;
|
||||
|
||||
}
|
||||
int row = permissionLogic.Delete(id.SplitToList().ToArray());
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
157
DH.RBAC/Views/Sys/Permission/PermissionPage.resx
Normal file
157
DH.RBAC/Views/Sys/Permission/PermissionPage.resx
Normal file
@ -0,0 +1,157 @@
|
||||
<?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="PermissionId.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="Encode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="Symbols.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="dataGridViewCellStyle15.NullValue" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAS
|
||||
cQAAEnEB89x6jgAAALVJREFUOE+lkrENwjAQRTObp/ASSU3qpAot2QEoSRkW8AzAABAQ0Lg99C3ZCrnY
|
||||
saF40un737vGGRFl/8CCVNygtaYUmEApRUKIKND1CnbbPb2e71nwFhQUeUF9f6Tu0LFlZHhDJyhAGcWm
|
||||
WbtlzMgwRwnA+XShdtMaMNs8WnAfHlSuSgPmJIFdxmUwliwKUKyr+uvqOAsKpJTm2u06uGULMryh4xVM
|
||||
P4yPWcH0qy7BBL/CglQ+6LISoJ37amgAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="Icons.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="PermissionName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="TypeName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="SortCode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="Remark.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="Column1.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