提交rbac

提交设置右键错位的bug
This commit is contained in:
2025-04-08 15:15:02 +08:00
parent ab38ee029a
commit 9f7c6206ca
139 changed files with 27868 additions and 117 deletions

146
DH.RBAC/Views/Sys/BaseSubForm.Designer.cs generated Normal file
View File

@ -0,0 +1,146 @@
namespace DH.RBAC.Page.Sys
{
partial class BaseSubForm
{
/// <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(BaseSubForm));
this.uiPanel1 = new Sunny.UI.UIPanel();
this.panel1 = new System.Windows.Forms.Panel();
this.panel2 = new System.Windows.Forms.Panel();
this.uiLabel15 = new Sunny.UI.UILabel();
this.uiSymbolLabel1 = new Sunny.UI.UISymbolLabel();
this.uiPanel1.SuspendLayout();
this.panel2.SuspendLayout();
this.SuspendLayout();
//
// uiPanel1
//
this.uiPanel1.Controls.Add(this.panel1);
this.uiPanel1.Controls.Add(this.panel2);
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(686, 530);
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;
//
// panel1
//
this.panel1.BackColor = System.Drawing.Color.White;
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.Location = new System.Drawing.Point(0, 43);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(686, 487);
this.panel1.TabIndex = 8;
//
// panel2
//
this.panel2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(216)))), ((int)(((byte)(219)))), ((int)(((byte)(227)))));
this.panel2.Controls.Add(this.uiLabel15);
this.panel2.Controls.Add(this.uiSymbolLabel1);
this.panel2.Dock = System.Windows.Forms.DockStyle.Top;
this.panel2.Location = new System.Drawing.Point(0, 0);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(686, 43);
this.panel2.TabIndex = 7;
this.panel2.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel2_MouseDown);
this.panel2.MouseMove += new System.Windows.Forms.MouseEventHandler(this.panel2_MouseMove);
//
// uiLabel15
//
this.uiLabel15.Dock = System.Windows.Forms.DockStyle.Fill;
this.uiLabel15.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.uiLabel15.Location = new System.Drawing.Point(0, 0);
this.uiLabel15.Name = "uiLabel15";
this.uiLabel15.Size = new System.Drawing.Size(641, 43);
this.uiLabel15.Style = Sunny.UI.UIStyle.Custom;
this.uiLabel15.TabIndex = 1;
this.uiLabel15.Text = "标题";
this.uiLabel15.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.uiLabel15.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel2_MouseDown);
this.uiLabel15.MouseMove += new System.Windows.Forms.MouseEventHandler(this.panel2_MouseMove);
//
// uiSymbolLabel1
//
this.uiSymbolLabel1.Dock = System.Windows.Forms.DockStyle.Right;
this.uiSymbolLabel1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.uiSymbolLabel1.Location = new System.Drawing.Point(641, 0);
this.uiSymbolLabel1.MinimumSize = new System.Drawing.Size(1, 1);
this.uiSymbolLabel1.Name = "uiSymbolLabel1";
this.uiSymbolLabel1.Padding = new System.Windows.Forms.Padding(64, 0, 0, 0);
this.uiSymbolLabel1.Size = new System.Drawing.Size(45, 43);
this.uiSymbolLabel1.Style = Sunny.UI.UIStyle.Custom;
this.uiSymbolLabel1.Symbol = 77;
this.uiSymbolLabel1.SymbolSize = 60;
this.uiSymbolLabel1.TabIndex = 0;
this.uiSymbolLabel1.Click += new System.EventHandler(this.uiSymbolLabel1_Click);
this.uiSymbolLabel1.MouseEnter += new System.EventHandler(this.uiSymbolLabel1_MouseEnter);
this.uiSymbolLabel1.MouseLeave += new System.EventHandler(this.uiSymbolLabel1_MouseLeave);
//
// BaseSubForm
//
this.AllowShowTitle = false;
this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 27F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(686, 530);
this.Controls.Add(this.uiPanel1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "BaseSubForm";
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.uiPanel1.ResumeLayout(false);
this.panel2.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private Sunny.UI.UIPanel uiPanel1;
private System.Windows.Forms.Panel panel2;
private Sunny.UI.UILabel uiLabel15;
private Sunny.UI.UISymbolLabel uiSymbolLabel1;
private System.Windows.Forms.Panel panel1;
}
}

View File

@ -0,0 +1,71 @@

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
{
public partial class BaseSubForm : UIForm
{
public BaseSubForm()
{
InitializeComponent();
}
public event EventHandler OnFormClose;
/// <summary>
/// 标题
/// </summary>
public string Title
{
get
{
return uiLabel15.Text;
}
set
{
uiLabel15.Text = value;
}
}
private void uiSymbolLabel1_Click(object sender, EventArgs e)
{
OnFormClose?.Invoke(this, EventArgs.Empty);
FormHelper.subForm = null;
this.Close();
}
private Point mPoint;
private void panel2_MouseDown(object sender, MouseEventArgs e)
{
mPoint = new Point(e.X, e.Y);
}
private void panel2_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 uiSymbolLabel1_MouseEnter(object sender, EventArgs e)
{
uiSymbolLabel1.BackColor = Color.FromArgb(231, 231, 231);
}
private void uiSymbolLabel1_MouseLeave(object sender, EventArgs e)
{
uiSymbolLabel1.BackColor = Color.Transparent;
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,706 @@
namespace DH.RBAC.Page.Sys.Organize
{
partial class AddOrganizeForm
{
/// <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(AddOrganizeForm));
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.uiLabel14 = new Sunny.UI.UILabel();
this.uiLabel13 = new Sunny.UI.UILabel();
this.uiLabel11 = new Sunny.UI.UILabel();
this.txtAddress = new Sunny.UI.UITextBox();
this.uiLabel10 = new Sunny.UI.UILabel();
this.txtFax = new Sunny.UI.UITextBox();
this.uiLabel9 = new Sunny.UI.UILabel();
this.txtEmail = new Sunny.UI.UITextBox();
this.uiLabel8 = new Sunny.UI.UILabel();
this.txtWeChat = new Sunny.UI.UITextBox();
this.uiLabel6 = new Sunny.UI.UILabel();
this.txtTelePhone = new Sunny.UI.UITextBox();
this.uiLabel5 = new Sunny.UI.UILabel();
this.txtManagerId = new Sunny.UI.UITextBox();
this.uiLabel3 = new Sunny.UI.UILabel();
this.comboType = new Sunny.UI.UIComboBox();
this.txtSortCode = new Sunny.UI.UIIntegerUpDown();
this.btnConfirm = new Sunny.UI.UIButton();
this.uiLabel12 = new Sunny.UI.UILabel();
this.txtRemark = new Sunny.UI.UITextBox();
this.uiLabel7 = new Sunny.UI.UILabel();
this.txtName = new Sunny.UI.UITextBox();
this.uiLabel2 = new Sunny.UI.UILabel();
this.uiLabel4 = new Sunny.UI.UILabel();
this.txtEnCode = new Sunny.UI.UITextBox();
this.uiLabel1 = new Sunny.UI.UILabel();
this.uiPanel1.SuspendLayout();
this.titlePanel.SuspendLayout();
this.panel1.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(686, 530);
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(686, 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(641, 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(641, 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.uiLabel14);
this.panel1.Controls.Add(this.uiLabel13);
this.panel1.Controls.Add(this.uiLabel11);
this.panel1.Controls.Add(this.txtAddress);
this.panel1.Controls.Add(this.uiLabel10);
this.panel1.Controls.Add(this.txtFax);
this.panel1.Controls.Add(this.uiLabel9);
this.panel1.Controls.Add(this.txtEmail);
this.panel1.Controls.Add(this.uiLabel8);
this.panel1.Controls.Add(this.txtWeChat);
this.panel1.Controls.Add(this.uiLabel6);
this.panel1.Controls.Add(this.txtTelePhone);
this.panel1.Controls.Add(this.uiLabel5);
this.panel1.Controls.Add(this.txtManagerId);
this.panel1.Controls.Add(this.uiLabel3);
this.panel1.Controls.Add(this.comboType);
this.panel1.Controls.Add(this.txtSortCode);
this.panel1.Controls.Add(this.btnConfirm);
this.panel1.Controls.Add(this.uiLabel12);
this.panel1.Controls.Add(this.txtRemark);
this.panel1.Controls.Add(this.uiLabel7);
this.panel1.Controls.Add(this.txtName);
this.panel1.Controls.Add(this.uiLabel2);
this.panel1.Controls.Add(this.uiLabel4);
this.panel1.Controls.Add(this.txtEnCode);
this.panel1.Controls.Add(this.uiLabel1);
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(686, 530);
this.panel1.TabIndex = 6;
//
// uiLabel14
//
this.uiLabel14.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.uiLabel14.ForeColor = System.Drawing.Color.Red;
this.uiLabel14.Location = new System.Drawing.Point(53, 135);
this.uiLabel14.Name = "uiLabel14";
this.uiLabel14.Size = new System.Drawing.Size(21, 29);
this.uiLabel14.Style = Sunny.UI.UIStyle.Custom;
this.uiLabel14.StyleCustomMode = true;
this.uiLabel14.TabIndex = 59;
this.uiLabel14.Text = "*";
this.uiLabel14.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// uiLabel13
//
this.uiLabel13.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.uiLabel13.ForeColor = System.Drawing.Color.Red;
this.uiLabel13.Location = new System.Drawing.Point(372, 73);
this.uiLabel13.Name = "uiLabel13";
this.uiLabel13.Size = new System.Drawing.Size(21, 29);
this.uiLabel13.Style = Sunny.UI.UIStyle.Custom;
this.uiLabel13.StyleCustomMode = true;
this.uiLabel13.TabIndex = 58;
this.uiLabel13.Text = "*";
this.uiLabel13.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// uiLabel11
//
this.uiLabel11.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.uiLabel11.ForeColor = System.Drawing.Color.Red;
this.uiLabel11.Location = new System.Drawing.Point(53, 73);
this.uiLabel11.Name = "uiLabel11";
this.uiLabel11.Size = new System.Drawing.Size(21, 29);
this.uiLabel11.Style = Sunny.UI.UIStyle.Custom;
this.uiLabel11.StyleCustomMode = true;
this.uiLabel11.TabIndex = 57;
this.uiLabel11.Text = "*";
this.uiLabel11.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// txtAddress
//
this.txtAddress.ButtonFillColor = System.Drawing.Color.White;
this.txtAddress.ButtonFillHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
this.txtAddress.ButtonFillPressColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
this.txtAddress.ButtonForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(96)))), ((int)(((byte)(98)))), ((int)(((byte)(102)))));
this.txtAddress.ButtonForeHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
this.txtAddress.ButtonForePressColor = System.Drawing.Color.FromArgb(((int)(((byte)(74)))), ((int)(((byte)(131)))), ((int)(((byte)(229)))));
this.txtAddress.ButtonRectColor = System.Drawing.Color.FromArgb(((int)(((byte)(216)))), ((int)(((byte)(219)))), ((int)(((byte)(227)))));
this.txtAddress.ButtonRectHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(197)))), ((int)(((byte)(222)))), ((int)(((byte)(255)))));
this.txtAddress.ButtonSymbol = 61761;
this.txtAddress.Cursor = System.Windows.Forms.Cursors.IBeam;
this.txtAddress.FillColor2 = System.Drawing.Color.White;
this.txtAddress.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.txtAddress.Location = new System.Drawing.Point(129, 302);
this.txtAddress.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.txtAddress.Maximum = 2147483647D;
this.txtAddress.MaxLength = 20;
this.txtAddress.Minimum = -2147483648D;
this.txtAddress.MinimumSize = new System.Drawing.Size(1, 16);
this.txtAddress.Name = "txtAddress";
this.txtAddress.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(216)))), ((int)(((byte)(219)))), ((int)(((byte)(227)))));
this.txtAddress.Size = new System.Drawing.Size(188, 42);
this.txtAddress.StyleCustomMode = true;
this.txtAddress.TabIndex = 9;
this.txtAddress.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
//
// uiLabel10
//
this.uiLabel10.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.uiLabel10.Location = new System.Drawing.Point(57, 309);
this.uiLabel10.Name = "uiLabel10";
this.uiLabel10.Size = new System.Drawing.Size(65, 29);
this.uiLabel10.Style = Sunny.UI.UIStyle.Custom;
this.uiLabel10.TabIndex = 56;
this.uiLabel10.Text = "地址";
this.uiLabel10.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// txtFax
//
this.txtFax.ButtonFillColor = System.Drawing.Color.White;
this.txtFax.ButtonFillHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
this.txtFax.ButtonFillPressColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
this.txtFax.ButtonForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(96)))), ((int)(((byte)(98)))), ((int)(((byte)(102)))));
this.txtFax.ButtonForeHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
this.txtFax.ButtonForePressColor = System.Drawing.Color.FromArgb(((int)(((byte)(74)))), ((int)(((byte)(131)))), ((int)(((byte)(229)))));
this.txtFax.ButtonRectColor = System.Drawing.Color.FromArgb(((int)(((byte)(216)))), ((int)(((byte)(219)))), ((int)(((byte)(227)))));
this.txtFax.ButtonRectHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(197)))), ((int)(((byte)(222)))), ((int)(((byte)(255)))));
this.txtFax.ButtonSymbol = 61761;
this.txtFax.Cursor = System.Windows.Forms.Cursors.IBeam;
this.txtFax.FillColor2 = System.Drawing.Color.White;
this.txtFax.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.txtFax.Location = new System.Drawing.Point(444, 239);
this.txtFax.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.txtFax.Maximum = 2147483647D;
this.txtFax.MaxLength = 20;
this.txtFax.Minimum = -2147483648D;
this.txtFax.MinimumSize = new System.Drawing.Size(1, 16);
this.txtFax.Name = "txtFax";
this.txtFax.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(216)))), ((int)(((byte)(219)))), ((int)(((byte)(227)))));
this.txtFax.Size = new System.Drawing.Size(188, 42);
this.txtFax.StyleCustomMode = true;
this.txtFax.TabIndex = 8;
this.txtFax.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
//
// uiLabel9
//
this.uiLabel9.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.uiLabel9.Location = new System.Drawing.Point(372, 246);
this.uiLabel9.Name = "uiLabel9";
this.uiLabel9.Size = new System.Drawing.Size(65, 29);
this.uiLabel9.Style = Sunny.UI.UIStyle.Custom;
this.uiLabel9.TabIndex = 56;
this.uiLabel9.Text = "传真";
this.uiLabel9.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// txtEmail
//
this.txtEmail.ButtonFillColor = System.Drawing.Color.White;
this.txtEmail.ButtonFillHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
this.txtEmail.ButtonFillPressColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
this.txtEmail.ButtonForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(96)))), ((int)(((byte)(98)))), ((int)(((byte)(102)))));
this.txtEmail.ButtonForeHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
this.txtEmail.ButtonForePressColor = System.Drawing.Color.FromArgb(((int)(((byte)(74)))), ((int)(((byte)(131)))), ((int)(((byte)(229)))));
this.txtEmail.ButtonRectColor = System.Drawing.Color.FromArgb(((int)(((byte)(216)))), ((int)(((byte)(219)))), ((int)(((byte)(227)))));
this.txtEmail.ButtonRectHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(197)))), ((int)(((byte)(222)))), ((int)(((byte)(255)))));
this.txtEmail.ButtonSymbol = 61761;
this.txtEmail.Cursor = System.Windows.Forms.Cursors.IBeam;
this.txtEmail.FillColor2 = System.Drawing.Color.White;
this.txtEmail.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.txtEmail.Location = new System.Drawing.Point(129, 245);
this.txtEmail.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.txtEmail.Maximum = 2147483647D;
this.txtEmail.MaxLength = 20;
this.txtEmail.Minimum = -2147483648D;
this.txtEmail.MinimumSize = new System.Drawing.Size(1, 16);
this.txtEmail.Name = "txtEmail";
this.txtEmail.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(216)))), ((int)(((byte)(219)))), ((int)(((byte)(227)))));
this.txtEmail.Size = new System.Drawing.Size(188, 42);
this.txtEmail.StyleCustomMode = true;
this.txtEmail.TabIndex = 7;
this.txtEmail.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
//
// uiLabel8
//
this.uiLabel8.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.uiLabel8.Location = new System.Drawing.Point(57, 252);
this.uiLabel8.Name = "uiLabel8";
this.uiLabel8.Size = new System.Drawing.Size(65, 29);
this.uiLabel8.Style = Sunny.UI.UIStyle.Custom;
this.uiLabel8.TabIndex = 54;
this.uiLabel8.Text = "邮箱";
this.uiLabel8.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// txtWeChat
//
this.txtWeChat.ButtonFillColor = System.Drawing.Color.White;
this.txtWeChat.ButtonFillHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
this.txtWeChat.ButtonFillPressColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
this.txtWeChat.ButtonForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(96)))), ((int)(((byte)(98)))), ((int)(((byte)(102)))));
this.txtWeChat.ButtonForeHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
this.txtWeChat.ButtonForePressColor = System.Drawing.Color.FromArgb(((int)(((byte)(74)))), ((int)(((byte)(131)))), ((int)(((byte)(229)))));
this.txtWeChat.ButtonRectColor = System.Drawing.Color.FromArgb(((int)(((byte)(216)))), ((int)(((byte)(219)))), ((int)(((byte)(227)))));
this.txtWeChat.ButtonRectHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(197)))), ((int)(((byte)(222)))), ((int)(((byte)(255)))));
this.txtWeChat.ButtonSymbol = 61761;
this.txtWeChat.Cursor = System.Windows.Forms.Cursors.IBeam;
this.txtWeChat.FillColor2 = System.Drawing.Color.White;
this.txtWeChat.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.txtWeChat.Location = new System.Drawing.Point(444, 184);
this.txtWeChat.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.txtWeChat.Maximum = 2147483647D;
this.txtWeChat.MaxLength = 20;
this.txtWeChat.Minimum = -2147483648D;
this.txtWeChat.MinimumSize = new System.Drawing.Size(1, 16);
this.txtWeChat.Name = "txtWeChat";
this.txtWeChat.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(216)))), ((int)(((byte)(219)))), ((int)(((byte)(227)))));
this.txtWeChat.Size = new System.Drawing.Size(188, 42);
this.txtWeChat.StyleCustomMode = true;
this.txtWeChat.TabIndex = 6;
this.txtWeChat.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
//
// uiLabel6
//
this.uiLabel6.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.uiLabel6.Location = new System.Drawing.Point(372, 191);
this.uiLabel6.Name = "uiLabel6";
this.uiLabel6.Size = new System.Drawing.Size(65, 29);
this.uiLabel6.Style = Sunny.UI.UIStyle.Custom;
this.uiLabel6.TabIndex = 52;
this.uiLabel6.Text = "微信";
this.uiLabel6.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// txtTelePhone
//
this.txtTelePhone.ButtonFillColor = System.Drawing.Color.White;
this.txtTelePhone.ButtonFillHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
this.txtTelePhone.ButtonFillPressColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
this.txtTelePhone.ButtonForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(96)))), ((int)(((byte)(98)))), ((int)(((byte)(102)))));
this.txtTelePhone.ButtonForeHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
this.txtTelePhone.ButtonForePressColor = System.Drawing.Color.FromArgb(((int)(((byte)(74)))), ((int)(((byte)(131)))), ((int)(((byte)(229)))));
this.txtTelePhone.ButtonRectColor = System.Drawing.Color.FromArgb(((int)(((byte)(216)))), ((int)(((byte)(219)))), ((int)(((byte)(227)))));
this.txtTelePhone.ButtonRectHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(197)))), ((int)(((byte)(222)))), ((int)(((byte)(255)))));
this.txtTelePhone.ButtonSymbol = 61761;
this.txtTelePhone.Cursor = System.Windows.Forms.Cursors.IBeam;
this.txtTelePhone.FillColor2 = System.Drawing.Color.White;
this.txtTelePhone.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.txtTelePhone.Location = new System.Drawing.Point(129, 184);
this.txtTelePhone.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.txtTelePhone.Maximum = 2147483647D;
this.txtTelePhone.MaxLength = 20;
this.txtTelePhone.Minimum = -2147483648D;
this.txtTelePhone.MinimumSize = new System.Drawing.Size(1, 16);
this.txtTelePhone.Name = "txtTelePhone";
this.txtTelePhone.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(216)))), ((int)(((byte)(219)))), ((int)(((byte)(227)))));
this.txtTelePhone.Size = new System.Drawing.Size(188, 42);
this.txtTelePhone.StyleCustomMode = true;
this.txtTelePhone.TabIndex = 5;
this.txtTelePhone.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
//
// uiLabel5
//
this.uiLabel5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.uiLabel5.Location = new System.Drawing.Point(12, 191);
this.uiLabel5.Name = "uiLabel5";
this.uiLabel5.Size = new System.Drawing.Size(110, 29);
this.uiLabel5.Style = Sunny.UI.UIStyle.Custom;
this.uiLabel5.TabIndex = 50;
this.uiLabel5.Text = "联系电话";
this.uiLabel5.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// txtManagerId
//
this.txtManagerId.ButtonFillColor = System.Drawing.Color.White;
this.txtManagerId.ButtonFillHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
this.txtManagerId.ButtonFillPressColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
this.txtManagerId.ButtonForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(96)))), ((int)(((byte)(98)))), ((int)(((byte)(102)))));
this.txtManagerId.ButtonForeHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
this.txtManagerId.ButtonForePressColor = System.Drawing.Color.FromArgb(((int)(((byte)(74)))), ((int)(((byte)(131)))), ((int)(((byte)(229)))));
this.txtManagerId.ButtonRectColor = System.Drawing.Color.FromArgb(((int)(((byte)(216)))), ((int)(((byte)(219)))), ((int)(((byte)(227)))));
this.txtManagerId.ButtonRectHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(197)))), ((int)(((byte)(222)))), ((int)(((byte)(255)))));
this.txtManagerId.ButtonSymbol = 61761;
this.txtManagerId.Cursor = System.Windows.Forms.Cursors.IBeam;
this.txtManagerId.FillColor2 = System.Drawing.Color.White;
this.txtManagerId.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.txtManagerId.Location = new System.Drawing.Point(444, 124);
this.txtManagerId.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.txtManagerId.Maximum = 2147483647D;
this.txtManagerId.MaxLength = 20;
this.txtManagerId.Minimum = -2147483648D;
this.txtManagerId.MinimumSize = new System.Drawing.Size(1, 16);
this.txtManagerId.Name = "txtManagerId";
this.txtManagerId.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(216)))), ((int)(((byte)(219)))), ((int)(((byte)(227)))));
this.txtManagerId.Size = new System.Drawing.Size(188, 42);
this.txtManagerId.StyleCustomMode = true;
this.txtManagerId.TabIndex = 4;
this.txtManagerId.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
//
// uiLabel3
//
this.uiLabel3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.uiLabel3.Location = new System.Drawing.Point(372, 131);
this.uiLabel3.Name = "uiLabel3";
this.uiLabel3.Size = new System.Drawing.Size(65, 29);
this.uiLabel3.Style = Sunny.UI.UIStyle.Custom;
this.uiLabel3.TabIndex = 48;
this.uiLabel3.Text = "主管";
this.uiLabel3.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// comboType
//
this.comboType.DataSource = null;
this.comboType.FillColor = System.Drawing.Color.White;
this.comboType.FillColor2 = System.Drawing.Color.White;
this.comboType.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.comboType.ItemHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(155)))), ((int)(((byte)(200)))), ((int)(((byte)(255)))));
this.comboType.ItemSelectBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(216)))), ((int)(((byte)(219)))), ((int)(((byte)(227)))));
this.comboType.ItemSelectForeColor = System.Drawing.Color.White;
this.comboType.Location = new System.Drawing.Point(129, 128);
this.comboType.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.comboType.MinimumSize = new System.Drawing.Size(63, 0);
this.comboType.Name = "comboType";
this.comboType.Padding = new System.Windows.Forms.Padding(0, 0, 30, 2);
this.comboType.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(216)))), ((int)(((byte)(219)))), ((int)(((byte)(227)))));
this.comboType.Size = new System.Drawing.Size(188, 36);
this.comboType.StyleCustomMode = true;
this.comboType.TabIndex = 3;
this.comboType.Text = "uiComboBox1";
this.comboType.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
//
// txtSortCode
//
this.txtSortCode.FillColor = System.Drawing.Color.White;
this.txtSortCode.FillColor2 = System.Drawing.Color.White;
this.txtSortCode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.txtSortCode.Location = new System.Drawing.Point(444, 302);
this.txtSortCode.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.txtSortCode.MinimumSize = new System.Drawing.Size(100, 0);
this.txtSortCode.Name = "txtSortCode";
this.txtSortCode.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(216)))), ((int)(((byte)(219)))), ((int)(((byte)(227)))));
this.txtSortCode.Size = new System.Drawing.Size(188, 36);
this.txtSortCode.StyleCustomMode = true;
this.txtSortCode.TabIndex = 10;
this.txtSortCode.Text = "txtSortCode";
this.txtSortCode.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
//
// 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(549, 474);
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 = 12;
this.btnConfirm.Text = "确定";
this.btnConfirm.Click += new System.EventHandler(this.btnConfirm_Click);
//
// uiLabel12
//
this.uiLabel12.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.uiLabel12.Location = new System.Drawing.Point(330, 308);
this.uiLabel12.Name = "uiLabel12";
this.uiLabel12.Size = new System.Drawing.Size(107, 29);
this.uiLabel12.Style = Sunny.UI.UIStyle.Custom;
this.uiLabel12.TabIndex = 45;
this.uiLabel12.Text = "排序号";
this.uiLabel12.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// txtRemark
//
this.txtRemark.ButtonFillColor = System.Drawing.Color.White;
this.txtRemark.ButtonFillHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
this.txtRemark.ButtonFillPressColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
this.txtRemark.ButtonForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(96)))), ((int)(((byte)(98)))), ((int)(((byte)(102)))));
this.txtRemark.ButtonForeHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
this.txtRemark.ButtonForePressColor = System.Drawing.Color.FromArgb(((int)(((byte)(74)))), ((int)(((byte)(131)))), ((int)(((byte)(229)))));
this.txtRemark.ButtonRectColor = System.Drawing.Color.FromArgb(((int)(((byte)(216)))), ((int)(((byte)(219)))), ((int)(((byte)(227)))));
this.txtRemark.ButtonRectHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(197)))), ((int)(((byte)(222)))), ((int)(((byte)(255)))));
this.txtRemark.ButtonSymbol = 61761;
this.txtRemark.Cursor = System.Windows.Forms.Cursors.IBeam;
this.txtRemark.FillColor2 = System.Drawing.Color.White;
this.txtRemark.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.txtRemark.Location = new System.Drawing.Point(129, 373);
this.txtRemark.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.txtRemark.Maximum = 2147483647D;
this.txtRemark.MaxLength = 128;
this.txtRemark.Minimum = -2147483648D;
this.txtRemark.MinimumSize = new System.Drawing.Size(1, 16);
this.txtRemark.Multiline = true;
this.txtRemark.Name = "txtRemark";
this.txtRemark.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(216)))), ((int)(((byte)(219)))), ((int)(((byte)(227)))));
this.txtRemark.Size = new System.Drawing.Size(414, 90);
this.txtRemark.StyleCustomMode = true;
this.txtRemark.TabIndex = 11;
this.txtRemark.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
this.txtRemark.Watermark = "请输入内容 ";
//
// uiLabel7
//
this.uiLabel7.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.uiLabel7.Location = new System.Drawing.Point(12, 373);
this.uiLabel7.Name = "uiLabel7";
this.uiLabel7.Size = new System.Drawing.Size(110, 29);
this.uiLabel7.Style = Sunny.UI.UIStyle.Custom;
this.uiLabel7.TabIndex = 35;
this.uiLabel7.Text = "备注";
this.uiLabel7.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// txtName
//
this.txtName.ButtonFillColor = System.Drawing.Color.White;
this.txtName.ButtonFillHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
this.txtName.ButtonFillPressColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
this.txtName.ButtonForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(96)))), ((int)(((byte)(98)))), ((int)(((byte)(102)))));
this.txtName.ButtonForeHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
this.txtName.ButtonForePressColor = System.Drawing.Color.FromArgb(((int)(((byte)(74)))), ((int)(((byte)(131)))), ((int)(((byte)(229)))));
this.txtName.ButtonRectColor = System.Drawing.Color.FromArgb(((int)(((byte)(216)))), ((int)(((byte)(219)))), ((int)(((byte)(227)))));
this.txtName.ButtonRectHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(197)))), ((int)(((byte)(222)))), ((int)(((byte)(255)))));
this.txtName.ButtonSymbol = 61761;
this.txtName.Cursor = System.Windows.Forms.Cursors.IBeam;
this.txtName.FillColor2 = System.Drawing.Color.White;
this.txtName.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.txtName.Location = new System.Drawing.Point(444, 66);
this.txtName.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.txtName.Maximum = 2147483647D;
this.txtName.MaxLength = 20;
this.txtName.Minimum = -2147483648D;
this.txtName.MinimumSize = new System.Drawing.Size(1, 16);
this.txtName.Name = "txtName";
this.txtName.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(216)))), ((int)(((byte)(219)))), ((int)(((byte)(227)))));
this.txtName.Size = new System.Drawing.Size(188, 42);
this.txtName.StyleCustomMode = true;
this.txtName.TabIndex = 2;
this.txtName.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
//
// uiLabel2
//
this.uiLabel2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.uiLabel2.Location = new System.Drawing.Point(373, 73);
this.uiLabel2.Name = "uiLabel2";
this.uiLabel2.Size = new System.Drawing.Size(65, 29);
this.uiLabel2.Style = Sunny.UI.UIStyle.Custom;
this.uiLabel2.TabIndex = 23;
this.uiLabel2.Text = "名称";
this.uiLabel2.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// uiLabel4
//
this.uiLabel4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.uiLabel4.Location = new System.Drawing.Point(56, 131);
this.uiLabel4.Name = "uiLabel4";
this.uiLabel4.Size = new System.Drawing.Size(65, 29);
this.uiLabel4.Style = Sunny.UI.UIStyle.Custom;
this.uiLabel4.TabIndex = 25;
this.uiLabel4.Text = "类型";
this.uiLabel4.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// txtEnCode
//
this.txtEnCode.ButtonFillColor = System.Drawing.Color.White;
this.txtEnCode.ButtonFillHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
this.txtEnCode.ButtonFillPressColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
this.txtEnCode.ButtonForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(96)))), ((int)(((byte)(98)))), ((int)(((byte)(102)))));
this.txtEnCode.ButtonForeHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
this.txtEnCode.ButtonForePressColor = System.Drawing.Color.FromArgb(((int)(((byte)(74)))), ((int)(((byte)(131)))), ((int)(((byte)(229)))));
this.txtEnCode.ButtonRectColor = System.Drawing.Color.FromArgb(((int)(((byte)(216)))), ((int)(((byte)(219)))), ((int)(((byte)(227)))));
this.txtEnCode.ButtonRectHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(197)))), ((int)(((byte)(222)))), ((int)(((byte)(255)))));
this.txtEnCode.ButtonSymbol = 61761;
this.txtEnCode.Cursor = System.Windows.Forms.Cursors.IBeam;
this.txtEnCode.FillColor2 = System.Drawing.Color.White;
this.txtEnCode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.txtEnCode.Location = new System.Drawing.Point(129, 66);
this.txtEnCode.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.txtEnCode.Maximum = 2147483647D;
this.txtEnCode.MaxLength = 20;
this.txtEnCode.Minimum = -2147483648D;
this.txtEnCode.MinimumSize = new System.Drawing.Size(1, 16);
this.txtEnCode.Name = "txtEnCode";
this.txtEnCode.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(216)))), ((int)(((byte)(219)))), ((int)(((byte)(227)))));
this.txtEnCode.Size = new System.Drawing.Size(188, 42);
this.txtEnCode.StyleCustomMode = true;
this.txtEnCode.TabIndex = 1;
this.txtEnCode.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
//
// uiLabel1
//
this.uiLabel1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.uiLabel1.Location = new System.Drawing.Point(57, 73);
this.uiLabel1.Name = "uiLabel1";
this.uiLabel1.Size = new System.Drawing.Size(65, 29);
this.uiLabel1.Style = Sunny.UI.UIStyle.Custom;
this.uiLabel1.TabIndex = 21;
this.uiLabel1.Text = "编码";
this.uiLabel1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// AddOrganizeForm
//
this.AllowShowTitle = false;
this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 27F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(686, 530);
this.Controls.Add(this.uiPanel1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "AddOrganizeForm";
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.AddOrganizeForm_Load);
this.uiPanel1.ResumeLayout(false);
this.titlePanel.ResumeLayout(false);
this.panel1.ResumeLayout(false);
this.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 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.UIComboBox comboType;
private Sunny.UI.UILabel uiLabel4;
private Sunny.UI.UITextBox txtManagerId;
private Sunny.UI.UILabel uiLabel3;
private Sunny.UI.UITextBox txtTelePhone;
private Sunny.UI.UILabel uiLabel5;
private Sunny.UI.UITextBox txtWeChat;
private Sunny.UI.UILabel uiLabel6;
private Sunny.UI.UITextBox txtEmail;
private Sunny.UI.UILabel uiLabel8;
private Sunny.UI.UITextBox txtFax;
private Sunny.UI.UILabel uiLabel9;
private Sunny.UI.UITextBox txtAddress;
private Sunny.UI.UILabel uiLabel10;
private Sunny.UI.UILabel uiLabel11;
private Sunny.UI.UILabel uiLabel14;
private Sunny.UI.UILabel uiLabel13;
}
}

View File

@ -0,0 +1,226 @@

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.Drawing;
using System.Windows.Forms;
namespace DH.RBAC.Page.Sys.Organize
{
public partial class AddOrganizeForm : UIForm
{
private SysOrganizeLogic organizeLogic;
public AddOrganizeForm()
{
InitializeComponent();
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 OrganizePage ParentPage { get; set; }
public string Id { get; set; }
/// <summary>
/// 画面加载,读取用户信息,显示在界面上
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void AddOrganizeForm_Load(object sender, EventArgs e)
{
comboType.Items.Add("公司");
comboType.Items.Add("部门");
comboType.Items.Add("小组");
comboType.SelectedIndex = 1;
if (StringHelper.IsNullOrEmpty(Id))
{
lblTitle.Text = "新增机构";
txtEnCode.Enabled = true;
}
else
{
lblTitle.Text = "修改机构";
txtEnCode.Enabled = false;
}
//获取部门下拉列表的值
if (StringHelper.IsNullOrEmpty(Id))
{
return;
}
SysOrganize entity = organizeLogic.Get(Id);
if (entity == null)
{
AntdUI.Message.warn(this, "网络或服务器异常,请稍后重试!", autoClose: 3);
btnClose_Click(null, null);
return;
}
//给文本框赋值
txtEnCode.Text = entity.EnCode;
txtName.Text = entity.FullName;
comboType.SelectedIndex = entity.Type.Value;
txtManagerId.Text = entity.ManagerId;
txtTelePhone.Text = entity.TelePhone;
txtWeChat.Text = entity.WeChat;
txtEmail.Text = entity.Email;
txtFax.Text = entity.Fax;
txtAddress.Text = entity.Address;
txtSortCode.Value = entity.SortCode.Value;
txtRemark.Text = entity.Remark;
}
/// <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;
}
SysOrganize model = new SysOrganize();
model.Id = Id;
model.EnCode = txtEnCode.Text;
model.FullName = txtName.Text;
model.Type = comboType.SelectedIndex;
model.ManagerId = txtManagerId.Text;
model.TelePhone = txtTelePhone.Text;
model.WeChat = txtWeChat.Text;
model.Email = txtEmail.Text;
model.Fax = txtFax.Text;
model.Address = txtAddress.Text;
model.SortCode = txtSortCode.Value;
model.Remark = txtRemark.Text;
model.ModifyUserId = GlobalConfig.CurrentUser.Id;
int row = organizeLogic.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 (StringHelper.IsNullOrEmpty(comboType.SelectedItem.ToString()))
{
AntdUI.Message.warn(this, "类型不能为空!", autoClose: 3);
return false;
}
return true;
}
/// <summary>
/// 执行新增操作
/// </summary>
private void DoAdd()
{
bool flag = ChechEmpty();
if (!flag)
return;
SysOrganize model = new SysOrganize();
model.EnCode = txtEnCode.Text;
model.FullName = txtName.Text;
model.Type = comboType.SelectedIndex;
model.ManagerId = txtManagerId.Text;
model.TelePhone = txtTelePhone.Text;
model.WeChat = txtWeChat.Text;
model.Email = txtEmail.Text;
model.Fax = txtFax.Text;
model.Address = txtAddress.Text;
model.SortCode = txtSortCode.Value;
model.Remark = txtRemark.Text;
model.CreateUserId = GlobalConfig.CurrentUser.Id;
int row = organizeLogic.AppInsert(model, model.CreateUserId);
if (row == 0)
{
AntdUI.Message.warn(this, "对不起,操作失败!", autoClose: 3);
return;
}
btnClose_Click(null, null);
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,424 @@
namespace DH.RBAC.Page.Sys.Organize
{
partial class OrganizePage
{
/// <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 dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = 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();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle20 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = 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.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle16 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle17 = new System.Windows.Forms.DataGridViewCellStyle();
pagination = new Sunny.UI.UIPagination();
panel5 = new System.Windows.Forms.Panel();
panel1 = new System.Windows.Forms.Panel();
dataGridView = new Sunny.UI.UIDataGridView();
OrganizeId = new System.Windows.Forms.DataGridViewTextBoxColumn();
OrganizeEncode = new System.Windows.Forms.DataGridViewTextBoxColumn();
OrganizeName = new System.Windows.Forms.DataGridViewTextBoxColumn();
OrganizeType = new System.Windows.Forms.DataGridViewTextBoxColumn();
OrganizeRemark = new System.Windows.Forms.DataGridViewTextBoxColumn();
RoleSortCode = new System.Windows.Forms.DataGridViewTextBoxColumn();
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 = new System.Windows.Forms.Panel();
panel5.SuspendLayout();
panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)dataGridView).BeginInit();
panel6.SuspendLayout();
panel7.SuspendLayout();
panel2.SuspendLayout();
SuspendLayout();
//
// 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, 492);
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;
//
// 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, 50);
panel1.Margin = new System.Windows.Forms.Padding(2);
panel1.Name = "panel1";
panel1.Size = new System.Drawing.Size(887, 518);
panel1.TabIndex = 12;
//
// dataGridView
//
dataGridView.AllowUserToAddRows = false;
dataGridView.AllowUserToDeleteRows = false;
dataGridView.AllowUserToResizeRows = false;
dataGridViewCellStyle11.BackColor = System.Drawing.Color.White;
dataGridView.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle11;
dataGridView.BackgroundColor = System.Drawing.Color.White;
dataGridView.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single;
dataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle12.BackColor = System.Drawing.Color.FromArgb(216, 219, 227);
dataGridViewCellStyle12.Font = new System.Drawing.Font("微软雅黑", 12F);
dataGridViewCellStyle12.ForeColor = System.Drawing.Color.FromArgb(96, 98, 102);
dataGridViewCellStyle12.SelectionBackColor = System.Drawing.Color.FromArgb(216, 219, 227);
dataGridViewCellStyle12.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
dataGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle12;
dataGridView.ColumnHeadersHeight = 32;
dataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
dataGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { OrganizeId, OrganizeEncode, OrganizeName, OrganizeType, OrganizeRemark, RoleSortCode });
dataGridViewCellStyle18.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle18.BackColor = System.Drawing.SystemColors.Window;
dataGridViewCellStyle18.Font = new System.Drawing.Font("微软雅黑", 12F);
dataGridViewCellStyle18.ForeColor = System.Drawing.Color.FromArgb(48, 48, 48);
dataGridViewCellStyle18.SelectionBackColor = System.Drawing.Color.FromArgb(155, 200, 255);
dataGridViewCellStyle18.SelectionForeColor = System.Drawing.Color.FromArgb(48, 48, 48);
dataGridViewCellStyle18.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
dataGridView.DefaultCellStyle = dataGridViewCellStyle18;
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);
dataGridViewCellStyle19.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle19.BackColor = System.Drawing.Color.White;
dataGridViewCellStyle19.Font = new System.Drawing.Font("微软雅黑", 12F);
dataGridViewCellStyle19.ForeColor = System.Drawing.Color.FromArgb(48, 48, 48);
dataGridViewCellStyle19.SelectionBackColor = System.Drawing.Color.FromArgb(216, 219, 227);
dataGridViewCellStyle19.SelectionForeColor = System.Drawing.Color.White;
dataGridViewCellStyle19.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
dataGridView.RowHeadersDefaultCellStyle = dataGridViewCellStyle19;
dataGridView.RowHeadersVisible = false;
dataGridView.RowHeadersWidth = 51;
dataGridViewCellStyle20.BackColor = System.Drawing.Color.White;
dataGridView.RowsDefaultCellStyle = dataGridViewCellStyle20;
dataGridView.RowTemplate.Height = 29;
dataGridView.SelectedIndex = -1;
dataGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
dataGridView.Size = new System.Drawing.Size(887, 492);
dataGridView.StripeOddColor = System.Drawing.Color.White;
dataGridView.StyleCustomMode = true;
dataGridView.TabIndex = 12;
//
// OrganizeId
//
OrganizeId.DataPropertyName = "Id";
OrganizeId.HeaderText = "Id";
OrganizeId.MinimumWidth = 6;
OrganizeId.Name = "OrganizeId";
OrganizeId.ReadOnly = true;
OrganizeId.Visible = false;
OrganizeId.Width = 125;
//
// OrganizeEncode
//
OrganizeEncode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
OrganizeEncode.DataPropertyName = "Encode";
dataGridViewCellStyle13.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle13.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
OrganizeEncode.DefaultCellStyle = dataGridViewCellStyle13;
OrganizeEncode.HeaderText = "编码";
OrganizeEncode.MinimumWidth = 6;
OrganizeEncode.Name = "OrganizeEncode";
OrganizeEncode.ReadOnly = true;
OrganizeEncode.Resizable = System.Windows.Forms.DataGridViewTriState.True;
OrganizeEncode.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
//
// OrganizeName
//
OrganizeName.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
OrganizeName.DataPropertyName = "FullName";
dataGridViewCellStyle14.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle14.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
OrganizeName.DefaultCellStyle = dataGridViewCellStyle14;
OrganizeName.HeaderText = "名称";
OrganizeName.MinimumWidth = 6;
OrganizeName.Name = "OrganizeName";
OrganizeName.ReadOnly = true;
OrganizeName.Resizable = System.Windows.Forms.DataGridViewTriState.True;
OrganizeName.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
//
// OrganizeType
//
OrganizeType.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
OrganizeType.DataPropertyName = "TypeStr";
dataGridViewCellStyle15.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle15.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
OrganizeType.DefaultCellStyle = dataGridViewCellStyle15;
OrganizeType.HeaderText = "类型";
OrganizeType.MinimumWidth = 6;
OrganizeType.Name = "OrganizeType";
OrganizeType.ReadOnly = true;
OrganizeType.Resizable = System.Windows.Forms.DataGridViewTriState.True;
OrganizeType.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
//
// OrganizeRemark
//
OrganizeRemark.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
OrganizeRemark.DataPropertyName = "Remark";
dataGridViewCellStyle16.Alignment = System.Windows.Forms.DataGridViewContentAlignment.BottomCenter;
dataGridViewCellStyle16.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
OrganizeRemark.DefaultCellStyle = dataGridViewCellStyle16;
OrganizeRemark.HeaderText = "备注";
OrganizeRemark.MinimumWidth = 6;
OrganizeRemark.Name = "OrganizeRemark";
OrganizeRemark.ReadOnly = true;
OrganizeRemark.Resizable = System.Windows.Forms.DataGridViewTriState.True;
OrganizeRemark.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
//
// RoleSortCode
//
RoleSortCode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
RoleSortCode.DataPropertyName = "SortCode";
dataGridViewCellStyle17.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle17.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
RoleSortCode.DefaultCellStyle = dataGridViewCellStyle17;
RoleSortCode.HeaderText = "排序码";
RoleSortCode.MinimumWidth = 6;
RoleSortCode.Name = "RoleSortCode";
RoleSortCode.ReadOnly = true;
RoleSortCode.Resizable = System.Windows.Forms.DataGridViewTriState.True;
RoleSortCode.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
//
// 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, 50);
panel6.TabIndex = 9;
//
// btnDelete
//
btnDelete.Location = new System.Drawing.Point(235, 7);
btnDelete.Name = "btnDelete";
btnDelete.Size = new System.Drawing.Size(98, 38);
btnDelete.TabIndex = 13;
btnDelete.Tag = "org-delete";
btnDelete.Text = "删除机构";
btnDelete.Visible = false;
//
// btnUpdate
//
btnUpdate.Location = new System.Drawing.Point(118, 7);
btnUpdate.Name = "btnUpdate";
btnUpdate.Size = new System.Drawing.Size(98, 38);
btnUpdate.TabIndex = 12;
btnUpdate.Tag = "org-edit";
btnUpdate.Text = "修改机构";
btnUpdate.Visible = false;
//
// btnAdd
//
btnAdd.Location = new System.Drawing.Point(5, 7);
btnAdd.Name = "btnAdd";
btnAdd.Size = new System.Drawing.Size(98, 38);
btnAdd.TabIndex = 11;
btnAdd.Tag = "org-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(644, 0);
panel7.Margin = new System.Windows.Forms.Padding(2);
panel7.Name = "panel7";
panel7.Size = new System.Drawing.Size(243, 50);
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(214, 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, 36);
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);
//
// 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(4, 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(206, 36);
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;
//
// 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 = 5;
//
// OrganizePage
//
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 = "OrganizePage";
Size = new System.Drawing.Size(923, 568);
panel5.ResumeLayout(false);
panel1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)dataGridView).EndInit();
panel6.ResumeLayout(false);
panel7.ResumeLayout(false);
panel2.ResumeLayout(false);
ResumeLayout(false);
}
#endregion
private Sunny.UI.UIPagination pagination;
private System.Windows.Forms.Panel panel5;
private System.Windows.Forms.Panel panel4;
private System.Windows.Forms.Panel panel3;
private System.Windows.Forms.Panel panel6;
private System.Windows.Forms.Panel panel7;
private Sunny.UI.UITextBox txtKeywords;
private System.Windows.Forms.Panel panel2;
private Sunny.UI.UISymbolButton btnQuery;
private System.Windows.Forms.Panel panel1;
private Sunny.UI.UIDataGridView dataGridView;
private System.Windows.Forms.DataGridViewTextBoxColumn OrganizeId;
private System.Windows.Forms.DataGridViewTextBoxColumn OrganizeEncode;
private System.Windows.Forms.DataGridViewTextBoxColumn OrganizeName;
private System.Windows.Forms.DataGridViewTextBoxColumn OrganizeType;
private System.Windows.Forms.DataGridViewTextBoxColumn OrganizeRemark;
private System.Windows.Forms.DataGridViewTextBoxColumn RoleSortCode;
private AntdUI.Button btnDelete;
private AntdUI.Button btnUpdate;
private AntdUI.Button btnAdd;
}
}

View File

@ -0,0 +1,187 @@

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.Organize
{
[PageCode("sys-organize")]
public partial class OrganizePage : MyPage
{
private SysOrganizeLogic organizeLogic;
Window window;
public OrganizePage(Window _window)
{
window= _window;
InitializeComponent();
organizeLogic = new SysOrganizeLogic();
dataGridView.AutoGenerateColumns = false;
Load += OrganizePage_Initialize;
btnQuery.Click += btnQuery_Click;
btnAdd.Click += btnAdd_Click;
btnDelete.Click += btnDelete_Click;
btnUpdate.Click += btnModify_Click;
}
/// <summary>
/// 界面初始化
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void OrganizePage_Initialize(object sender, EventArgs e)
{
btnQuery_Click(null, null);
}
/// <summary>
/// 查询按钮
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
public void btnQuery_Click(object sender, EventArgs e)
{
//调用服务器获得数据
int totalCount = 0;
List<SysOrganize> list = organizeLogic.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)
{
AddOrganizeForm form = new AddOrganizeForm();
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["OrganizeId"].Value.ToString();
AddOrganizeForm form = new AddOrganizeForm();
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["OrganizeId"].Value.ToString();
var result = AntdUI.Modal.open(window, "删除警告!", "您是否确定要删除该机构?", TType.Warn);
if (result == DialogResult.OK)
{
try
{
int row = 0;
int count = organizeLogic.GetChildCount(id);
if (count > 0)
{
AntdUI.Message.warn(window, $"操作失败,请先删除该项的{count}个子级机构。", autoClose: 3);
return;
}
row = organizeLogic.Delete(id);
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);
}
}
}

View 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="OrganizeId.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="OrganizeEncode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="OrganizeName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="OrganizeType.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="OrganizeRemark.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="RoleSortCode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>

View 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;
}
}

View 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;
}
}
}
}

File diff suppressed because it is too large Load Diff

View 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;
}
}

View 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();
}
}
}

File diff suppressed because it is too large Load Diff

View 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;
}
}

View 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);
}
}
}

View 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>

View File

@ -0,0 +1,427 @@
namespace DH.RBAC.Page.Sys.Role
{
partial class AddRoleForm
{
/// <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(AddRoleForm));
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.comboType = new Sunny.UI.UIComboBox();
this.txtSortCode = new Sunny.UI.UIIntegerUpDown();
this.btnConfirm = new Sunny.UI.UIButton();
this.uiLabel12 = new Sunny.UI.UILabel();
this.comboDept = new Sunny.UI.UIComboBox();
this.uiLabel11 = new Sunny.UI.UILabel();
this.txtRemark = new Sunny.UI.UITextBox();
this.uiLabel7 = new Sunny.UI.UILabel();
this.txtName = new Sunny.UI.UITextBox();
this.uiLabel2 = new Sunny.UI.UILabel();
this.uiLabel4 = new Sunny.UI.UILabel();
this.txtEnCode = new Sunny.UI.UITextBox();
this.uiLabel1 = new Sunny.UI.UILabel();
this.uiPanel1.SuspendLayout();
this.titlePanel.SuspendLayout();
this.panel1.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(686, 530);
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(686, 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(641, 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(641, 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.comboType);
this.panel1.Controls.Add(this.txtSortCode);
this.panel1.Controls.Add(this.btnConfirm);
this.panel1.Controls.Add(this.uiLabel12);
this.panel1.Controls.Add(this.comboDept);
this.panel1.Controls.Add(this.uiLabel11);
this.panel1.Controls.Add(this.txtRemark);
this.panel1.Controls.Add(this.uiLabel7);
this.panel1.Controls.Add(this.txtName);
this.panel1.Controls.Add(this.uiLabel2);
this.panel1.Controls.Add(this.uiLabel4);
this.panel1.Controls.Add(this.txtEnCode);
this.panel1.Controls.Add(this.uiLabel1);
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(686, 530);
this.panel1.TabIndex = 6;
//
// comboType
//
this.comboType.DataSource = null;
this.comboType.FillColor = System.Drawing.Color.White;
this.comboType.FillColor2 = System.Drawing.Color.White;
this.comboType.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.comboType.ItemHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(155)))), ((int)(((byte)(200)))), ((int)(((byte)(255)))));
this.comboType.ItemSelectBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(216)))), ((int)(((byte)(219)))), ((int)(((byte)(227)))));
this.comboType.ItemSelectForeColor = System.Drawing.Color.White;
this.comboType.Location = new System.Drawing.Point(130, 133);
this.comboType.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.comboType.MinimumSize = new System.Drawing.Size(63, 0);
this.comboType.Name = "comboType";
this.comboType.Padding = new System.Windows.Forms.Padding(0, 0, 30, 2);
this.comboType.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(216)))), ((int)(((byte)(219)))), ((int)(((byte)(227)))));
this.comboType.Size = new System.Drawing.Size(188, 36);
this.comboType.StyleCustomMode = true;
this.comboType.TabIndex = 3;
this.comboType.Text = "uiComboBox1";
this.comboType.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
//
// txtSortCode
//
this.txtSortCode.FillColor = System.Drawing.Color.White;
this.txtSortCode.FillColor2 = System.Drawing.Color.White;
this.txtSortCode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.txtSortCode.Location = new System.Drawing.Point(129, 191);
this.txtSortCode.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.txtSortCode.MinimumSize = new System.Drawing.Size(100, 0);
this.txtSortCode.Name = "txtSortCode";
this.txtSortCode.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(216)))), ((int)(((byte)(219)))), ((int)(((byte)(227)))));
this.txtSortCode.Size = new System.Drawing.Size(188, 36);
this.txtSortCode.StyleCustomMode = true;
this.txtSortCode.TabIndex = 5;
this.txtSortCode.Text = "txtSortCode";
this.txtSortCode.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
//
// 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(538, 473);
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 = 7;
this.btnConfirm.Text = "确定";
this.btnConfirm.Click += new System.EventHandler(this.btnConfirm_Click);
//
// uiLabel12
//
this.uiLabel12.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.uiLabel12.Location = new System.Drawing.Point(15, 197);
this.uiLabel12.Name = "uiLabel12";
this.uiLabel12.Size = new System.Drawing.Size(107, 29);
this.uiLabel12.Style = Sunny.UI.UIStyle.Custom;
this.uiLabel12.TabIndex = 45;
this.uiLabel12.Text = "排序号";
this.uiLabel12.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// comboDept
//
this.comboDept.DataSource = null;
this.comboDept.FillColor = System.Drawing.Color.White;
this.comboDept.FillColor2 = System.Drawing.Color.White;
this.comboDept.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.comboDept.ItemHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(155)))), ((int)(((byte)(200)))), ((int)(((byte)(255)))));
this.comboDept.ItemSelectBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(216)))), ((int)(((byte)(219)))), ((int)(((byte)(227)))));
this.comboDept.ItemSelectForeColor = System.Drawing.Color.White;
this.comboDept.Location = new System.Drawing.Point(445, 133);
this.comboDept.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.comboDept.MinimumSize = new System.Drawing.Size(63, 0);
this.comboDept.Name = "comboDept";
this.comboDept.Padding = new System.Windows.Forms.Padding(0, 0, 30, 2);
this.comboDept.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(216)))), ((int)(((byte)(219)))), ((int)(((byte)(227)))));
this.comboDept.Size = new System.Drawing.Size(188, 36);
this.comboDept.StyleCustomMode = true;
this.comboDept.TabIndex = 4;
this.comboDept.Text = "uiComboBox1";
this.comboDept.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
//
// uiLabel11
//
this.uiLabel11.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.uiLabel11.Location = new System.Drawing.Point(328, 136);
this.uiLabel11.Name = "uiLabel11";
this.uiLabel11.Size = new System.Drawing.Size(110, 29);
this.uiLabel11.Style = Sunny.UI.UIStyle.Custom;
this.uiLabel11.TabIndex = 42;
this.uiLabel11.Text = "所属部门";
this.uiLabel11.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// txtRemark
//
this.txtRemark.ButtonFillColor = System.Drawing.Color.White;
this.txtRemark.ButtonFillHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
this.txtRemark.ButtonFillPressColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
this.txtRemark.ButtonForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(96)))), ((int)(((byte)(98)))), ((int)(((byte)(102)))));
this.txtRemark.ButtonForeHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
this.txtRemark.ButtonForePressColor = System.Drawing.Color.FromArgb(((int)(((byte)(74)))), ((int)(((byte)(131)))), ((int)(((byte)(229)))));
this.txtRemark.ButtonRectColor = System.Drawing.Color.FromArgb(((int)(((byte)(216)))), ((int)(((byte)(219)))), ((int)(((byte)(227)))));
this.txtRemark.ButtonRectHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(197)))), ((int)(((byte)(222)))), ((int)(((byte)(255)))));
this.txtRemark.ButtonSymbol = 61761;
this.txtRemark.Cursor = System.Windows.Forms.Cursors.IBeam;
this.txtRemark.FillColor2 = System.Drawing.Color.White;
this.txtRemark.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.txtRemark.Location = new System.Drawing.Point(129, 292);
this.txtRemark.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.txtRemark.Maximum = 2147483647D;
this.txtRemark.MaxLength = 128;
this.txtRemark.Minimum = -2147483648D;
this.txtRemark.MinimumSize = new System.Drawing.Size(1, 16);
this.txtRemark.Multiline = true;
this.txtRemark.Name = "txtRemark";
this.txtRemark.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(216)))), ((int)(((byte)(219)))), ((int)(((byte)(227)))));
this.txtRemark.Size = new System.Drawing.Size(504, 150);
this.txtRemark.StyleCustomMode = true;
this.txtRemark.TabIndex = 6;
this.txtRemark.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
this.txtRemark.Watermark = "请输入内容 ";
//
// uiLabel7
//
this.uiLabel7.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.uiLabel7.Location = new System.Drawing.Point(12, 258);
this.uiLabel7.Name = "uiLabel7";
this.uiLabel7.Size = new System.Drawing.Size(110, 29);
this.uiLabel7.Style = Sunny.UI.UIStyle.Custom;
this.uiLabel7.TabIndex = 35;
this.uiLabel7.Text = "备注";
this.uiLabel7.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// txtName
//
this.txtName.ButtonFillColor = System.Drawing.Color.White;
this.txtName.ButtonFillHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
this.txtName.ButtonFillPressColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
this.txtName.ButtonForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(96)))), ((int)(((byte)(98)))), ((int)(((byte)(102)))));
this.txtName.ButtonForeHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
this.txtName.ButtonForePressColor = System.Drawing.Color.FromArgb(((int)(((byte)(74)))), ((int)(((byte)(131)))), ((int)(((byte)(229)))));
this.txtName.ButtonRectColor = System.Drawing.Color.FromArgb(((int)(((byte)(216)))), ((int)(((byte)(219)))), ((int)(((byte)(227)))));
this.txtName.ButtonRectHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(197)))), ((int)(((byte)(222)))), ((int)(((byte)(255)))));
this.txtName.ButtonSymbol = 61761;
this.txtName.Cursor = System.Windows.Forms.Cursors.IBeam;
this.txtName.FillColor2 = System.Drawing.Color.White;
this.txtName.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.txtName.Location = new System.Drawing.Point(445, 66);
this.txtName.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.txtName.Maximum = 2147483647D;
this.txtName.MaxLength = 20;
this.txtName.Minimum = -2147483648D;
this.txtName.MinimumSize = new System.Drawing.Size(1, 16);
this.txtName.Name = "txtName";
this.txtName.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(216)))), ((int)(((byte)(219)))), ((int)(((byte)(227)))));
this.txtName.Size = new System.Drawing.Size(188, 42);
this.txtName.StyleCustomMode = true;
this.txtName.TabIndex = 2;
this.txtName.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
//
// uiLabel2
//
this.uiLabel2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.uiLabel2.Location = new System.Drawing.Point(373, 73);
this.uiLabel2.Name = "uiLabel2";
this.uiLabel2.Size = new System.Drawing.Size(65, 29);
this.uiLabel2.Style = Sunny.UI.UIStyle.Custom;
this.uiLabel2.TabIndex = 23;
this.uiLabel2.Text = "名称";
this.uiLabel2.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// uiLabel4
//
this.uiLabel4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.uiLabel4.Location = new System.Drawing.Point(57, 136);
this.uiLabel4.Name = "uiLabel4";
this.uiLabel4.Size = new System.Drawing.Size(65, 29);
this.uiLabel4.Style = Sunny.UI.UIStyle.Custom;
this.uiLabel4.TabIndex = 25;
this.uiLabel4.Text = "类型";
this.uiLabel4.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// txtEnCode
//
this.txtEnCode.ButtonFillColor = System.Drawing.Color.White;
this.txtEnCode.ButtonFillHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
this.txtEnCode.ButtonFillPressColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
this.txtEnCode.ButtonForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(96)))), ((int)(((byte)(98)))), ((int)(((byte)(102)))));
this.txtEnCode.ButtonForeHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
this.txtEnCode.ButtonForePressColor = System.Drawing.Color.FromArgb(((int)(((byte)(74)))), ((int)(((byte)(131)))), ((int)(((byte)(229)))));
this.txtEnCode.ButtonRectColor = System.Drawing.Color.FromArgb(((int)(((byte)(216)))), ((int)(((byte)(219)))), ((int)(((byte)(227)))));
this.txtEnCode.ButtonRectHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(197)))), ((int)(((byte)(222)))), ((int)(((byte)(255)))));
this.txtEnCode.ButtonSymbol = 61761;
this.txtEnCode.Cursor = System.Windows.Forms.Cursors.IBeam;
this.txtEnCode.FillColor2 = System.Drawing.Color.White;
this.txtEnCode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.txtEnCode.Location = new System.Drawing.Point(129, 66);
this.txtEnCode.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.txtEnCode.Maximum = 2147483647D;
this.txtEnCode.MaxLength = 20;
this.txtEnCode.Minimum = -2147483648D;
this.txtEnCode.MinimumSize = new System.Drawing.Size(1, 16);
this.txtEnCode.Name = "txtEnCode";
this.txtEnCode.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(216)))), ((int)(((byte)(219)))), ((int)(((byte)(227)))));
this.txtEnCode.Size = new System.Drawing.Size(188, 42);
this.txtEnCode.StyleCustomMode = true;
this.txtEnCode.TabIndex = 1;
this.txtEnCode.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
//
// uiLabel1
//
this.uiLabel1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.uiLabel1.Location = new System.Drawing.Point(57, 73);
this.uiLabel1.Name = "uiLabel1";
this.uiLabel1.Size = new System.Drawing.Size(65, 29);
this.uiLabel1.Style = Sunny.UI.UIStyle.Custom;
this.uiLabel1.TabIndex = 21;
this.uiLabel1.Text = "编码";
this.uiLabel1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// AddRoleForm
//
this.AllowShowTitle = false;
this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 27F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(686, 530);
this.Controls.Add(this.uiPanel1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "AddRoleForm";
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.AddRoleForm_Load);
this.uiPanel1.ResumeLayout(false);
this.titlePanel.ResumeLayout(false);
this.panel1.ResumeLayout(false);
this.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 txtRemark;
private Sunny.UI.UILabel uiLabel7;
private Sunny.UI.UITextBox txtName;
private Sunny.UI.UILabel uiLabel2;
private Sunny.UI.UILabel uiLabel4;
private Sunny.UI.UITextBox txtEnCode;
private Sunny.UI.UILabel uiLabel1;
private Sunny.UI.UILabel uiLabel11;
private Sunny.UI.UIComboBox comboDept;
private Sunny.UI.UILabel uiLabel12;
private Sunny.UI.UIButton btnConfirm;
private Sunny.UI.UIIntegerUpDown txtSortCode;
private Sunny.UI.UIComboBox comboType;
}
}

View File

@ -0,0 +1,267 @@

using DH.RBAC.Common;
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;
using DH.RBAC.Logic.Sys;
using DH.RBAC.Utility.Other;
using DH.RBAC.Model.Sys;
namespace DH.RBAC.Page.Sys.Role
{
public partial class AddRoleForm : UIForm
{
private SysOrganizeLogic organizeLogic;
private SysRoleLogic roleLogic;
public AddRoleForm()
{
InitializeComponent();
organizeLogic = new SysOrganizeLogic();
roleLogic = new SysRoleLogic();
}
#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 RolePage ParentPage { get; set; }
public string Id { get; set; }
/// <summary>
/// 画面加载,读取用户信息,显示在界面上
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void AddRoleForm_Load(object sender, EventArgs e)
{
comboType.Items.Add("系统角色");
comboType.Items.Add("业务角色");
comboType.Items.Add("其他角色");
comboType.SelectedIndex = 2;
if (StringHelper.IsNullOrEmpty(Id))
{
lblTitle.Text = "新增角色";
txtEnCode.Enabled = true;
}
else
{
lblTitle.Text = "修改角色";
txtEnCode.Enabled = false;
}
//获取部门下拉列表的值
bool flag = GetDepartmentCombox();
if (!flag)
{
btnClose_Click(null, null);
return;
}
if (StringHelper.IsNullOrEmpty(Id))
{
return;
}
//获得用户信息
SysRole entity = roleLogic.Get(Id);
entity.AllowEdit = entity.AllowEdit == "1" ? "true" : "false";
if (entity == null)
{
AntdUI.Message.success(this, "角色信息不存在!", autoClose: 3);
btnClose_Click(null, null);
return;
}
//给文本框赋值
txtEnCode.Text = entity.EnCode;
txtName.Text = entity.Name;
comboType.SelectedIndex = entity.Type.Value;
comboDept.SelectedValue = entity.OrganizeId;
txtSortCode.Value = entity.SortCode.Value;
txtRemark.Text = entity.Remark;
}
/// <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();
if (!flag)
{
return;
}
SysRole model = new SysRole();
model.Id = Id;
model.EnCode = txtEnCode.Text;
model.Name = txtName.Text;
model.Type = comboType.SelectedIndex;
model.OrganizeId = comboDept.SelectedValue.ToString();
model.SortCode = txtSortCode.Value;
model.Remark = txtRemark.Text;
model.ModifyUserId = GlobalConfig.CurrentUser.Id;
int row = roleLogic.AppUpdate(model, 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()
{
if (StringHelper.IsNullOrEmpty(txtEnCode.Text))
{
AntdUI.Message.success(this, "编码不能为空!", autoClose: 3);
return false;
}
if (StringHelper.IsNullOrEmpty(txtName.Text))
{
AntdUI.Message.success(this, "名称不能为空!", autoClose: 3);
return false;
}
if (StringHelper.IsNullOrEmpty(comboType.SelectedItem.ToString()))
{
AntdUI.Message.success(this, "类型不能为空!", autoClose: 3);
return false;
}
if (StringHelper.IsNullOrEmpty(comboDept.SelectedItem.ToString()))
{
AntdUI.Message.success(this, "所属部门不能为空!", autoClose: 3);
return false;
}
if (StringHelper.IsNullOrEmpty(txtSortCode.Text))
{
AntdUI.Message.success(this, "排序号不能为空!", autoClose: 3);
return false;
}
return true;
}
/// <summary>
/// 执行新增操作
/// </summary>
private void DoAdd()
{
bool flag = ChechEmpty();
if (!flag)
return;
SysRole model = new SysRole();
model.EnCode = txtEnCode.Text;
model.Name = txtName.Text;
model.Type = comboType.SelectedIndex;
model.OrganizeId = comboDept.SelectedValue.ToString();
model.SortCode = txtSortCode.Value;
model.Remark = txtRemark.Text;
model.CreateUserId = GlobalConfig.CurrentUser.Id;
int row = roleLogic.AppInsert(model, model.CreateUserId);
if (row == 0)
{
AntdUI.Message.warn(this, "对不起,操作失败!", autoClose: 3);
return;
}
//ParentPage.Init();
btnClose_Click(null, null);
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,200 @@
namespace DH.RBAC.Page.Sys.Role
{
partial class RoleAuthorizeForm
{
/// <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(RoleAuthorizeForm));
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.treeView = new Sunny.UI.UITreeView();
this.btnConfirm = new Sunny.UI.UIButton();
this.uiPanel1.SuspendLayout();
this.titlePanel.SuspendLayout();
this.panel1.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(686, 530);
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(686, 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(641, 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(641, 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.treeView);
this.panel1.Controls.Add(this.btnConfirm);
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(686, 530);
this.panel1.TabIndex = 6;
//
// treeView
//
this.treeView.CheckBoxes = true;
this.treeView.FillColor = System.Drawing.Color.White;
this.treeView.FillColor2 = System.Drawing.Color.White;
this.treeView.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.treeView.Location = new System.Drawing.Point(30, 50);
this.treeView.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.treeView.MinimumSize = new System.Drawing.Size(1, 1);
this.treeView.Name = "treeView";
this.treeView.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(216)))), ((int)(((byte)(219)))), ((int)(((byte)(227)))));
this.treeView.SelectedNode = null;
this.treeView.Size = new System.Drawing.Size(325, 466);
this.treeView.StyleCustomMode = true;
this.treeView.TabIndex = 15;
this.treeView.Text = "uiTreeView1";
this.treeView.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
//
// 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(538, 473);
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);
//
// RoleAuthorizeForm
//
this.AllowShowTitle = false;
this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 27F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(686, 530);
this.Controls.Add(this.uiPanel1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "RoleAuthorizeForm";
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.AddRoleForm_Load);
this.uiPanel1.ResumeLayout(false);
this.titlePanel.ResumeLayout(false);
this.panel1.ResumeLayout(false);
this.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.UIButton btnConfirm;
private Sunny.UI.UITreeView treeView;
}
}

View File

@ -0,0 +1,207 @@
using Sunny.UI;
using System;
using System.Collections.Generic;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using DH.RBAC.Common;
using DH.RBAC.Logic.Sys;
using DH.RBAC.Model.Sys;
using DH.RBAC.Utility.Other;
namespace DH.RBAC.Page.Sys.Role
{
public partial class RoleAuthorizeForm : UIForm
{
private SysRoleAuthorizeLogic roleAuthorizeLogic;
private SysPermissionLogic permissionLogic;
public RoleAuthorizeForm()
{
InitializeComponent();
roleAuthorizeLogic = new SysRoleAuthorizeLogic();
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 RolePage ParentPage { get; set; }
public string Id { get; set; }
/// <summary>
/// 画面加载,读取用户信息,显示在界面上
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void AddRoleForm_Load(object sender, EventArgs e)
{
try
{
List<string> listPerIds = roleAuthorizeLogic.GetList(Id).Select(c => c.ModuleId).ToList();
List<SysPermission> listAllPers;
if (new SysUserLogic().ContainsUser("admin", GlobalConfig.CurrentUser.Id))
{
listAllPers = permissionLogic.GetList();
}
else
{
listAllPers = permissionLogic.GetList(GlobalConfig.CurrentUser.Id);
}
listAllPers = HandleData(listAllPers);
List<ZTreeNode> result = new List<ZTreeNode>();
foreach (var item in listAllPers)
{
ZTreeNode model = new ZTreeNode();
model.@checked = listPerIds.Where(it => (it + "-view").StartsWith(item.Id)).Count() > 0 ? model.@checked = true : model.@checked = false;
model.id = item.Id;
model.pId = item.ParentId;
model.name = item.Name;
model.open = true;
result.Add(model);
}
List<ZTreeNode> fistNode = result.Where(it => it.pId == "0").ToList();
foreach (ZTreeNode node in fistNode)
{
TreeNode parentNode = new TreeNode(node.name);
parentNode.Tag = node.id;
parentNode.Checked = node.@checked;
//二级菜单
List<ZTreeNode> secondList = result.Where(it => it.pId == node.id).ToList();
foreach (ZTreeNode second in secondList)
{
TreeNode seconds = new TreeNode(second.name);
seconds.Checked = second.@checked;
seconds.Tag = second.id;
//三级菜单
List<ZTreeNode> thirdList = result.Where(it => it.pId == second.id).ToList();
foreach (ZTreeNode third in thirdList)
{
TreeNode thirds = new TreeNode(third.name);
thirds.Tag = third.id;
thirds.Checked = third.@checked;
seconds.Nodes.Add(thirds);
}
parentNode.Nodes.Add(seconds);
}
treeView.Nodes.Add(parentNode);
}
treeView.ExpandAll();
}
catch
{
AntdUI.Message.warn(this, "网络或服务器异常,请稍后重试!", autoClose: 3);
btnClose_Click(null, null);
}
}
private List<SysPermission> HandleData(List<SysPermission> listAllPers)
{
List<SysPermission> list = new List<SysPermission>();
List<SysPermission> firstNode = listAllPers.Where(it => it.ParentId == "0").ToList();
foreach (SysPermission permission in firstNode)
{
list.Add(permission);
List<SysPermission> secondNode = listAllPers.Where(it => it.ParentId == permission.Id).ToList();
foreach (SysPermission per in secondNode)
{
list.Add(per);
List<SysPermission> thirdNode = listAllPers.Where(it => it.ParentId == per.Id).ToList();
list.Add(new SysPermission
{
Id = per.Id + "-view",
ParentId = per.Id,
Layer = 2,
EnCode = per.EnCode,
Name = "显示",
});
foreach (SysPermission per2 in thirdNode)
{
list.Add(per2);
}
}
}
return list;
}
/// <summary>
/// 确定按钮点击事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void btnConfirm_Click(object sender, EventArgs e)
{
try
{
//获得所有的Tag
List<string> userPermissionList = new List<string>();//用于保存所有的id
foreach (TreeNode parentNode in treeView.Nodes)
{
if (parentNode.Checked)
{
userPermissionList.Add((string)parentNode.Tag);
}
//二级
foreach (TreeNode second in parentNode.Nodes)
{
if (second.Checked)
{
userPermissionList.Add((string)second.Tag);
}
//三级
foreach (TreeNode third in second.Nodes)
{
if (third.Checked)
{
userPermissionList.Add((string)third.Tag);
}
}
}
}
roleAuthorizeLogic.AppAuthorize(GlobalConfig.CurrentUser.Account, Id, userPermissionList.Select(it => it.Replace("-view", "")).Distinct().ToArray());
btnClose_Click(null, null);
}
catch
{
AntdUI.Message.warn(this, "网络或服务器异常,请稍后重试!", autoClose: 3);
return;
}
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,437 @@
namespace DH.RBAC.Page.Sys.Role
{
partial class RolePage
{
/// <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();
txtKeywords = new Sunny.UI.UITextBox();
panel7 = new System.Windows.Forms.Panel();
btnQuery = new Sunny.UI.UISymbolButton();
pagination = new Sunny.UI.UIPagination();
panel2 = new System.Windows.Forms.Panel();
panel5 = new System.Windows.Forms.Panel();
panel8 = new System.Windows.Forms.Panel();
dataGridView = new Sunny.UI.UIDataGridView();
RoleId = new System.Windows.Forms.DataGridViewTextBoxColumn();
RoleEncode = new System.Windows.Forms.DataGridViewTextBoxColumn();
RoleName = new System.Windows.Forms.DataGridViewTextBoxColumn();
RoleType = new System.Windows.Forms.DataGridViewTextBoxColumn();
RoleDept = new System.Windows.Forms.DataGridViewTextBoxColumn();
RoleSortCode = new System.Windows.Forms.DataGridViewTextBoxColumn();
panel6 = new System.Windows.Forms.Panel();
btnPwd = new AntdUI.Button();
btnDelete = new AntdUI.Button();
btnUpdate = new AntdUI.Button();
btnAdd = new AntdUI.Button();
panel4 = new System.Windows.Forms.Panel();
panel3 = new System.Windows.Forms.Panel();
panel7.SuspendLayout();
panel2.SuspendLayout();
panel5.SuspendLayout();
panel8.SuspendLayout();
((System.ComponentModel.ISupportInitialize)dataGridView).BeginInit();
panel6.SuspendLayout();
SuspendLayout();
//
// 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, 8);
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(195, 36);
txtKeywords.StyleCustomMode = true;
txtKeywords.TabIndex = 0;
txtKeywords.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
txtKeywords.Watermark = "角色名称或编码";
txtKeywords.KeyDown += txtKeywords_KeyDown;
//
// panel7
//
panel7.Controls.Add(btnQuery);
panel7.Controls.Add(txtKeywords);
panel7.Dock = System.Windows.Forms.DockStyle.Right;
panel7.Location = new System.Drawing.Point(578, 0);
panel7.Margin = new System.Windows.Forms.Padding(2);
panel7.Name = "panel7";
panel7.Size = new System.Drawing.Size(230, 49);
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(201, 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, 37);
btnQuery.StyleCustomMode = true;
btnQuery.Symbol = 61442;
btnQuery.SymbolSize = 30;
btnQuery.TabIndex = 2;
btnQuery.TipsFont = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
//
// 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, 401);
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(808, 26);
pagination.StyleCustomMode = true;
pagination.TabIndex = 11;
pagination.Text = "uiPagination1";
pagination.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
pagination.PageChanged += pagination_PageChanged;
//
// 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(844, 476);
panel2.TabIndex = 4;
//
// panel5
//
panel5.Controls.Add(panel8);
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(844, 476);
panel5.TabIndex = 7;
//
// panel8
//
panel8.Controls.Add(dataGridView);
panel8.Controls.Add(pagination);
panel8.Dock = System.Windows.Forms.DockStyle.Fill;
panel8.Location = new System.Drawing.Point(18, 49);
panel8.Margin = new System.Windows.Forms.Padding(2);
panel8.Name = "panel8";
panel8.Size = new System.Drawing.Size(808, 427);
panel8.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[] { RoleId, RoleEncode, RoleName, RoleType, RoleDept, RoleSortCode });
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.RowTemplate.Height = 29;
dataGridView.SelectedIndex = -1;
dataGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
dataGridView.Size = new System.Drawing.Size(808, 401);
dataGridView.StripeOddColor = System.Drawing.Color.White;
dataGridView.StyleCustomMode = true;
dataGridView.TabIndex = 12;
//
// RoleId
//
RoleId.DataPropertyName = "Id";
RoleId.HeaderText = "Id";
RoleId.MinimumWidth = 6;
RoleId.Name = "RoleId";
RoleId.ReadOnly = true;
RoleId.Visible = false;
RoleId.Width = 125;
//
// RoleEncode
//
RoleEncode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
RoleEncode.DataPropertyName = "Encode";
dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
RoleEncode.DefaultCellStyle = dataGridViewCellStyle3;
RoleEncode.HeaderText = "编码";
RoleEncode.MinimumWidth = 6;
RoleEncode.Name = "RoleEncode";
RoleEncode.ReadOnly = true;
RoleEncode.Resizable = System.Windows.Forms.DataGridViewTriState.True;
RoleEncode.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
//
// RoleName
//
RoleName.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
RoleName.DataPropertyName = "Name";
dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
RoleName.DefaultCellStyle = dataGridViewCellStyle4;
RoleName.HeaderText = "名称";
RoleName.MinimumWidth = 6;
RoleName.Name = "RoleName";
RoleName.ReadOnly = true;
RoleName.Resizable = System.Windows.Forms.DataGridViewTriState.True;
RoleName.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
//
// RoleType
//
RoleType.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
RoleType.DataPropertyName = "TypeStr";
dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
RoleType.DefaultCellStyle = dataGridViewCellStyle5;
RoleType.HeaderText = "类型";
RoleType.MinimumWidth = 6;
RoleType.Name = "RoleType";
RoleType.ReadOnly = true;
RoleType.Resizable = System.Windows.Forms.DataGridViewTriState.True;
RoleType.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
//
// RoleDept
//
RoleDept.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
RoleDept.DataPropertyName = "DeptName";
dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.BottomCenter;
dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
RoleDept.DefaultCellStyle = dataGridViewCellStyle6;
RoleDept.HeaderText = "所属部门";
RoleDept.MinimumWidth = 6;
RoleDept.Name = "RoleDept";
RoleDept.ReadOnly = true;
RoleDept.Resizable = System.Windows.Forms.DataGridViewTriState.True;
RoleDept.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
//
// RoleSortCode
//
RoleSortCode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
RoleSortCode.DataPropertyName = "SortCode";
dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
RoleSortCode.DefaultCellStyle = dataGridViewCellStyle7;
RoleSortCode.HeaderText = "排序码";
RoleSortCode.MinimumWidth = 6;
RoleSortCode.Name = "RoleSortCode";
RoleSortCode.ReadOnly = true;
RoleSortCode.Resizable = System.Windows.Forms.DataGridViewTriState.True;
RoleSortCode.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
//
// 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(808, 49);
panel6.TabIndex = 12;
//
// btnPwd
//
btnPwd.Location = new System.Drawing.Point(350, 6);
btnPwd.Name = "btnPwd";
btnPwd.Size = new System.Drawing.Size(98, 38);
btnPwd.TabIndex = 11;
btnPwd.Tag = "role-authorize";
btnPwd.Text = "角色授权";
btnPwd.Visible = false;
//
// btnDelete
//
btnDelete.Location = new System.Drawing.Point(235, 6);
btnDelete.Name = "btnDelete";
btnDelete.Size = new System.Drawing.Size(98, 38);
btnDelete.TabIndex = 10;
btnDelete.Tag = "role-delete";
btnDelete.Text = "删除角色";
btnDelete.Visible = false;
//
// btnUpdate
//
btnUpdate.Location = new System.Drawing.Point(118, 6);
btnUpdate.Name = "btnUpdate";
btnUpdate.Size = new System.Drawing.Size(98, 38);
btnUpdate.TabIndex = 9;
btnUpdate.Tag = "role-edit";
btnUpdate.Text = "修改角色";
btnUpdate.Visible = false;
//
// btnAdd
//
btnAdd.Location = new System.Drawing.Point(5, 6);
btnAdd.Name = "btnAdd";
btnAdd.Size = new System.Drawing.Size(98, 38);
btnAdd.TabIndex = 8;
btnAdd.Tag = "role-add";
btnAdd.Text = "新增角色";
btnAdd.Visible = false;
//
// panel4
//
panel4.Dock = System.Windows.Forms.DockStyle.Right;
panel4.Location = new System.Drawing.Point(826, 0);
panel4.Margin = new System.Windows.Forms.Padding(2);
panel4.Name = "panel4";
panel4.Size = new System.Drawing.Size(18, 476);
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, 476);
panel3.TabIndex = 4;
//
// RolePage
//
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 = "RolePage";
Size = new System.Drawing.Size(844, 476);
panel7.ResumeLayout(false);
panel2.ResumeLayout(false);
panel5.ResumeLayout(false);
panel8.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)dataGridView).EndInit();
panel6.ResumeLayout(false);
ResumeLayout(false);
}
#endregion
private Sunny.UI.UITextBox txtKeywords;
private System.Windows.Forms.Panel panel7;
private Sunny.UI.UIPagination pagination;
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.Panel panel5;
private System.Windows.Forms.Panel panel4;
private System.Windows.Forms.Panel panel3;
private Sunny.UI.UISymbolButton btnQuery;
private System.Windows.Forms.Panel panel6;
private System.Windows.Forms.Panel panel8;
private Sunny.UI.UIDataGridView dataGridView;
private System.Windows.Forms.DataGridViewTextBoxColumn RoleId;
private System.Windows.Forms.DataGridViewTextBoxColumn RoleEncode;
private System.Windows.Forms.DataGridViewTextBoxColumn RoleName;
private System.Windows.Forms.DataGridViewTextBoxColumn RoleType;
private System.Windows.Forms.DataGridViewTextBoxColumn RoleDept;
private System.Windows.Forms.DataGridViewTextBoxColumn RoleSortCode;
private AntdUI.Button btnDelete;
private AntdUI.Button btnUpdate;
private AntdUI.Button btnAdd;
private AntdUI.Button btnPwd;
}
}

View File

@ -0,0 +1,223 @@

using AntdUI;
using DH.RBAC.Common;
using DH.RBAC.Logic;
using DH.RBAC.Logic.Sys;
using DH.RBAC.Model.Sys;
using DH.RBAC.Page.Sys.User;
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.Role
{
[PageCode("sys-role")]
public partial class RolePage : MyPage
{
private SysRoleLogic roleLogic;
private SysUserRoleRelationLogic roleRelationLogic;
Window window;
public RolePage(Window _window)
{
window = _window;
InitializeComponent();
roleLogic = new SysRoleLogic();
roleRelationLogic = new SysUserRoleRelationLogic();
dataGridView.AutoGenerateColumns = false;
Load += RolePage_Initialize;
btnAdd.Click += btnAdd_Click;
btnUpdate.Click += btnModify_Click;
btnDelete.Click += btnDelete_Click;
btnPwd.Click += btnAuthorize_Click;
btnQuery.Click += btnQuery_Click;
}
/// <summary>
/// 界面初始化,查询显示数据
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void RolePage_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<SysRole> list = roleLogic.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)
{
AddRoleForm form = new AddRoleForm();
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["RoleId"].Value.ToString();
AddRoleForm form = new AddRoleForm();
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["RoleId"].Value.ToString();
var result = AntdUI.Modal.open(window, "删除警告!", "您是否确定要删除该角色?", TType.Warn);
if (result == DialogResult.OK)
{
try
{
//判断这些权限是不是被用户绑定了,一旦绑定了,就不能删除,提示请先将用户解除绑定
List<string> ids = id.SplitToList();
List<SysUserRoleRelation> roleRelationList = roleRelationLogic.GetByRoles(ids);
if (roleRelationList.Count > 0)
{
AntdUI.Message.warn(window, "请先从用户中解除角色绑定!", autoClose: 3);
return;
}
int row = roleLogic.Delete(ids);
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="e"></param>
private void btnAuthorize_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["RoleId"].Value.ToString();
RoleAuthorizeForm form = new RoleAuthorizeForm();
form.ParentPage = this;
form.Id = id;
FormHelper.ShowSubForm(form);
}
/// <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 btnUpdate_Click(object sender, EventArgs e)
{
}
}
}

View 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="RoleId.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="RoleEncode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="RoleName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="RoleType.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="RoleDept.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="RoleSortCode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>

View 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;
}
}

View 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);
}
}
}

File diff suppressed because it is too large Load Diff

View 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;
}
}

View 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);
}
}
}
}

View 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>