提交rbac
提交设置右键错位的bug
879
DH.RBAC/AccountForm.Designer.cs
generated
Normal file
@ -0,0 +1,879 @@
|
||||
namespace DH.RBAC
|
||||
{
|
||||
partial class AccountForm
|
||||
{
|
||||
/// <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(AccountForm));
|
||||
this.uiPanel1 = new Sunny.UI.UIPanel();
|
||||
this.titlePanel = new System.Windows.Forms.Panel();
|
||||
this.uiLabel15 = new Sunny.UI.UILabel();
|
||||
this.btnClose = new Sunny.UI.UISymbolLabel();
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.lblCurrentUser = new System.Windows.Forms.Label();
|
||||
this.imageAvator = new System.Windows.Forms.PictureBox();
|
||||
this.uiTabControl1 = new Sunny.UI.UITabControl();
|
||||
this.tabPage1 = new System.Windows.Forms.TabPage();
|
||||
this.txtBirthday = new Sunny.UI.UIDatePicker();
|
||||
this.btnSave = new Sunny.UI.UIButton();
|
||||
this.txtSignature = new Sunny.UI.UITextBox();
|
||||
this.lblSignature = new Sunny.UI.UILabel();
|
||||
this.txtAddress = new Sunny.UI.UITextBox();
|
||||
this.lblAddress = new Sunny.UI.UILabel();
|
||||
this.txtTel = new Sunny.UI.UITextBox();
|
||||
this.lblTel = new Sunny.UI.UILabel();
|
||||
this.txtEmail = new Sunny.UI.UITextBox();
|
||||
this.lblEmail = new Sunny.UI.UILabel();
|
||||
this.lblBirthday = new Sunny.UI.UILabel();
|
||||
this.rdFemale = new Sunny.UI.UIRadioButton();
|
||||
this.rdMale = new Sunny.UI.UIRadioButton();
|
||||
this.txtNickName = new Sunny.UI.UITextBox();
|
||||
this.lblGender = new Sunny.UI.UILabel();
|
||||
this.lblNickName = new Sunny.UI.UILabel();
|
||||
this.txtName = new Sunny.UI.UITextBox();
|
||||
this.lblName = new Sunny.UI.UILabel();
|
||||
this.txtAccount = new Sunny.UI.UITextBox();
|
||||
this.lblAccount = new Sunny.UI.UILabel();
|
||||
this.tabPage2 = new System.Windows.Forms.TabPage();
|
||||
this.btnSelectAvator = new Sunny.UI.UIButton();
|
||||
this.uiLabel10 = new Sunny.UI.UILabel();
|
||||
this.tabPage3 = new System.Windows.Forms.TabPage();
|
||||
this.btnReset = new Sunny.UI.UIButton();
|
||||
this.btnChangePassword = new Sunny.UI.UIButton();
|
||||
this.txtComfirmPassword = new Sunny.UI.UITextBox();
|
||||
this.txtNewPassword = new Sunny.UI.UITextBox();
|
||||
this.lblComfirmPassword = new Sunny.UI.UILabel();
|
||||
this.lblNewPassword = new Sunny.UI.UILabel();
|
||||
this.txtOldPassword = new Sunny.UI.UITextBox();
|
||||
this.lblOldPassword = new Sunny.UI.UILabel();
|
||||
this.uiLabel11 = new Sunny.UI.UILabel();
|
||||
this.uiPanel1.SuspendLayout();
|
||||
this.titlePanel.SuspendLayout();
|
||||
this.panel1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.imageAvator)).BeginInit();
|
||||
this.uiTabControl1.SuspendLayout();
|
||||
this.tabPage1.SuspendLayout();
|
||||
this.tabPage2.SuspendLayout();
|
||||
this.tabPage3.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// uiPanel1
|
||||
//
|
||||
this.uiPanel1.Controls.Add(this.titlePanel);
|
||||
this.uiPanel1.Controls.Add(this.panel1);
|
||||
this.uiPanel1.Controls.Add(this.uiTabControl1);
|
||||
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(1031, 558);
|
||||
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.uiLabel15);
|
||||
this.titlePanel.Controls.Add(this.btnClose);
|
||||
this.titlePanel.Location = new System.Drawing.Point(0, -1);
|
||||
this.titlePanel.Name = "titlePanel";
|
||||
this.titlePanel.Size = new System.Drawing.Size(1031, 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);
|
||||
//
|
||||
// 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(986, 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.titlePanel_MouseDown);
|
||||
this.uiLabel15.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(986, 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.lblCurrentUser);
|
||||
this.panel1.Controls.Add(this.imageAvator);
|
||||
this.panel1.Location = new System.Drawing.Point(12, 56);
|
||||
this.panel1.Name = "panel1";
|
||||
this.panel1.Size = new System.Drawing.Size(241, 218);
|
||||
this.panel1.TabIndex = 6;
|
||||
//
|
||||
// lblCurrentUser
|
||||
//
|
||||
this.lblCurrentUser.Location = new System.Drawing.Point(3, 176);
|
||||
this.lblCurrentUser.Name = "lblCurrentUser";
|
||||
this.lblCurrentUser.Size = new System.Drawing.Size(235, 27);
|
||||
this.lblCurrentUser.TabIndex = 4;
|
||||
this.lblCurrentUser.Text = "admin@管理员";
|
||||
this.lblCurrentUser.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// imageAvator
|
||||
//
|
||||
this.imageAvator.Image = global:: DH.RBAC.Properties.Resources.avatar;
|
||||
this.imageAvator.Location = new System.Drawing.Point(49, 27);
|
||||
this.imageAvator.Name = "imageAvator";
|
||||
this.imageAvator.Size = new System.Drawing.Size(139, 136);
|
||||
this.imageAvator.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
|
||||
this.imageAvator.TabIndex = 3;
|
||||
this.imageAvator.TabStop = false;
|
||||
//
|
||||
// uiTabControl1
|
||||
//
|
||||
this.uiTabControl1.Controls.Add(this.tabPage1);
|
||||
this.uiTabControl1.Controls.Add(this.tabPage2);
|
||||
this.uiTabControl1.Controls.Add(this.tabPage3);
|
||||
this.uiTabControl1.DrawMode = System.Windows.Forms.TabDrawMode.OwnerDrawFixed;
|
||||
this.uiTabControl1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
this.uiTabControl1.ItemSize = new System.Drawing.Size(150, 40);
|
||||
this.uiTabControl1.Location = new System.Drawing.Point(275, 56);
|
||||
this.uiTabControl1.MainPage = "";
|
||||
this.uiTabControl1.MenuStyle = Sunny.UI.UIMenuStyle.Custom;
|
||||
this.uiTabControl1.Name = "uiTabControl1";
|
||||
this.uiTabControl1.SelectedIndex = 0;
|
||||
this.uiTabControl1.Size = new System.Drawing.Size(734, 490);
|
||||
this.uiTabControl1.SizeMode = System.Windows.Forms.TabSizeMode.Fixed;
|
||||
this.uiTabControl1.Style = Sunny.UI.UIStyle.Custom;
|
||||
this.uiTabControl1.TabBackColor = System.Drawing.Color.White;
|
||||
this.uiTabControl1.TabIndex = 5;
|
||||
this.uiTabControl1.TabSelectedColor = System.Drawing.Color.White;
|
||||
this.uiTabControl1.TabUnSelectedForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(73)))), ((int)(((byte)(82)))), ((int)(((byte)(91)))));
|
||||
//
|
||||
// tabPage1
|
||||
//
|
||||
this.tabPage1.BackColor = System.Drawing.Color.White;
|
||||
this.tabPage1.Controls.Add(this.txtBirthday);
|
||||
this.tabPage1.Controls.Add(this.btnSave);
|
||||
this.tabPage1.Controls.Add(this.txtSignature);
|
||||
this.tabPage1.Controls.Add(this.lblSignature);
|
||||
this.tabPage1.Controls.Add(this.txtAddress);
|
||||
this.tabPage1.Controls.Add(this.lblAddress);
|
||||
this.tabPage1.Controls.Add(this.txtTel);
|
||||
this.tabPage1.Controls.Add(this.lblTel);
|
||||
this.tabPage1.Controls.Add(this.txtEmail);
|
||||
this.tabPage1.Controls.Add(this.lblEmail);
|
||||
this.tabPage1.Controls.Add(this.lblBirthday);
|
||||
this.tabPage1.Controls.Add(this.rdFemale);
|
||||
this.tabPage1.Controls.Add(this.rdMale);
|
||||
this.tabPage1.Controls.Add(this.txtNickName);
|
||||
this.tabPage1.Controls.Add(this.lblGender);
|
||||
this.tabPage1.Controls.Add(this.lblNickName);
|
||||
this.tabPage1.Controls.Add(this.txtName);
|
||||
this.tabPage1.Controls.Add(this.lblName);
|
||||
this.tabPage1.Controls.Add(this.txtAccount);
|
||||
this.tabPage1.Controls.Add(this.lblAccount);
|
||||
this.tabPage1.Location = new System.Drawing.Point(0, 40);
|
||||
this.tabPage1.Name = "tabPage1";
|
||||
this.tabPage1.Size = new System.Drawing.Size(734, 450);
|
||||
this.tabPage1.TabIndex = 0;
|
||||
this.tabPage1.Text = "资料";
|
||||
//
|
||||
// txtBirthday
|
||||
//
|
||||
this.txtBirthday.FillColor = System.Drawing.Color.White;
|
||||
this.txtBirthday.FillColor2 = System.Drawing.Color.White;
|
||||
this.txtBirthday.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
this.txtBirthday.Location = new System.Drawing.Point(117, 139);
|
||||
this.txtBirthday.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
this.txtBirthday.MaxLength = 10;
|
||||
this.txtBirthday.MinimumSize = new System.Drawing.Size(63, 0);
|
||||
this.txtBirthday.Name = "txtBirthday";
|
||||
this.txtBirthday.Padding = new System.Windows.Forms.Padding(0, 0, 30, 2);
|
||||
this.txtBirthday.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(216)))), ((int)(((byte)(219)))), ((int)(((byte)(227)))));
|
||||
this.txtBirthday.Size = new System.Drawing.Size(188, 36);
|
||||
|
||||
this.txtBirthday.StyleCustomMode = true;
|
||||
this.txtBirthday.SymbolDropDown = 61555;
|
||||
this.txtBirthday.SymbolNormal = 61555;
|
||||
this.txtBirthday.TabIndex = 20;
|
||||
this.txtBirthday.Text = "2021-12-29";
|
||||
this.txtBirthday.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
this.txtBirthday.Value = new System.DateTime(2021, 12, 29, 0, 0, 0, 0);
|
||||
//
|
||||
// btnSave
|
||||
//
|
||||
this.btnSave.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.btnSave.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
this.btnSave.Location = new System.Drawing.Point(117, 379);
|
||||
this.btnSave.MinimumSize = new System.Drawing.Size(1, 1);
|
||||
this.btnSave.Name = "btnSave";
|
||||
this.btnSave.Size = new System.Drawing.Size(125, 44);
|
||||
this.btnSave.Style = Sunny.UI.UIStyle.Custom;
|
||||
this.btnSave.TabIndex = 19;
|
||||
this.btnSave.Text = "保存";
|
||||
this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
|
||||
//
|
||||
// txtSignature
|
||||
//
|
||||
this.txtSignature.ButtonFillColor = System.Drawing.Color.White;
|
||||
this.txtSignature.ButtonFillHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
|
||||
this.txtSignature.ButtonFillPressColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
|
||||
this.txtSignature.ButtonForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(96)))), ((int)(((byte)(98)))), ((int)(((byte)(102)))));
|
||||
this.txtSignature.ButtonForeHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
|
||||
this.txtSignature.ButtonForePressColor = System.Drawing.Color.FromArgb(((int)(((byte)(74)))), ((int)(((byte)(131)))), ((int)(((byte)(229)))));
|
||||
this.txtSignature.ButtonRectColor = System.Drawing.Color.FromArgb(((int)(((byte)(216)))), ((int)(((byte)(219)))), ((int)(((byte)(227)))));
|
||||
this.txtSignature.ButtonRectHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(197)))), ((int)(((byte)(222)))), ((int)(((byte)(255)))));
|
||||
this.txtSignature.ButtonSymbol = 61761;
|
||||
this.txtSignature.Cursor = System.Windows.Forms.Cursors.IBeam;
|
||||
this.txtSignature.FillColor2 = System.Drawing.Color.White;
|
||||
this.txtSignature.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
this.txtSignature.Location = new System.Drawing.Point(117, 252);
|
||||
this.txtSignature.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
this.txtSignature.Maximum = 2147483647D;
|
||||
this.txtSignature.MaxLength = 128;
|
||||
this.txtSignature.Minimum = -2147483648D;
|
||||
this.txtSignature.MinimumSize = new System.Drawing.Size(1, 16);
|
||||
this.txtSignature.Multiline = true;
|
||||
this.txtSignature.Name = "txtSignature";
|
||||
this.txtSignature.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(216)))), ((int)(((byte)(219)))), ((int)(((byte)(227)))));
|
||||
this.txtSignature.Size = new System.Drawing.Size(581, 103);
|
||||
|
||||
this.txtSignature.StyleCustomMode = true;
|
||||
this.txtSignature.TabIndex = 18;
|
||||
this.txtSignature.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// lblSignature
|
||||
//
|
||||
this.lblSignature.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
this.lblSignature.Location = new System.Drawing.Point(3, 252);
|
||||
this.lblSignature.Name = "lblSignature";
|
||||
this.lblSignature.Size = new System.Drawing.Size(107, 29);
|
||||
this.lblSignature.Style = Sunny.UI.UIStyle.Custom;
|
||||
this.lblSignature.TabIndex = 17;
|
||||
this.lblSignature.Text = "个性签名";
|
||||
this.lblSignature.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(429, 191);
|
||||
this.txtAddress.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
this.txtAddress.Maximum = 2147483647D;
|
||||
this.txtAddress.MaxLength = 128;
|
||||
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(269, 42);
|
||||
|
||||
this.txtAddress.StyleCustomMode = true;
|
||||
this.txtAddress.TabIndex = 16;
|
||||
this.txtAddress.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// lblAddress
|
||||
//
|
||||
this.lblAddress.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
this.lblAddress.Location = new System.Drawing.Point(312, 198);
|
||||
this.lblAddress.Name = "lblAddress";
|
||||
this.lblAddress.Size = new System.Drawing.Size(110, 29);
|
||||
this.lblAddress.Style = Sunny.UI.UIStyle.Custom;
|
||||
this.lblAddress.TabIndex = 15;
|
||||
this.lblAddress.Text = "联系地址";
|
||||
this.lblAddress.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// txtTel
|
||||
//
|
||||
this.txtTel.ButtonFillColor = System.Drawing.Color.White;
|
||||
this.txtTel.ButtonFillHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
|
||||
this.txtTel.ButtonFillPressColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
|
||||
this.txtTel.ButtonForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(96)))), ((int)(((byte)(98)))), ((int)(((byte)(102)))));
|
||||
this.txtTel.ButtonForeHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
|
||||
this.txtTel.ButtonForePressColor = System.Drawing.Color.FromArgb(((int)(((byte)(74)))), ((int)(((byte)(131)))), ((int)(((byte)(229)))));
|
||||
this.txtTel.ButtonRectColor = System.Drawing.Color.FromArgb(((int)(((byte)(216)))), ((int)(((byte)(219)))), ((int)(((byte)(227)))));
|
||||
this.txtTel.ButtonRectHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(197)))), ((int)(((byte)(222)))), ((int)(((byte)(255)))));
|
||||
this.txtTel.ButtonSymbol = 61761;
|
||||
this.txtTel.Cursor = System.Windows.Forms.Cursors.IBeam;
|
||||
this.txtTel.FillColor2 = System.Drawing.Color.White;
|
||||
this.txtTel.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
this.txtTel.Location = new System.Drawing.Point(117, 191);
|
||||
this.txtTel.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
this.txtTel.Maximum = 2147483647D;
|
||||
this.txtTel.MaxLength = 20;
|
||||
this.txtTel.Minimum = -2147483648D;
|
||||
this.txtTel.MinimumSize = new System.Drawing.Size(1, 16);
|
||||
this.txtTel.Name = "txtTel";
|
||||
this.txtTel.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(216)))), ((int)(((byte)(219)))), ((int)(((byte)(227)))));
|
||||
this.txtTel.Size = new System.Drawing.Size(188, 42);
|
||||
|
||||
this.txtTel.StyleCustomMode = true;
|
||||
this.txtTel.TabIndex = 14;
|
||||
this.txtTel.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// lblTel
|
||||
//
|
||||
this.lblTel.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
this.lblTel.Location = new System.Drawing.Point(3, 198);
|
||||
this.lblTel.Name = "lblTel";
|
||||
this.lblTel.Size = new System.Drawing.Size(107, 29);
|
||||
this.lblTel.Style = Sunny.UI.UIStyle.Custom;
|
||||
this.lblTel.TabIndex = 13;
|
||||
this.lblTel.Text = "移动电话";
|
||||
this.lblTel.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(429, 136);
|
||||
this.txtEmail.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
this.txtEmail.Maximum = 2147483647D;
|
||||
this.txtEmail.MaxLength = 60;
|
||||
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(269, 42);
|
||||
|
||||
this.txtEmail.StyleCustomMode = true;
|
||||
this.txtEmail.TabIndex = 12;
|
||||
this.txtEmail.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// lblEmail
|
||||
//
|
||||
this.lblEmail.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
this.lblEmail.Location = new System.Drawing.Point(357, 143);
|
||||
this.lblEmail.Name = "lblEmail";
|
||||
this.lblEmail.Size = new System.Drawing.Size(65, 29);
|
||||
this.lblEmail.Style = Sunny.UI.UIStyle.Custom;
|
||||
this.lblEmail.TabIndex = 11;
|
||||
this.lblEmail.Text = "邮箱";
|
||||
this.lblEmail.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// lblBirthday
|
||||
//
|
||||
this.lblBirthday.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
this.lblBirthday.Location = new System.Drawing.Point(3, 143);
|
||||
this.lblBirthday.Name = "lblBirthday";
|
||||
this.lblBirthday.Size = new System.Drawing.Size(107, 29);
|
||||
this.lblBirthday.Style = Sunny.UI.UIStyle.Custom;
|
||||
this.lblBirthday.TabIndex = 9;
|
||||
this.lblBirthday.Text = "出生日期";
|
||||
this.lblBirthday.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// rdFemale
|
||||
//
|
||||
this.rdFemale.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.rdFemale.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
this.rdFemale.Location = new System.Drawing.Point(501, 88);
|
||||
this.rdFemale.MinimumSize = new System.Drawing.Size(1, 1);
|
||||
this.rdFemale.Name = "rdFemale";
|
||||
this.rdFemale.Padding = new System.Windows.Forms.Padding(22, 0, 0, 0);
|
||||
this.rdFemale.Size = new System.Drawing.Size(57, 36);
|
||||
this.rdFemale.Style = Sunny.UI.UIStyle.Custom;
|
||||
this.rdFemale.TabIndex = 8;
|
||||
this.rdFemale.Text = "女";
|
||||
//
|
||||
// rdMale
|
||||
//
|
||||
this.rdMale.Checked = true;
|
||||
this.rdMale.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.rdMale.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
this.rdMale.Location = new System.Drawing.Point(433, 88);
|
||||
this.rdMale.MinimumSize = new System.Drawing.Size(1, 1);
|
||||
this.rdMale.Name = "rdMale";
|
||||
this.rdMale.Padding = new System.Windows.Forms.Padding(22, 0, 0, 0);
|
||||
this.rdMale.Size = new System.Drawing.Size(57, 36);
|
||||
this.rdMale.Style = Sunny.UI.UIStyle.Custom;
|
||||
this.rdMale.TabIndex = 7;
|
||||
this.rdMale.Text = "男";
|
||||
//
|
||||
// txtNickName
|
||||
//
|
||||
this.txtNickName.ButtonFillColor = System.Drawing.Color.White;
|
||||
this.txtNickName.ButtonFillHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
|
||||
this.txtNickName.ButtonFillPressColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
|
||||
this.txtNickName.ButtonForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(96)))), ((int)(((byte)(98)))), ((int)(((byte)(102)))));
|
||||
this.txtNickName.ButtonForeHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
|
||||
this.txtNickName.ButtonForePressColor = System.Drawing.Color.FromArgb(((int)(((byte)(74)))), ((int)(((byte)(131)))), ((int)(((byte)(229)))));
|
||||
this.txtNickName.ButtonRectColor = System.Drawing.Color.FromArgb(((int)(((byte)(216)))), ((int)(((byte)(219)))), ((int)(((byte)(227)))));
|
||||
this.txtNickName.ButtonRectHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(197)))), ((int)(((byte)(222)))), ((int)(((byte)(255)))));
|
||||
this.txtNickName.ButtonSymbol = 61761;
|
||||
this.txtNickName.Cursor = System.Windows.Forms.Cursors.IBeam;
|
||||
this.txtNickName.FillColor2 = System.Drawing.Color.White;
|
||||
this.txtNickName.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
this.txtNickName.Location = new System.Drawing.Point(429, 32);
|
||||
this.txtNickName.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
this.txtNickName.Maximum = 2147483647D;
|
||||
this.txtNickName.MaxLength = 20;
|
||||
this.txtNickName.Minimum = -2147483648D;
|
||||
this.txtNickName.MinimumSize = new System.Drawing.Size(1, 16);
|
||||
this.txtNickName.Name = "txtNickName";
|
||||
this.txtNickName.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(216)))), ((int)(((byte)(219)))), ((int)(((byte)(227)))));
|
||||
this.txtNickName.Size = new System.Drawing.Size(269, 42);
|
||||
|
||||
this.txtNickName.StyleCustomMode = true;
|
||||
this.txtNickName.TabIndex = 3;
|
||||
this.txtNickName.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// lblGender
|
||||
//
|
||||
this.lblGender.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
this.lblGender.Location = new System.Drawing.Point(357, 91);
|
||||
this.lblGender.Name = "lblGender";
|
||||
this.lblGender.Size = new System.Drawing.Size(65, 29);
|
||||
this.lblGender.Style = Sunny.UI.UIStyle.Custom;
|
||||
this.lblGender.TabIndex = 6;
|
||||
this.lblGender.Text = "性别";
|
||||
this.lblGender.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// lblNickName
|
||||
//
|
||||
this.lblNickName.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
this.lblNickName.Location = new System.Drawing.Point(357, 39);
|
||||
this.lblNickName.Name = "lblNickName";
|
||||
this.lblNickName.Size = new System.Drawing.Size(65, 29);
|
||||
this.lblNickName.Style = Sunny.UI.UIStyle.Custom;
|
||||
this.lblNickName.TabIndex = 2;
|
||||
this.lblNickName.Text = "昵称";
|
||||
this.lblNickName.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(117, 84);
|
||||
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 = 5;
|
||||
this.txtName.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// lblName
|
||||
//
|
||||
this.lblName.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
this.lblName.Location = new System.Drawing.Point(45, 91);
|
||||
this.lblName.Name = "lblName";
|
||||
this.lblName.Size = new System.Drawing.Size(65, 29);
|
||||
this.lblName.Style = Sunny.UI.UIStyle.Custom;
|
||||
this.lblName.TabIndex = 4;
|
||||
this.lblName.Text = "姓名";
|
||||
this.lblName.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// txtAccount
|
||||
//
|
||||
this.txtAccount.ButtonFillColor = System.Drawing.Color.White;
|
||||
this.txtAccount.ButtonFillHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
|
||||
this.txtAccount.ButtonFillPressColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
|
||||
this.txtAccount.ButtonForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(96)))), ((int)(((byte)(98)))), ((int)(((byte)(102)))));
|
||||
this.txtAccount.ButtonForeHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
|
||||
this.txtAccount.ButtonForePressColor = System.Drawing.Color.FromArgb(((int)(((byte)(74)))), ((int)(((byte)(131)))), ((int)(((byte)(229)))));
|
||||
this.txtAccount.ButtonRectColor = System.Drawing.Color.FromArgb(((int)(((byte)(216)))), ((int)(((byte)(219)))), ((int)(((byte)(227)))));
|
||||
this.txtAccount.ButtonRectHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(197)))), ((int)(((byte)(222)))), ((int)(((byte)(255)))));
|
||||
this.txtAccount.ButtonSymbol = 61761;
|
||||
this.txtAccount.Cursor = System.Windows.Forms.Cursors.IBeam;
|
||||
this.txtAccount.Enabled = false;
|
||||
this.txtAccount.FillColor2 = System.Drawing.Color.White;
|
||||
this.txtAccount.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
this.txtAccount.Location = new System.Drawing.Point(117, 32);
|
||||
this.txtAccount.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
this.txtAccount.Maximum = 2147483647D;
|
||||
this.txtAccount.MaxLength = 20;
|
||||
this.txtAccount.Minimum = -2147483648D;
|
||||
this.txtAccount.MinimumSize = new System.Drawing.Size(1, 16);
|
||||
this.txtAccount.Name = "txtAccount";
|
||||
this.txtAccount.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(216)))), ((int)(((byte)(219)))), ((int)(((byte)(227)))));
|
||||
this.txtAccount.Size = new System.Drawing.Size(188, 42);
|
||||
|
||||
this.txtAccount.StyleCustomMode = true;
|
||||
this.txtAccount.TabIndex = 1;
|
||||
this.txtAccount.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// lblAccount
|
||||
//
|
||||
this.lblAccount.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
this.lblAccount.Location = new System.Drawing.Point(45, 39);
|
||||
this.lblAccount.Name = "lblAccount";
|
||||
this.lblAccount.Size = new System.Drawing.Size(65, 29);
|
||||
this.lblAccount.Style = Sunny.UI.UIStyle.Custom;
|
||||
this.lblAccount.TabIndex = 0;
|
||||
this.lblAccount.Text = "账号";
|
||||
this.lblAccount.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// tabPage2
|
||||
//
|
||||
this.tabPage2.BackColor = System.Drawing.Color.White;
|
||||
this.tabPage2.Controls.Add(this.btnSelectAvator);
|
||||
this.tabPage2.Controls.Add(this.uiLabel10);
|
||||
this.tabPage2.Location = new System.Drawing.Point(0, 40);
|
||||
this.tabPage2.Name = "tabPage2";
|
||||
this.tabPage2.Size = new System.Drawing.Size(200, 60);
|
||||
this.tabPage2.TabIndex = 1;
|
||||
this.tabPage2.Text = "头像";
|
||||
//
|
||||
// btnSelectAvator
|
||||
//
|
||||
this.btnSelectAvator.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.btnSelectAvator.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
this.btnSelectAvator.Location = new System.Drawing.Point(258, 127);
|
||||
this.btnSelectAvator.MinimumSize = new System.Drawing.Size(1, 1);
|
||||
this.btnSelectAvator.Name = "btnSelectAvator";
|
||||
this.btnSelectAvator.Size = new System.Drawing.Size(137, 48);
|
||||
this.btnSelectAvator.Style = Sunny.UI.UIStyle.Custom;
|
||||
this.btnSelectAvator.TabIndex = 1;
|
||||
this.btnSelectAvator.Text = "上传头像";
|
||||
this.btnSelectAvator.Click += new System.EventHandler(this.btnSelectAvator_Click);
|
||||
//
|
||||
// uiLabel10
|
||||
//
|
||||
this.uiLabel10.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
this.uiLabel10.Location = new System.Drawing.Point(111, 47);
|
||||
this.uiLabel10.Name = "uiLabel10";
|
||||
this.uiLabel10.Size = new System.Drawing.Size(538, 29);
|
||||
this.uiLabel10.Style = Sunny.UI.UIStyle.Custom;
|
||||
this.uiLabel10.TabIndex = 0;
|
||||
this.uiLabel10.Text = "建议尺寸168*168,支持jpg,bmp,png,不能超过200kb";
|
||||
this.uiLabel10.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// tabPage3
|
||||
//
|
||||
this.tabPage3.BackColor = System.Drawing.Color.White;
|
||||
this.tabPage3.Controls.Add(this.btnReset);
|
||||
this.tabPage3.Controls.Add(this.btnChangePassword);
|
||||
this.tabPage3.Controls.Add(this.txtComfirmPassword);
|
||||
this.tabPage3.Controls.Add(this.txtNewPassword);
|
||||
this.tabPage3.Controls.Add(this.lblComfirmPassword);
|
||||
this.tabPage3.Controls.Add(this.lblNewPassword);
|
||||
this.tabPage3.Controls.Add(this.txtOldPassword);
|
||||
this.tabPage3.Controls.Add(this.lblOldPassword);
|
||||
this.tabPage3.Controls.Add(this.uiLabel11);
|
||||
this.tabPage3.Location = new System.Drawing.Point(0, 40);
|
||||
this.tabPage3.Name = "tabPage3";
|
||||
this.tabPage3.Size = new System.Drawing.Size(200, 60);
|
||||
this.tabPage3.TabIndex = 2;
|
||||
this.tabPage3.Text = "账号";
|
||||
//
|
||||
// btnReset
|
||||
//
|
||||
this.btnReset.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.btnReset.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(155)))), ((int)(((byte)(40)))));
|
||||
this.btnReset.FillColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(155)))), ((int)(((byte)(40)))));
|
||||
this.btnReset.FillHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(223)))), ((int)(((byte)(174)))), ((int)(((byte)(86)))));
|
||||
this.btnReset.FillPressColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(137)))), ((int)(((byte)(43)))));
|
||||
this.btnReset.FillSelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(137)))), ((int)(((byte)(43)))));
|
||||
this.btnReset.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
this.btnReset.Location = new System.Drawing.Point(268, 261);
|
||||
this.btnReset.MinimumSize = new System.Drawing.Size(1, 1);
|
||||
this.btnReset.Name = "btnReset";
|
||||
this.btnReset.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(155)))), ((int)(((byte)(40)))));
|
||||
this.btnReset.RectHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(223)))), ((int)(((byte)(174)))), ((int)(((byte)(86)))));
|
||||
this.btnReset.RectPressColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(137)))), ((int)(((byte)(43)))));
|
||||
this.btnReset.RectSelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(137)))), ((int)(((byte)(43)))));
|
||||
this.btnReset.Size = new System.Drawing.Size(125, 44);
|
||||
this.btnReset.Style = Sunny.UI.UIStyle.Orange;
|
||||
this.btnReset.StyleCustomMode = true;
|
||||
this.btnReset.TabIndex = 21;
|
||||
this.btnReset.Text = "重置";
|
||||
this.btnReset.Click += new System.EventHandler(this.btnReset_Click);
|
||||
//
|
||||
// btnChangePassword
|
||||
//
|
||||
this.btnChangePassword.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.btnChangePassword.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
this.btnChangePassword.Location = new System.Drawing.Point(114, 261);
|
||||
this.btnChangePassword.MinimumSize = new System.Drawing.Size(1, 1);
|
||||
this.btnChangePassword.Name = "btnChangePassword";
|
||||
this.btnChangePassword.Size = new System.Drawing.Size(125, 44);
|
||||
this.btnChangePassword.Style = Sunny.UI.UIStyle.Custom;
|
||||
this.btnChangePassword.TabIndex = 20;
|
||||
this.btnChangePassword.Text = "保存";
|
||||
this.btnChangePassword.Click += new System.EventHandler(this.btnChangePassword_Click);
|
||||
//
|
||||
// txtComfirmPassword
|
||||
//
|
||||
this.txtComfirmPassword.ButtonFillColor = System.Drawing.Color.White;
|
||||
this.txtComfirmPassword.ButtonFillHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
|
||||
this.txtComfirmPassword.ButtonFillPressColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
|
||||
this.txtComfirmPassword.ButtonForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(96)))), ((int)(((byte)(98)))), ((int)(((byte)(102)))));
|
||||
this.txtComfirmPassword.ButtonForeHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
|
||||
this.txtComfirmPassword.ButtonForePressColor = System.Drawing.Color.FromArgb(((int)(((byte)(74)))), ((int)(((byte)(131)))), ((int)(((byte)(229)))));
|
||||
this.txtComfirmPassword.ButtonRectColor = System.Drawing.Color.FromArgb(((int)(((byte)(216)))), ((int)(((byte)(219)))), ((int)(((byte)(227)))));
|
||||
this.txtComfirmPassword.ButtonRectHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(197)))), ((int)(((byte)(222)))), ((int)(((byte)(255)))));
|
||||
this.txtComfirmPassword.ButtonSymbol = 61761;
|
||||
this.txtComfirmPassword.Cursor = System.Windows.Forms.Cursors.IBeam;
|
||||
this.txtComfirmPassword.FillColor2 = System.Drawing.Color.White;
|
||||
this.txtComfirmPassword.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
this.txtComfirmPassword.Location = new System.Drawing.Point(205, 178);
|
||||
this.txtComfirmPassword.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
this.txtComfirmPassword.Maximum = 2147483647D;
|
||||
this.txtComfirmPassword.Minimum = -2147483648D;
|
||||
this.txtComfirmPassword.MinimumSize = new System.Drawing.Size(1, 16);
|
||||
this.txtComfirmPassword.Name = "txtComfirmPassword";
|
||||
this.txtComfirmPassword.PasswordChar = '*';
|
||||
this.txtComfirmPassword.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(216)))), ((int)(((byte)(219)))), ((int)(((byte)(227)))));
|
||||
this.txtComfirmPassword.Size = new System.Drawing.Size(188, 42);
|
||||
|
||||
this.txtComfirmPassword.StyleCustomMode = true;
|
||||
this.txtComfirmPassword.TabIndex = 11;
|
||||
this.txtComfirmPassword.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// txtNewPassword
|
||||
//
|
||||
this.txtNewPassword.ButtonFillColor = System.Drawing.Color.White;
|
||||
this.txtNewPassword.ButtonFillHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
|
||||
this.txtNewPassword.ButtonFillPressColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
|
||||
this.txtNewPassword.ButtonForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(96)))), ((int)(((byte)(98)))), ((int)(((byte)(102)))));
|
||||
this.txtNewPassword.ButtonForeHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
|
||||
this.txtNewPassword.ButtonForePressColor = System.Drawing.Color.FromArgb(((int)(((byte)(74)))), ((int)(((byte)(131)))), ((int)(((byte)(229)))));
|
||||
this.txtNewPassword.ButtonRectColor = System.Drawing.Color.FromArgb(((int)(((byte)(216)))), ((int)(((byte)(219)))), ((int)(((byte)(227)))));
|
||||
this.txtNewPassword.ButtonRectHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(197)))), ((int)(((byte)(222)))), ((int)(((byte)(255)))));
|
||||
this.txtNewPassword.ButtonSymbol = 61761;
|
||||
this.txtNewPassword.Cursor = System.Windows.Forms.Cursors.IBeam;
|
||||
this.txtNewPassword.FillColor2 = System.Drawing.Color.White;
|
||||
this.txtNewPassword.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
this.txtNewPassword.Location = new System.Drawing.Point(205, 123);
|
||||
this.txtNewPassword.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
this.txtNewPassword.Maximum = 2147483647D;
|
||||
this.txtNewPassword.Minimum = -2147483648D;
|
||||
this.txtNewPassword.MinimumSize = new System.Drawing.Size(1, 16);
|
||||
this.txtNewPassword.Name = "txtNewPassword";
|
||||
this.txtNewPassword.PasswordChar = '*';
|
||||
this.txtNewPassword.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(216)))), ((int)(((byte)(219)))), ((int)(((byte)(227)))));
|
||||
this.txtNewPassword.Size = new System.Drawing.Size(188, 42);
|
||||
|
||||
this.txtNewPassword.StyleCustomMode = true;
|
||||
this.txtNewPassword.TabIndex = 9;
|
||||
this.txtNewPassword.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// lblComfirmPassword
|
||||
//
|
||||
this.lblComfirmPassword.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
this.lblComfirmPassword.Location = new System.Drawing.Point(88, 185);
|
||||
this.lblComfirmPassword.Name = "lblComfirmPassword";
|
||||
this.lblComfirmPassword.Size = new System.Drawing.Size(110, 29);
|
||||
this.lblComfirmPassword.Style = Sunny.UI.UIStyle.Custom;
|
||||
this.lblComfirmPassword.TabIndex = 10;
|
||||
this.lblComfirmPassword.Text = "确认密码";
|
||||
this.lblComfirmPassword.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// lblNewPassword
|
||||
//
|
||||
this.lblNewPassword.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
this.lblNewPassword.Location = new System.Drawing.Point(114, 130);
|
||||
this.lblNewPassword.Name = "lblNewPassword";
|
||||
this.lblNewPassword.Size = new System.Drawing.Size(84, 29);
|
||||
this.lblNewPassword.Style = Sunny.UI.UIStyle.Custom;
|
||||
this.lblNewPassword.TabIndex = 8;
|
||||
this.lblNewPassword.Text = "新密码";
|
||||
this.lblNewPassword.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// txtOldPassword
|
||||
//
|
||||
this.txtOldPassword.ButtonFillColor = System.Drawing.Color.White;
|
||||
this.txtOldPassword.ButtonFillHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
|
||||
this.txtOldPassword.ButtonFillPressColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
|
||||
this.txtOldPassword.ButtonForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(96)))), ((int)(((byte)(98)))), ((int)(((byte)(102)))));
|
||||
this.txtOldPassword.ButtonForeHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
|
||||
this.txtOldPassword.ButtonForePressColor = System.Drawing.Color.FromArgb(((int)(((byte)(74)))), ((int)(((byte)(131)))), ((int)(((byte)(229)))));
|
||||
this.txtOldPassword.ButtonRectColor = System.Drawing.Color.FromArgb(((int)(((byte)(216)))), ((int)(((byte)(219)))), ((int)(((byte)(227)))));
|
||||
this.txtOldPassword.ButtonRectHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(197)))), ((int)(((byte)(222)))), ((int)(((byte)(255)))));
|
||||
this.txtOldPassword.ButtonSymbol = 61761;
|
||||
this.txtOldPassword.Cursor = System.Windows.Forms.Cursors.IBeam;
|
||||
this.txtOldPassword.FillColor2 = System.Drawing.Color.White;
|
||||
this.txtOldPassword.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
this.txtOldPassword.Location = new System.Drawing.Point(205, 71);
|
||||
this.txtOldPassword.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
this.txtOldPassword.Maximum = 2147483647D;
|
||||
this.txtOldPassword.Minimum = -2147483648D;
|
||||
this.txtOldPassword.MinimumSize = new System.Drawing.Size(1, 16);
|
||||
this.txtOldPassword.Name = "txtOldPassword";
|
||||
this.txtOldPassword.PasswordChar = '*';
|
||||
this.txtOldPassword.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(216)))), ((int)(((byte)(219)))), ((int)(((byte)(227)))));
|
||||
this.txtOldPassword.Size = new System.Drawing.Size(188, 42);
|
||||
|
||||
this.txtOldPassword.StyleCustomMode = true;
|
||||
this.txtOldPassword.TabIndex = 7;
|
||||
this.txtOldPassword.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// lblOldPassword
|
||||
//
|
||||
this.lblOldPassword.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
this.lblOldPassword.Location = new System.Drawing.Point(114, 78);
|
||||
this.lblOldPassword.Name = "lblOldPassword";
|
||||
this.lblOldPassword.Size = new System.Drawing.Size(84, 29);
|
||||
this.lblOldPassword.Style = Sunny.UI.UIStyle.Custom;
|
||||
this.lblOldPassword.TabIndex = 6;
|
||||
this.lblOldPassword.Text = "旧密码";
|
||||
this.lblOldPassword.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// uiLabel11
|
||||
//
|
||||
this.uiLabel11.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
this.uiLabel11.Location = new System.Drawing.Point(45, 23);
|
||||
this.uiLabel11.Name = "uiLabel11";
|
||||
this.uiLabel11.Size = new System.Drawing.Size(125, 29);
|
||||
this.uiLabel11.Style = Sunny.UI.UIStyle.Custom;
|
||||
this.uiLabel11.TabIndex = 0;
|
||||
this.uiLabel11.Text = "修改密码";
|
||||
this.uiLabel11.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// AccountForm
|
||||
//
|
||||
this.AllowShowTitle = false;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 27F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(1031, 558);
|
||||
this.Controls.Add(this.uiPanel1);
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "AccountForm";
|
||||
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.AccountForm_Load);
|
||||
this.uiPanel1.ResumeLayout(false);
|
||||
this.titlePanel.ResumeLayout(false);
|
||||
this.panel1.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.imageAvator)).EndInit();
|
||||
this.uiTabControl1.ResumeLayout(false);
|
||||
this.tabPage1.ResumeLayout(false);
|
||||
this.tabPage2.ResumeLayout(false);
|
||||
this.tabPage3.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
private Sunny.UI.UIPanel uiPanel1;
|
||||
private System.Windows.Forms.Panel panel1;
|
||||
private System.Windows.Forms.Label lblCurrentUser;
|
||||
private System.Windows.Forms.PictureBox imageAvator;
|
||||
private Sunny.UI.UITabControl uiTabControl1;
|
||||
private System.Windows.Forms.TabPage tabPage1;
|
||||
private Sunny.UI.UIButton btnSave;
|
||||
private Sunny.UI.UITextBox txtSignature;
|
||||
private Sunny.UI.UILabel lblSignature;
|
||||
private Sunny.UI.UITextBox txtAddress;
|
||||
private Sunny.UI.UILabel lblAddress;
|
||||
private Sunny.UI.UITextBox txtTel;
|
||||
private Sunny.UI.UILabel lblTel;
|
||||
private Sunny.UI.UITextBox txtEmail;
|
||||
private Sunny.UI.UILabel lblEmail;
|
||||
private Sunny.UI.UILabel lblBirthday;
|
||||
private Sunny.UI.UIRadioButton rdFemale;
|
||||
private Sunny.UI.UIRadioButton rdMale;
|
||||
private Sunny.UI.UILabel lblGender;
|
||||
private Sunny.UI.UILabel lblNickName;
|
||||
private Sunny.UI.UITextBox txtName;
|
||||
private Sunny.UI.UILabel lblName;
|
||||
private Sunny.UI.UITextBox txtAccount;
|
||||
private Sunny.UI.UILabel lblAccount;
|
||||
private System.Windows.Forms.TabPage tabPage2;
|
||||
private Sunny.UI.UIButton btnSelectAvator;
|
||||
private Sunny.UI.UILabel uiLabel10;
|
||||
private System.Windows.Forms.TabPage tabPage3;
|
||||
private Sunny.UI.UIButton btnReset;
|
||||
private Sunny.UI.UIButton btnChangePassword;
|
||||
private Sunny.UI.UITextBox txtComfirmPassword;
|
||||
private Sunny.UI.UITextBox txtNewPassword;
|
||||
private Sunny.UI.UILabel lblComfirmPassword;
|
||||
private Sunny.UI.UILabel lblNewPassword;
|
||||
private Sunny.UI.UITextBox txtOldPassword;
|
||||
private Sunny.UI.UILabel lblOldPassword;
|
||||
private Sunny.UI.UILabel uiLabel11;
|
||||
private System.Windows.Forms.Panel titlePanel;
|
||||
private Sunny.UI.UILabel uiLabel15;
|
||||
private Sunny.UI.UISymbolLabel btnClose;
|
||||
private Sunny.UI.UITextBox txtNickName;
|
||||
private Sunny.UI.UIDatePicker txtBirthday;
|
||||
}
|
||||
}
|
304
DH.RBAC/AccountForm.cs
Normal file
@ -0,0 +1,304 @@
|
||||
using Sunny.UI;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Windows.Forms;
|
||||
using DH.RBAC.Model.Sys;
|
||||
using DH.RBAC.Common;
|
||||
using DH.RBAC.Properties;
|
||||
using DH.RBAC.Logic.Sys;
|
||||
using DH.RBAC.Utility.Other;
|
||||
using static System.Windows.Forms.VisualStyles.VisualStyleElement;
|
||||
|
||||
namespace DH.RBAC
|
||||
{
|
||||
/// <summary>
|
||||
/// 用户账户界面
|
||||
/// </summary>
|
||||
public partial class AccountForm : UIForm
|
||||
{
|
||||
private SysUserLogic userlogic;
|
||||
private SysUserLogOnLogic userLogOnLogic;
|
||||
/// <summary>
|
||||
/// 构造方法
|
||||
/// </summary>
|
||||
public AccountForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
userlogic = new SysUserLogic();
|
||||
userLogOnLogic = new SysUserLogOnLogic();
|
||||
}
|
||||
|
||||
#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
|
||||
|
||||
private string Avatar;
|
||||
/// <summary>
|
||||
/// 画面加载,读取用户信息,显示在界面上
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void AccountForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
SysUser user = userlogic.Get(GlobalConfig.CurrentUser.Id);
|
||||
if (user == null)
|
||||
{
|
||||
AntdUI.Message.warn(this, "网络或服务器异常,请稍后重试!", autoClose: 3);
|
||||
|
||||
return;
|
||||
}
|
||||
Avatar = user.Avatar;
|
||||
txtAccount.Text = user.Account;
|
||||
txtNickName.Text = user.NickName;
|
||||
txtName.Text = user.RealName;
|
||||
if (user.Gender == "1")
|
||||
rdMale.Checked = true;
|
||||
else
|
||||
rdFemale.Checked = true;
|
||||
txtBirthday.Value = user.Birthday.Value;
|
||||
txtEmail.Text = user.Email;
|
||||
txtTel.Text = user.MobilePhone;
|
||||
txtAddress.Text = user.Address;
|
||||
txtSignature.Text = user.Signature;
|
||||
|
||||
//头像显示
|
||||
if (StringHelper.IsNullOrEmpty(user.AvatarBase64))
|
||||
{
|
||||
imageAvator.Image = Resources.avatar;
|
||||
}
|
||||
else
|
||||
{
|
||||
try
|
||||
{
|
||||
MemoryStream ms = new MemoryStream(Convert.FromBase64String(user.AvatarBase64));
|
||||
imageAvator.Image = Image.FromStream(ms);
|
||||
}
|
||||
catch
|
||||
{
|
||||
imageAvator.Image = Resources.avatar;
|
||||
}
|
||||
}
|
||||
|
||||
lblCurrentUser.Text = $"{user.Account}@{user.NickName}";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 保存修改
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
//非空检测
|
||||
if (StringHelper.IsNullOrEmpty(txtNickName.Text))
|
||||
{
|
||||
AntdUI.Message.warn(this, "昵称不能为空!", autoClose: 3);
|
||||
|
||||
return;
|
||||
}
|
||||
if (StringHelper.IsNullOrEmpty(txtName.Text))
|
||||
{
|
||||
AntdUI.Message.warn(this, "姓名不能为空!", autoClose: 3);
|
||||
|
||||
return;
|
||||
}
|
||||
if (StringHelper.IsNullOrEmpty(txtBirthday.Text))
|
||||
{
|
||||
AntdUI.Message.warn(this, "请选择生日!", autoClose: 3);
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
if (StringHelper.IsNullOrEmpty(txtEmail.Text))
|
||||
{
|
||||
AntdUI.Message.warn(this, "邮箱不能为空!", autoClose: 3);
|
||||
|
||||
return;
|
||||
}
|
||||
if (StringHelper.IsNullOrEmpty(txtTel.Text))
|
||||
{
|
||||
AntdUI.Message.warn(this, "手机不能为空!", autoClose: 3);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
//获得目前信息,提交给服务端处理,返回结果
|
||||
SysUser model = new SysUser();
|
||||
model.Id = GlobalConfig.CurrentUser.Id;
|
||||
model.Account = txtAccount.Text;
|
||||
model.NickName = txtNickName.Text;
|
||||
model.RealName = txtName.Text;
|
||||
model.Avatar = Avatar;
|
||||
model.Gender = rdMale.Checked ? "1" : "0";
|
||||
model.StrBirthday = txtBirthday.Text;
|
||||
model.Email = txtEmail.Text;
|
||||
model.MobilePhone = txtTel.Text;
|
||||
model.Address = txtAddress.Text;
|
||||
model.Signature = txtSignature.Text;
|
||||
|
||||
DateTime defaultDt = DateTime.Today;
|
||||
DateTime.TryParse(model.StrBirthday, out defaultDt);
|
||||
model.Birthday = defaultDt;
|
||||
int row = userlogic.AppUpdateBasicInfo(model);
|
||||
|
||||
if (row == 0)
|
||||
{
|
||||
AntdUI.Message.warn(this, "对不起,操作失败!", autoClose: 3);
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
AntdUI.Message.success(this, "恭喜你,操作成功!", autoClose: 3);
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 选择图片上传
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void btnSelectAvator_Click(object sender, EventArgs e)
|
||||
{
|
||||
//OpenFileDialog dialog = new OpenFileDialog();
|
||||
//dialog.Filter = "Image Files(*.BMP;*.JPG;*.png)|*.BMP;*.JPG;*.png";
|
||||
//if (dialog.ShowDialog() == DialogResult.OK)
|
||||
//{
|
||||
// string fileName = dialog.FileName;
|
||||
// Image image = Image.FromFile(fileName);
|
||||
// //上传到服务器
|
||||
// AjaxResult result = null;
|
||||
|
||||
// string url = GlobalConfig.Config.Url + "account/uploadImage";
|
||||
// string str = HttpUtils.PostFile(url, fileName, 2000);
|
||||
// try
|
||||
// {
|
||||
// result = str.ToObject<AjaxResult>();
|
||||
// }
|
||||
// catch
|
||||
// {
|
||||
// result = null;
|
||||
// }
|
||||
|
||||
|
||||
// if (result == null)
|
||||
// {
|
||||
// this.ShowWarningDialog("网络或服务器异常,请稍后重试", UIStyle.White);
|
||||
// return;
|
||||
// }
|
||||
// if (result.state != ResultType.Success)
|
||||
// {
|
||||
// this.ShowWarningDialog(result.message, UIStyle.White);
|
||||
// return;
|
||||
// }
|
||||
// //上传成功,修改界面头像,以及服务器头像地址
|
||||
// Avatar = result.data.ToString();
|
||||
// imageAvator.Image = image;
|
||||
// this.ShowSuccessDialog("上传成功,点击保存后生效", UIStyle.White);
|
||||
//}
|
||||
}
|
||||
|
||||
private void btnReset_Click(object sender, EventArgs e)
|
||||
{
|
||||
txtOldPassword.Text = string.Empty;
|
||||
txtNewPassword.Text = string.Empty;
|
||||
txtComfirmPassword.Text = string.Empty;
|
||||
}
|
||||
|
||||
private void btnChangePassword_Click(object sender, EventArgs e)
|
||||
{
|
||||
//非空检测
|
||||
if (StringHelper.IsNullOrEmpty(txtOldPassword.Text))
|
||||
{
|
||||
AntdUI.Message.warn(this, "旧密码不能为空!", autoClose: 3);
|
||||
|
||||
return;
|
||||
}
|
||||
if (StringHelper.IsNullOrEmpty(txtNewPassword.Text))
|
||||
{
|
||||
AntdUI.Message.warn(this, "新密码不能为空!", autoClose: 3);
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
if (StringHelper.IsNullOrEmpty(txtComfirmPassword.Text))
|
||||
{
|
||||
AntdUI.Message.warn(this, "确认密码不能为空!", autoClose: 3);
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
if (txtNewPassword.Text != txtComfirmPassword.Text)
|
||||
{
|
||||
AntdUI.Message.warn(this, "两次密码不一致!", autoClose: 3);
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
Dictionary<string, string> parm = new Dictionary<string, string>();
|
||||
string userId = GlobalConfig.CurrentUser.Id;
|
||||
string oldPassword = txtOldPassword.Text;
|
||||
string newPassword = txtNewPassword.Text;
|
||||
string confirmPassword = txtComfirmPassword.Text;
|
||||
|
||||
|
||||
if (!newPassword.Equals(confirmPassword))
|
||||
{
|
||||
AntdUI.Message.warn(this, "两次密码输入不一致,请重新确认!", autoClose: 3);
|
||||
|
||||
return;
|
||||
}
|
||||
oldPassword = oldPassword.MD5Encrypt();
|
||||
newPassword = newPassword.MD5Encrypt();
|
||||
confirmPassword = confirmPassword.MD5Encrypt();
|
||||
|
||||
var userLoginEntity = userLogOnLogic.GetByAccount(userId);
|
||||
if (oldPassword.DESEncrypt(userLoginEntity.SecretKey).MD5Encrypt() != userLoginEntity.Password)
|
||||
{
|
||||
AntdUI.Message.warn(this, "旧密码验证失败!", autoClose: 3);
|
||||
return;
|
||||
}
|
||||
userLoginEntity.Password = newPassword.DESEncrypt(userLoginEntity.SecretKey).MD5Encrypt();
|
||||
int isSuccess = userLogOnLogic.ModifyPwd(userLoginEntity);
|
||||
if (isSuccess == 0)
|
||||
{
|
||||
AntdUI.Message.warn(this, "对不起,操作失败!", autoClose: 3);
|
||||
|
||||
return;
|
||||
}
|
||||
AntdUI.Message.success(this, "修改成功!", autoClose: 3);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
1161
DH.RBAC/AccountForm.resx
Normal file
35
DH.RBAC/Common/GlobalConfig.cs
Normal file
@ -0,0 +1,35 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using DH.RBAC.Model.Sys;
|
||||
|
||||
namespace DH.RBAC.Common
|
||||
{
|
||||
/// <summary>
|
||||
/// 全局数据存放
|
||||
/// </summary>
|
||||
public class GlobalConfig
|
||||
{
|
||||
public static MyConfig Config { get; set; }
|
||||
/// <summary>
|
||||
/// 当前登录的用户
|
||||
/// </summary>
|
||||
public static SysUser CurrentUser;
|
||||
|
||||
/// <summary>
|
||||
/// 当前用户头像
|
||||
/// </summary>
|
||||
public static Image Avatar;
|
||||
|
||||
/// <summary>
|
||||
/// 当前选的哪个菜单
|
||||
/// </summary>
|
||||
public static string CurrentMenuText;
|
||||
|
||||
/// <summary>
|
||||
/// 当前用户权限
|
||||
/// </summary>
|
||||
public static List<SysPermission> PermissionList;
|
||||
|
||||
|
||||
}
|
||||
}
|
719
DH.RBAC/Common/IconDict.cs
Normal file
@ -0,0 +1,719 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace DH.RBAC.Common
|
||||
{
|
||||
/// <summary>
|
||||
/// 图标字典
|
||||
/// </summary>
|
||||
public class IconDict
|
||||
{
|
||||
/// <summary>
|
||||
/// 全局存放图标字典
|
||||
/// </summary>
|
||||
public static Dictionary<string, int> MyIconDict = Init();
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 初始化字典
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private static Dictionary<string, int> Init()
|
||||
{
|
||||
Dictionary<string, int> dict = new Dictionary<string, int>();
|
||||
dict.Add("fa fa-bluetooth", 62099);
|
||||
dict.Add("fa fa-bluetooth-b", 62100);
|
||||
dict.Add("fa fa-codiepie", 62084);
|
||||
dict.Add("fa fa-credit-card-alt", 62083);
|
||||
dict.Add("fa fa-edge", 62082);
|
||||
dict.Add("fa fa-fort-awesome", 62086);
|
||||
dict.Add("fa fa-hashtag", 62098);
|
||||
dict.Add("fa fa-mixcloud", 62089);
|
||||
dict.Add("fa fa-modx", 62085);
|
||||
dict.Add("fa fa-pause-circle", 62091);
|
||||
dict.Add("fa fa-pause-circle-o", 62092);
|
||||
dict.Add("fa fa-percent", 62101);
|
||||
dict.Add("fa fa-product-hunt", 62088);
|
||||
dict.Add("fa fa-reddit-alien", 62081);
|
||||
dict.Add("fa fa-scribd", 62090);
|
||||
dict.Add("fa fa-shopping-bag", 62096);
|
||||
dict.Add("fa fa-shopping-basket", 62097);
|
||||
dict.Add("fa fa-stop-circle", 62093);
|
||||
dict.Add("fa fa-stop-circle-o", 62094);
|
||||
dict.Add("fa fa-usb", 62087);
|
||||
dict.Add("fa fa-adjust", 61506);
|
||||
dict.Add("fa fa-anchor", 61757);
|
||||
dict.Add("fa fa-archive", 61831);
|
||||
dict.Add("fa fa-area-chart", 61950);
|
||||
dict.Add("fa fa-arrows", 61511);
|
||||
dict.Add("fa fa-arrows-h", 61566);
|
||||
dict.Add("fa fa-arrows-v", 61565);
|
||||
dict.Add("fa fa-asterisk", 61545);
|
||||
dict.Add("fa fa-at", 61946);
|
||||
dict.Add("fa fa-automobile", 61881);
|
||||
dict.Add("fa fa-balance-scale", 62030);
|
||||
dict.Add("fa fa-ban", 61534);
|
||||
dict.Add("fa fa-bank", 61852);
|
||||
dict.Add("fa fa-bar-chart", 61568);
|
||||
dict.Add("fa fa-bar-chart-o", 61568);
|
||||
dict.Add("fa fa-barcode", 61482);
|
||||
dict.Add("fa fa-bars", 61641);
|
||||
dict.Add("fa fa-battery-0", 62020);
|
||||
dict.Add("fa fa-battery-1", 62019);
|
||||
dict.Add("fa fa-battery-2", 62018);
|
||||
dict.Add("fa fa-battery-3", 62017);
|
||||
dict.Add("fa fa-battery-4", 62016);
|
||||
dict.Add("fa fa-battery-empty", 62020);
|
||||
dict.Add("fa fa-battery-full", 62016);
|
||||
dict.Add("fa fa-battery-half", 62018);
|
||||
dict.Add("fa fa-battery-quarter", 62019);
|
||||
dict.Add("fa fa-battery-three-quarters", 62017);
|
||||
dict.Add("fa fa-bed", 62006);
|
||||
dict.Add("fa fa-beer", 61692);
|
||||
dict.Add("fa fa-bell", 61683);
|
||||
dict.Add("fa fa-bell-o", 61602);
|
||||
dict.Add("fa fa-bell-slash", 61942);
|
||||
dict.Add("fa fa-bell-slash-o", 61943);
|
||||
dict.Add("fa fa-bicycle", 61958);
|
||||
dict.Add("fa fa-binoculars", 61925);
|
||||
dict.Add("fa fa-birthday-cake", 61949);
|
||||
dict.Add("fa fa-bolt", 61671);
|
||||
dict.Add("fa fa-bomb", 61922);
|
||||
dict.Add("fa fa-book", 61485);
|
||||
dict.Add("fa fa-bookmark", 61486);
|
||||
dict.Add("fa fa-bookmark-o", 61591);
|
||||
dict.Add("fa fa-briefcase", 61617);
|
||||
dict.Add("fa fa-bug", 61832);
|
||||
dict.Add("fa fa-building", 61869);
|
||||
dict.Add("fa fa-building-o", 61687);
|
||||
dict.Add("fa fa-bullhorn", 61601);
|
||||
dict.Add("fa fa-bullseye", 61760);
|
||||
dict.Add("fa fa-bus", 61959);
|
||||
dict.Add("fa fa-cab", 61882);
|
||||
dict.Add("fa fa-calculator", 61932);
|
||||
dict.Add("fa fa-calendar", 61555);
|
||||
dict.Add("fa fa-calendar-check-o", 62068);
|
||||
dict.Add("fa fa-calendar-minus-o", 62066);
|
||||
dict.Add("fa fa-calendar-o", 61747);
|
||||
dict.Add("fa fa-calendar-plus-o", 62065);
|
||||
dict.Add("fa fa-calendar-times-o", 62067);
|
||||
dict.Add("fa fa-camera", 61488);
|
||||
dict.Add("fa fa-camera-retro", 61571);
|
||||
dict.Add("fa fa-car", 61881);
|
||||
dict.Add("fa fa-caret-square-o-down", 61776);
|
||||
dict.Add("fa fa-caret-square-o-left", 61841);
|
||||
dict.Add("fa fa-caret-square-o-right", 61778);
|
||||
dict.Add("fa fa-caret-square-o-up", 61777);
|
||||
dict.Add("fa fa-cart-arrow-down", 61976);
|
||||
dict.Add("fa fa-cart-plus", 61975);
|
||||
dict.Add("fa fa-cc", 61962);
|
||||
dict.Add("fa fa-certificate", 61603);
|
||||
dict.Add("fa fa-check", 61452);
|
||||
dict.Add("fa fa-check-circle", 61528);
|
||||
dict.Add("fa fa-check-circle-o", 61533);
|
||||
dict.Add("fa fa-check-square", 61770);
|
||||
dict.Add("fa fa-check-square-o", 61510);
|
||||
dict.Add("fa fa-child", 61870);
|
||||
dict.Add("fa fa-circle", 61713);
|
||||
dict.Add("fa fa-circle-o", 61708);
|
||||
dict.Add("fa fa-circle-o-notch", 61902);
|
||||
dict.Add("fa fa-circle-thin", 61915);
|
||||
dict.Add("fa fa-clock-o", 61463);
|
||||
dict.Add("fa fa-clone", 62029);
|
||||
dict.Add("fa fa-close", 61453);
|
||||
dict.Add("fa fa-cloud", 61634);
|
||||
dict.Add("fa fa-cloud-download", 61677);
|
||||
dict.Add("fa fa-cloud-upload", 61678);
|
||||
dict.Add("fa fa-code", 61729);
|
||||
dict.Add("fa fa-code-fork", 61734);
|
||||
dict.Add("fa fa-coffee", 61684);
|
||||
dict.Add("fa fa-cog", 61459);
|
||||
dict.Add("fa fa-cogs", 61573);
|
||||
dict.Add("fa fa-comment", 61557);
|
||||
dict.Add("fa fa-comment-o", 61669);
|
||||
dict.Add("fa fa-commenting", 62074);
|
||||
dict.Add("fa fa-commenting-o", 62075);
|
||||
dict.Add("fa fa-comments", 61574);
|
||||
dict.Add("fa fa-comments-o", 61670);
|
||||
dict.Add("fa fa-compass", 61774);
|
||||
dict.Add("fa fa-copyright", 61945);
|
||||
dict.Add("fa fa-creative-commons", 62046);
|
||||
dict.Add("fa fa-credit-card", 61597);
|
||||
dict.Add("fa fa-crop", 61733);
|
||||
dict.Add("fa fa-crosshairs", 61531);
|
||||
dict.Add("fa fa-cube", 61874);
|
||||
dict.Add("fa fa-cubes", 61875);
|
||||
dict.Add("fa fa-cutlery", 61685);
|
||||
dict.Add("fa fa-dashboard", 61668);
|
||||
dict.Add("fa fa-database", 61888);
|
||||
dict.Add("fa fa-desktop", 61704);
|
||||
dict.Add("fa fa-diamond", 61977);
|
||||
dict.Add("fa fa-dot-circle-o", 61842);
|
||||
dict.Add("fa fa-download", 61465);
|
||||
dict.Add("fa fa-edit", 61508);
|
||||
dict.Add("fa fa-ellipsis-h", 61761);
|
||||
dict.Add("fa fa-ellipsis-v", 61762);
|
||||
dict.Add("fa fa-envelope", 61664);
|
||||
dict.Add("fa fa-envelope-o", 61443);
|
||||
dict.Add("fa fa-envelope-square", 61849);
|
||||
dict.Add("fa fa-eraser", 61741);
|
||||
dict.Add("fa fa-exchange", 61676);
|
||||
dict.Add("fa fa-exclamation", 61738);
|
||||
dict.Add("fa fa-exclamation-circle", 61546);
|
||||
dict.Add("fa fa-exclamation-triangle", 61553);
|
||||
dict.Add("fa fa-external-link", 61582);
|
||||
dict.Add("fa fa-external-link-square", 61772);
|
||||
dict.Add("fa fa-eye", 61550);
|
||||
dict.Add("fa fa-eye-slash", 61552);
|
||||
dict.Add("fa fa-eyedropper", 61947);
|
||||
dict.Add("fa fa-fax", 61868);
|
||||
dict.Add("fa fa-feed", 61598);
|
||||
dict.Add("fa fa-female", 61826);
|
||||
dict.Add("fa fa-fighter-jet", 61691);
|
||||
dict.Add("fa fa-file-archive-o", 61894);
|
||||
dict.Add("fa fa-file-audio-o", 61895);
|
||||
dict.Add("fa fa-file-code-o", 61897);
|
||||
dict.Add("fa fa-file-excel-o", 61891);
|
||||
dict.Add("fa fa-file-image-o", 61893);
|
||||
dict.Add("fa fa-file-movie-o", 61896);
|
||||
dict.Add("fa fa-file-pdf-o", 61889);
|
||||
dict.Add("fa fa-file-photo-o", 61893);
|
||||
dict.Add("fa fa-file-picture-o", 61893);
|
||||
dict.Add("fa fa-file-powerpoint-o", 61892);
|
||||
dict.Add("fa fa-file-sound-o", 61895);
|
||||
dict.Add("fa fa-file-video-o", 61896);
|
||||
dict.Add("fa fa-file-word-o", 61890);
|
||||
dict.Add("fa fa-file-zip-o", 61894);
|
||||
dict.Add("fa fa-film", 61448);
|
||||
dict.Add("fa fa-filter", 61616);
|
||||
dict.Add("fa fa-fire", 61549);
|
||||
dict.Add("fa fa-fire-extinguisher", 61748);
|
||||
dict.Add("fa fa-flag", 61476);
|
||||
dict.Add("fa fa-flag-checkered", 61726);
|
||||
dict.Add("fa fa-flag-o", 61725);
|
||||
dict.Add("fa fa-flash", 61671);
|
||||
dict.Add("fa fa-flask", 61635);
|
||||
dict.Add("fa fa-folder", 61563);
|
||||
dict.Add("fa fa-folder-o", 61716);
|
||||
dict.Add("fa fa-folder-open", 61564);
|
||||
dict.Add("fa fa-folder-open-o", 61717);
|
||||
dict.Add("fa fa-frown-o", 61721);
|
||||
dict.Add("fa fa-futbol-o", 61923);
|
||||
dict.Add("fa fa-gamepad", 61723);
|
||||
dict.Add("fa fa-gavel", 61667);
|
||||
dict.Add("fa fa-gear", 61459);
|
||||
dict.Add("fa fa-gears", 61573);
|
||||
dict.Add("fa fa-gift", 61547);
|
||||
dict.Add("fa fa-glass", 61440);
|
||||
dict.Add("fa fa-globe", 61612);
|
||||
dict.Add("fa fa-graduation-cap", 61853);
|
||||
dict.Add("fa fa-group", 61632);
|
||||
dict.Add("fa fa-hand-grab-o", 62037);
|
||||
dict.Add("fa fa-hand-lizard-o", 62040);
|
||||
dict.Add("fa fa-hand-paper-o", 62038);
|
||||
dict.Add("fa fa-hand-peace-o", 62043);
|
||||
dict.Add("fa fa-hand-pointer-o", 62042);
|
||||
dict.Add("fa fa-hand-rock-o", 62037);
|
||||
dict.Add("fa fa-hand-scissors-o", 62039);
|
||||
dict.Add("fa fa-hand-spock-o", 62041);
|
||||
dict.Add("fa fa-hand-stop-o", 62038);
|
||||
dict.Add("fa fa-hdd-o", 61600);
|
||||
dict.Add("fa fa-headphones", 61477);
|
||||
dict.Add("fa fa-heart", 61444);
|
||||
dict.Add("fa fa-heart-o", 61578);
|
||||
dict.Add("fa fa-heartbeat", 61982);
|
||||
dict.Add("fa fa-history", 61914);
|
||||
dict.Add("fa fa-home", 61461);
|
||||
dict.Add("fa fa-hotel", 62006);
|
||||
dict.Add("fa fa-hourglass", 62036);
|
||||
dict.Add("fa fa-hourglass-1", 62033);
|
||||
dict.Add("fa fa-hourglass-2", 62034);
|
||||
dict.Add("fa fa-hourglass-3", 62035);
|
||||
dict.Add("fa fa-hourglass-end", 62035);
|
||||
dict.Add("fa fa-hourglass-half", 62034);
|
||||
dict.Add("fa fa-hourglass-o", 62032);
|
||||
dict.Add("fa fa-hourglass-start", 62033);
|
||||
dict.Add("fa fa-i-cursor", 62022);
|
||||
dict.Add("fa fa-image", 61502);
|
||||
dict.Add("fa fa-inbox", 61468);
|
||||
dict.Add("fa fa-industry", 62069);
|
||||
dict.Add("fa fa-info", 61737);
|
||||
dict.Add("fa fa-info-circle", 61530);
|
||||
dict.Add("fa fa-institution", 61852);
|
||||
dict.Add("fa fa-key", 61572);
|
||||
dict.Add("fa fa-keyboard-o", 61724);
|
||||
dict.Add("fa fa-language", 61867);
|
||||
dict.Add("fa fa-laptop", 61705);
|
||||
dict.Add("fa fa-leaf", 61548);
|
||||
dict.Add("fa fa-legal", 61667);
|
||||
dict.Add("fa fa-lemon-o", 61588);
|
||||
dict.Add("fa fa-level-down", 61769);
|
||||
dict.Add("fa fa-level-up", 61768);
|
||||
dict.Add("fa fa-life-bouy", 61901);
|
||||
dict.Add("fa fa-life-buoy", 61901);
|
||||
dict.Add("fa fa-life-ring", 61901);
|
||||
dict.Add("fa fa-life-saver", 61901);
|
||||
dict.Add("fa fa-lightbulb-o", 61675);
|
||||
dict.Add("fa fa-line-chart", 61953);
|
||||
dict.Add("fa fa-location-arrow", 61732);
|
||||
dict.Add("fa fa-lock", 61475);
|
||||
dict.Add("fa fa-magic", 61648);
|
||||
dict.Add("fa fa-magnet", 61558);
|
||||
dict.Add("fa fa-mail-forward", 61540);
|
||||
dict.Add("fa fa-mail-reply", 61714);
|
||||
dict.Add("fa fa-mail-reply-all", 61730);
|
||||
dict.Add("fa fa-male", 61827);
|
||||
dict.Add("fa fa-map", 62073);
|
||||
dict.Add("fa fa-map-marker", 61505);
|
||||
dict.Add("fa fa-map-o", 62072);
|
||||
dict.Add("fa fa-map-pin", 62070);
|
||||
dict.Add("fa fa-map-signs", 62071);
|
||||
dict.Add("fa fa-meh-o", 61722);
|
||||
dict.Add("fa fa-microphone", 61744);
|
||||
dict.Add("fa fa-microphone-slash", 61745);
|
||||
dict.Add("fa fa-minus", 61544);
|
||||
dict.Add("fa fa-minus-circle", 61526);
|
||||
dict.Add("fa fa-minus-square", 61766);
|
||||
dict.Add("fa fa-minus-square-o", 61767);
|
||||
dict.Add("fa fa-mobile", 61707);
|
||||
dict.Add("fa fa-mobile-phone", 61707);
|
||||
dict.Add("fa fa-money", 61654);
|
||||
dict.Add("fa fa-moon-o", 61830);
|
||||
dict.Add("fa fa-mortar-board", 61853);
|
||||
dict.Add("fa fa-motorcycle", 61980);
|
||||
dict.Add("fa fa-mouse-pointer", 62021);
|
||||
dict.Add("fa fa-music", 61441);
|
||||
dict.Add("fa fa-navicon", 61641);
|
||||
dict.Add("fa fa-newspaper-o", 61930);
|
||||
dict.Add("fa fa-object-group", 62023);
|
||||
dict.Add("fa fa-object-ungroup", 62024);
|
||||
dict.Add("fa fa-paint-brush", 61948);
|
||||
dict.Add("fa fa-paper-plane", 61912);
|
||||
dict.Add("fa fa-paper-plane-o", 61913);
|
||||
dict.Add("fa fa-paw", 61872);
|
||||
dict.Add("fa fa-pencil", 61504);
|
||||
dict.Add("fa fa-pencil-square", 61771);
|
||||
dict.Add("fa fa-pencil-square-o", 61508);
|
||||
dict.Add("fa fa-phone", 61589);
|
||||
dict.Add("fa fa-phone-square", 61592);
|
||||
dict.Add("fa fa-photo", 61502);
|
||||
dict.Add("fa fa-picture-o", 61502);
|
||||
dict.Add("fa fa-pie-chart", 61952);
|
||||
dict.Add("fa fa-plane", 61554);
|
||||
dict.Add("fa fa-plug", 61926);
|
||||
dict.Add("fa fa-plus", 61543);
|
||||
dict.Add("fa fa-plus-circle", 61525);
|
||||
dict.Add("fa fa-plus-square", 61694);
|
||||
dict.Add("fa fa-plus-square-o", 61846);
|
||||
dict.Add("fa fa-power-off", 61457);
|
||||
dict.Add("fa fa-print", 61487);
|
||||
dict.Add("fa fa-puzzle-piece", 61742);
|
||||
dict.Add("fa fa-qrcode", 61481);
|
||||
dict.Add("fa fa-question", 61736);
|
||||
dict.Add("fa fa-question-circle", 61529);
|
||||
dict.Add("fa fa-quote-left", 61709);
|
||||
dict.Add("fa fa-quote-right", 61710);
|
||||
dict.Add("fa fa-random", 61556);
|
||||
dict.Add("fa fa-recycle", 61880);
|
||||
dict.Add("fa fa-refresh", 61473);
|
||||
dict.Add("fa fa-registered", 62045);
|
||||
dict.Add("fa fa-remove", 61453);
|
||||
dict.Add("fa fa-reorder", 61641);
|
||||
dict.Add("fa fa-reply", 61714);
|
||||
dict.Add("fa fa-reply-all", 61730);
|
||||
dict.Add("fa fa-retweet", 61561);
|
||||
dict.Add("fa fa-road", 61464);
|
||||
dict.Add("fa fa-rocket", 61749);
|
||||
dict.Add("fa fa-rss", 61598);
|
||||
dict.Add("fa fa-rss-square", 61763);
|
||||
dict.Add("fa fa-search", 61442);
|
||||
dict.Add("fa fa-search-minus", 61456);
|
||||
dict.Add("fa fa-search-plus", 61454);
|
||||
dict.Add("fa fa-send", 61912);
|
||||
dict.Add("fa fa-send-o", 61913);
|
||||
dict.Add("fa fa-server", 62003);
|
||||
dict.Add("fa fa-share", 61540);
|
||||
dict.Add("fa fa-share-alt", 61920);
|
||||
dict.Add("fa fa-share-alt-square", 61921);
|
||||
dict.Add("fa fa-share-square", 61773);
|
||||
dict.Add("fa fa-share-square-o", 61509);
|
||||
dict.Add("fa fa-shield", 61746);
|
||||
dict.Add("fa fa-ship", 61978);
|
||||
dict.Add("fa fa-shopping-cart", 61562);
|
||||
dict.Add("fa fa-sign-in", 61584);
|
||||
dict.Add("fa fa-sign-out", 61579);
|
||||
dict.Add("fa fa-signal", 61458);
|
||||
dict.Add("fa fa-sitemap", 61672);
|
||||
dict.Add("fa fa-sliders", 61918);
|
||||
dict.Add("fa fa-smile-o", 61720);
|
||||
dict.Add("fa fa-soccer-ball-o", 61923);
|
||||
dict.Add("fa fa-sort", 61660);
|
||||
dict.Add("fa fa-sort-alpha-asc", 61789);
|
||||
dict.Add("fa fa-sort-alpha-desc", 61790);
|
||||
dict.Add("fa fa-sort-amount-asc", 61792);
|
||||
dict.Add("fa fa-sort-amount-desc", 61793);
|
||||
dict.Add("fa fa-sort-asc", 61662);
|
||||
dict.Add("fa fa-sort-desc", 61661);
|
||||
dict.Add("fa fa-sort-down", 61661);
|
||||
dict.Add("fa fa-sort-numeric-asc", 61794);
|
||||
dict.Add("fa fa-sort-numeric-desc", 61795);
|
||||
dict.Add("fa fa-sort-up", 61662);
|
||||
dict.Add("fa fa-space-shuttle", 61847);
|
||||
dict.Add("fa fa-spoon", 61873);
|
||||
dict.Add("fa fa-square", 61640);
|
||||
dict.Add("fa fa-square-o", 61590);
|
||||
dict.Add("fa fa-star", 61445);
|
||||
dict.Add("fa fa-star-half", 61577);
|
||||
dict.Add("fa fa-star-half-empty", 61731);
|
||||
dict.Add("fa fa-star-half-full", 61731);
|
||||
dict.Add("fa fa-star-half-o", 61731);
|
||||
dict.Add("fa fa-star-o", 61446);
|
||||
dict.Add("fa fa-sticky-note", 62025);
|
||||
dict.Add("fa fa-sticky-note-o", 62026);
|
||||
dict.Add("fa fa-street-view", 61981);
|
||||
dict.Add("fa fa-suitcase", 61682);
|
||||
dict.Add("fa fa-sun-o", 61829);
|
||||
dict.Add("fa fa-support", 61901);
|
||||
dict.Add("fa fa-tablet", 61706);
|
||||
dict.Add("fa fa-tachometer", 61668);
|
||||
dict.Add("fa fa-tag", 61483);
|
||||
dict.Add("fa fa-tags", 61484);
|
||||
dict.Add("fa fa-tasks", 61614);
|
||||
dict.Add("fa fa-taxi", 61882);
|
||||
dict.Add("fa fa-television", 62060);
|
||||
dict.Add("fa fa-terminal", 61728);
|
||||
dict.Add("fa fa-thumb-tack", 61581);
|
||||
dict.Add("fa fa-thumbs-down", 61797);
|
||||
dict.Add("fa fa-thumbs-o-down", 61576);
|
||||
dict.Add("fa fa-thumbs-o-up", 61575);
|
||||
dict.Add("fa fa-thumbs-up", 61796);
|
||||
dict.Add("fa fa-ticket", 61765);
|
||||
dict.Add("fa fa-times", 61453);
|
||||
dict.Add("fa fa-times-circle", 61527);
|
||||
dict.Add("fa fa-times-circle-o", 61532);
|
||||
dict.Add("fa fa-tint", 61507);
|
||||
dict.Add("fa fa-toggle-down", 61776);
|
||||
dict.Add("fa fa-toggle-left", 61841);
|
||||
dict.Add("fa fa-toggle-off", 61956);
|
||||
dict.Add("fa fa-toggle-on", 61957);
|
||||
dict.Add("fa fa-toggle-right", 61778);
|
||||
dict.Add("fa fa-toggle-up", 61777);
|
||||
dict.Add("fa fa-trademark", 62044);
|
||||
dict.Add("fa fa-trash", 61944);
|
||||
dict.Add("fa fa-trash-o", 61460);
|
||||
dict.Add("fa fa-tree", 61883);
|
||||
dict.Add("fa fa-trophy", 61585);
|
||||
dict.Add("fa fa-truck", 61649);
|
||||
dict.Add("fa fa-tty", 61924);
|
||||
dict.Add("fa fa-tv", 62060);
|
||||
dict.Add("fa fa-umbrella", 61673);
|
||||
dict.Add("fa fa-university", 61852);
|
||||
dict.Add("fa fa-unlock", 61596);
|
||||
dict.Add("fa fa-unlock-alt", 61758);
|
||||
dict.Add("fa fa-unsorted", 61660);
|
||||
dict.Add("fa fa-upload", 61587);
|
||||
dict.Add("fa fa-user", 61447);
|
||||
dict.Add("fa fa-user-plus", 62004);
|
||||
dict.Add("fa fa-user-secret", 61979);
|
||||
dict.Add("fa fa-user-times", 62005);
|
||||
dict.Add("fa fa-users", 61632);
|
||||
dict.Add("fa fa-video-camera", 61501);
|
||||
dict.Add("fa fa-volume-down", 61479);
|
||||
dict.Add("fa fa-volume-off", 61478);
|
||||
dict.Add("fa fa-volume-up", 61480);
|
||||
dict.Add("fa fa-warning", 61553);
|
||||
dict.Add("fa fa-wheelchair", 61843);
|
||||
dict.Add("fa fa-wifi", 61931);
|
||||
dict.Add("fa fa-wrench", 61613);
|
||||
dict.Add("fa fa-hand-o-down", 61607);
|
||||
dict.Add("fa fa-hand-o-left", 61605);
|
||||
dict.Add("fa fa-hand-o-right", 61604);
|
||||
dict.Add("fa fa-hand-o-up", 61606);
|
||||
dict.Add("fa fa-ambulance", 61689);
|
||||
dict.Add("fa fa-subway", 62009);
|
||||
dict.Add("fa fa-train", 62008);
|
||||
dict.Add("fa fa-genderless", 61997);
|
||||
dict.Add("fa fa-intersex", 61988);
|
||||
dict.Add("fa fa-mars", 61986);
|
||||
dict.Add("fa fa-mars-double", 61991);
|
||||
dict.Add("fa fa-mars-stroke", 61993);
|
||||
dict.Add("fa fa-mars-stroke-h", 61995);
|
||||
dict.Add("fa fa-mars-stroke-v", 61994);
|
||||
dict.Add("fa fa-mercury", 61987);
|
||||
dict.Add("fa fa-neuter", 61996);
|
||||
dict.Add("fa fa-transgender", 61988);
|
||||
dict.Add("fa fa-transgender-alt", 61989);
|
||||
dict.Add("fa fa-venus", 61985);
|
||||
dict.Add("fa fa-venus-double", 61990);
|
||||
dict.Add("fa fa-venus-mars", 61992);
|
||||
dict.Add("fa fa-file", 61787);
|
||||
dict.Add("fa fa-file-o", 61462);
|
||||
dict.Add("fa fa-file-text", 61788);
|
||||
dict.Add("fa fa-file-text-o", 61686);
|
||||
dict.Add("fa fa-cc-amex", 61939);
|
||||
dict.Add("fa fa-cc-diners-club", 62028);
|
||||
dict.Add("fa fa-cc-discover", 61938);
|
||||
dict.Add("fa fa-cc-jcb", 62027);
|
||||
dict.Add("fa fa-cc-mastercard", 61937);
|
||||
dict.Add("fa fa-cc-paypal", 61940);
|
||||
dict.Add("fa fa-cc-stripe", 61941);
|
||||
dict.Add("fa fa-cc-visa", 61936);
|
||||
dict.Add("fa fa-google-wallet", 61934);
|
||||
dict.Add("fa fa-paypal", 61933);
|
||||
dict.Add("fa fa-bitcoin", 61786);
|
||||
dict.Add("fa fa-btc", 61786);
|
||||
dict.Add("fa fa-cny", 61783);
|
||||
dict.Add("fa fa-dollar", 61781);
|
||||
dict.Add("fa fa-eur", 61779);
|
||||
dict.Add("fa fa-euro", 61779);
|
||||
dict.Add("fa fa-gbp", 61780);
|
||||
dict.Add("fa fa-gg", 62048);
|
||||
dict.Add("fa fa-gg-circle", 62049);
|
||||
dict.Add("fa fa-ils", 61963);
|
||||
dict.Add("fa fa-inr", 61782);
|
||||
dict.Add("fa fa-jpy", 61783);
|
||||
dict.Add("fa fa-krw", 61785);
|
||||
dict.Add("fa fa-rmb", 61783);
|
||||
dict.Add("fa fa-rouble", 61784);
|
||||
dict.Add("fa fa-rub", 61784);
|
||||
dict.Add("fa fa-ruble", 61784);
|
||||
dict.Add("fa fa-rupee", 61782);
|
||||
dict.Add("fa fa-shekel", 61963);
|
||||
dict.Add("fa fa-sheqel", 61963);
|
||||
dict.Add("fa fa-try", 61845);
|
||||
dict.Add("fa fa-turkish-lira", 61845);
|
||||
dict.Add("fa fa-usd", 61781);
|
||||
dict.Add("fa fa-won", 61785);
|
||||
dict.Add("fa fa-yen", 61783);
|
||||
dict.Add("fa fa-align-center", 61495);
|
||||
dict.Add("fa fa-align-justify", 61497);
|
||||
dict.Add("fa fa-align-left", 61494);
|
||||
dict.Add("fa fa-align-right", 61496);
|
||||
dict.Add("fa fa-bold", 61490);
|
||||
dict.Add("fa fa-chain", 61633);
|
||||
dict.Add("fa fa-chain-broken", 61735);
|
||||
dict.Add("fa fa-clipboard", 61674);
|
||||
dict.Add("fa fa-columns", 61659);
|
||||
dict.Add("fa fa-copy", 61637);
|
||||
dict.Add("fa fa-cut", 61636);
|
||||
dict.Add("fa fa-dedent", 61499);
|
||||
dict.Add("fa fa-files-o", 61637);
|
||||
dict.Add("fa fa-floppy-o", 61639);
|
||||
dict.Add("fa fa-font", 61489);
|
||||
dict.Add("fa fa-header", 61916);
|
||||
dict.Add("fa fa-indent", 61500);
|
||||
dict.Add("fa fa-italic", 61491);
|
||||
dict.Add("fa fa-link", 61633);
|
||||
dict.Add("fa fa-list", 61498);
|
||||
dict.Add("fa fa-list-alt", 61474);
|
||||
dict.Add("fa fa-list-ol", 61643);
|
||||
dict.Add("fa fa-list-ul", 61642);
|
||||
dict.Add("fa fa-outdent", 61499);
|
||||
dict.Add("fa fa-paperclip", 61638);
|
||||
dict.Add("fa fa-paragraph", 61917);
|
||||
dict.Add("fa fa-paste", 61674);
|
||||
dict.Add("fa fa-repeat", 61470);
|
||||
dict.Add("fa fa-rotate-left", 61666);
|
||||
dict.Add("fa fa-rotate-right", 61470);
|
||||
dict.Add("fa fa-save", 61639);
|
||||
dict.Add("fa fa-scissors", 61636);
|
||||
dict.Add("fa fa-strikethrough", 61644);
|
||||
dict.Add("fa fa-subscript", 61740);
|
||||
dict.Add("fa fa-superscript", 61739);
|
||||
dict.Add("fa fa-table", 61646);
|
||||
dict.Add("fa fa-text-height", 61492);
|
||||
dict.Add("fa fa-text-width", 61493);
|
||||
dict.Add("fa fa-th", 61450);
|
||||
dict.Add("fa fa-th-large", 61449);
|
||||
dict.Add("fa fa-th-list", 61451);
|
||||
dict.Add("fa fa-underline", 61645);
|
||||
dict.Add("fa fa-undo", 61666);
|
||||
dict.Add("fa fa-unlink", 61735);
|
||||
dict.Add("fa fa-angle-double-down", 61699);
|
||||
dict.Add("fa fa-angle-double-left", 61696);
|
||||
dict.Add("fa fa-angle-double-right", 61697);
|
||||
dict.Add("fa fa-angle-double-up", 61698);
|
||||
dict.Add("fa fa-angle-down", 61703);
|
||||
dict.Add("fa fa-angle-left", 61700);
|
||||
dict.Add("fa fa-angle-right", 61701);
|
||||
dict.Add("fa fa-angle-up", 61702);
|
||||
dict.Add("fa fa-arrow-circle-down", 61611);
|
||||
dict.Add("fa fa-arrow-circle-left", 61608);
|
||||
dict.Add("fa fa-arrow-circle-o-down", 61466);
|
||||
dict.Add("fa fa-arrow-circle-o-left", 61840);
|
||||
dict.Add("fa fa-arrow-circle-o-right", 61838);
|
||||
dict.Add("fa fa-arrow-circle-o-up", 61467);
|
||||
dict.Add("fa fa-arrow-circle-right", 61609);
|
||||
dict.Add("fa fa-arrow-circle-up", 61610);
|
||||
dict.Add("fa fa-arrow-down", 61539);
|
||||
dict.Add("fa fa-arrow-left", 61536);
|
||||
dict.Add("fa fa-arrow-right", 61537);
|
||||
dict.Add("fa fa-arrow-up", 61538);
|
||||
dict.Add("fa fa-arrows-alt", 61618);
|
||||
dict.Add("fa fa-caret-down", 61655);
|
||||
dict.Add("fa fa-caret-left", 61657);
|
||||
dict.Add("fa fa-caret-right", 61658);
|
||||
dict.Add("fa fa-caret-up", 61656);
|
||||
dict.Add("fa fa-chevron-circle-down", 61754);
|
||||
dict.Add("fa fa-chevron-circle-left", 61751);
|
||||
dict.Add("fa fa-chevron-circle-right", 61752);
|
||||
dict.Add("fa fa-chevron-circle-up", 61753);
|
||||
dict.Add("fa fa-chevron-down", 61560);
|
||||
dict.Add("fa fa-chevron-left", 61523);
|
||||
dict.Add("fa fa-chevron-right", 61524);
|
||||
dict.Add("fa fa-chevron-up", 61559);
|
||||
dict.Add("fa fa-long-arrow-down", 61813);
|
||||
dict.Add("fa fa-long-arrow-left", 61815);
|
||||
dict.Add("fa fa-long-arrow-right", 61816);
|
||||
dict.Add("fa fa-long-arrow-up", 61814);
|
||||
dict.Add("fa fa-backward", 61514);
|
||||
dict.Add("fa fa-compress", 61542);
|
||||
dict.Add("fa fa-eject", 61522);
|
||||
dict.Add("fa fa-expand", 61541);
|
||||
dict.Add("fa fa-fast-backward", 61513);
|
||||
dict.Add("fa fa-fast-forward", 61520);
|
||||
dict.Add("fa fa-forward", 61518);
|
||||
dict.Add("fa fa-pause", 61516);
|
||||
dict.Add("fa fa-play", 61515);
|
||||
dict.Add("fa fa-play-circle", 61764);
|
||||
dict.Add("fa fa-play-circle-o", 61469);
|
||||
dict.Add("fa fa-step-backward", 61512);
|
||||
dict.Add("fa fa-step-forward", 61521);
|
||||
dict.Add("fa fa-stop", 61517);
|
||||
dict.Add("fa fa-youtube-play", 61802);
|
||||
dict.Add("fa fa-500px", 62062);
|
||||
dict.Add("fa fa-adn", 61808);
|
||||
dict.Add("fa fa-amazon", 62064);
|
||||
dict.Add("fa fa-android", 61819);
|
||||
dict.Add("fa fa-angellist", 61961);
|
||||
dict.Add("fa fa-apple", 61817);
|
||||
dict.Add("fa fa-behance", 61876);
|
||||
dict.Add("fa fa-behance-square", 61877);
|
||||
dict.Add("fa fa-bitbucket", 61809);
|
||||
dict.Add("fa fa-bitbucket-square", 61810);
|
||||
dict.Add("fa fa-black-tie", 62078);
|
||||
dict.Add("fa fa-buysellads", 61965);
|
||||
dict.Add("fa fa-chrome", 62056);
|
||||
dict.Add("fa fa-codepen", 61899);
|
||||
dict.Add("fa fa-connectdevelop", 61966);
|
||||
dict.Add("fa fa-contao", 62061);
|
||||
dict.Add("fa fa-css3", 61756);
|
||||
dict.Add("fa fa-dashcube", 61968);
|
||||
dict.Add("fa fa-delicious", 61861);
|
||||
dict.Add("fa fa-deviantart", 61885);
|
||||
dict.Add("fa fa-digg", 61862);
|
||||
dict.Add("fa fa-dribbble", 61821);
|
||||
dict.Add("fa fa-dropbox", 61803);
|
||||
dict.Add("fa fa-drupal", 61865);
|
||||
dict.Add("fa fa-empire", 61905);
|
||||
dict.Add("fa fa-expeditedssl", 62014);
|
||||
dict.Add("fa fa-facebook", 61594);
|
||||
dict.Add("fa fa-facebook-f", 61594);
|
||||
dict.Add("fa fa-facebook-official", 62000);
|
||||
dict.Add("fa fa-facebook-square", 61570);
|
||||
dict.Add("fa fa-firefox", 62057);
|
||||
dict.Add("fa fa-flickr", 61806);
|
||||
dict.Add("fa fa-fonticons", 62080);
|
||||
dict.Add("fa fa-forumbee", 61969);
|
||||
dict.Add("fa fa-foursquare", 61824);
|
||||
dict.Add("fa fa-ge", 61905);
|
||||
dict.Add("fa fa-get-pocket", 62053);
|
||||
dict.Add("fa fa-git", 61907);
|
||||
dict.Add("fa fa-git-square", 61906);
|
||||
dict.Add("fa fa-github", 61595);
|
||||
dict.Add("fa fa-github-alt", 61715);
|
||||
dict.Add("fa fa-github-square", 61586);
|
||||
dict.Add("fa fa-gittip", 61828);
|
||||
dict.Add("fa fa-google", 61856);
|
||||
dict.Add("fa fa-google-plus", 61653);
|
||||
dict.Add("fa fa-google-plus-square", 61652);
|
||||
dict.Add("fa fa-gratipay", 61828);
|
||||
dict.Add("fa fa-hacker-news", 61908);
|
||||
dict.Add("fa fa-houzz", 62076);
|
||||
dict.Add("fa fa-html5", 61755);
|
||||
dict.Add("fa fa-instagram", 61805);
|
||||
dict.Add("fa fa-internet-explorer", 62059);
|
||||
dict.Add("fa fa-ioxhost", 61960);
|
||||
dict.Add("fa fa-joomla", 61866);
|
||||
dict.Add("fa fa-jsfiddle", 61900);
|
||||
dict.Add("fa fa-lastfm", 61954);
|
||||
dict.Add("fa fa-lastfm-square", 61955);
|
||||
dict.Add("fa fa-leanpub", 61970);
|
||||
dict.Add("fa fa-linkedin", 61665);
|
||||
dict.Add("fa fa-linkedin-square", 61580);
|
||||
dict.Add("fa fa-linux", 61820);
|
||||
dict.Add("fa fa-maxcdn", 61750);
|
||||
dict.Add("fa fa-meanpath", 61964);
|
||||
dict.Add("fa fa-medium", 62010);
|
||||
dict.Add("fa fa-odnoklassniki", 62051);
|
||||
dict.Add("fa fa-odnoklassniki-square", 62052);
|
||||
dict.Add("fa fa-opencart", 62013);
|
||||
dict.Add("fa fa-openid", 61851);
|
||||
dict.Add("fa fa-opera", 62058);
|
||||
dict.Add("fa fa-optin-monster", 62012);
|
||||
dict.Add("fa fa-pagelines", 61836);
|
||||
dict.Add("fa fa-pied-piper", 62126);
|
||||
dict.Add("fa fa-pied-piper-alt", 61864);
|
||||
dict.Add("fa fa-pinterest", 61650);
|
||||
dict.Add("fa fa-pinterest-p", 62001);
|
||||
dict.Add("fa fa-pinterest-square", 61651);
|
||||
dict.Add("fa fa-qq", 61910);
|
||||
dict.Add("fa fa-ra", 61904);
|
||||
dict.Add("fa fa-rebel", 61904);
|
||||
dict.Add("fa fa-reddit", 61857);
|
||||
dict.Add("fa fa-reddit-square", 61858);
|
||||
dict.Add("fa fa-renren", 61835);
|
||||
dict.Add("fa fa-safari", 62055);
|
||||
dict.Add("fa fa-sellsy", 61971);
|
||||
dict.Add("fa fa-shirtsinbulk", 61972);
|
||||
dict.Add("fa fa-simplybuilt", 61973);
|
||||
dict.Add("fa fa-skyatlas", 61974);
|
||||
dict.Add("fa fa-skype", 61822);
|
||||
dict.Add("fa fa-slack", 61848);
|
||||
dict.Add("fa fa-slideshare", 61927);
|
||||
dict.Add("fa fa-soundcloud", 61886);
|
||||
dict.Add("fa fa-spotify", 61884);
|
||||
dict.Add("fa fa-stack-exchange", 61837);
|
||||
dict.Add("fa fa-stack-overflow", 61804);
|
||||
dict.Add("fa fa-steam", 61878);
|
||||
dict.Add("fa fa-steam-square", 61879);
|
||||
dict.Add("fa fa-stumbleupon", 61860);
|
||||
dict.Add("fa fa-stumbleupon-circle", 61859);
|
||||
dict.Add("fa fa-tencent-weibo", 61909);
|
||||
dict.Add("fa fa-trello", 61825);
|
||||
dict.Add("fa fa-tripadvisor", 62050);
|
||||
dict.Add("fa fa-tumblr", 61811);
|
||||
dict.Add("fa fa-tumblr-square", 61812);
|
||||
dict.Add("fa fa-twitch", 61928);
|
||||
dict.Add("fa fa-twitter", 61593);
|
||||
dict.Add("fa fa-twitter-square", 61569);
|
||||
dict.Add("fa fa-viacoin", 62007);
|
||||
dict.Add("fa fa-vimeo", 62077);
|
||||
dict.Add("fa fa-vimeo-square", 61844);
|
||||
dict.Add("fa fa-vine", 61898);
|
||||
dict.Add("fa fa-vk", 61833);
|
||||
dict.Add("fa fa-wechat", 61911);
|
||||
dict.Add("fa fa-weibo", 61834);
|
||||
dict.Add("fa fa-weixin", 61911);
|
||||
dict.Add("fa fa-whatsapp", 62002);
|
||||
dict.Add("fa fa-wikipedia-w", 62054);
|
||||
dict.Add("fa fa-windows", 61818);
|
||||
dict.Add("fa fa-wordpress", 61850);
|
||||
dict.Add("fa fa-xing", 61800);
|
||||
dict.Add("fa fa-xing-square", 61801);
|
||||
dict.Add("fa fa-y-combinator", 62011);
|
||||
dict.Add("fa fa-y-combinator-square", 61908);
|
||||
dict.Add("fa fa-yahoo", 61854);
|
||||
dict.Add("fa fa-yc", 62011);
|
||||
dict.Add("fa fa-yc-square", 61908);
|
||||
dict.Add("fa fa-yelp", 61929);
|
||||
dict.Add("fa fa-youtube", 61799);
|
||||
dict.Add("fa fa-youtube-square", 61798);
|
||||
dict.Add("fa fa-h-square", 61693);
|
||||
dict.Add("fa fa-hospital-o", 61688);
|
||||
dict.Add("fa fa-medkit", 61690);
|
||||
dict.Add("fa fa-stethoscope", 61681);
|
||||
dict.Add("fa fa-user-md", 61680);
|
||||
return dict;
|
||||
}
|
||||
}
|
||||
}
|
45
DH.RBAC/Common/MyConfig.cs
Normal file
@ -0,0 +1,45 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DH.RBAC.Common
|
||||
{
|
||||
public class MyConfig
|
||||
{
|
||||
public int EveryPageDataCount { get; set; }
|
||||
/// <summary>
|
||||
/// 数据库类型
|
||||
/// </summary>
|
||||
public string DbType { get; set; }
|
||||
/// <summary>
|
||||
/// 数据库主机IP
|
||||
/// </summary>
|
||||
public string DbHost { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 数据库名
|
||||
/// </summary>
|
||||
public string DbName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 数据库用户名
|
||||
/// </summary>
|
||||
public string DbUserName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 数据库密码
|
||||
/// </summary>
|
||||
public string DbPassword { get; set; }
|
||||
|
||||
|
||||
private bool _debug = false;
|
||||
/// <summary>
|
||||
/// 是否调试模式,调试模式将会输出日志
|
||||
/// </summary>
|
||||
public bool Debug { get { return _debug; } set { _debug = value; } }
|
||||
|
||||
|
||||
}
|
||||
}
|
143
DH.RBAC/DH.RBAC.csproj
Normal file
@ -0,0 +1,143 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0-windows</TargetFramework>
|
||||
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<BaseOutputPath>..\</BaseOutputPath>
|
||||
<AppendTargetFrameworkToOutputPath>output</AppendTargetFrameworkToOutputPath>
|
||||
<UseWindowsForms>true</UseWindowsForms>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<Platforms>AnyCPU;x64</Platforms>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="AccountForm.cs" />
|
||||
<Compile Include="AccountForm.Designer.cs" />
|
||||
<Compile Include="Common\GlobalConfig.cs" />
|
||||
<Compile Include="Common\IconDict.cs" />
|
||||
<Compile Include="Common\MyConfig.cs" />
|
||||
<Compile Include="Logic\BaseLogic.cs" />
|
||||
<Compile Include="Logic\Logger.cs" />
|
||||
<Compile Include="Logic\Sys\SysItemLogic.cs" />
|
||||
<Compile Include="Logic\Sys\SysItemsDetailLogic.cs" />
|
||||
<Compile Include="Logic\Sys\SysLogLogic.cs" />
|
||||
<Compile Include="Logic\Sys\SysOrganizeLogic.cs" />
|
||||
<Compile Include="Logic\Sys\SysPermissionLogic.cs" />
|
||||
<Compile Include="Logic\Sys\SysRoleAuthorizeLogic.cs" />
|
||||
<Compile Include="Logic\Sys\SysRoleLogic.cs" />
|
||||
<Compile Include="Logic\Sys\SysUserLogic.cs" />
|
||||
<Compile Include="Logic\Sys\SysUserLogOnLogic.cs" />
|
||||
<Compile Include="Logic\Sys\SysUserRoleRelationLogic.cs" />
|
||||
<Compile Include="Models\Base\BaseModelEntity.cs" />
|
||||
<Compile Include="Models\Base\CodeGenerator.cs" />
|
||||
<Compile Include="Models\Base\MenuControlAttribute.cs" />
|
||||
<Compile Include="Models\DTO\Parms\AuthorParms.cs" />
|
||||
<Compile Include="Models\DTO\Parms\FileUploadParms.cs" />
|
||||
<Compile Include="Models\DTO\Parms\ItemDetailIndexParms.cs" />
|
||||
<Compile Include="Models\DTO\Parms\KeyValue.cs" />
|
||||
<Compile Include="Models\DTO\Parms\LogDeleteParms.cs" />
|
||||
<Compile Include="Models\DTO\Parms\LogIndexParms.cs" />
|
||||
<Compile Include="Models\DTO\Parms\LongPrimaryKeyParms.cs" />
|
||||
<Compile Include="Models\DTO\Parms\ModifyPasswordParms.cs" />
|
||||
<Compile Include="Models\DTO\Parms\RoleDeleteParms.cs" />
|
||||
<Compile Include="Models\DTO\Parms\SearchParms.cs" />
|
||||
<Compile Include="Models\DTO\Parms\StrPrimaryKeyParms.cs" />
|
||||
<Compile Include="Models\DTO\Parms\UserDeleteParms.cs" />
|
||||
<Compile Include="Models\DTO\Parms\UserLoginParms.cs" />
|
||||
<Compile Include="Models\Enum\ModuleType.cs" />
|
||||
<Compile Include="Models\Sys\SysItem.cs" />
|
||||
<Compile Include="Models\Sys\SysItemDetail.cs" />
|
||||
<Compile Include="Models\Sys\SysLog.cs" />
|
||||
<Compile Include="Models\Sys\SysOrganize.cs" />
|
||||
<Compile Include="Models\Sys\SysPermission.cs" />
|
||||
<Compile Include="Models\Sys\SysRole.cs" />
|
||||
<Compile Include="Models\Sys\SysRoleAuthorize.cs" />
|
||||
<Compile Include="Models\Sys\SysUser.cs" />
|
||||
<Compile Include="Models\Sys\SysUserLogOn.cs" />
|
||||
<Compile Include="Models\Sys\SysUserRoleRelation.cs" />
|
||||
<Compile Include="Properties\Resources.Designer.cs" />
|
||||
<Compile Include="RBACWindow.cs" />
|
||||
<Compile Include="RBACWindow.Designer.cs" />
|
||||
<Compile Include="Utility\Extension\ExtMethods.cs" />
|
||||
<Compile Include="Utility\Extension\MyEnvironment.cs" />
|
||||
<Compile Include="Utility\Other\DESHelper.cs" />
|
||||
<Compile Include="Utility\Other\FormHelper.cs" />
|
||||
<Compile Include="Utility\Other\JsonHelper.cs" />
|
||||
<Compile Include="Utility\Other\MD5Helper.cs" />
|
||||
<Compile Include="Utility\Other\PanelScrollHelper.cs" />
|
||||
<Compile Include="Utility\Other\ScreenUtils.cs" />
|
||||
<Compile Include="Utility\Other\SnowFlakeHelper.cs" />
|
||||
<Compile Include="Utility\Other\StringHelper.cs" />
|
||||
<Compile Include="Utility\Other\TreeSelect.cs" />
|
||||
<Compile Include="Utility\Other\UIUtils.cs" />
|
||||
<Compile Include="Utility\Other\UUID.cs" />
|
||||
<Compile Include="Utility\Other\ZTreeNode.cs" />
|
||||
<Compile Include="Utility\PopupTool\GripBounds.cs" />
|
||||
<Compile Include="Utility\PopupTool\Popup.cs" />
|
||||
<Compile Include="Utility\PopupTool\UnsafeMethods.cs" />
|
||||
<Compile Include="Views\DefaultPage.cs" />
|
||||
<Compile Include="Views\DefaultPage.Designer.cs" />
|
||||
<Compile Include="Views\EmptyPage.cs" />
|
||||
<Compile Include="Views\EmptyPage.Designer.cs" />
|
||||
<Compile Include="Views\MyPage.cs" />
|
||||
<Compile Include="Views\Sys\BaseSubForm.cs" />
|
||||
<Compile Include="Views\Sys\BaseSubForm.Designer.cs" />
|
||||
<Compile Include="Views\Sys\Organize\AddOrganizeForm.cs" />
|
||||
<Compile Include="Views\Sys\Organize\AddOrganizeForm.Designer.cs" />
|
||||
<Compile Include="Views\Sys\Organize\OrganizePage.cs" />
|
||||
<Compile Include="Views\Sys\Organize\OrganizePage.Designer.cs" />
|
||||
<Compile Include="Views\Sys\Permission\AddPermissionForm.cs" />
|
||||
<Compile Include="Views\Sys\Permission\AddPermissionForm.Designer.cs" />
|
||||
<Compile Include="Views\Sys\Permission\IconForm.cs" />
|
||||
<Compile Include="Views\Sys\Permission\IconForm.Designer.cs" />
|
||||
<Compile Include="Views\Sys\Permission\PermissionPage.cs" />
|
||||
<Compile Include="Views\Sys\Permission\PermissionPage.Designer.cs" />
|
||||
<Compile Include="Views\Sys\Role\AddRoleForm.cs" />
|
||||
<Compile Include="Views\Sys\Role\AddRoleForm.Designer.cs" />
|
||||
<Compile Include="Views\Sys\Role\RoleAuthorizeForm.cs" />
|
||||
<Compile Include="Views\Sys\Role\RoleAuthorizeForm.Designer.cs" />
|
||||
<Compile Include="Views\Sys\Role\RolePage.cs" />
|
||||
<Compile Include="Views\Sys\Role\RolePage.Designer.cs" />
|
||||
<Compile Include="Views\Sys\User\AddUserForm.cs" />
|
||||
<Compile Include="Views\Sys\User\AddUserForm.Designer.cs" />
|
||||
<Compile Include="Views\Sys\User\UserPage.cs" />
|
||||
<Compile Include="Views\Sys\User\UserPage.Designer.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="favicon.ico" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="AntdUI" Version="1.8.9" />
|
||||
<PackageReference Include="JinianNet.JNTemplate" Version="2.4.2" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||
<PackageReference Include="SqlSugarCore" Version="5.1.4.185" />
|
||||
<PackageReference Include="SunnyUI" Version="3.8.2" />
|
||||
<PackageReference Include="System.Data.SqlClient" Version="4.9.0" />
|
||||
<PackageReference Include="System.Data.SQLite" Version="1.0.119" />
|
||||
<PackageReference Include="System.Drawing.Common" Version="9.0.3" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
<!-- 自动生成 -->
|
||||
<ItemGroup>
|
||||
<Compile Update="Page\DefaultPage.cs" />
|
||||
<Compile Update="Properties\Resources.Designer.cs">
|
||||
<DesignTime>True</DesignTime>
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Update="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ProjectExtensions>
|
||||
<VisualStudio>
|
||||
<UserProperties configs_4config_1json__JsonSchema="" />
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
</Project>
|
303
DH.RBAC/Logic/BaseLogic.cs
Normal file
@ -0,0 +1,303 @@
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
using System.Data;
|
||||
|
||||
using DH.RBAC.Model.Base;
|
||||
using JinianNet.JNTemplate;
|
||||
using DH.RBAC.Utility.Other;
|
||||
using DH.RBAC.Utility.Extension;
|
||||
|
||||
|
||||
|
||||
namespace DH.RBAC.Logic.Base
|
||||
{
|
||||
public class BaseLogic
|
||||
{
|
||||
private static string ConnectionString;
|
||||
private static SqlSugar.DbType DbType;
|
||||
private static string DbName;
|
||||
private static bool DebugMode;
|
||||
|
||||
public static bool InitDB(string dbType, string host, string dbName, string userName, string pasword, ref string message, bool debug = false)
|
||||
{
|
||||
DebugMode = debug;
|
||||
DbName = dbName;
|
||||
if (dbType.ToLower() == "SqlServer".ToLower())
|
||||
{
|
||||
DbType = SqlSugar.DbType.SqlServer;
|
||||
ConnectionString = $"Data Source={host};Initial Catalog={dbName};User ID={userName};Password={pasword};";
|
||||
return true;
|
||||
}
|
||||
else if (dbType.ToLower() == "MySql".ToLower())
|
||||
{
|
||||
DbType = SqlSugar.DbType.MySql;
|
||||
ConnectionString = $"server={host};Database={dbName};Uid={userName};Pwd={pasword};";
|
||||
return true;
|
||||
}
|
||||
else if (dbType.ToLower() == "Oracle".ToLower())
|
||||
{
|
||||
DbType = SqlSugar.DbType.Oracle;
|
||||
ConnectionString = $"Data Source={host}/{dbName};User ID={userName};Password={pasword};";
|
||||
return true;
|
||||
}
|
||||
else if (dbType.ToLower() == "PostgreSql".ToLower())
|
||||
{
|
||||
DbType = SqlSugar.DbType.PostgreSQL;
|
||||
ConnectionString = $"Server={host};Port=5432;Database={dbName};User Id={userName};Password={pasword};";
|
||||
return true;
|
||||
}
|
||||
else if (dbType.ToLower() == "Sqlite".ToLower())
|
||||
{
|
||||
DbType = SqlSugar.DbType.Sqlite;
|
||||
|
||||
var template = Engine.CreateTemplate(dbName);
|
||||
template.Set("BaseDirectory", MyEnvironment.RootPath(""));
|
||||
var result = template.Render();
|
||||
|
||||
ConnectionString = $"DataSource={result};";
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
message = "不支持的数据库";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public static SqlSugarClient GetInstance()
|
||||
{
|
||||
#if !NETFRAMEWORK && !WINDOWS
|
||||
SqlSugarScope client = (SqlSugar.SqlSugarScope)Utility.MiddleWare.AutofacContainerModule.GetService<ISqlSugarClient>();
|
||||
if (client != null)
|
||||
return client.ScopedContext;
|
||||
#endif
|
||||
|
||||
SqlSugarClient db = new SqlSugarClient(new ConnectionConfig()
|
||||
{
|
||||
ConnectionString = ConnectionString,
|
||||
DbType = DbType,
|
||||
IsAutoCloseConnection = true,
|
||||
ConfigureExternalServices = new ConfigureExternalServices()
|
||||
{
|
||||
SqlFuncServices = ExtMethods.GetExpMethods
|
||||
|
||||
}
|
||||
});
|
||||
//用来打印Sql方便你调式
|
||||
db.Aop.OnLogExecuting = (sql, pars) =>
|
||||
{
|
||||
if (DebugMode)
|
||||
{
|
||||
Console.WriteLine(sql + "\r\n" +
|
||||
db.Utilities.SerializeObject(pars.ToDictionary(it => it.ParameterName, it => it.Value)));
|
||||
Console.WriteLine();
|
||||
}
|
||||
};
|
||||
return db;
|
||||
}
|
||||
|
||||
public DataTable GetTableColumnInfo(string tableName)
|
||||
{
|
||||
if (DbType == SqlSugar.DbType.SqlServer)
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
StringBuilder strSql = new StringBuilder();
|
||||
strSql.Append(" SELECT ").AppendLine();
|
||||
strSql.Append(" A.Name AS TableName, ").AppendLine();
|
||||
strSql.Append(" B.Name AS ColumnName, ").AppendLine();
|
||||
strSql.Append(" D.Name AS TypeName, ").AppendLine();
|
||||
strSql.Append(" B.Max_Length AS TypeLength, ").AppendLine();
|
||||
strSql.Append(" CASE WHEN ").AppendLine();
|
||||
strSql.Append(" ( ").AppendLine();
|
||||
strSql.Append(" SELECT ").AppendLine();
|
||||
strSql.Append(" F.Name ").AppendLine();
|
||||
strSql.Append(" FROM ").AppendLine();
|
||||
strSql.Append(" information_schema.key_column_usage E,sys.indexes F ").AppendLine();
|
||||
strSql.Append(" WHERE ").AppendLine();
|
||||
strSql.Append(" F.object_id=B.object_id ").AppendLine();
|
||||
strSql.Append(" AND F.name=E.constraint_name ").AppendLine();
|
||||
strSql.Append(" AND F.is_primary_key=1 ").AppendLine();
|
||||
strSql.Append(" AND E.table_name=A.Name ").AppendLine();
|
||||
strSql.Append(" AND E.column_name =B.Name ").AppendLine();
|
||||
strSql.Append(" ) IS NULL THEN 0 ELSE 1 END AS IsPrimaryKey, ").AppendLine();
|
||||
strSql.Append(" '' AS ClassName, ").AppendLine();
|
||||
strSql.Append(" '' AS PropertyName, ").AppendLine();
|
||||
strSql.Append(" '' AS CSType, ").AppendLine();
|
||||
strSql.Append(" C.VALUE AS Other ").AppendLine();
|
||||
strSql.Append(" FROM sys.tables A ").AppendLine();
|
||||
strSql.Append(" LEFT JOIN sys.columns B ").AppendLine();
|
||||
strSql.Append(" ON B.object_id = A.object_id ").AppendLine();
|
||||
strSql.Append(" LEFT JOIN sys.extended_properties C ").AppendLine();
|
||||
strSql.Append(" ON C.major_id = B.object_id AND C.minor_id = B.column_id ").AppendLine();
|
||||
strSql.Append(" LEFT JOIN sys.types D ON D.system_type_id=B.system_type_id ").AppendLine();
|
||||
strSql.Append(" WHERE A.Name = '" + tableName + "' ").AppendLine();
|
||||
DataTable dt = db.Ado.GetDataTable(strSql.ToString());
|
||||
return dt;
|
||||
}
|
||||
}
|
||||
else if (DbType == SqlSugar.DbType.MySql)
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
StringBuilder strSql = new StringBuilder();
|
||||
strSql.Append(" SELECT ").AppendLine();
|
||||
strSql.Append(" '" + tableName + "' AS TableName, ").AppendLine();
|
||||
strSql.Append(" COLUMN_NAME AS ColumnName, ").AppendLine();
|
||||
strSql.Append(" DATA_TYPE AS TypeName, ").AppendLine();
|
||||
strSql.Append(" CHARACTER_MAXIMUM_LENGTH AS TypeLength, ").AppendLine();
|
||||
strSql.Append(" case when COLUMN_KEY = 'PRI' THEN 1 ELSE 0 END AS IsPrimaryKey, ").AppendLine();
|
||||
strSql.Append(" '' AS ClassName, ").AppendLine();
|
||||
strSql.Append(" '' PropertyName, ").AppendLine();
|
||||
strSql.Append(" '' CSType , ").AppendLine();
|
||||
strSql.Append(" COLUMN_COMMENT AS Other ").AppendLine();
|
||||
strSql.Append(" FROM ").AppendLine();
|
||||
strSql.Append(" INFORMATION_SCHEMA.COLUMNS ").AppendLine();
|
||||
strSql.Append(" WHERE ").AppendLine();
|
||||
strSql.Append(" table_schema ='" + DbName + "' AND table_name = '" + tableName + "' ").AppendLine();
|
||||
strSql.Append(" ORDER BY ORDINAL_POSITION ").AppendLine();
|
||||
DataTable dt = db.Ado.GetDataTable(strSql.ToString());
|
||||
return dt;
|
||||
}
|
||||
}
|
||||
else if (DbType == SqlSugar.DbType.Sqlite)
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
|
||||
string sql = "SELECT * from sqlite_master where type = 'table' AND tbl_name='" + tableName + "'";
|
||||
DataTable dt = db.Ado.GetDataTable(sql);
|
||||
//创建个新的DataTable,把dt中的数据放进去
|
||||
DataTable newDt = new DataTable();
|
||||
newDt.Columns.Add("TableName");
|
||||
newDt.Columns.Add("ColumnName");
|
||||
newDt.Columns.Add("TypeName");
|
||||
newDt.Columns.Add("TypeLength");
|
||||
newDt.Columns.Add("IsPrimaryKey");
|
||||
newDt.Columns.Add("ClassName");
|
||||
newDt.Columns.Add("PropertyName");
|
||||
newDt.Columns.Add("CSType");
|
||||
newDt.Columns.Add("Other");
|
||||
if (dt == null || dt.Rows.Count == 0)
|
||||
return newDt;
|
||||
string sql1 = dt.Rows[0]["sql"].ToString().Replace("\"", "");
|
||||
|
||||
List<CodeGenerator> list = new List<CodeGenerator>();
|
||||
//第一个(
|
||||
int index1 = sql1.IndexOf("(");
|
||||
int index2 = sql1.LastIndexOf(")");
|
||||
string content = sql1.Substring(index1 + 1, index2 - index1 - 1);
|
||||
List<string> array = content.Split('\n').Select(it => it.Trim()).ToList();
|
||||
List<string> primaryKey = new List<string>();
|
||||
foreach (string item in array)
|
||||
{
|
||||
if (item.Trim() == "")
|
||||
continue;
|
||||
if (item.ToUpper().StartsWith("PRIMARY KEY"))
|
||||
{
|
||||
int index3 = item.IndexOf("(");
|
||||
int index4 = item.IndexOf(")");
|
||||
string[] keyArray = item.Substring(index3 + 1, index4 - index3 - 1).Split(',');
|
||||
foreach (string key in keyArray)
|
||||
primaryKey.Add(key.Trim());
|
||||
continue;
|
||||
}
|
||||
string[] itemText = item.Trim().Split(' ');
|
||||
CodeGenerator codeGenerator = new CodeGenerator();
|
||||
codeGenerator.TableName = tableName;
|
||||
codeGenerator.ColumnName = itemText[0];
|
||||
string type = itemText[1];
|
||||
int index5 = type.IndexOf("(");
|
||||
int index6 = type.IndexOf(")");
|
||||
codeGenerator.TypeName = index5 == -1 ? type : type.Substring(0, index5);
|
||||
codeGenerator.TypeLength = index5 == -1 ? "0" : type.Substring(index5 + 1, index6 - index5 - 1);
|
||||
codeGenerator.IsPrimaryKey = "0";
|
||||
codeGenerator.ClassName = "";
|
||||
codeGenerator.PropertyName = "";
|
||||
codeGenerator.CSType = "";
|
||||
codeGenerator.Other = "";
|
||||
list.Add(codeGenerator);
|
||||
}
|
||||
foreach (CodeGenerator code in list)
|
||||
{
|
||||
if (primaryKey.Contains(code.ColumnName))
|
||||
code.IsPrimaryKey = "1";
|
||||
}
|
||||
return list.ToJson().ToDataTable();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public List<string> GetTableList()
|
||||
{
|
||||
if (DbType == SqlSugar.DbType.SqlServer)
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
StringBuilder strSql = new StringBuilder();
|
||||
strSql.Append(" SELECT ").AppendLine();
|
||||
strSql.Append(" A.Name ").AppendLine();
|
||||
strSql.Append(" FROM ").AppendLine();
|
||||
strSql.Append(" sysobjects A ").AppendLine();
|
||||
strSql.Append(" WHERE ").AppendLine();
|
||||
strSql.Append(" A.xtype = 'U' ").AppendLine();
|
||||
DataTable dt = db.Ado.GetDataTable(strSql.ToString());
|
||||
if (dt == null)
|
||||
return new List<string>();
|
||||
List<string> list = new List<string>();
|
||||
foreach (DataRow row in dt.Rows)
|
||||
{
|
||||
list.Add(row["Name"].ToString());
|
||||
}
|
||||
return list;
|
||||
}
|
||||
}
|
||||
else if (DbType == SqlSugar.DbType.MySql)
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
StringBuilder strSql = new StringBuilder();
|
||||
strSql.Append(" SELECT ").AppendLine();
|
||||
strSql.Append(" TABLE_NAME AS Name ").AppendLine();
|
||||
strSql.Append(" FROM ").AppendLine();
|
||||
strSql.Append(" information_schema.TABLES ").AppendLine();
|
||||
strSql.Append(" WHERE ").AppendLine();
|
||||
strSql.Append(" TABLE_SCHEMA = '" + DbName + "' ").AppendLine();
|
||||
DataTable dt = db.Ado.GetDataTable(strSql.ToString());
|
||||
if (dt == null)
|
||||
return new List<string>();
|
||||
List<string> list = new List<string>();
|
||||
foreach (DataRow row in dt.Rows)
|
||||
{
|
||||
list.Add(row["Name"].ToString());
|
||||
}
|
||||
return list;
|
||||
}
|
||||
}
|
||||
else if (DbType == SqlSugar.DbType.Sqlite)
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
string sql = "SELECT name from sqlite_master where type='table'";
|
||||
DataTable dt = db.Ado.GetDataTable(sql);
|
||||
if (dt == null)
|
||||
return new List<string>();
|
||||
List<string> list = new List<string>();
|
||||
foreach (DataRow row in dt.Rows)
|
||||
{
|
||||
list.Add(row["name"].ToString());
|
||||
}
|
||||
return list;
|
||||
}
|
||||
}
|
||||
return new List<string>();
|
||||
}
|
||||
}
|
||||
}
|
80
DH.RBAC/Logic/Logger.cs
Normal file
@ -0,0 +1,80 @@
|
||||
using DH.RBAC.Model.Sys;
|
||||
using DH.RBAC.Logic.Base;
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using DH.RBAC.Utility.Other;
|
||||
|
||||
namespace DH.RBAC.Logic
|
||||
{
|
||||
/// <summary>
|
||||
/// 日志
|
||||
/// </summary>
|
||||
public class Logger
|
||||
{
|
||||
private static object _lock = new object();
|
||||
private static void Log(string type, string message)
|
||||
{
|
||||
lock (_lock)
|
||||
{
|
||||
SimpleClient<SysLog> client = new SimpleClient<SysLog>(BaseLogic.GetInstance());
|
||||
|
||||
|
||||
|
||||
SysLog log = new SysLog();
|
||||
log.Id = UUID.SnowId;
|
||||
log.Type = type;
|
||||
#if !NETFRAMEWORK
|
||||
log.ThreadId = Thread.GetCurrentProcessorId();
|
||||
#else
|
||||
log.ThreadId = Thread.CurrentThread.ManagedThreadId;
|
||||
#endif
|
||||
log.Message = message;
|
||||
log.EnableFlag = "Y";
|
||||
log.DeleteFlag = "N";
|
||||
log.CreateTime = DateTime.Now;
|
||||
log.CreateUserId = "1";
|
||||
log.ModifyUserId = "1";
|
||||
log.ModifyTime = log.CreateTime;
|
||||
client.Insert(log);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 操作日志写入
|
||||
/// </summary>
|
||||
/// <param name="message"></param>
|
||||
public static void OperateInfo(string message)
|
||||
{
|
||||
Log("Operate", message);
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 运行日志写入
|
||||
/// </summary>
|
||||
/// <param name="message"></param>
|
||||
public static void RunningInfo(string message)
|
||||
{
|
||||
Log("Running", message);
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 错误日志写入
|
||||
/// </summary>
|
||||
/// <param name="message"></param>
|
||||
public static void ErrorInfo(string message)
|
||||
{
|
||||
Log("Error", message);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
167
DH.RBAC/Logic/Sys/SysItemLogic.cs
Normal file
@ -0,0 +1,167 @@
|
||||
using DH.RBAC.Model.Sys;
|
||||
using DH.RBAC.Logic.Base;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using SqlSugar;
|
||||
using DH.RBAC.Utility.Other;
|
||||
|
||||
|
||||
namespace DH.RBAC.Logic.Sys
|
||||
{
|
||||
public class SysItemLogic : BaseLogic
|
||||
{
|
||||
|
||||
public List<SysItem> GetList()
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
return db.Queryable<SysItem>().Where(it => it.DeleteFlag == "N")
|
||||
.Includes(it => it.CreateUser)
|
||||
.Includes(it => it.ModifyUser)
|
||||
.OrderBy(it => it.SortCode)
|
||||
.ToList();
|
||||
}
|
||||
}
|
||||
|
||||
public List<SysItem> GetAppList(int pageIndex, int pageSize, ref int totalCount)
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
return db.Queryable<SysItem>().Where(it => it.ParentId != "0" && it.DeleteFlag == "N")
|
||||
.Includes(it => it.CreateUser)
|
||||
.Includes(it => it.ModifyUser)
|
||||
.OrderBy(it => it.SortCode)
|
||||
.ToPageList(pageIndex, pageSize, ref totalCount);
|
||||
}
|
||||
}
|
||||
public List<SysItem> GetList(int pageIndex, int pageSize, string keyWord, ref int totalCount)
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
ISugarQueryable<SysItem> queryable = db.Queryable<SysItem>().Where(it => it.DeleteFlag == "N");
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(keyWord))
|
||||
{
|
||||
queryable = queryable.Where(it => (it.Name.Contains(keyWord) || it.EnCode.Contains(keyWord)));
|
||||
}
|
||||
return queryable
|
||||
.Includes(it => it.CreateUser)
|
||||
.Includes(it => it.ModifyUser)
|
||||
.OrderBy(it => it.SortCode)
|
||||
.ToPageList(pageIndex, pageSize, ref totalCount);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public int GetChildCount(string parentId)
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
return db.Queryable<SysItem>()
|
||||
.Where(it => it.ParentId == parentId && it.DeleteFlag == "N")
|
||||
.ToList().Count();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public SysItem Get(string primaryKey)
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
return db.Queryable<SysItem>().Where(it => it.DeleteFlag == "N")
|
||||
.Where(it => it.Id == primaryKey)
|
||||
.Includes(it => it.CreateUser)
|
||||
.Includes(it => it.ModifyUser)
|
||||
.First();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public int AppInsert(SysItem model, string operateUser)
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
SysItem s = db.Queryable<SysItem>().Where(it => it.ParentId == "0").First();
|
||||
model.Id = UUID.StrSnowId;
|
||||
model.Layer = s.Layer + 1;
|
||||
model.ParentId = s.Id;
|
||||
model.DeleteFlag = "N";
|
||||
model.CreateUserId = operateUser;
|
||||
model.CreateTime = DateTime.Now;
|
||||
model.ModifyUserId = model.CreateUser.Id;
|
||||
model.ModifyTime = model.CreateTime;
|
||||
return db.Insertable<SysItem>(model).ExecuteCommand();
|
||||
}
|
||||
}
|
||||
|
||||
public int Insert(SysItem model, string account)
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
model.Id = UUID.StrSnowId;
|
||||
model.Layer = Get(model.ParentId).Layer += 1;
|
||||
model.DeleteFlag = "N";
|
||||
model.CreateUserId = account;
|
||||
model.CreateTime = DateTime.Now;
|
||||
model.ModifyUserId = model.CreateUserId;
|
||||
model.ModifyTime = model.CreateTime;
|
||||
return db.Insertable<SysItem>(model).ExecuteCommand();
|
||||
}
|
||||
}
|
||||
|
||||
public int Delete(string primaryKey)
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
SysItem item = db.Queryable<SysItem>().Where(it => it.Id == primaryKey).First();
|
||||
if (item == null)
|
||||
return 0;
|
||||
item.DeleteFlag = "Y";
|
||||
return db.Updateable<SysItem>(item).ExecuteCommand();
|
||||
}
|
||||
}
|
||||
public int Update(SysItem model, string account)
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
model.Layer = Get(model.ParentId).Layer += 1;
|
||||
model.ModifyUserId = account;
|
||||
model.ModifyTime = DateTime.Now;
|
||||
return db.Updateable<SysItem>(model).UpdateColumns(it => new
|
||||
{
|
||||
it.ParentId,
|
||||
it.Layer,
|
||||
it.EnCode,
|
||||
it.Name,
|
||||
it.SortCode,
|
||||
it.EnableFlag,
|
||||
it.Remark,
|
||||
it.ModifyUserId,
|
||||
it.ModifyTime
|
||||
}).ExecuteCommand();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public int AppUpdate(SysItem model, string operateUser)
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
model.ModifyUserId = operateUser;
|
||||
model.ModifyTime = DateTime.Now;
|
||||
return db.Updateable<SysItem>(model).UpdateColumns(it => new
|
||||
{
|
||||
it.EnCode,
|
||||
it.Name,
|
||||
it.SortCode,
|
||||
it.Remark,
|
||||
it.ModifyUserId,
|
||||
it.ModifyTime
|
||||
}).ExecuteCommand();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
182
DH.RBAC/Logic/Sys/SysItemsDetailLogic.cs
Normal file
@ -0,0 +1,182 @@
|
||||
using DH.RBAC.Model.Sys;
|
||||
using DH.RBAC.Logic.Base;
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using DH.RBAC.Utility.Other;
|
||||
|
||||
|
||||
namespace DH.RBAC.Logic.Sys
|
||||
{
|
||||
public class SysItemsDetailLogic : BaseLogic
|
||||
{
|
||||
public List<SysItemDetail> GetItemDetailList(string strItemCode)
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
|
||||
SysItem item = db.Queryable<SysItem>().Where(it => it.EnCode == strItemCode && it.DeleteFlag == "N").First();
|
||||
if (null == item)
|
||||
return null;
|
||||
return db.Queryable<SysItemDetail>().Where(it => it.ItemId == item.Id && it.DeleteFlag == "N")
|
||||
.Includes(it => it.CreateUser)
|
||||
.Includes(it => it.ModifyUser)
|
||||
.OrderBy(it => it.SortCode)
|
||||
.ToList();
|
||||
}
|
||||
}
|
||||
|
||||
public List<SysItemDetail> GetList(int pageIndex, int pageSize, string itemId, string keyWord, ref int totalCount)
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
ISugarQueryable<SysItemDetail> queryable = db.Queryable<SysItemDetail>().Where(it => it.DeleteFlag == "N" && it.ItemId == itemId);
|
||||
if (!keyWord.IsNullOrEmpty())
|
||||
{
|
||||
queryable = queryable.Where(it => (it.Name.Contains(keyWord) || it.EnCode.Contains(keyWord)));
|
||||
}
|
||||
return queryable
|
||||
.Includes(it => it.CreateUser)
|
||||
.Includes(it => it.ModifyUser)
|
||||
.OrderBy(it => it.SortCode)
|
||||
.ToPageList(pageIndex, pageSize, ref totalCount);
|
||||
}
|
||||
}
|
||||
|
||||
public List<SysItemDetail> GetListByItemId(string itemId)
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
return db.Queryable<SysItemDetail>()
|
||||
.Where(it => it.ItemId == itemId && it.DeleteFlag == "N")
|
||||
.Includes(it => it.CreateUser)
|
||||
.Includes(it => it.ModifyUser)
|
||||
.ToList();
|
||||
}
|
||||
}
|
||||
|
||||
public void InsertItemDetail(string itemId, List<SysItemDetail> list)
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
try
|
||||
{
|
||||
db.BeginTran();
|
||||
List<SysItemDetail> list2 = db.Queryable<SysItemDetail>().Where(it => it.ItemId == itemId && it.DeleteFlag == "N").ToList();
|
||||
list2.ForEach(it => { it.DeleteFlag = "Y"; });
|
||||
db.Updateable<SysItemDetail>(list2).ExecuteCommand();
|
||||
db.Insertable<SysItemDetail>(list).ExecuteCommand();
|
||||
db.CommitTran();
|
||||
}
|
||||
catch
|
||||
{
|
||||
db.RollbackTran();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public SysItemDetail Get(string primaryKey)
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
return db.Queryable<SysItemDetail>()
|
||||
.Where(it => it.DeleteFlag == "N" && it.Id == primaryKey)
|
||||
.Includes(it => it.CreateUser)
|
||||
.Includes(it => it.ModifyUser)
|
||||
.First();
|
||||
}
|
||||
}
|
||||
|
||||
public int Insert(SysItemDetail model, string account)
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
model.Id = UUID.StrSnowId;
|
||||
model.IsDefault = model.IsDefault == null ? "0" : "1";
|
||||
model.DeleteFlag = "N";
|
||||
model.CreateUserId = account;
|
||||
model.CreateTime = DateTime.Now;
|
||||
model.ModifyUserId = model.CreateUserId;
|
||||
model.ModifyTime = model.CreateTime;
|
||||
return db.Insertable<SysItemDetail>(model).ExecuteCommand();
|
||||
}
|
||||
}
|
||||
|
||||
public int AppInsert(SysItemDetail model, string operateUser)
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
model.Id = UUID.StrSnowId;
|
||||
model.IsDefault = "0";
|
||||
model.DeleteFlag = "N";
|
||||
model.CreateUserId = operateUser;
|
||||
model.CreateTime = DateTime.Now;
|
||||
model.ModifyUserId = model.CreateUserId;
|
||||
model.ModifyTime = model.CreateTime;
|
||||
return db.Insertable<SysItemDetail>(model).ExecuteCommand();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public int AppUpdate(SysItemDetail model, string operateUser)
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
model.ModifyUserId = operateUser;
|
||||
model.ModifyTime = DateTime.Now;
|
||||
return db.Updateable<SysItemDetail>(model).UpdateColumns(it => new
|
||||
{
|
||||
it.EnCode,
|
||||
it.Name,
|
||||
it.SortCode,
|
||||
it.ModifyUserId,
|
||||
it.ModifyTime
|
||||
}).ExecuteCommand();
|
||||
}
|
||||
}
|
||||
|
||||
public int Delete(string itemId)
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
SysItemDetail itemDetail = db.Queryable<SysItemDetail>().Where(it => it.Id == itemId).First();
|
||||
if (itemDetail == null)
|
||||
return 0;
|
||||
itemDetail.DeleteFlag = "Y";
|
||||
return db.Updateable<SysItemDetail>(itemDetail).ExecuteCommand();
|
||||
}
|
||||
}
|
||||
|
||||
public int Update(SysItemDetail model, string account)
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
model.IsDefault = model.IsDefault == null ? "0" : "1";
|
||||
model.ModifyUserId = account;
|
||||
model.ModifyTime = DateTime.Now;
|
||||
return db.Updateable<SysItemDetail>(model).UpdateColumns(it => new
|
||||
{
|
||||
it.ItemId,
|
||||
it.EnCode,
|
||||
it.Name,
|
||||
it.IsDefault,
|
||||
it.SortCode,
|
||||
it.EnableFlag,
|
||||
it.ModifyUserId,
|
||||
it.ModifyTime
|
||||
}).ExecuteCommand();
|
||||
}
|
||||
}
|
||||
|
||||
public SysItemDetail GetSoftwareName()
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
return db.Queryable<SysItemDetail>().Where(it => it.EnCode == "SoftwareName").First();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
123
DH.RBAC/Logic/Sys/SysLogLogic.cs
Normal file
@ -0,0 +1,123 @@
|
||||
using DH.RBAC.Model.Sys;
|
||||
using DH.RBAC.Logic.Base;
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using DH.RBAC.Utility.Other;
|
||||
|
||||
|
||||
namespace DH.RBAC.Logic.Sys
|
||||
{
|
||||
/// <summary>
|
||||
/// 系统日志表数据访问
|
||||
/// </summary>
|
||||
public class SysLogLogic : BaseLogic
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 根据日志类型获得日志
|
||||
/// </summary>
|
||||
/// <param name="pageIndex"></param>
|
||||
/// <param name="pageSize"></param>
|
||||
/// <param name="type"></param>
|
||||
/// <param name="index"></param>
|
||||
/// <param name="keyWord"></param>
|
||||
/// <param name="totalCount"></param>
|
||||
/// <returns></returns>
|
||||
public List<SysLog> GetList(int pageIndex, int pageSize, string type, string index, string keyWord, ref int totalCount)
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
ISugarQueryable<SysLog> query = db.Queryable<SysLog>().Where(it => it.Type == type);
|
||||
if (!keyWord.IsNullOrEmpty())
|
||||
{
|
||||
query = query.Where(it => it.Message.Contains(keyWord));
|
||||
}
|
||||
//查询当日
|
||||
if (index == "1")
|
||||
{
|
||||
DateTime today = DateTime.Today;
|
||||
DateTime startTime = today;
|
||||
DateTime endTime = today.AddDays(1);
|
||||
query = query.Where(it => it.CreateTime >= startTime && it.CreateTime < endTime);
|
||||
}
|
||||
//近7天
|
||||
else if (index == "2")
|
||||
{
|
||||
DateTime today = DateTime.Today;
|
||||
DateTime startTime = today.AddDays(-6);
|
||||
DateTime endTime = today.AddDays(1);
|
||||
query = query.Where(it => it.CreateTime >= startTime && it.CreateTime < endTime);
|
||||
}
|
||||
//近1月
|
||||
else if (index == "3")
|
||||
{
|
||||
DateTime today = DateTime.Today;
|
||||
DateTime startTime = today.AddDays(-29);
|
||||
DateTime endTime = today.AddDays(1);
|
||||
query = query.Where(it => it.CreateTime >= startTime && it.CreateTime < endTime);
|
||||
}
|
||||
//近3月
|
||||
else if (index == "4")
|
||||
{
|
||||
DateTime today = DateTime.Today;
|
||||
DateTime startTime = today.AddDays(-91);
|
||||
DateTime endTime = today.AddDays(1);
|
||||
query = query.Where(it => it.CreateTime >= startTime && it.CreateTime < endTime);
|
||||
}
|
||||
return query.OrderBy(it => it.Id, OrderByType.Desc).ToPageList(pageIndex, pageSize, ref totalCount);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 删除日志
|
||||
/// </summary>
|
||||
/// <param name="type"></param>
|
||||
/// <param name="index"></param>
|
||||
/// <returns></returns>
|
||||
public int Delete(string type, string index)
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
IDeleteable<SysLog> query = db.Deleteable<SysLog>().Where(it => it.Type == type);
|
||||
//保留一个月
|
||||
if (index == "1")
|
||||
{
|
||||
DateTime today = DateTime.Today;
|
||||
DateTime startTime = today;
|
||||
DateTime endTime = today.AddDays(-29);
|
||||
query = query.Where(it => it.CreateTime < endTime);
|
||||
return query.ExecuteCommand();
|
||||
}
|
||||
//保留7天
|
||||
else if (index == "2")
|
||||
{
|
||||
DateTime today = DateTime.Today;
|
||||
DateTime startTime = today.AddDays(-6);
|
||||
query = query.Where(it => it.CreateTime < startTime);
|
||||
return query.ExecuteCommand();
|
||||
}
|
||||
//保留近3个月
|
||||
else if (index == "3")
|
||||
{
|
||||
DateTime today = DateTime.Today;
|
||||
DateTime startTime = today.AddDays(-92);
|
||||
query = query.Where(it => it.CreateTime < startTime);
|
||||
return query.ExecuteCommand();
|
||||
}
|
||||
//全部
|
||||
else if (index == "4")
|
||||
{
|
||||
return query.ExecuteCommand();
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
157
DH.RBAC/Logic/Sys/SysOrganizeLogic.cs
Normal file
@ -0,0 +1,157 @@
|
||||
using DH.RBAC.Model.Sys;
|
||||
using DH.RBAC.Logic.Base;
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using DH.RBAC.Utility.Other;
|
||||
|
||||
|
||||
namespace DH.RBAC.Logic.Sys
|
||||
{
|
||||
public class SysOrganizeLogic : BaseLogic
|
||||
{
|
||||
public List<SysOrganize> GetList()
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
return db.Queryable<SysOrganize>().Where(it => it.DeleteFlag == "N").ToList();
|
||||
}
|
||||
}
|
||||
|
||||
public List<SysOrganize> GetList(int pageIndex, int pageSize, string keyWord, ref int totalCount)
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
ISugarQueryable<SysOrganize> queryable = db.Queryable<SysOrganize>().Where(it => it.ParentId != "0" && it.DeleteFlag == "N");
|
||||
|
||||
if (!keyWord.IsNullOrEmpty())
|
||||
{
|
||||
queryable = queryable.Where(it => (it.FullName.Contains(keyWord) || it.EnCode.Contains(keyWord)));
|
||||
}
|
||||
return queryable
|
||||
.OrderBy(it => it.SortCode)
|
||||
.ToPageList(pageIndex, pageSize, ref totalCount);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public int GetChildCount(string parentId)
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
return db.Queryable<SysOrganize>().Where(it => it.ParentId == parentId && it.DeleteFlag == "N").Count();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public int AppUpdate(SysOrganize model, string opreaterUser)
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
model.ModifyUserId = opreaterUser;
|
||||
model.ModifyTime = DateTime.Now;
|
||||
return db.Updateable<SysOrganize>(model).UpdateColumns(it => new
|
||||
{
|
||||
it.EnCode,
|
||||
it.FullName,
|
||||
it.Type,
|
||||
it.ManagerId,
|
||||
it.TelePhone,
|
||||
it.WeChat,
|
||||
it.Fax,
|
||||
it.Email,
|
||||
it.Address,
|
||||
it.SortCode,
|
||||
it.Remark,
|
||||
it.ModifyUserId,
|
||||
it.ModifyTime
|
||||
}).ExecuteCommand();
|
||||
}
|
||||
}
|
||||
|
||||
public int AppInsert(SysOrganize model, string opreaterUser)
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
SysOrganize s = db.Queryable<SysOrganize>().Where(it => it.ParentId == "0").First();
|
||||
model.Id = UUID.StrSnowId;
|
||||
model.Layer = s.Layer + 1;
|
||||
model.ParentId = s.Id;
|
||||
|
||||
model.EnableFlag = "Y";
|
||||
model.DeleteFlag = "N";
|
||||
model.CreateUserId = opreaterUser;
|
||||
model.CreateTime = DateTime.Now;
|
||||
model.ModifyUserId = model.CreateUserId;
|
||||
model.ModifyTime = model.CreateTime;
|
||||
return db.Insertable<SysOrganize>(model).ExecuteCommand();
|
||||
}
|
||||
}
|
||||
public int Insert(SysOrganize model, string account)
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
model.Id = UUID.StrSnowId;
|
||||
model.Layer = Get(model.ParentId).Layer += 1;
|
||||
model.EnableFlag = "Y";
|
||||
model.DeleteFlag = "N";
|
||||
model.CreateUserId = account;
|
||||
model.CreateTime = DateTime.Now;
|
||||
model.ModifyUserId = model.CreateUserId;
|
||||
model.ModifyTime = model.CreateTime;
|
||||
return db.Insertable<SysOrganize>(model).ExecuteCommand();
|
||||
}
|
||||
}
|
||||
|
||||
public int Delete(string primaryKey)
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
SysOrganize organize = db.Queryable<SysOrganize>().Where(it => it.Id == primaryKey).First();
|
||||
if (organize == null)
|
||||
return 0;
|
||||
organize.DeleteFlag = "Y";
|
||||
return db.Updateable<SysOrganize>(organize).ExecuteCommand();
|
||||
}
|
||||
}
|
||||
public SysOrganize Get(string primaryKey)
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
return db.Queryable<SysOrganize>().Where(it => it.Id == primaryKey).Includes(it => it.CreateUser).Includes(it => it.ModifyUser).First();
|
||||
}
|
||||
}
|
||||
public int Update(SysOrganize model, string account)
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
model.ModifyUserId = account;
|
||||
model.ModifyTime = DateTime.Now;
|
||||
return db.Updateable<SysOrganize>(model).UpdateColumns(it => new
|
||||
{
|
||||
it.ParentId,
|
||||
it.Layer,
|
||||
it.EnCode,
|
||||
it.FullName,
|
||||
it.Type,
|
||||
it.ManagerId,
|
||||
it.TelePhone,
|
||||
it.WeChat,
|
||||
it.Fax,
|
||||
it.Email,
|
||||
it.Address,
|
||||
it.SortCode,
|
||||
it.EnableFlag,
|
||||
it.Remark,
|
||||
it.ModifyUserId,
|
||||
it.ModifyTime
|
||||
}).ExecuteCommand();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
238
DH.RBAC/Logic/Sys/SysPermissionLogic.cs
Normal file
@ -0,0 +1,238 @@
|
||||
using DH.RBAC.Model.Sys;
|
||||
using DH.RBAC.Logic.Base;
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using DH.RBAC.Utility.Other;
|
||||
|
||||
|
||||
namespace DH.RBAC.Logic.Sys
|
||||
{
|
||||
public class SysPermissionLogic : BaseLogic
|
||||
{
|
||||
public bool ActionValidate(string userId, string action)
|
||||
{
|
||||
List<SysPermission> authorizeModules;
|
||||
if (new SysUserLogic().ContainsUser("admin", userId))
|
||||
{
|
||||
authorizeModules = GetList();
|
||||
}
|
||||
else
|
||||
{
|
||||
authorizeModules = GetList(userId);
|
||||
}
|
||||
foreach (var item in authorizeModules)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(item.Url))
|
||||
{
|
||||
string[] url = item.Url.Split('?');
|
||||
if (url[0].ToLower() == action.ToLower())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public List<SysPermission> GetList(string userId)
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
List<string> permissionIdList = db.Queryable<SysUserRoleRelation, SysRoleAuthorize, SysPermission>((A, B, C) => new object[] {
|
||||
JoinType.Left,A.RoleId == B.RoleId,
|
||||
JoinType.Left,C.Id == B.ModuleId,
|
||||
})
|
||||
.Where((A, B, C) => A.UserId == userId && C.EnableFlag == "Y" && B.DeleteFlag == "N")
|
||||
.Select((A, B, C) => C.Id).ToList();
|
||||
return db.Queryable<SysPermission>().Where(it => permissionIdList.Contains(it.Id)).OrderBy(it => it.SortCode).ToList();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public List<SysPermission> GetList(int pageIndex, int pageSize, string keyWord, ref int totalCount)
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
if (keyWord.IsNullOrEmpty())
|
||||
{
|
||||
return db.Queryable<SysPermission>().Where(it => it.DeleteFlag == "N").OrderBy(it => it.SortCode).ToPageList(pageIndex, pageSize, ref totalCount);
|
||||
}
|
||||
return db.Queryable<SysPermission>().Where(it => it.DeleteFlag == "N" && (it.Name.Contains(keyWord) || it.EnCode.Contains(keyWord))).OrderBy(it => it.SortCode).ToPageList(pageIndex, pageSize, ref totalCount);
|
||||
}
|
||||
}
|
||||
|
||||
public int Delete(params string[] primaryKeys)
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
try
|
||||
{
|
||||
db.BeginTran();
|
||||
//删除权限与角色的对应关系。
|
||||
List<SysPermission> list = db.Queryable<SysPermission>().Where(it => primaryKeys.Contains(it.Id) && it.DeleteFlag == "N").ToList();
|
||||
List<string> ids = list.Select(it => it.Id).ToList();
|
||||
list.ForEach(it => { it.DeleteFlag = "Y"; });
|
||||
db.Updateable<SysPermission>(list).ExecuteCommand();
|
||||
List<SysRoleAuthorize> list2 = db.Queryable<SysRoleAuthorize>().Where(it => ids.Contains(it.ModuleId) && it.DeleteFlag == "N").ToList();
|
||||
list2.ForEach(it => { it.DeleteFlag = "Y"; });
|
||||
db.Updateable<SysRoleAuthorize>(list2).ExecuteCommand();
|
||||
db.CommitTran();
|
||||
return 1;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
db.RollbackTran();
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
public int GetMaxChildMenuOrderCode(string parentId)
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
//得到当前节点
|
||||
SysPermission permission = db.Queryable<SysPermission>().Where(it => it.Id == parentId && it.DeleteFlag == "N").First();
|
||||
if (permission == null)
|
||||
return 0;
|
||||
//得到子的
|
||||
SysPermission child = db.Queryable<SysPermission>().Where(it => it.ParentId == parentId && it.DeleteFlag == "N").OrderBy(it => it.SortCode, OrderByType.Desc).First();
|
||||
if (child == null)
|
||||
return permission.SortCode.Value + 100;
|
||||
else
|
||||
return child.SortCode.Value + 100;
|
||||
}
|
||||
}
|
||||
public int GetChildCount(string parentId)
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
return db.Queryable<SysPermission>().Where(it => it.ParentId == parentId && it.DeleteFlag == "N").ToList().Count();
|
||||
}
|
||||
}
|
||||
|
||||
public List<SysPermission> GetList()
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
return db.Queryable<SysPermission>().Where(it => it.DeleteFlag == "N").OrderBy(it => it.SortCode).ToList();
|
||||
}
|
||||
}
|
||||
|
||||
public SysPermission Get(string primaryKey)
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
return db.Queryable<SysPermission>().Where(it => it.Id == primaryKey).Includes(it => it.CreateUser).Includes(it => it.ModifyUser).First();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public int Insert(SysPermission model, string account)
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
model.Id = UUID.StrSnowId;
|
||||
model.Layer = model.Type == 2 ? 0 : model.Type == 0 ? 1 : 2;
|
||||
model.IsEdit = model.IsEdit == null ? "0" : "1";
|
||||
model.IsPublic = model.IsPublic == null ? "0" : "1";
|
||||
|
||||
model.DeleteFlag = "N";
|
||||
model.EnableFlag = "Y";
|
||||
model.CreateUserId = account;
|
||||
model.CreateTime = DateTime.Now;
|
||||
model.ModifyUserId = model.CreateUserId;
|
||||
model.ModifyTime = model.CreateTime;
|
||||
return db.Insertable<SysPermission>(model).ExecuteCommand();
|
||||
}
|
||||
}
|
||||
public int AppInsert(SysPermission model, string operateUser)
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
model.Id = UUID.StrSnowId;
|
||||
model.Layer = model.Type == 2 ? 0 : model.Type == 0 ? 1 : 2;
|
||||
model.IsEdit = "1";
|
||||
model.IsPublic = "0";
|
||||
|
||||
model.DeleteFlag = "N";
|
||||
model.EnableFlag = "Y";
|
||||
model.CreateUserId = operateUser;
|
||||
model.CreateTime = DateTime.Now;
|
||||
model.ModifyUserId = model.CreateUserId;
|
||||
model.ModifyTime = model.CreateTime;
|
||||
return db.Insertable<SysPermission>(model).ExecuteCommand();
|
||||
}
|
||||
}
|
||||
|
||||
public int AppUpdate(SysPermission model, string operateUser)
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
model.Layer = model.Type == 2 ? 0 : model.Type == 0 ? 1 : 2;
|
||||
model.ModifyUserId = operateUser;
|
||||
model.ModifyTime = DateTime.Now;
|
||||
return db.Updateable<SysPermission>(model).UpdateColumns(it => new
|
||||
{
|
||||
it.ParentId,
|
||||
it.Layer,
|
||||
it.EnCode,
|
||||
it.Name,
|
||||
it.JsEvent,
|
||||
it.Icon,
|
||||
it.SymbolIndex,
|
||||
it.Url,
|
||||
it.Remark,
|
||||
it.Type,
|
||||
it.SortCode,
|
||||
it.ModifyUserId,
|
||||
it.ModifyTime,
|
||||
}).ExecuteCommand();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public int Update(SysPermission model, string account)
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
model.Layer = model.Type == 2 ? 0 : model.Type == 0 ? 1 : 2;
|
||||
model.IsEdit = model.IsEdit == null ? "0" : "1";
|
||||
model.IsPublic = model.IsPublic == null ? "0" : "1";
|
||||
model.ModifyUserId = account;
|
||||
model.ModifyTime = DateTime.Now;
|
||||
return db.Updateable<SysPermission>(model).UpdateColumns(it => new
|
||||
{
|
||||
it.ParentId,
|
||||
it.Layer,
|
||||
it.EnCode,
|
||||
it.Name,
|
||||
it.JsEvent,
|
||||
it.Icon,
|
||||
it.SymbolIndex,
|
||||
it.Url,
|
||||
it.Remark,
|
||||
it.Type,
|
||||
it.SortCode,
|
||||
it.IsPublic,
|
||||
it.EnableFlag,
|
||||
it.IsEdit,
|
||||
it.ModifyUserId,
|
||||
it.ModifyTime,
|
||||
}).ExecuteCommand();
|
||||
}
|
||||
}
|
||||
public int InsertList(List<SysPermission> permissionList)
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
return db.Insertable<SysPermission>(permissionList).ExecuteCommand();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
170
DH.RBAC/Logic/Sys/SysRoleAuthorizeLogic.cs
Normal file
@ -0,0 +1,170 @@
|
||||
using DH.RBAC.Model.Sys;
|
||||
using DH.RBAC.Logic.Base;
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using DH.RBAC.Utility.Other;
|
||||
|
||||
|
||||
namespace DH.RBAC.Logic.Sys
|
||||
{
|
||||
public class SysRoleAuthorizeLogic : BaseLogic
|
||||
{
|
||||
/// <summary>
|
||||
/// 获得角色权限关系
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public List<SysRoleAuthorize> GetList()
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
return db.Queryable<SysRoleAuthorize>().ToList();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据角色ID获得角色权限关系
|
||||
/// </summary>
|
||||
/// <param name="roleId"></param>
|
||||
/// <returns></returns>
|
||||
public List<SysRoleAuthorize> GetList(string roleId)
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
return db.Queryable<SysRoleAuthorize>().Where(it => it.RoleId == roleId && it.DeleteFlag == "N").ToList();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 给某个角色授权
|
||||
/// </summary>
|
||||
/// <param name="roleId"></param>
|
||||
/// <param name="perIds"></param>
|
||||
public void AppAuthorize(string operate, string roleId, params string[] perIds)
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
try
|
||||
{
|
||||
db.BeginTran();
|
||||
//获得所有权限
|
||||
List<SysPermission> permissionList = db.Queryable<SysPermission>().Where(it => it.DeleteFlag == "N").ToList();
|
||||
List<string> perList = new List<string>();
|
||||
foreach (string perId in perIds)
|
||||
{
|
||||
string id = perId;
|
||||
while (!id.IsNullOrEmpty() && id != "0")
|
||||
{
|
||||
if (!perList.Contains(id))
|
||||
{
|
||||
perList.Add(id);
|
||||
}
|
||||
id = permissionList.Where(it => it.Id == id).Select(it => it.ParentId).FirstOrDefault();
|
||||
}
|
||||
}
|
||||
//删除旧的
|
||||
List<SysRoleAuthorize> list2 = db.Queryable<SysRoleAuthorize>().Where(it => it.RoleId == roleId && it.DeleteFlag == "N").ToList();
|
||||
list2.ForEach(it => { it.DeleteFlag = "Y"; });
|
||||
db.Updateable<SysRoleAuthorize>(list2).ExecuteCommand();
|
||||
|
||||
|
||||
List<SysRoleAuthorize> newRoleAuthorizeList = perList.Select(it => new SysRoleAuthorize
|
||||
{
|
||||
Id = UUID.StrSnowId,
|
||||
RoleId = roleId,
|
||||
ModuleId = it,
|
||||
DeleteFlag = "N",
|
||||
EnableFlag = "Y",
|
||||
CreateUserId = operate,
|
||||
CreateTime = DateTime.Now,
|
||||
ModifyUserId = operate,
|
||||
ModifyTime = DateTime.Now
|
||||
|
||||
}).ToList();
|
||||
db.Insertable<SysRoleAuthorize>(newRoleAuthorizeList).ExecuteCommand();
|
||||
db.CommitTran();
|
||||
}
|
||||
catch
|
||||
{
|
||||
db.RollbackTran();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 给某个角色授权
|
||||
/// </summary>
|
||||
/// <param name="roleId"></param>
|
||||
/// <param name="perIds"></param>
|
||||
public void Authorize(string roleId, string account, params string[] perIds)
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
try
|
||||
{
|
||||
db.BeginTran();
|
||||
//获得所有权限
|
||||
List<SysPermission> permissionList = db.Queryable<SysPermission>().ToList();
|
||||
List<string> perList = new List<string>();
|
||||
foreach (string perId in perIds)
|
||||
{
|
||||
string id = perId;
|
||||
while (!id.IsNullOrEmpty() && id != "0")
|
||||
{
|
||||
if (!perList.Contains(id))
|
||||
{
|
||||
perList.Add(id);
|
||||
}
|
||||
id = permissionList.Where(it => it.Id == id).Select(it => it.ParentId).FirstOrDefault();
|
||||
}
|
||||
}
|
||||
//删除旧的
|
||||
List<SysRoleAuthorize> list2 = db.Queryable<SysRoleAuthorize>().Where(it => it.RoleId == roleId && it.DeleteFlag == "N").ToList();
|
||||
list2.ForEach(it => { it.DeleteFlag = "Y"; });
|
||||
db.Updateable<SysRoleAuthorize>(list2).ExecuteCommand();
|
||||
|
||||
|
||||
List<SysRoleAuthorize> newRoleAuthorizeList = perList.Select(it => new SysRoleAuthorize
|
||||
{
|
||||
Id = UUID.StrSnowId,
|
||||
RoleId = roleId,
|
||||
ModuleId = it,
|
||||
DeleteFlag = "N",
|
||||
EnableFlag = "Y",
|
||||
CreateUserId = account,
|
||||
CreateTime = DateTime.Now,
|
||||
ModifyUserId = account,
|
||||
ModifyTime = DateTime.Now
|
||||
}).ToList();
|
||||
db.Insertable<SysRoleAuthorize>(newRoleAuthorizeList).ExecuteCommand();
|
||||
db.CommitTran();
|
||||
}
|
||||
catch
|
||||
{
|
||||
db.RollbackTran();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 从角色权限关系中删除某个模块
|
||||
/// </summary>
|
||||
/// <param name="moduleIds"></param>
|
||||
/// <returns></returns>
|
||||
public int Delete(params string[] moduleIds)
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
List<SysRoleAuthorize> list = db.Queryable<SysRoleAuthorize>().Where(it => moduleIds.Contains(it.ModuleId)).ToList();
|
||||
list.ForEach(it => { it.DeleteFlag = "Y"; });
|
||||
return db.Updateable<SysRoleAuthorize>(list).ExecuteCommand();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
176
DH.RBAC/Logic/Sys/SysRoleLogic.cs
Normal file
@ -0,0 +1,176 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using DH.RBAC.Model.Sys;
|
||||
using DH.RBAC.Logic.Base;
|
||||
using SqlSugar;
|
||||
using DH.RBAC.Utility.Other;
|
||||
|
||||
|
||||
namespace DH.RBAC.Logic.Sys
|
||||
{
|
||||
public class SysRoleLogic : BaseLogic
|
||||
{
|
||||
/// <summary>
|
||||
/// 得到角色列表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public List<SysRole> GetList()
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
return db.Queryable<SysRole>().Where(it => it.DeleteFlag == "N")
|
||||
.Includes(it => it.Organize)
|
||||
.Includes(it => it.CreateUser)
|
||||
.Includes(it => it.ModifyUser)
|
||||
.ToList();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获得角色列表分页
|
||||
/// </summary>
|
||||
/// <param name="pageIndex"></param>
|
||||
/// <param name="pageSize"></param>
|
||||
/// <param name="keyWord"></param>
|
||||
/// <param name="totalCount"></param>
|
||||
/// <returns></returns>
|
||||
public List<SysRole> GetList(int pageIndex, int pageSize, string keyWord, ref int totalCount)
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
|
||||
ISugarQueryable<SysRole> queryable = db.Queryable<SysRole>().Where(it => it.DeleteFlag == "N");
|
||||
|
||||
if (!keyWord.IsNullOrEmpty())
|
||||
{
|
||||
queryable = queryable.Where(it => (it.Name.Contains(keyWord) || it.EnCode.Contains(keyWord)));
|
||||
}
|
||||
|
||||
return queryable.Includes(it => it.Organize)
|
||||
.Includes(it => it.CreateUser)
|
||||
.Includes(it => it.ModifyUser)
|
||||
.OrderBy(it => it.SortCode)
|
||||
.ToPageList(pageIndex, pageSize, ref totalCount);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 新增角色
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
/// <returns></returns>
|
||||
public int Insert(SysRole model, string account)
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
model.Id = UUID.StrSnowId;
|
||||
model.AllowEdit = model.AllowEdit == null ? "0" : "1";
|
||||
model.DeleteFlag = "N";
|
||||
model.CreateUserId = account;
|
||||
model.CreateTime = DateTime.Now;
|
||||
model.ModifyUserId = model.CreateUserId;
|
||||
model.ModifyTime = model.CreateTime;
|
||||
return db.Insertable<SysRole>(model).ExecuteCommand();
|
||||
}
|
||||
}
|
||||
|
||||
public int AppInsert(SysRole model, string operateUser)
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
model.Id = UUID.StrSnowId;
|
||||
model.AllowEdit = "1";
|
||||
model.DeleteFlag = "N";
|
||||
model.CreateUserId = operateUser;
|
||||
model.CreateTime = DateTime.Now;
|
||||
model.ModifyUserId = model.CreateUserId;
|
||||
model.ModifyTime = model.CreateTime;
|
||||
return db.Insertable<SysRole>(model).ExecuteCommand();
|
||||
}
|
||||
}
|
||||
|
||||
public int AppUpdate(SysRole model, string operateUser)
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
model.AllowEdit = model.AllowEdit == null ? "0" : "1";
|
||||
model.ModifyUserId = operateUser;
|
||||
model.ModifyTime = DateTime.Now;
|
||||
return db.Updateable<SysRole>(model).UpdateColumns(it => new
|
||||
{
|
||||
it.OrganizeId,
|
||||
it.EnCode,
|
||||
it.Type,
|
||||
it.Name,
|
||||
it.Remark,
|
||||
it.SortCode,
|
||||
it.ModifyUserId,
|
||||
it.ModifyTime
|
||||
}).ExecuteCommand();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 更新角色信息
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
/// <returns></returns>
|
||||
public int Update(SysRole model, string account)
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
model.AllowEdit = model.AllowEdit == null ? "0" : "1";
|
||||
model.ModifyUserId = account;
|
||||
model.ModifyTime = DateTime.Now;
|
||||
return db.Updateable<SysRole>(model).UpdateColumns(it => new
|
||||
{
|
||||
it.OrganizeId,
|
||||
it.EnCode,
|
||||
it.Type,
|
||||
it.Name,
|
||||
it.AllowEdit,
|
||||
it.EnableFlag,
|
||||
it.Remark,
|
||||
it.SortCode,
|
||||
it.ModifyUserId,
|
||||
it.ModifyTime
|
||||
}).ExecuteCommand();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键得到角色信息
|
||||
/// </summary>
|
||||
/// <param name="primaryKey"></param>
|
||||
/// <returns></returns>
|
||||
public SysRole Get(string primaryKey)
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
return db.Queryable<SysRole>().Where(it => it.Id == primaryKey)
|
||||
.Includes(it => it.Organize)
|
||||
.Includes(it => it.CreateUser)
|
||||
.Includes(it => it.ModifyUser)
|
||||
.First();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 删除角色信息
|
||||
/// </summary>
|
||||
/// <param name="primaryKeys"></param>
|
||||
/// <returns></returns>
|
||||
public int Delete(List<string> primaryKeys)
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
List<SysRole> list = db.Queryable<SysRole>().Where(it => primaryKeys.Contains(it.Id)).ToList();
|
||||
list.ForEach(it => { it.DeleteFlag = "Y"; });
|
||||
return db.Updateable<SysRole>(list).ExecuteCommand();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
175
DH.RBAC/Logic/Sys/SysUserLogOnLogic.cs
Normal file
@ -0,0 +1,175 @@
|
||||
using DH.RBAC.Model.Sys;
|
||||
using DH.RBAC.Logic.Base;
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using DH.RBAC.Utility.Other;
|
||||
|
||||
|
||||
namespace DH.RBAC.Logic.Sys
|
||||
{
|
||||
public class SysUserLogOnLogic : BaseLogic
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 根据用户Id得到登录账号信息
|
||||
/// </summary>
|
||||
/// <param name="userId"></param>
|
||||
/// <returns></returns>
|
||||
public SysUserLogOn GetByAccount(string userId)
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
return db.Queryable<SysUserLogOn>().Where(it => it.UserId == userId).First();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新用户登录账号信息
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
/// <returns></returns>
|
||||
public int UpdateLogin(SysUserLogOn model)
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
model.IsOnLine = "1";
|
||||
model.LastVisitTime = DateTime.Now;
|
||||
model.PrevVisitTime = model.LastVisitTime;
|
||||
model.LoginCount += 1;
|
||||
model.ModifyTime = DateTime.Now;
|
||||
model.ModifyUserId = model.UserId;
|
||||
return db.Updateable<SysUserLogOn>(model).UpdateColumns(it => new
|
||||
{
|
||||
it.IsOnLine,
|
||||
it.PrevVisitTime,
|
||||
it.LastVisitTime,
|
||||
it.LoginCount,
|
||||
it.ModifyTime,
|
||||
it.ModifyUserId
|
||||
}).ExecuteCommand();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改密码
|
||||
/// </summary>
|
||||
/// <param name="userLoginEntity"></param>
|
||||
/// <returns></returns>
|
||||
public int ModifyPwd(SysUserLogOn userLoginEntity)
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
userLoginEntity.ChangePwdTime = DateTime.Now;
|
||||
userLoginEntity.ModifyUserId = userLoginEntity.UserId;
|
||||
userLoginEntity.ModifyTime = DateTime.Now;
|
||||
|
||||
return db.Updateable<SysUserLogOn>(userLoginEntity).UpdateColumns(it => new
|
||||
{
|
||||
it.Password,
|
||||
it.ChangePwdTime,
|
||||
it.ModifyUserId,
|
||||
it.ModifyTime
|
||||
}).ExecuteCommand();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除用户登录信息
|
||||
/// </summary>
|
||||
/// <param name="userIds"></param>
|
||||
/// <returns></returns>
|
||||
public int Delete(List<string> userIds)
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
List<SysUserLogOn> list = db.Queryable<SysUserLogOn>().Where(it => userIds.Contains(it.UserId)).ToList();
|
||||
list.ForEach(it => { it.DeleteFlag = "Y"; });
|
||||
return db.Updateable<SysUserLogOn>(list).ExecuteCommand();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 新增用户登录账号
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
/// <returns></returns>
|
||||
public int Insert(SysUserLogOn model)
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
model.Id = UUID.StrSnowId;
|
||||
model.SecretKey = model.Id.DESEncrypt().Substring(0, 8);
|
||||
model.Password = model.Password.MD5Encrypt().DESEncrypt(model.SecretKey).MD5Encrypt();
|
||||
model.LoginCount = 0;
|
||||
model.IsOnLine = "0";
|
||||
model.EnableFlag = "Y";
|
||||
model.DeleteFlag = "N";
|
||||
model.CreateTime = DateTime.Now;
|
||||
model.ModifyTime = DateTime.Now;
|
||||
model.ModifyUserId = model.UserId;
|
||||
model.CreateUserId = model.UserId;
|
||||
return db.Insertable<SysUserLogOn>(model).ExecuteCommand();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新用户登录账号信息
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
/// <returns></returns>
|
||||
public int UpdateInfo(SysUserLogOn model)
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
model.ModifyTime = DateTime.Now;
|
||||
model.ModifyUserId = model.UserId;
|
||||
|
||||
return db.Updateable<SysUserLogOn>(model).UpdateColumns(it => new
|
||||
{
|
||||
it.AllowMultiUserOnline,
|
||||
it.Question,
|
||||
it.AnswerQuestion,
|
||||
it.CheckIPAddress,
|
||||
it.Language,
|
||||
it.Theme,
|
||||
it.ModifyUserId,
|
||||
it.ModifyTime
|
||||
}).ExecuteCommand();
|
||||
}
|
||||
}
|
||||
|
||||
public int UpdateTheme(SysUserLogOn model)
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
model.ModifyTime = DateTime.Now;
|
||||
model.ModifyUserId = model.UserId;
|
||||
return db.Updateable<SysUserLogOn>(model).UpdateColumns(it => new
|
||||
{
|
||||
it.Theme,
|
||||
it.ModifyUserId,
|
||||
it.ModifyTime
|
||||
}).ExecuteCommand();
|
||||
}
|
||||
}
|
||||
|
||||
public int UpdatePassword(SysUserLogOn model)
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
model.ModifyTime = DateTime.Now;
|
||||
model.ModifyUserId = model.UserId;
|
||||
return db.Updateable<SysUserLogOn>(model).UpdateColumns(it => new
|
||||
{
|
||||
it.Password,
|
||||
it.ModifyUserId,
|
||||
it.ModifyTime
|
||||
}).ExecuteCommand();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
509
DH.RBAC/Logic/Sys/SysUserLogic.cs
Normal file
@ -0,0 +1,509 @@
|
||||
|
||||
using DH.RBAC.Logic.Base;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Security.Principal;
|
||||
using DH.RBAC.Model.Sys;
|
||||
|
||||
using DH.RBAC.Utility.Other;
|
||||
using SqlSugar;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace DH.RBAC.Logic.Sys
|
||||
{
|
||||
public class SysUserLogic : BaseLogic
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据账号得到用户信息
|
||||
/// </summary>
|
||||
/// <param name="account"></param>
|
||||
/// <returns></returns>
|
||||
public SysUser GetByUserName(string account)
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
return db.Queryable<SysUser>().Where(it => it.Account == account && it.DeleteFlag == "N")
|
||||
.Includes(it => it.Organize)
|
||||
.Includes(it => it.CreateUser)
|
||||
.Includes(it => it.ModifyUser)
|
||||
.First();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改用户基础信息
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
/// <returns></returns>
|
||||
public int UpdateBasicInfo(SysUser model, string account)
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
model.ModifyUserId = account;
|
||||
model.ModifyTime = DateTime.Now;
|
||||
return db.Updateable<SysUser>(model).UpdateColumns(it => new
|
||||
{
|
||||
it.RealName,
|
||||
it.NickName,
|
||||
it.Gender,
|
||||
it.Birthday,
|
||||
it.MobilePhone,
|
||||
it.Avatar,
|
||||
it.Email,
|
||||
it.Signature,
|
||||
it.Address,
|
||||
it.ModifyUserId,
|
||||
it.ModifyTime
|
||||
}).ExecuteCommand();
|
||||
}
|
||||
}
|
||||
|
||||
public int AppUpdateBasicInfo(SysUser model)
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
model.ModifyUserId = model.Id;
|
||||
model.ModifyTime = DateTime.Now;
|
||||
return db.Updateable<SysUser>(model).UpdateColumns(it => new
|
||||
{
|
||||
it.RealName,
|
||||
it.NickName,
|
||||
it.Gender,
|
||||
it.Birthday,
|
||||
it.MobilePhone,
|
||||
it.Avatar,
|
||||
it.Email,
|
||||
it.Signature,
|
||||
it.Address,
|
||||
it.ModifyUserId,
|
||||
it.ModifyTime
|
||||
}).ExecuteCommand();
|
||||
}
|
||||
}
|
||||
|
||||
public int Insert(SysUser model, string password, string account, string[] roleIds)
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
try
|
||||
{
|
||||
db.BeginTran();
|
||||
////新增用户基本信息。
|
||||
model.Id = UUID.StrSnowId;
|
||||
model.EnableFlag = "Y";
|
||||
model.DeleteFlag = "N";
|
||||
model.CreateUserId = account;
|
||||
model.CreateTime = DateTime.Now;
|
||||
model.ModifyUserId = model.CreateUserId;
|
||||
model.ModifyTime = model.CreateTime;
|
||||
model.Avatar = "/Content/framework/images/avatar.png";
|
||||
int row = db.Insertable<SysUser>(model).ExecuteCommand();
|
||||
if (row == 0)
|
||||
{
|
||||
db.RollbackTran();
|
||||
return row;
|
||||
}
|
||||
|
||||
//新增新的角色
|
||||
List<SysUserRoleRelation> list = new List<SysUserRoleRelation>();
|
||||
foreach (string roleId in roleIds)
|
||||
{
|
||||
SysUserRoleRelation roleRelation = new SysUserRoleRelation
|
||||
{
|
||||
Id = UUID.StrSnowId,
|
||||
UserId = model.Id,
|
||||
RoleId = roleId,
|
||||
EnableFlag = "Y",
|
||||
DeleteFlag = "N",
|
||||
CreateUserId = account,
|
||||
CreateTime = DateTime.Now,
|
||||
ModifyUserId = account,
|
||||
ModifyTime = DateTime.Now
|
||||
};
|
||||
list.Add(roleRelation);
|
||||
}
|
||||
row = db.Insertable<SysUserRoleRelation>(list).ExecuteCommand();
|
||||
if (row == 0)
|
||||
{
|
||||
db.RollbackTran();
|
||||
return row;
|
||||
}
|
||||
//新增用户登陆信息。
|
||||
SysUserLogOn userLogOnEntity = new SysUserLogOn();
|
||||
userLogOnEntity.Id = UUID.StrSnowId;
|
||||
userLogOnEntity.UserId = model.Id;
|
||||
userLogOnEntity.SecretKey = userLogOnEntity.Id.DESEncrypt().Substring(0, 8);
|
||||
userLogOnEntity.Password = password.MD5Encrypt().DESEncrypt(userLogOnEntity.SecretKey).MD5Encrypt();
|
||||
userLogOnEntity.LoginCount = 0;
|
||||
userLogOnEntity.IsOnLine = "0";
|
||||
userLogOnEntity.EnableFlag = "Y";
|
||||
userLogOnEntity.DeleteFlag = "N";
|
||||
userLogOnEntity.CreateUserId = account;
|
||||
userLogOnEntity.CreateTime = DateTime.Now;
|
||||
userLogOnEntity.ModifyUserId = account;
|
||||
userLogOnEntity.ModifyTime = DateTime.Now;
|
||||
row = db.Insertable<SysUserLogOn>(userLogOnEntity).ExecuteCommand();
|
||||
if (row == 0)
|
||||
{
|
||||
db.RollbackTran();
|
||||
return row;
|
||||
}
|
||||
db.CommitTran();
|
||||
return row;
|
||||
}
|
||||
catch
|
||||
{
|
||||
db.RollbackTran();
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public bool ContainsUser(string userAccount, params string[] userIdList)
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
List<string> accountList = db.Queryable<SysUser>().Where(it => userIdList.Contains(it.Id)).Select(it => it.Account).ToList();
|
||||
if (accountList.IsNullOrEmpty())
|
||||
return false;
|
||||
if (accountList.Contains(userAccount))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
public int AppInsert(SysUser model, string password, string[] roleIds, string opearateUser)
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
try
|
||||
{
|
||||
db.BeginTran();
|
||||
////新增用户基本信息。
|
||||
model.Id = UUID.StrSnowId;
|
||||
model.EnableFlag = "Y";
|
||||
model.DeleteFlag = "N";
|
||||
model.CreateUserId = opearateUser;
|
||||
model.CreateTime = DateTime.Now;
|
||||
model.ModifyUserId = model.CreateUserId;
|
||||
model.ModifyTime = model.CreateTime;
|
||||
model.Avatar = "/Content/framework/images/avatar.png";
|
||||
int row = db.Insertable<SysUser>(model).ExecuteCommand();
|
||||
if (row == 0)
|
||||
{
|
||||
db.RollbackTran();
|
||||
return row;
|
||||
}
|
||||
|
||||
//新增新的角色
|
||||
List<SysUserRoleRelation> list = new List<SysUserRoleRelation>();
|
||||
foreach (string roleId in roleIds)
|
||||
{
|
||||
SysUserRoleRelation roleRelation = new SysUserRoleRelation
|
||||
{
|
||||
Id = UUID.StrSnowId,
|
||||
UserId = model.Id,
|
||||
RoleId = roleId,
|
||||
EnableFlag = "Y",
|
||||
DeleteFlag = "N",
|
||||
CreateUserId = opearateUser,
|
||||
CreateTime = DateTime.Now,
|
||||
ModifyUserId = opearateUser,
|
||||
ModifyTime = DateTime.Now
|
||||
};
|
||||
list.Add(roleRelation);
|
||||
}
|
||||
row = db.Insertable<SysUserRoleRelation>(list).ExecuteCommand();
|
||||
if (row == 0)
|
||||
{
|
||||
db.RollbackTran();
|
||||
return row;
|
||||
}
|
||||
//新增用户登陆信息。
|
||||
SysUserLogOn userLogOnEntity = new SysUserLogOn();
|
||||
userLogOnEntity.Id = UUID.StrSnowId;
|
||||
userLogOnEntity.UserId = model.Id;
|
||||
userLogOnEntity.SecretKey = userLogOnEntity.Id.DESEncrypt().Substring(0, 8);
|
||||
userLogOnEntity.Password = password.DESEncrypt(userLogOnEntity.SecretKey).MD5Encrypt();
|
||||
userLogOnEntity.LoginCount = 0;
|
||||
userLogOnEntity.IsOnLine = "0";
|
||||
userLogOnEntity.EnableFlag = "Y";
|
||||
userLogOnEntity.DeleteFlag = "N";
|
||||
userLogOnEntity.CreateUserId = opearateUser;
|
||||
userLogOnEntity.CreateTime = DateTime.Now;
|
||||
userLogOnEntity.ModifyUserId = userLogOnEntity.CreateUserId;
|
||||
userLogOnEntity.ModifyTime = userLogOnEntity.CreateTime;
|
||||
row = db.Insertable<SysUserLogOn>(userLogOnEntity).ExecuteCommand();
|
||||
if (row == 0)
|
||||
{
|
||||
db.RollbackTran();
|
||||
return row;
|
||||
}
|
||||
db.CommitTran();
|
||||
return row;
|
||||
}
|
||||
catch
|
||||
{
|
||||
db.RollbackTran();
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键得到用户信息
|
||||
/// </summary>
|
||||
/// <param name="primaryKey"></param>
|
||||
/// <returns></returns>
|
||||
public SysUser Get(string primaryKey)
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
return db.Queryable<SysUser>().Where(it => it.Id == primaryKey)
|
||||
.Includes(it => it.Organize)
|
||||
.Includes(it => it.CreateUser)
|
||||
.Includes(it => it.ModifyUser).First();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获得用户列表分页
|
||||
/// </summary>
|
||||
/// <param name="pageIndex"></param>
|
||||
/// <param name="pageSize"></param>
|
||||
/// <param name="keyWord"></param>
|
||||
/// <param name="totalCount"></param>
|
||||
/// <returns></returns>
|
||||
public List<SysUser> GetList(int pageIndex, int pageSize, string keyWord, ref int totalCount)
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
ISugarQueryable<SysUser> queryable = db.Queryable<SysUser>().Where(it => it.DeleteFlag == "N");
|
||||
if (!keyWord.IsNullOrEmpty())
|
||||
{
|
||||
queryable = queryable.Where(it => it.Account.Contains(keyWord) || it.RealName.Contains(keyWord));
|
||||
}
|
||||
return queryable.OrderBy(it => it.SortCode)
|
||||
.Includes(it => it.Organize)
|
||||
.Includes(it => it.CreateUser)
|
||||
.Includes(it => it.ModifyUser).ToPageList(pageIndex, pageSize, ref totalCount);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 删除用户信息
|
||||
/// </summary>
|
||||
/// <param name="primaryKeys"></param>
|
||||
/// <returns></returns>
|
||||
public int Delete(List<string> primaryKeys)
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
List<SysUser> list = db.Queryable<SysUser>().Where(it => primaryKeys.Contains(it.Id)).ToList();
|
||||
list.ForEach(it => { it.DeleteFlag = "Y"; });
|
||||
return db.Updateable<SysUser>(list).ExecuteCommand();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 新增用户基础信息
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
/// <returns></returns>
|
||||
public int Insert(SysUser model, string account)
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
model.Id = UUID.StrSnowId;
|
||||
model.DeleteFlag = "N";
|
||||
model.EnableFlag = "Y";
|
||||
|
||||
|
||||
model.CreateUserId = account;
|
||||
model.CreateTime = DateTime.Now;
|
||||
model.ModifyUserId = model.CreateUserId;
|
||||
model.ModifyTime = model.CreateTime;
|
||||
model.Avatar = "/Content/framework/images/avatar.png";
|
||||
return db.Insertable<SysUser>(model).ExecuteCommand();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 更新用户基础信息
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
/// <returns></returns>
|
||||
public int Update(SysUser model, string account)
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
model.ModifyUserId = account;
|
||||
model.ModifyTime = DateTime.Now;
|
||||
|
||||
return db.Updateable<SysUser>(model).UpdateColumns(it => new
|
||||
{
|
||||
it.NickName,
|
||||
it.RealName,
|
||||
it.Birthday,
|
||||
it.Gender,
|
||||
it.Email,
|
||||
it.DepartmentId,
|
||||
it.RoleId,
|
||||
it.MobilePhone,
|
||||
it.Address,
|
||||
it.Signature,
|
||||
it.SortCode,
|
||||
it.IsEnabled,
|
||||
it.ModifyUserId,
|
||||
it.ModifyTime
|
||||
}).ExecuteCommand();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public int AppUpdateAndSetRole(SysUser model, string[] roleIds, string opereateUser)
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
try
|
||||
{
|
||||
db.BeginTran();
|
||||
model.ModifyUserId = opereateUser;
|
||||
model.ModifyTime = DateTime.Now;
|
||||
int row = db.Updateable<SysUser>(model).UpdateColumns(it => new
|
||||
{
|
||||
it.NickName,
|
||||
it.RealName,
|
||||
it.Birthday,
|
||||
it.Gender,
|
||||
it.Email,
|
||||
it.DepartmentId,
|
||||
it.RoleId,
|
||||
it.MobilePhone,
|
||||
it.Address,
|
||||
it.Signature,
|
||||
it.SortCode,
|
||||
it.ModifyUserId,
|
||||
it.ModifyTime
|
||||
}).ExecuteCommand();
|
||||
if (row == 0)
|
||||
{
|
||||
db.RollbackTran();
|
||||
return row;
|
||||
}
|
||||
//删除原来的角色
|
||||
List<SysUserRoleRelation> list2 = db.Queryable<SysUserRoleRelation>().Where(it => it.UserId == model.Id && it.DeleteFlag == "N").ToList();
|
||||
list2.ForEach(it => { it.DeleteFlag = "Y"; });
|
||||
db.Updateable<SysUserRoleRelation>(list2).ExecuteCommand();
|
||||
//新增新的角色
|
||||
List<SysUserRoleRelation> list = new List<SysUserRoleRelation>();
|
||||
foreach (string roleId in roleIds)
|
||||
{
|
||||
SysUserRoleRelation roleRelation = new SysUserRoleRelation
|
||||
{
|
||||
Id = UUID.StrSnowId,
|
||||
UserId = model.Id,
|
||||
RoleId = roleId,
|
||||
DeleteFlag = "N",
|
||||
EnableFlag = "Y",
|
||||
CreateUserId = opereateUser,
|
||||
CreateTime = DateTime.Now,
|
||||
ModifyUserId = opereateUser,
|
||||
ModifyTime = DateTime.Now
|
||||
};
|
||||
list.Add(roleRelation);
|
||||
}
|
||||
row = db.Insertable<SysUserRoleRelation>(list).ExecuteCommand();
|
||||
if (row == 0)
|
||||
{
|
||||
db.RollbackTran();
|
||||
return row;
|
||||
}
|
||||
db.CommitTran();
|
||||
return row;
|
||||
}
|
||||
catch
|
||||
{
|
||||
db.RollbackTran();
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public int UpdateAndSetRole(SysUser model, string account, string[] roleIds)
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
try
|
||||
{
|
||||
db.BeginTran();
|
||||
model.ModifyUserId = account;
|
||||
model.ModifyTime = DateTime.Now;
|
||||
int row = db.Updateable<SysUser>(model).UpdateColumns(it => new
|
||||
{
|
||||
it.NickName,
|
||||
it.RealName,
|
||||
it.Birthday,
|
||||
it.Gender,
|
||||
it.Email,
|
||||
it.DepartmentId,
|
||||
it.RoleId,
|
||||
it.MobilePhone,
|
||||
it.Address,
|
||||
it.Signature,
|
||||
it.SortCode,
|
||||
it.EnableFlag,
|
||||
it.ModifyUserId,
|
||||
it.ModifyTime
|
||||
}).ExecuteCommand();
|
||||
if (row == 0)
|
||||
{
|
||||
db.RollbackTran();
|
||||
return row;
|
||||
}
|
||||
//删除原来的角色
|
||||
List<SysUserRoleRelation> list2 = db.Queryable<SysUserRoleRelation>().Where(it => it.UserId == model.Id && it.DeleteFlag == "N").ToList();
|
||||
list2.ForEach(it => { it.DeleteFlag = "Y"; });
|
||||
db.Updateable<SysUserRoleRelation>(list2).ExecuteCommand();
|
||||
//新增新的角色
|
||||
List<SysUserRoleRelation> list = new List<SysUserRoleRelation>();
|
||||
foreach (string roleId in roleIds)
|
||||
{
|
||||
SysUserRoleRelation roleRelation = new SysUserRoleRelation
|
||||
{
|
||||
Id = UUID.StrSnowId,
|
||||
UserId = model.Id,
|
||||
RoleId = roleId,
|
||||
EnableFlag = "Y",
|
||||
DeleteFlag = "N",
|
||||
CreateUserId = account,
|
||||
CreateTime = DateTime.Now,
|
||||
ModifyTime = DateTime.Now,
|
||||
ModifyUserId = account
|
||||
};
|
||||
list.Add(roleRelation);
|
||||
}
|
||||
row = db.Insertable<SysUserRoleRelation>(list).ExecuteCommand();
|
||||
if (row == 0)
|
||||
{
|
||||
db.RollbackTran();
|
||||
return row;
|
||||
}
|
||||
db.CommitTran();
|
||||
return row;
|
||||
}
|
||||
catch
|
||||
{
|
||||
db.RollbackTran();
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
57
DH.RBAC/Logic/Sys/SysUserRoleRelationLogic.cs
Normal file
@ -0,0 +1,57 @@
|
||||
using DH.RBAC.Model.Sys;
|
||||
using DH.RBAC.Logic.Base;
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
||||
namespace DH.RBAC.Logic.Sys
|
||||
{
|
||||
public class SysUserRoleRelationLogic : BaseLogic
|
||||
{
|
||||
/// <summary>
|
||||
/// 删除用户角色关系
|
||||
/// </summary>
|
||||
/// <param name="userIds"></param>
|
||||
/// <returns></returns>
|
||||
public int Delete(List<string> userIds)
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
List<SysUserRoleRelation> list = db.Queryable<SysUserRoleRelation>().Where(it => userIds.Contains(it.UserId)).ToList();
|
||||
list.ForEach(it => { it.DeleteFlag = "Y"; });
|
||||
return db.Updateable<SysUserRoleRelation>(list).ExecuteCommand();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据ID得到用户角色关系
|
||||
/// </summary>
|
||||
/// <param name="userIds"></param>
|
||||
/// <returns></returns>
|
||||
public List<SysUserRoleRelation> GetList(string userId)
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
return db.Queryable<SysUserRoleRelation>().Where(it => it.UserId == userId && it.DeleteFlag=="N").ToList();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 从用户角色关系表中得到所有角色绑定信息
|
||||
/// </summary>
|
||||
/// <param name="ids"></param>
|
||||
/// <returns></returns>
|
||||
public List<SysUserRoleRelation> GetByRoles(List<string> ids)
|
||||
{
|
||||
using (var db = GetInstance())
|
||||
{
|
||||
return db.Queryable<SysUserRoleRelation>().Where(it => ids.Contains(it.RoleId) && it.DeleteFlag == "N").ToList();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
91
DH.RBAC/Models/Base/BaseModelEntity.cs
Normal file
@ -0,0 +1,91 @@
|
||||
using AntdUI;
|
||||
using DH.RBAC.Model.Sys;
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace DH.RBAC.Model
|
||||
{
|
||||
public class BaseModelEntity: NotifyProperty
|
||||
{
|
||||
/// <summary>
|
||||
/// 是否启用
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "EnableFlag", ColumnDescription = "是否启用", IsNullable = true, Length = 1)]
|
||||
public virtual string EnableFlag { get; set; }
|
||||
/// <summary>
|
||||
/// 是否删除
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "DeleteFlag", ColumnDescription = "是否删除", IsNullable = true, Length = 1)]
|
||||
public virtual string DeleteFlag { get; set; }
|
||||
/// <summary>
|
||||
/// 创建人
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "CreateUserId", ColumnDescription = "创建人", IsNullable = true, Length = 255)]
|
||||
public virtual string CreateUserId { get; set; }
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "CreateTime", ColumnDescription = "创建时间", IsNullable = true, Length = 3)]
|
||||
public virtual DateTime? CreateTime { get; set; }
|
||||
/// <summary>
|
||||
/// 更新人
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "ModifyUserId", ColumnDescription = "更新人", IsNullable = true, Length = 255)]
|
||||
public virtual string ModifyUserId { get; set; }
|
||||
/// <summary>
|
||||
/// 更新时间
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "ModifyTime", ColumnDescription = "更新时间", IsNullable = true, Length = 3)]
|
||||
public virtual DateTime? ModifyTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建人
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Navigate(NavigateType.OneToOne, nameof(CreateUserId), nameof(SysUser.Id))]//一对一 SchoolId是StudentA类里面的
|
||||
public SysUser CreateUser { get; set; } //不能赋值只能是null
|
||||
/// <summary>
|
||||
/// 更新人
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Navigate(NavigateType.OneToOne, nameof(ModifyUserId), nameof(SysUser.Id))]//一对一 SchoolId是StudentA类里面的
|
||||
public SysUser ModifyUser { get; set; } //不能赋值只能是null
|
||||
|
||||
|
||||
[SugarColumn(IsIgnore = true)]
|
||||
public string CreateUserName
|
||||
{
|
||||
get
|
||||
{
|
||||
return CreateUser == null ? "" : CreateUser.RealName;
|
||||
}
|
||||
}
|
||||
[SugarColumn(IsIgnore = true)]
|
||||
public string ModifyUserName
|
||||
{
|
||||
get
|
||||
{
|
||||
return ModifyUser == null ? "" : ModifyUser.RealName;
|
||||
}
|
||||
}
|
||||
|
||||
[SugarColumn(IsIgnore = true)]
|
||||
public bool IsDeleted
|
||||
{
|
||||
get
|
||||
{
|
||||
return DeleteFlag == "Y" ? true : false;
|
||||
}
|
||||
}
|
||||
|
||||
[SugarColumn(IsIgnore = true)]
|
||||
public bool IsEnabled
|
||||
{
|
||||
get
|
||||
{
|
||||
return EnableFlag == "Y" ? true : false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
22
DH.RBAC/Models/Base/CodeGenerator.cs
Normal file
@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DH.RBAC.Model.Base
|
||||
{
|
||||
public class CodeGenerator
|
||||
{
|
||||
public string TableName { get; set; }
|
||||
public string ColumnName { get; set; }
|
||||
public string TypeName { get; set; }
|
||||
public string TypeLength { get; set; }
|
||||
public string IsPrimaryKey { get; set; }
|
||||
public string ClassName { get; set; }
|
||||
public string PropertyName { get; set; }
|
||||
public string CSType { get; set; }
|
||||
|
||||
public string Other { get; set; }
|
||||
}
|
||||
}
|
20
DH.RBAC/Models/Base/MenuControlAttribute.cs
Normal file
@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DH.RBAC.Models.Base
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
|
||||
public class MenuControlAttribute : Attribute
|
||||
{
|
||||
public string ParentMenu { get; } // 父菜单名称(如 "相机设置")
|
||||
public Type ConfigType { get; } // 配置类型(如 CameraBase)
|
||||
|
||||
public MenuControlAttribute(string parentMenu)
|
||||
{
|
||||
ParentMenu = parentMenu;
|
||||
}
|
||||
}
|
||||
}
|
16
DH.RBAC/Models/DTO/Parms/AuthorParms.cs
Normal file
@ -0,0 +1,16 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DH.RBAC.Model.DTO.Parms
|
||||
{
|
||||
public class AuthorParms
|
||||
{
|
||||
public string roleId { get; set; }
|
||||
public List<string> perIds { get; set; }
|
||||
|
||||
public string operater { get; set; }
|
||||
}
|
||||
}
|
14
DH.RBAC/Models/DTO/Parms/FileUploadParms.cs
Normal file
@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DH.RBAC.Model.DTO.Parms
|
||||
{
|
||||
public class FileUploadParms
|
||||
{
|
||||
public byte[] file { get; set; }
|
||||
public string fileName { get; set; }
|
||||
}
|
||||
}
|
17
DH.RBAC/Models/DTO/Parms/ItemDetailIndexParms.cs
Normal file
@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DH.RBAC.Model.DTO.Parms
|
||||
{
|
||||
public class ItemDetailIndexParms
|
||||
{
|
||||
public int pageIndex { get; set; }
|
||||
public int pageSize { get; set; }
|
||||
|
||||
public string keyWord { get; set; }
|
||||
public string itemId { get; set; }
|
||||
}
|
||||
}
|
14
DH.RBAC/Models/DTO/Parms/KeyValue.cs
Normal file
@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DH.RBAC.Model.DTO.Parms
|
||||
{
|
||||
public class KeyValue
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public string Value { get; set; }
|
||||
}
|
||||
}
|
15
DH.RBAC/Models/DTO/Parms/LogDeleteParms.cs
Normal file
@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DH.RBAC.Model.DTO.Parms
|
||||
{
|
||||
public class LogDeleteParms
|
||||
{
|
||||
public string type { get; set; }
|
||||
public string index { get; set; }
|
||||
public string operateUser { get; set; }
|
||||
}
|
||||
}
|
17
DH.RBAC/Models/DTO/Parms/LogIndexParms.cs
Normal file
@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DH.RBAC.Model.DTO.Parms
|
||||
{
|
||||
public class LogIndexParms
|
||||
{
|
||||
public int pageIndex { get; set; }
|
||||
public int pageSize { get; set; }
|
||||
public string type { get; set; }
|
||||
public string index { get; set; }
|
||||
public string keyWord { get; set; }
|
||||
}
|
||||
}
|
18
DH.RBAC/Models/DTO/Parms/LongPrimaryKeyParms.cs
Normal file
@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DH.RBAC.Model.DTO.Parms
|
||||
{
|
||||
public class LongPrimaryKeyParms
|
||||
{
|
||||
public string operaterId { get; set; }
|
||||
public long primaryKey { get; set; }
|
||||
|
||||
public string operateUser { get; set; }
|
||||
public string userIds { get; set; }
|
||||
public string roleId { get; set; }
|
||||
}
|
||||
}
|
16
DH.RBAC/Models/DTO/Parms/ModifyPasswordParms.cs
Normal file
@ -0,0 +1,16 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DH.RBAC.Model.DTO.Parms
|
||||
{
|
||||
public class ModifyPasswordParms
|
||||
{
|
||||
public string userId { get; set; }
|
||||
public string oldPassword { get; set; }
|
||||
public string newPassword { get; set; }
|
||||
public string confirmPassword { get; set; }
|
||||
}
|
||||
}
|
14
DH.RBAC/Models/DTO/Parms/RoleDeleteParms.cs
Normal file
@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DH.RBAC.Model.DTO.Parms
|
||||
{
|
||||
public class RoleDeleteParms
|
||||
{
|
||||
public List<string> roleIdList { get; set; }
|
||||
public string operateUser { get; set; }
|
||||
}
|
||||
}
|
15
DH.RBAC/Models/DTO/Parms/SearchParms.cs
Normal file
@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DH.RBAC.Model.DTO.Parms
|
||||
{
|
||||
public class SearchParms
|
||||
{
|
||||
public int pageIndex { get; set; }
|
||||
public int pageSize { get; set; }
|
||||
public string keyWord { get; set; }
|
||||
}
|
||||
}
|
18
DH.RBAC/Models/DTO/Parms/StrPrimaryKeyParms.cs
Normal file
@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DH.RBAC.Model.DTO.Parms
|
||||
{
|
||||
public class StrPrimaryKeyParms
|
||||
{
|
||||
public string operaterId { get; set; }
|
||||
public string primaryKey { get; set; }
|
||||
|
||||
public string operateUser { get; set; }
|
||||
public string userIds { get; set; }
|
||||
public string roleId { get; set; }
|
||||
}
|
||||
}
|
16
DH.RBAC/Models/DTO/Parms/UserDeleteParms.cs
Normal file
@ -0,0 +1,16 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DH.RBAC.Model.DTO.Parms
|
||||
{
|
||||
public class UserDeleteParms
|
||||
{
|
||||
public List<string> userIdList { get; set; }
|
||||
|
||||
public string currentUserId { get; set; }
|
||||
public string operateUser { get; set; }
|
||||
}
|
||||
}
|
15
DH.RBAC/Models/DTO/Parms/UserLoginParms.cs
Normal file
@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DH.RBAC.Model.DTO.Parms
|
||||
{
|
||||
public class UserLoginParms
|
||||
{
|
||||
public string verifyCode { get; set; }
|
||||
public string userName { get; set; }
|
||||
public string password { get; set; }
|
||||
}
|
||||
}
|
27
DH.RBAC/Models/Enum/ModuleType.cs
Normal file
@ -0,0 +1,27 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
namespace DH.RBAC.Model.Enum
|
||||
{
|
||||
/// <summary>
|
||||
/// 权限类型。
|
||||
/// </summary>
|
||||
public class ModuleType
|
||||
{
|
||||
/// <summary>
|
||||
/// 主菜单。
|
||||
/// </summary>
|
||||
public const int Menu = 2;
|
||||
/// <summary>
|
||||
/// 子菜单
|
||||
/// </summary>
|
||||
public const int SubMenu = 0;
|
||||
/// <summary>
|
||||
/// 按钮。
|
||||
/// </summary>
|
||||
public const int Button = 1;
|
||||
|
||||
}
|
||||
}
|
37
DH.RBAC/Models/Sys/SysItem.cs
Normal file
@ -0,0 +1,37 @@
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DH.RBAC.Model.Sys
|
||||
{
|
||||
[SugarTable("Sys_Item")]
|
||||
public partial class SysItem : BaseModelEntity
|
||||
{
|
||||
[SugarColumn(ColumnName = "Id", IsPrimaryKey = true)]
|
||||
public string Id { get; set; }
|
||||
|
||||
[SugarColumn(ColumnName = "EnCode")]
|
||||
public string EnCode { get; set; }
|
||||
|
||||
[SugarColumn(ColumnName = "ParentId")]
|
||||
public string ParentId { get; set; }
|
||||
|
||||
[SugarColumn(ColumnName = "Name")]
|
||||
public string Name { get; set; }
|
||||
|
||||
[SugarColumn(ColumnName = "Layer")]
|
||||
public int? Layer { get; set; }
|
||||
|
||||
[SugarColumn(ColumnName = "SortCode")]
|
||||
public int? SortCode { get; set; }
|
||||
|
||||
[SugarColumn(ColumnName = "IsTree")]
|
||||
public string IsTree { get; set; }
|
||||
|
||||
[SugarColumn(ColumnName = "Remark")]
|
||||
public string Remark { get; set; }
|
||||
}
|
||||
}
|
35
DH.RBAC/Models/Sys/SysItemDetail.cs
Normal file
@ -0,0 +1,35 @@
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DH.RBAC.Model.Sys
|
||||
{
|
||||
[SugarTable("Sys_ItemsDetail")]
|
||||
public partial class SysItemDetail : BaseModelEntity
|
||||
{
|
||||
[SugarColumn(ColumnName = "Id", IsPrimaryKey = true)]
|
||||
public string Id { get; set; }
|
||||
|
||||
[SugarColumn(ColumnName = "ItemId")]
|
||||
public string ItemId { get; set; }
|
||||
|
||||
[SugarColumn(ColumnName = "EnCode")]
|
||||
public string EnCode { get; set; }
|
||||
|
||||
[SugarColumn(ColumnName = "Name")]
|
||||
public string Name { get; set; }
|
||||
|
||||
|
||||
[SugarColumn(ColumnName = "IsDefault")]
|
||||
public string IsDefault { get; set; }
|
||||
|
||||
|
||||
[SugarColumn(ColumnName = "SortCode")]
|
||||
public int? SortCode { get; set; }
|
||||
|
||||
}
|
||||
|
||||
}
|
29
DH.RBAC/Models/Sys/SysLog.cs
Normal file
@ -0,0 +1,29 @@
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DH.RBAC.Model.Sys
|
||||
{
|
||||
|
||||
[SugarTable("Sys_Log")]
|
||||
public class SysLog : BaseModelEntity
|
||||
{
|
||||
[SugarColumn(IsPrimaryKey = true)]
|
||||
public long Id { get; set; }
|
||||
|
||||
[SugarColumn]
|
||||
public string Type { get; set; }
|
||||
|
||||
[SugarColumn]
|
||||
public int ThreadId { get; set; }
|
||||
|
||||
[SugarColumn]
|
||||
public string Message { get; set; }
|
||||
|
||||
[SugarColumn]
|
||||
public DateTime CreateTime { get; set; }
|
||||
}
|
||||
}
|
58
DH.RBAC/Models/Sys/SysOrganize.cs
Normal file
@ -0,0 +1,58 @@
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DH.RBAC.Model.Sys
|
||||
{
|
||||
[SugarTable("Sys_Organize")]
|
||||
public partial class SysOrganize : BaseModelEntity
|
||||
{
|
||||
[SugarColumn(ColumnName = "Id", IsPrimaryKey = true)]
|
||||
public string Id { get; set; }
|
||||
|
||||
|
||||
[SugarColumn(ColumnName = "ParentId")]
|
||||
public string ParentId { get; set; }
|
||||
|
||||
[SugarColumn(ColumnName = "Layer")]
|
||||
public int? Layer { get; set; }
|
||||
|
||||
[SugarColumn(ColumnName = "EnCode")]
|
||||
public string EnCode { get; set; }
|
||||
|
||||
[SugarColumn(ColumnName = "FullName")]
|
||||
public string FullName { get; set; }
|
||||
|
||||
[SugarColumn(ColumnName = "Type")]
|
||||
public int? Type { get; set; }
|
||||
|
||||
[SugarColumn(ColumnName = "ManagerId")]
|
||||
public string ManagerId { get; set; }
|
||||
|
||||
[SugarColumn(ColumnName = "TelePhone")]
|
||||
public string TelePhone { get; set; }
|
||||
|
||||
[SugarColumn(ColumnName = "WeChat")]
|
||||
public string WeChat { get; set; }
|
||||
|
||||
[SugarColumn(ColumnName = "Fax")]
|
||||
public string Fax { get; set; }
|
||||
|
||||
[SugarColumn(ColumnName = "Email")]
|
||||
public string Email { get; set; }
|
||||
|
||||
[SugarColumn(ColumnName = "Address")]
|
||||
public string Address { get; set; }
|
||||
|
||||
[SugarColumn(ColumnName = "SortCode")]
|
||||
public int? SortCode { get; set; }
|
||||
|
||||
|
||||
[SugarColumn(ColumnName = "Remark")]
|
||||
public string Remark { get; set; }
|
||||
|
||||
}
|
||||
}
|
61
DH.RBAC/Models/Sys/SysPermission.cs
Normal file
@ -0,0 +1,61 @@
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DH.RBAC.Model.Sys
|
||||
{
|
||||
|
||||
[SugarTable("Sys_Permission")]
|
||||
public partial class SysPermission : BaseModelEntity
|
||||
{
|
||||
[SugarColumn(ColumnName = "Id", IsPrimaryKey = true)]
|
||||
public string Id { get; set; }
|
||||
|
||||
|
||||
[SugarColumn(ColumnName = "ParentId")]
|
||||
public string ParentId { get; set; }
|
||||
|
||||
[SugarColumn(ColumnName = "Layer")]
|
||||
public int? Layer { get; set; }
|
||||
|
||||
[SugarColumn(ColumnName = "EnCode")]
|
||||
public string EnCode { get; set; }
|
||||
|
||||
[SugarColumn(ColumnName = "Name")]
|
||||
public string Name { get; set; }
|
||||
|
||||
|
||||
[SugarColumn(ColumnName = "JsEvent")]
|
||||
public string JsEvent { get; set; }
|
||||
|
||||
[SugarColumn(ColumnName = "Icon")]
|
||||
public string Icon { get; set; }
|
||||
|
||||
[SugarColumn(ColumnName = "SymbolIndex")]
|
||||
public int SymbolIndex { get; set; }
|
||||
|
||||
|
||||
[SugarColumn(ColumnName = "Url")]
|
||||
public string Url { get; set; }
|
||||
|
||||
|
||||
[SugarColumn(ColumnName = "Remark")]
|
||||
public string Remark { get; set; }
|
||||
|
||||
[SugarColumn(ColumnName = "Type")]
|
||||
public int? Type { get; set; }
|
||||
|
||||
[SugarColumn(ColumnName = "SortCode")]
|
||||
public int? SortCode { get; set; }
|
||||
|
||||
[SugarColumn(ColumnName = "IsPublic")]
|
||||
public string IsPublic { get; set; }
|
||||
|
||||
[SugarColumn(ColumnName = "IsEdit")]
|
||||
public string IsEdit { get; set; }
|
||||
|
||||
}
|
||||
}
|
55
DH.RBAC/Models/Sys/SysRole.cs
Normal file
@ -0,0 +1,55 @@
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DH.RBAC.Model.Sys
|
||||
{
|
||||
[SugarTable("Sys_Role")]
|
||||
public partial class SysRole : BaseModelEntity
|
||||
{
|
||||
[SugarColumn(ColumnName = "Id", IsPrimaryKey = true)]
|
||||
public string Id { get; set; }
|
||||
|
||||
[SugarColumn(ColumnName = "OrganizeId")]
|
||||
public string OrganizeId { get; set; }
|
||||
|
||||
[SugarColumn(ColumnName = "EnCode")]
|
||||
public string EnCode { get; set; }
|
||||
|
||||
[SugarColumn(ColumnName = "Type")]
|
||||
public int? Type { get; set; }
|
||||
|
||||
[SugarColumn(ColumnName = "Name")]
|
||||
public string Name { get; set; }
|
||||
|
||||
|
||||
[SugarColumn(ColumnName = "AllowEdit")]
|
||||
public string AllowEdit { get; set; }
|
||||
|
||||
|
||||
[SugarColumn(ColumnName = "Remark")]
|
||||
public string Remark { get; set; }
|
||||
|
||||
[SugarColumn(ColumnName = "SortCode")]
|
||||
public int? SortCode { get; set; }
|
||||
|
||||
|
||||
[Navigate(NavigateType.OneToOne, nameof(OrganizeId), nameof(SysOrganize.Id))]
|
||||
public SysOrganize Organize { get; set; }
|
||||
|
||||
|
||||
[SugarColumn(IsIgnore = true)]
|
||||
public string DeptName
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Organize == null)
|
||||
return "";
|
||||
return Organize.FullName;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
29
DH.RBAC/Models/Sys/SysRoleAuthorize.cs
Normal file
@ -0,0 +1,29 @@
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DH.RBAC.Model.Sys
|
||||
{
|
||||
[SugarTable("Sys_RoleAuthorize")]
|
||||
public partial class SysRoleAuthorize : BaseModelEntity
|
||||
{
|
||||
[SugarColumn(ColumnName = "Id", IsPrimaryKey = true)]
|
||||
|
||||
public string Id { get; set; }
|
||||
|
||||
|
||||
[SugarColumn(ColumnName = "RoleId")]
|
||||
public string RoleId { get; set; }
|
||||
|
||||
|
||||
[SugarColumn(ColumnName = "ModuleId")]
|
||||
public string ModuleId { get; set; }
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
115
DH.RBAC/Models/Sys/SysUser.cs
Normal file
@ -0,0 +1,115 @@
|
||||
|
||||
using DH.RBAC.Utility.Extension;
|
||||
using DH.RBAC.Utility.Other;
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
namespace DH.RBAC.Model.Sys
|
||||
{
|
||||
[SugarTable("Sys_User")]
|
||||
public partial class SysUser : BaseModelEntity
|
||||
{
|
||||
private SysOrganize organize;
|
||||
|
||||
[SugarColumn(ColumnName = "Id", IsPrimaryKey = true)]
|
||||
public string Id { get; set; }
|
||||
|
||||
[SugarColumn(ColumnName = "Account")]
|
||||
public string Account { get; set; }
|
||||
|
||||
[SugarColumn(ColumnName = "RealName")]
|
||||
public string RealName { get; set; }
|
||||
|
||||
[SugarColumn(ColumnName = "NickName")]
|
||||
public string NickName { get; set; }
|
||||
|
||||
[SugarColumn(ColumnName = "Avatar")]
|
||||
public string Avatar { get; set; }
|
||||
|
||||
[SugarColumn(IsIgnore = true)]
|
||||
public string AvatarBase64
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Avatar.IsNullOrEmpty())
|
||||
return "";
|
||||
string filePath = MyEnvironment.RootPath("wwwroot" + Avatar);
|
||||
if (!File.Exists(filePath))
|
||||
{
|
||||
return "";
|
||||
}
|
||||
return filePath;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[SugarColumn(ColumnName = "Gender")]
|
||||
public string Gender { get; set; }
|
||||
|
||||
[SugarColumn(IsIgnore = true)]
|
||||
public string GenderStr
|
||||
{
|
||||
get
|
||||
{
|
||||
return Gender == "1" ? "男" : "女";
|
||||
}
|
||||
}
|
||||
|
||||
[SugarColumn(ColumnName = "Birthday")]
|
||||
public DateTime? Birthday { get; set; }
|
||||
|
||||
[SugarColumn(ColumnName = "MobilePhone")]
|
||||
public string MobilePhone { get; set; }
|
||||
|
||||
|
||||
[SugarColumn(ColumnName = "Email")]
|
||||
public string Email { get; set; }
|
||||
|
||||
[SugarColumn(ColumnName = "Signature")]
|
||||
public string Signature { get; set; }
|
||||
|
||||
|
||||
[SugarColumn(ColumnName = "Address")]
|
||||
public string Address { get; set; }
|
||||
|
||||
|
||||
[SugarColumn(ColumnName = "CompanyId")]
|
||||
public string CompanyId { get; set; }
|
||||
|
||||
|
||||
[SugarColumn(ColumnName = "SortCode")]
|
||||
public int? SortCode { get; set; }
|
||||
|
||||
[SugarColumn(ColumnName = "DepartmentId")]
|
||||
public string DepartmentId { get; set; }
|
||||
|
||||
|
||||
[Navigate(NavigateType.OneToOne, nameof(DepartmentId), nameof(SysOrganize.Id))]
|
||||
public SysOrganize Organize { get; set; }
|
||||
|
||||
[SugarColumn(IsIgnore = true)]
|
||||
public string DeptName
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Organize == null)
|
||||
return "";
|
||||
return Organize.FullName;
|
||||
}
|
||||
}
|
||||
|
||||
[SugarColumn(IsIgnore = true)]
|
||||
public string StrBirthday { get; set; }
|
||||
|
||||
[SugarColumn(IsIgnore = true)]
|
||||
public List<string> RoleId { set; get; }
|
||||
|
||||
|
||||
[SugarColumn(IsIgnore = true)]
|
||||
public string password { set; get; }
|
||||
[SugarColumn(IsIgnore = true)]
|
||||
public string roleIds { set; get; }
|
||||
|
||||
}
|
||||
}
|
60
DH.RBAC/Models/Sys/SysUserLogOn.cs
Normal file
@ -0,0 +1,60 @@
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DH.RBAC.Model.Sys
|
||||
{
|
||||
[SugarTable("Sys_UserLogOn")]
|
||||
public partial class SysUserLogOn : BaseModelEntity
|
||||
{
|
||||
[SugarColumn(ColumnName = "Id", IsPrimaryKey = true)]
|
||||
public string Id { get; set; }
|
||||
|
||||
[SugarColumn(ColumnName = "UserId")]
|
||||
public string UserId { get; set; }
|
||||
|
||||
[SugarColumn(ColumnName = "Password")]
|
||||
public string Password { get; set; }
|
||||
|
||||
[SugarColumn(ColumnName = "SecretKey")]
|
||||
public string SecretKey { get; set; }
|
||||
|
||||
[SugarColumn(ColumnName = "PrevVisitTime")]
|
||||
public DateTime? PrevVisitTime { get; set; }
|
||||
|
||||
[SugarColumn(ColumnName = "LastVisitTime")]
|
||||
public DateTime? LastVisitTime { get; set; }
|
||||
|
||||
[SugarColumn(ColumnName = "ChangePwdTime")]
|
||||
public DateTime? ChangePwdTime { get; set; }
|
||||
|
||||
[SugarColumn(ColumnName = "LoginCount")]
|
||||
public int LoginCount { get; set; }
|
||||
|
||||
[SugarColumn(ColumnName = "AllowMultiUserOnline")]
|
||||
public string AllowMultiUserOnline { get; set; }
|
||||
|
||||
|
||||
[SugarColumn(ColumnName = "IsOnLine")]
|
||||
public string IsOnLine { get; set; }
|
||||
|
||||
[SugarColumn(ColumnName = "Question")]
|
||||
public string Question { get; set; }
|
||||
|
||||
[SugarColumn(ColumnName = "AnswerQuestion")]
|
||||
public string AnswerQuestion { get; set; }
|
||||
|
||||
[SugarColumn(ColumnName = "CheckIPAddress")]
|
||||
public string CheckIPAddress { get; set; }
|
||||
|
||||
[SugarColumn(ColumnName = "Language")]
|
||||
public string Language { get; set; }
|
||||
|
||||
[SugarColumn(ColumnName = "Theme")]
|
||||
public string Theme { get; set; }
|
||||
|
||||
}
|
||||
}
|
26
DH.RBAC/Models/Sys/SysUserRoleRelation.cs
Normal file
@ -0,0 +1,26 @@
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DH.RBAC.Model.Sys
|
||||
{
|
||||
|
||||
[SugarTable("Sys_UserRoleRelation")]
|
||||
public partial class SysUserRoleRelation : BaseModelEntity
|
||||
{
|
||||
|
||||
[SugarColumn(ColumnName = "Id", IsPrimaryKey = true)]
|
||||
public string Id { get; set; }
|
||||
|
||||
[SugarColumn(ColumnName = "UserId")]
|
||||
public string UserId { get; set; }
|
||||
|
||||
|
||||
[SugarColumn(ColumnName = "RoleId")]
|
||||
public string RoleId { get; set; }
|
||||
|
||||
}
|
||||
}
|
153
DH.RBAC/Properties/Resources.Designer.cs
generated
Normal file
@ -0,0 +1,153 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 此代码由工具生成。
|
||||
// 运行时版本:4.0.30319.42000
|
||||
//
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
// 重新生成代码,这些更改将会丢失。
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace DH.RBAC.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 一个强类型的资源类,用于查找本地化的字符串等。
|
||||
/// </summary>
|
||||
// 此类是由 StronglyTypedResourceBuilder
|
||||
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
|
||||
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
|
||||
// (以 /str 作为命令选项),或重新生成 VS 项目。
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 返回此类使用的缓存的 ResourceManager 实例。
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager(" DH.RBAC.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 重写当前线程的 CurrentUICulture 属性,对
|
||||
/// 使用此强类型资源类的所有资源查找执行重写。
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap avatar {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("avatar", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap back {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("back", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap background {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("background", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap login_back {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("login_back", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap logo {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("logo", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap logo2 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("logo2", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap menu01 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("menu01", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap menu02 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("menu02", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap menu03 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("menu03", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
148
DH.RBAC/Properties/Resources.resx
Normal file
@ -0,0 +1,148 @@
|
||||
<?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>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="login_back" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\login_back.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="logo" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\logo.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="back" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\back.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="logo2" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\logo2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="background" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\background.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="menu02" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\menu02.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="avatar" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\avatar.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="menu01" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\menu01.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="menu03" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\menu03.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
114
DH.RBAC/RBACWindow.Designer.cs
generated
Normal file
@ -0,0 +1,114 @@
|
||||
namespace DH.RBAC
|
||||
{
|
||||
partial class RBACWindow
|
||||
{
|
||||
/// <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()
|
||||
{
|
||||
AntdUI.Tabs.StyleCard styleCard1 = new AntdUI.Tabs.StyleCard();
|
||||
titlebar = new AntdUI.PageHeader();
|
||||
lbName = new AntdUI.Label();
|
||||
menu1 = new AntdUI.Menu();
|
||||
tabs1 = new AntdUI.Tabs();
|
||||
titlebar.SuspendLayout();
|
||||
SuspendLayout();
|
||||
//
|
||||
// titlebar
|
||||
//
|
||||
titlebar.BackColor = System.Drawing.Color.FromArgb(46, 108, 227);
|
||||
titlebar.Controls.Add(lbName);
|
||||
titlebar.DividerShow = true;
|
||||
titlebar.DividerThickness = 0F;
|
||||
titlebar.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
titlebar.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
|
||||
titlebar.ForeColor = System.Drawing.Color.White;
|
||||
titlebar.Location = new System.Drawing.Point(0, 0);
|
||||
titlebar.Mode = AntdUI.TAMode.Dark;
|
||||
titlebar.Name = "titlebar";
|
||||
titlebar.ShowButton = true;
|
||||
titlebar.ShowIcon = true;
|
||||
titlebar.Size = new System.Drawing.Size(923, 40);
|
||||
titlebar.SubText = "CCD光学筛选系统后台";
|
||||
titlebar.TabIndex = 1;
|
||||
titlebar.Text = "山东迭慧智能科技有限公司";
|
||||
//
|
||||
// lbName
|
||||
//
|
||||
lbName.Dock = System.Windows.Forms.DockStyle.Right;
|
||||
lbName.ForeColor = System.Drawing.SystemColors.Window;
|
||||
lbName.Location = new System.Drawing.Point(645, 0);
|
||||
lbName.Name = "lbName";
|
||||
lbName.Size = new System.Drawing.Size(134, 40);
|
||||
lbName.TabIndex = 0;
|
||||
lbName.Text = "";
|
||||
lbName.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// menu1
|
||||
//
|
||||
menu1.Dock = System.Windows.Forms.DockStyle.Left;
|
||||
menu1.Location = new System.Drawing.Point(0, 40);
|
||||
menu1.Name = "menu1";
|
||||
menu1.Size = new System.Drawing.Size(169, 504);
|
||||
menu1.TabIndex = 2;
|
||||
menu1.Text = "menu1";
|
||||
//
|
||||
// tabs1
|
||||
//
|
||||
tabs1.BackColor = System.Drawing.SystemColors.Window;
|
||||
tabs1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
tabs1.Location = new System.Drawing.Point(169, 40);
|
||||
tabs1.Name = "tabs1";
|
||||
tabs1.Size = new System.Drawing.Size(754, 504);
|
||||
styleCard1.Closable = true;
|
||||
tabs1.Style = styleCard1;
|
||||
tabs1.TabIndex = 6;
|
||||
tabs1.Text = "tabs1";
|
||||
tabs1.Type = AntdUI.TabType.Card;
|
||||
//
|
||||
// RBACWindow
|
||||
//
|
||||
AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
|
||||
AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
ClientSize = new System.Drawing.Size(923, 544);
|
||||
Controls.Add(tabs1);
|
||||
Controls.Add(menu1);
|
||||
Controls.Add(titlebar);
|
||||
Name = "RBACWindow";
|
||||
StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
Text = "RBACWindow";
|
||||
WindowState = System.Windows.Forms.FormWindowState.Maximized;
|
||||
titlebar.ResumeLayout(false);
|
||||
ResumeLayout(false);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private AntdUI.PageHeader titlebar;
|
||||
private AntdUI.Label lbName;
|
||||
private AntdUI.Menu menu1;
|
||||
private AntdUI.Tabs tabs1;
|
||||
}
|
||||
}
|
204
DH.RBAC/RBACWindow.cs
Normal file
@ -0,0 +1,204 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using AntdUI;
|
||||
using DH.RBAC.Common;
|
||||
using DH.RBAC.Logic.Sys;
|
||||
using DH.RBAC.Model.Sys;
|
||||
using DH.RBAC.Models.Base;
|
||||
using DH.RBAC.Page;
|
||||
using Sunny.UI;
|
||||
|
||||
|
||||
|
||||
namespace DH.RBAC
|
||||
{
|
||||
public partial class RBACWindow : Window
|
||||
{
|
||||
private SysUserLogic userLogic;
|
||||
private SysPermissionLogic permissionLogic;
|
||||
private List<Menu> pageList = new List<Menu>();
|
||||
public RBACWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
userLogic = new SysUserLogic();
|
||||
permissionLogic = new SysPermissionLogic();
|
||||
Load += RBACWindow_Load;
|
||||
menu1.SelectChanged += Menu1_SelectChanged;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 窗体对象实例
|
||||
/// </summary>
|
||||
private static RBACWindow _instance;
|
||||
|
||||
public static RBACWindow Instance
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_instance == null || _instance.IsDisposed)
|
||||
_instance = new RBACWindow();
|
||||
return _instance;
|
||||
}
|
||||
}
|
||||
|
||||
private void RBACWindow_Load(object sender, EventArgs e)
|
||||
{
|
||||
lbName.Text = GlobalConfig.CurrentUser.Account;
|
||||
//设置关联
|
||||
//Aside.TabControl = MainTabControl;
|
||||
//获得用户权限
|
||||
List<SysPermission> list;
|
||||
if (userLogic.ContainsUser("admin", GlobalConfig.CurrentUser.Id))
|
||||
{
|
||||
list = permissionLogic.GetList();
|
||||
}
|
||||
else
|
||||
{
|
||||
list = permissionLogic.GetList(GlobalConfig.CurrentUser.Id);
|
||||
}
|
||||
if (list.IsNullOrEmpty())
|
||||
{
|
||||
AntdUI.Message.warn(this, "网络或服务器异常,请稍后重试!", autoClose: 3);
|
||||
|
||||
return;
|
||||
}
|
||||
GlobalConfig.PermissionList = list;
|
||||
|
||||
//取出一级菜单
|
||||
List<SysPermission> root = list.Where(it => it.ParentId == "0").ToList();
|
||||
foreach (SysPermission permission in root)
|
||||
{
|
||||
MenuItem menuItem=new MenuItem();
|
||||
menuItem.Text = permission.Name;
|
||||
menu1.Items.Add(menuItem);
|
||||
|
||||
List<SysPermission> childList = list.Where(it => it.ParentId == permission.Id).ToList();
|
||||
|
||||
foreach (SysPermission child in childList)
|
||||
{
|
||||
MenuItem childmenuItem = new MenuItem();
|
||||
childmenuItem.Text = child.Name;
|
||||
childmenuItem.ID = child.EnCode;
|
||||
childmenuItem.Tag=child.Id.ToString();
|
||||
menuItem.Sub.Add(childmenuItem);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void Menu1_SelectChanged(object sender, MenuSelectEventArgs e)
|
||||
{
|
||||
var clickedItem = e.Value as MenuItem;
|
||||
|
||||
|
||||
|
||||
|
||||
if (clickedItem?.ID == null) return;
|
||||
|
||||
string pageCode = clickedItem.ID; // 获取PageCode(如"sys-user")
|
||||
string menuText = clickedItem.Text;
|
||||
string permissionId= clickedItem.Tag.ToString();
|
||||
// 查找是否已存在对应的TabPage
|
||||
var existingTab = FindTabByPageCode(pageCode);
|
||||
if (existingTab != null)
|
||||
{
|
||||
tabs1.SelectedTab = existingTab;
|
||||
return;
|
||||
}
|
||||
|
||||
// 动态创建控件并添加TabPage
|
||||
MyPage control = CreateControlByPageCode(pageCode);
|
||||
try
|
||||
{
|
||||
|
||||
|
||||
control.ButtonPermissionList = GlobalConfig.PermissionList.Where(it => it.ParentId == permissionId).ToList();
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
}
|
||||
if (control == null)
|
||||
{
|
||||
AntdUI.Message.warn(this, "该菜单仅权限配置,无显示页面!", autoClose: 3);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
AddNewTab(control, menuText, pageCode);
|
||||
|
||||
}
|
||||
private MyPage CreateControlByPageCode(string pageCode)
|
||||
{
|
||||
Type controlType = FindControlTypeByPageCode(pageCode);
|
||||
if (controlType == null) return null;
|
||||
|
||||
try
|
||||
{
|
||||
// 获取接受 Form 参数的构造函数
|
||||
var constructor = controlType.GetConstructor(new[] { typeof(Window) });
|
||||
if (constructor != null)
|
||||
{
|
||||
return constructor.Invoke(new object[] { this }) as MyPage; // 传递当前窗体实例
|
||||
}
|
||||
else
|
||||
{
|
||||
// 如果未找到带 Form 参数的构造函数,尝试无参构造
|
||||
return Activator.CreateInstance(controlType) as MyPage;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show($"创建页面失败: {ex.Message}");
|
||||
return null;
|
||||
}
|
||||
}
|
||||
private Type FindControlTypeByPageCode(string pageCode)
|
||||
{
|
||||
// 反射查找所有带有PageCodeAttribute的UserControl类型
|
||||
var controlTypes = Assembly.GetExecutingAssembly().GetTypes()
|
||||
.Where(t => t.IsSubclassOf(typeof(UserControl)) && !t.IsAbstract);
|
||||
|
||||
foreach (var type in controlTypes)
|
||||
{
|
||||
var attr = type.GetCustomAttribute<PageCodeAttribute>();
|
||||
if (attr != null && attr.Encode == pageCode)
|
||||
{
|
||||
return type;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
private void AddNewTab(UserControl control, string menuText, string pageCode)
|
||||
{
|
||||
AntdUI.TabPage tabPage = new AntdUI.TabPage
|
||||
{
|
||||
Text = menuText,
|
||||
Tag = pageCode, // 可选:存储PageCode用于后续查找
|
||||
ReadOnly = false
|
||||
};
|
||||
control.Dock = DockStyle.Fill;
|
||||
AutoDpi(control); // DPI适配(如果有)
|
||||
tabPage.Controls.Add(control);
|
||||
tabs1.Pages.Add(tabPage);
|
||||
tabs1.SelectedTab = tabPage;
|
||||
}
|
||||
|
||||
private AntdUI.TabPage FindTabByPageCode(string pageCode)
|
||||
{
|
||||
return tabs1.Pages.OfType<AntdUI.TabPage>()
|
||||
.FirstOrDefault(t => t.Tag?.ToString() == pageCode);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
120
DH.RBAC/RBACWindow.resx
Normal file
@ -0,0 +1,120 @@
|
||||
<?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>
|
||||
</root>
|
BIN
DH.RBAC/Resources/avatar.png
Normal file
After Width: | Height: | Size: 3.3 KiB |
BIN
DH.RBAC/Resources/back.png
Normal file
After Width: | Height: | Size: 9.3 KiB |
BIN
DH.RBAC/Resources/background.png
Normal file
After Width: | Height: | Size: 373 KiB |
BIN
DH.RBAC/Resources/login_back.jpg
Normal file
After Width: | Height: | Size: 21 KiB |
BIN
DH.RBAC/Resources/logo.png
Normal file
After Width: | Height: | Size: 40 KiB |
BIN
DH.RBAC/Resources/logo2.png
Normal file
After Width: | Height: | Size: 19 KiB |
BIN
DH.RBAC/Resources/menu01.png
Normal file
After Width: | Height: | Size: 4.0 KiB |
BIN
DH.RBAC/Resources/menu02.png
Normal file
After Width: | Height: | Size: 4.2 KiB |
BIN
DH.RBAC/Resources/menu03.png
Normal file
After Width: | Height: | Size: 3.8 KiB |
87
DH.RBAC/UserControls/AccountControl.Designer.cs
generated
Normal file
@ -0,0 +1,87 @@
|
||||
namespace DH.RBAC.UserControls
|
||||
{
|
||||
partial class AccountControl
|
||||
{
|
||||
/// <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.userAvatar = new Sunny.UI.UIAvatar();
|
||||
this.lblUserName = new Sunny.UI.UILabel();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// userAvatar
|
||||
//
|
||||
this.userAvatar.Dock = System.Windows.Forms.DockStyle.Left;
|
||||
this.userAvatar.FillColor = System.Drawing.Color.Transparent;
|
||||
this.userAvatar.Font = new System.Drawing.Font("微软雅黑", 12F);
|
||||
this.userAvatar.ForeColor = System.Drawing.Color.White;
|
||||
this.userAvatar.Location = new System.Drawing.Point(0, 0);
|
||||
this.userAvatar.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.userAvatar.MinimumSize = new System.Drawing.Size(1, 1);
|
||||
this.userAvatar.Name = "userAvatar";
|
||||
this.userAvatar.Size = new System.Drawing.Size(55, 60);
|
||||
this.userAvatar.Style = Sunny.UI.UIStyle.Custom;
|
||||
this.userAvatar.TabIndex = 2;
|
||||
this.userAvatar.Click += new System.EventHandler(this.userAvatar_Click);
|
||||
this.userAvatar.MouseEnter += new System.EventHandler(this.lblUserName_MouseEnter);
|
||||
this.userAvatar.MouseLeave += new System.EventHandler(this.userAvatar_Leave);
|
||||
//
|
||||
// lblUserName
|
||||
//
|
||||
this.lblUserName.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.lblUserName.Font = new System.Drawing.Font("微软雅黑", 12F);
|
||||
this.lblUserName.ForeColor = System.Drawing.Color.White;
|
||||
this.lblUserName.Location = new System.Drawing.Point(55, 0);
|
||||
this.lblUserName.Name = "lblUserName";
|
||||
this.lblUserName.Size = new System.Drawing.Size(122, 60);
|
||||
this.lblUserName.Style = Sunny.UI.UIStyle.Custom;
|
||||
this.lblUserName.TabIndex = 4;
|
||||
this.lblUserName.Text = "Admin";
|
||||
this.lblUserName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
this.lblUserName.Click += new System.EventHandler(this.userAvatar_Click);
|
||||
this.lblUserName.MouseEnter += new System.EventHandler(this.lblUserName_MouseEnter);
|
||||
this.lblUserName.MouseLeave += new System.EventHandler(this.userAvatar_Leave);
|
||||
//
|
||||
// AccountControl
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.Gray;
|
||||
this.Controls.Add(this.lblUserName);
|
||||
this.Controls.Add(this.userAvatar);
|
||||
this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.Name = "AccountControl";
|
||||
this.Size = new System.Drawing.Size(177, 60);
|
||||
this.Load += new System.EventHandler(this.AccountControl_Load);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
private Sunny.UI.UIAvatar userAvatar;
|
||||
private Sunny.UI.UILabel lblUserName;
|
||||
}
|
||||
}
|
75
DH.RBAC/UserControls/AccountControl.cs
Normal file
@ -0,0 +1,75 @@
|
||||
using DH.RBAC.Common;
|
||||
using DH.RBAC.UserControls.Menus;
|
||||
using PopupTool;
|
||||
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.UserControls
|
||||
{
|
||||
/// <summary>
|
||||
/// 用户自定义控件,弹出层显示
|
||||
/// </summary>
|
||||
public partial class AccountControl : UserControl
|
||||
{
|
||||
public AccountControl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 界面加载时,显示信息
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void AccountControl_Load(object sender, EventArgs e)
|
||||
{
|
||||
lblUserName.Text = GlobalConfig.CurrentUser.NickName;
|
||||
if (GlobalConfig.Avatar != null)
|
||||
{
|
||||
userAvatar.Icon = Sunny.UI.UIAvatar.UIIcon.Image;
|
||||
userAvatar.Image = GlobalConfig.Avatar;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 鼠标放上去改变颜色
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void lblUserName_MouseEnter(object sender, EventArgs e)
|
||||
{
|
||||
userAvatar.BackColor = Color.FromArgb(176, 176, 176);
|
||||
lblUserName.BackColor = Color.FromArgb(176, 176, 176);
|
||||
}
|
||||
/// <summary>
|
||||
/// 鼠标离开时,颜色改回来
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void userAvatar_Leave(object sender, EventArgs e)
|
||||
{
|
||||
userAvatar.BackColor = Color.Gray;
|
||||
lblUserName.BackColor = Color.Gray;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 点下去后显示弹出层
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void userAvatar_Click(object sender, EventArgs e)
|
||||
{
|
||||
UserMenuPanel uc = new UserMenuPanel();
|
||||
Popup pop = new Popup(uc);
|
||||
pop.Show(this);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
120
DH.RBAC/UserControls/AccountControl.resx
Normal file
@ -0,0 +1,120 @@
|
||||
<?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>
|
||||
</root>
|
121
DH.RBAC/UserControls/Menus/UserMenuPanel.cs
Normal file
@ -0,0 +1,121 @@
|
||||
|
||||
using DH.RBAC;
|
||||
using DH.RBAC.Utility.Other;
|
||||
using Sunny.UI;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DH.RBAC.UserControls.Menus
|
||||
{
|
||||
public class UserMenuPanel : UIPanel
|
||||
{
|
||||
public UserMenuPanel()
|
||||
{
|
||||
UISymbolLabel lblAccountManage = new UISymbolLabel();
|
||||
lblAccountManage.ForeColor = Color.FromArgb(153, 153, 153);
|
||||
|
||||
lblAccountManage.Location = new Point(7, 7);
|
||||
lblAccountManage.MinimumSize = new Size(1, 1);
|
||||
lblAccountManage.Padding = new System.Windows.Forms.Padding(32, 0, 0, 0);
|
||||
lblAccountManage.Size = new Size(122, 44);
|
||||
lblAccountManage.Style = UIStyle.Custom;
|
||||
lblAccountManage.StyleCustomMode = true;
|
||||
lblAccountManage.Symbol = 61508;
|
||||
lblAccountManage.SymbolColor = Color.FromArgb(153, 153, 153);
|
||||
lblAccountManage.SymbolSize = 28;
|
||||
lblAccountManage.Text = "账户管理";
|
||||
lblAccountManage.Click += new EventHandler(this.lblAccountManage_Click);
|
||||
lblAccountManage.MouseEnter += new EventHandler(this.uiSymbolLabel1_MouseEnter);
|
||||
lblAccountManage.MouseLeave += new EventHandler(this.uiSymbolLabel1_MouseLeave);
|
||||
|
||||
|
||||
UISymbolLabel lblExit = new UISymbolLabel();
|
||||
lblExit.ForeColor = Color.FromArgb(153, 153, 153);
|
||||
|
||||
lblExit.Location = new Point(6, 62);
|
||||
lblExit.Padding = new System.Windows.Forms.Padding(32, 0, 0, 0);
|
||||
lblExit.Size = new Size(122, 44);
|
||||
lblExit.Style = UIStyle.Custom;
|
||||
lblExit.StyleCustomMode = true;
|
||||
lblExit.Symbol = 61584;
|
||||
lblExit.SymbolColor = Color.FromArgb(153, 153, 153);
|
||||
lblExit.SymbolSize = 28;
|
||||
lblExit.TabIndex = 15;
|
||||
lblExit.Text = "安全退出";
|
||||
lblExit.Click += new EventHandler(this.lblExit_Click);
|
||||
lblExit.MouseEnter += new EventHandler(this.uiSymbolLabel1_MouseEnter);
|
||||
lblExit.MouseLeave += new EventHandler(this.uiSymbolLabel1_MouseLeave);
|
||||
|
||||
this.Style = UIStyle.Custom;
|
||||
this.StyleCustomMode = true;
|
||||
this.Size = new Size(134, 114);
|
||||
this.BackColor = Color.White;
|
||||
this.FillColor = Color.White;
|
||||
this.RectColor = Color.Silver;
|
||||
this.Controls.Add(lblExit);
|
||||
this.Controls.Add(lblAccountManage);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 账户管理点击事件处理
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void lblAccountManage_Click(object sender, EventArgs e)
|
||||
{
|
||||
FormHelper.ShowSubForm(new AccountForm());
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 鼠标进入按钮后,改变颜色
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void uiSymbolLabel1_MouseEnter(object sender, EventArgs e)
|
||||
{
|
||||
UISymbolLabel label = sender as UISymbolLabel;
|
||||
label.BackColor = Color.FromArgb(244, 244, 244);
|
||||
label.ForeColor = Color.FromArgb(181, 181, 181);
|
||||
label.SymbolColor = Color.FromArgb(181, 181, 181);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 鼠标离开按钮后,颜色改回来
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void uiSymbolLabel1_MouseLeave(object sender, EventArgs e)
|
||||
{
|
||||
UISymbolLabel label = sender as UISymbolLabel;
|
||||
label.BackColor = Color.Transparent;
|
||||
label.ForeColor = Color.FromArgb(153, 153, 153);
|
||||
label.SymbolColor = Color.FromArgb(153, 153, 153);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 安全退出
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void lblExit_Click(object sender, EventArgs e)
|
||||
{
|
||||
//自己关闭,重新打开自己
|
||||
new Thread(() =>
|
||||
{
|
||||
string fileName = Process.GetCurrentProcess().MainModule.FileName;
|
||||
ProcessStartInfo processStartInfo = new ProcessStartInfo(fileName);
|
||||
new Process { StartInfo = processStartInfo }.Start();
|
||||
}).Start();
|
||||
Thread.Sleep(100);
|
||||
Environment.Exit(0);
|
||||
}
|
||||
}
|
||||
}
|
120
DH.RBAC/UserControls/Menus/UserMenuPanel.resx
Normal file
@ -0,0 +1,120 @@
|
||||
<?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>
|
||||
</root>
|
69
DH.RBAC/UserControls/ProgressForm.Designer.cs
generated
Normal file
@ -0,0 +1,69 @@
|
||||
namespace DH.RBAC.UserControls
|
||||
{
|
||||
partial class ProgressForm
|
||||
{
|
||||
/// <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.uiProcessBar1 = new Sunny.UI.UIProcessBar();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// uiProcessBar1
|
||||
//
|
||||
this.uiProcessBar1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.uiProcessBar1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.uiProcessBar1.Location = new System.Drawing.Point(0, 0);
|
||||
this.uiProcessBar1.MinimumSize = new System.Drawing.Size(70, 3);
|
||||
this.uiProcessBar1.Name = "uiProcessBar1";
|
||||
this.uiProcessBar1.Size = new System.Drawing.Size(704, 41);
|
||||
this.uiProcessBar1.TabIndex = 0;
|
||||
this.uiProcessBar1.Text = "uiProcessBar1";
|
||||
//
|
||||
// ProgressForm
|
||||
//
|
||||
this.AllowShowTitle = false;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 27F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(704, 41);
|
||||
this.ControlBox = false;
|
||||
this.Controls.Add(this.uiProcessBar1);
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Movable = false;
|
||||
this.Name = "ProgressForm";
|
||||
this.Padding = new System.Windows.Forms.Padding(0);
|
||||
this.ShowTitle = false;
|
||||
this.Text = "下载进度";
|
||||
this.TopMost = true;
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private Sunny.UI.UIProcessBar uiProcessBar1;
|
||||
}
|
||||
}
|
132
DH.RBAC/UserControls/ProgressForm.cs
Normal file
@ -0,0 +1,132 @@
|
||||
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.Net;
|
||||
using System.Net.Security;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using DH.RBAC.Utility.Other;
|
||||
namespace DH.RBAC.UserControls
|
||||
{
|
||||
public partial class ProgressForm : UIForm
|
||||
{
|
||||
public delegate void EndEventHandler(object sender);
|
||||
public event EndEventHandler EndHandler;
|
||||
|
||||
|
||||
public delegate void ErrorEventHandler(object sender, Exception ex);
|
||||
public event ErrorEventHandler ErrorHandler;
|
||||
public ProgressForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
CloseForm = new CloseFormDelegate(() =>
|
||||
{
|
||||
this.Close();
|
||||
});
|
||||
}
|
||||
|
||||
public void SetValue(int value)
|
||||
{
|
||||
uiProcessBar1.InvokeProgressValue(value);
|
||||
}
|
||||
|
||||
public delegate void CloseFormDelegate();
|
||||
public CloseFormDelegate CloseForm;
|
||||
|
||||
public string FileName { get; internal set; }
|
||||
|
||||
public void Download(string method, string url, Dictionary<string, string> parms)
|
||||
{
|
||||
Thread thread = new Thread(() =>
|
||||
{
|
||||
try
|
||||
{
|
||||
if (string.IsNullOrEmpty(url))
|
||||
{
|
||||
throw new ArgumentNullException("url");
|
||||
}
|
||||
HttpWebRequest request = null;
|
||||
//如果是发送HTTPS请求
|
||||
if (url.StartsWith("https", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback((sender, certificate, chain, errors) => { return true; });
|
||||
request = WebRequest.Create(url) as HttpWebRequest;
|
||||
request.ProtocolVersion = HttpVersion.Version10;
|
||||
}
|
||||
else
|
||||
{
|
||||
request = WebRequest.Create(url) as HttpWebRequest;
|
||||
}
|
||||
|
||||
//request.CookieContainer = m_Cookie;
|
||||
request.Method = method;
|
||||
request.ContentType = "application/x-www-form-urlencoded";
|
||||
|
||||
request.UserAgent = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)";
|
||||
// 设置参数
|
||||
|
||||
//如果需要POST数据
|
||||
if (!(parms == null || parms.Count == 0))
|
||||
{
|
||||
StringBuilder buffer = new StringBuilder();
|
||||
int i = 0;
|
||||
foreach (string key in parms.Keys)
|
||||
{
|
||||
if (i > 0)
|
||||
{
|
||||
buffer.AppendFormat("&{0}={1}", key, parms[key]);
|
||||
}
|
||||
else
|
||||
{
|
||||
buffer.AppendFormat("{0}={1}", key, parms[key]);
|
||||
}
|
||||
i++;
|
||||
}
|
||||
byte[] data = Encoding.UTF8.GetBytes(buffer.ToString());
|
||||
using (Stream stream1 = request.GetRequestStream())
|
||||
{
|
||||
stream1.Write(data, 0, data.Length);
|
||||
}
|
||||
}
|
||||
//发送请求并获取相应回应数据
|
||||
HttpWebResponse response = request.GetResponse() as HttpWebResponse;
|
||||
//直到request.GetResponse()程序才开始向目标网页发送Post请求
|
||||
Stream responseStream = response.GetResponseStream();
|
||||
|
||||
long totalLenght = response.ContentLength;
|
||||
//StartHandler?.Invoke(this, totalLenght);
|
||||
|
||||
long current = 0;
|
||||
//创建写入流
|
||||
FileStream pFileStream = new FileStream(FileName, FileMode.OpenOrCreate);
|
||||
byte[] bArr = new byte[10240];
|
||||
int size = responseStream.Read(bArr, 0, (int)bArr.Length);
|
||||
while (size > 0)
|
||||
{
|
||||
current += size;
|
||||
uiProcessBar1.InvokeProgressValue((int)((current * 1.0 / totalLenght) * 100));
|
||||
pFileStream.Write(bArr, 0, size);
|
||||
size = responseStream.Read(bArr, 0, (int)bArr.Length);
|
||||
}
|
||||
responseStream.Close();
|
||||
pFileStream.Close();
|
||||
this.Invoke(CloseForm, null);
|
||||
EndHandler?.Invoke(this);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
this.Invoke(CloseForm, null);
|
||||
ErrorHandler?.Invoke(this, ex);
|
||||
}
|
||||
});
|
||||
thread.Start();
|
||||
}
|
||||
}
|
||||
}
|
120
DH.RBAC/UserControls/ProgressForm.resx
Normal file
@ -0,0 +1,120 @@
|
||||
<?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>
|
||||
</root>
|
322
DH.RBAC/Utility/Extension/ExtMethods.cs
Normal file
@ -0,0 +1,322 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using SqlSugar;
|
||||
|
||||
namespace DH.RBAC.Utility.Extension
|
||||
{
|
||||
public class ExtMethods
|
||||
{
|
||||
public static List<SqlFuncExternal> GetExpMethods
|
||||
{
|
||||
get
|
||||
{
|
||||
var expMethods = new List<SqlFuncExternal>();
|
||||
//abs
|
||||
expMethods.Add(new SqlFuncExternal()
|
||||
{
|
||||
UniqueMethodName = "Abs",
|
||||
MethodValue = (expInfo, dbType, expContext) =>
|
||||
{
|
||||
if (dbType == DbType.MySql)
|
||||
return string.Format("ABS({0})", expInfo.Args[0].MemberName);
|
||||
else if (dbType == DbType.SqlServer)
|
||||
return string.Format("ABS({0})", expInfo.Args[0].MemberName);
|
||||
else if (dbType == DbType.PostgreSQL)
|
||||
return string.Format("abs({0})", expInfo.Args[0].MemberName);
|
||||
else if (dbType == DbType.Oracle)
|
||||
return string.Format("ABS({0})", expInfo.Args[0].MemberName);
|
||||
else if (dbType == DbType.Sqlite)
|
||||
return string.Format("ABS({0})", expInfo.Args[0].MemberName);
|
||||
else
|
||||
throw new Exception("未实现");
|
||||
}
|
||||
});
|
||||
//sin
|
||||
expMethods.Add(new SqlFuncExternal()
|
||||
{
|
||||
UniqueMethodName = "Sin",
|
||||
MethodValue = (expInfo, dbType, expContext) =>
|
||||
{
|
||||
if (dbType == DbType.MySql)
|
||||
return string.Format("SIN({0})", expInfo.Args[0].MemberName);
|
||||
else if (dbType == DbType.SqlServer)
|
||||
return string.Format("SIN({0})", expInfo.Args[0].MemberName);
|
||||
else if (dbType == DbType.PostgreSQL)
|
||||
return string.Format("sin({0})", expInfo.Args[0].MemberName);
|
||||
else if (dbType == DbType.Oracle)
|
||||
return string.Format("SIN({0})", expInfo.Args[0].MemberName);
|
||||
else if (dbType == DbType.Sqlite)
|
||||
return string.Format("SIN({0})", expInfo.Args[0].MemberName);
|
||||
else
|
||||
throw new Exception("未实现");
|
||||
}
|
||||
});
|
||||
//cos
|
||||
expMethods.Add(new SqlFuncExternal()
|
||||
{
|
||||
UniqueMethodName = "Cos",
|
||||
MethodValue = (expInfo, dbType, expContext) =>
|
||||
{
|
||||
if (dbType == DbType.MySql)
|
||||
return string.Format("COS({0})", expInfo.Args[0].MemberName);
|
||||
else if (dbType == DbType.SqlServer)
|
||||
return string.Format("COS({0})", expInfo.Args[0].MemberName);
|
||||
else if (dbType == DbType.PostgreSQL)
|
||||
return string.Format("cos({0})", expInfo.Args[0].MemberName);
|
||||
else if (dbType == DbType.Oracle)
|
||||
return string.Format("COS({0})", expInfo.Args[0].MemberName);
|
||||
else if (dbType == DbType.Sqlite)
|
||||
return string.Format("COS({0})", expInfo.Args[0].MemberName);
|
||||
else
|
||||
throw new Exception("未实现");
|
||||
}
|
||||
});
|
||||
//asin
|
||||
expMethods.Add(new SqlFuncExternal()
|
||||
{
|
||||
UniqueMethodName = "Asin",
|
||||
MethodValue = (expInfo, dbType, expContext) =>
|
||||
{
|
||||
if (dbType == DbType.MySql)
|
||||
return string.Format("ASIN({0})", expInfo.Args[0].MemberName);
|
||||
else if (dbType == DbType.SqlServer)
|
||||
return string.Format("ASIN({0})", expInfo.Args[0].MemberName);
|
||||
else if (dbType == DbType.PostgreSQL)
|
||||
return string.Format("asin({0})", expInfo.Args[0].MemberName);
|
||||
else if (dbType == DbType.Oracle)
|
||||
return string.Format("ASIN({0})", expInfo.Args[0].MemberName);
|
||||
else if (dbType == DbType.Sqlite)
|
||||
return string.Format("ASIN({0})", expInfo.Args[0].MemberName);
|
||||
else
|
||||
throw new Exception("未实现");
|
||||
}
|
||||
});
|
||||
//acos
|
||||
expMethods.Add(new SqlFuncExternal()
|
||||
{
|
||||
UniqueMethodName = "Acos",
|
||||
MethodValue = (expInfo, dbType, expContext) =>
|
||||
{
|
||||
if (dbType == DbType.MySql)
|
||||
return string.Format("ACOS({0})", expInfo.Args[0].MemberName);
|
||||
else if (dbType == DbType.SqlServer)
|
||||
return string.Format("ACOS({0})", expInfo.Args[0].MemberName);
|
||||
else if (dbType == DbType.PostgreSQL)
|
||||
return string.Format("acos({0})", expInfo.Args[0].MemberName);
|
||||
else if (dbType == DbType.Oracle)
|
||||
return string.Format("ACOS({0})", expInfo.Args[0].MemberName);
|
||||
else if (dbType == DbType.Sqlite)
|
||||
return string.Format("ACOS({0})", expInfo.Args[0].MemberName);
|
||||
else
|
||||
throw new Exception("未实现");
|
||||
}
|
||||
});
|
||||
//tan
|
||||
expMethods.Add(new SqlFuncExternal()
|
||||
{
|
||||
UniqueMethodName = "Tan",
|
||||
MethodValue = (expInfo, dbType, expContext) =>
|
||||
{
|
||||
if (dbType == DbType.MySql)
|
||||
return string.Format("TAN({0})", expInfo.Args[0].MemberName);
|
||||
else if (dbType == DbType.SqlServer)
|
||||
return string.Format("TAN({0})", expInfo.Args[0].MemberName);
|
||||
else if (dbType == DbType.PostgreSQL)
|
||||
return string.Format("tan({0})", expInfo.Args[0].MemberName);
|
||||
else if (dbType == DbType.Oracle)
|
||||
return string.Format("TAN({0})", expInfo.Args[0].MemberName);
|
||||
else if (dbType == DbType.Sqlite)
|
||||
return string.Format("TAN({0})", expInfo.Args[0].MemberName);
|
||||
else
|
||||
throw new Exception("未实现");
|
||||
}
|
||||
});
|
||||
//atan
|
||||
expMethods.Add(new SqlFuncExternal()
|
||||
{
|
||||
UniqueMethodName = "Atan",
|
||||
MethodValue = (expInfo, dbType, expContext) =>
|
||||
{
|
||||
if (dbType == DbType.MySql)
|
||||
return string.Format("ATAN({0})", expInfo.Args[0].MemberName);
|
||||
else if (dbType == DbType.SqlServer)
|
||||
return string.Format("ATAN({0})", expInfo.Args[0].MemberName);
|
||||
else if (dbType == DbType.PostgreSQL)
|
||||
return string.Format("atan({0})", expInfo.Args[0].MemberName);
|
||||
else if (dbType == DbType.Oracle)
|
||||
return string.Format("ATAN({0})", expInfo.Args[0].MemberName);
|
||||
else if (dbType == DbType.Sqlite)
|
||||
return string.Format("ATAN({0})", expInfo.Args[0].MemberName);
|
||||
else
|
||||
throw new Exception("未实现");
|
||||
}
|
||||
});
|
||||
//atan2
|
||||
expMethods.Add(new SqlFuncExternal()
|
||||
{
|
||||
UniqueMethodName = "Atan2",
|
||||
MethodValue = (expInfo, dbType, expContext) =>
|
||||
{
|
||||
if (dbType == DbType.MySql)
|
||||
return string.Format("ATAN2({0},{1})", expInfo.Args[0].MemberName, expInfo.Args[1].MemberName);
|
||||
else if (dbType == DbType.SqlServer)
|
||||
return string.Format("ATAN({0}/{1})", expInfo.Args[0].MemberName, expInfo.Args[1].MemberName);
|
||||
else if (dbType == DbType.PostgreSQL)
|
||||
return string.Format("atan2({0},{1})", expInfo.Args[0].MemberName, expInfo.Args[1].MemberName);
|
||||
else if (dbType == DbType.Oracle)
|
||||
return string.Format("ATAN2({0},{1})", expInfo.Args[0].MemberName, expInfo.Args[1].MemberName);
|
||||
else if (dbType == DbType.Sqlite)
|
||||
return string.Format("ATAN2({0},{1})", expInfo.Args[0].MemberName, expInfo.Args[1].MemberName);
|
||||
else
|
||||
throw new Exception("未实现");
|
||||
}
|
||||
});
|
||||
//pow
|
||||
expMethods.Add(new SqlFuncExternal()
|
||||
{
|
||||
UniqueMethodName = "Pow",
|
||||
MethodValue = (expInfo, dbType, expContext) =>
|
||||
{
|
||||
if (dbType == DbType.MySql)
|
||||
return string.Format("POW({0},{1})", expInfo.Args[0].MemberName, expInfo.Args[1].MemberName);
|
||||
else if (dbType == DbType.SqlServer)
|
||||
return string.Format("POWER({0},{1})", expInfo.Args[0].MemberName, expInfo.Args[1].MemberName);
|
||||
else if (dbType == DbType.PostgreSQL)
|
||||
return string.Format("power({0},{1})", expInfo.Args[0].MemberName, expInfo.Args[1].MemberName);
|
||||
else if (dbType == DbType.Oracle)
|
||||
return string.Format("POWER({0},{1})", expInfo.Args[0].MemberName, expInfo.Args[1].MemberName);
|
||||
else if (dbType == DbType.Sqlite)
|
||||
return string.Format("POWER({0},{1})", expInfo.Args[0].MemberName, expInfo.Args[1].MemberName);
|
||||
else
|
||||
throw new Exception("未实现");
|
||||
}
|
||||
});
|
||||
//sqrt
|
||||
expMethods.Add(new SqlFuncExternal()
|
||||
{
|
||||
UniqueMethodName = "Sqrt",
|
||||
MethodValue = (expInfo, dbType, expContext) =>
|
||||
{
|
||||
if (dbType == DbType.MySql)
|
||||
return string.Format("SQRT({0})", expInfo.Args[0].MemberName);
|
||||
else if (dbType == DbType.SqlServer)
|
||||
return string.Format("SQRT({0})", expInfo.Args[0].MemberName);
|
||||
else if (dbType == DbType.PostgreSQL)
|
||||
return string.Format("sqrt({0})", expInfo.Args[0].MemberName);
|
||||
else if (dbType == DbType.Oracle)
|
||||
return string.Format("SQRT({0})", expInfo.Args[0].MemberName);
|
||||
else if (dbType == DbType.Sqlite)
|
||||
return string.Format("SQRT({0})", expInfo.Args[0].MemberName);
|
||||
else
|
||||
throw new Exception("未实现");
|
||||
}
|
||||
});
|
||||
//GetDistance
|
||||
expMethods.Add(new SqlFuncExternal()
|
||||
{
|
||||
UniqueMethodName = "GetDistance",
|
||||
MethodValue = (expInfo, dbType, expContext) =>
|
||||
{
|
||||
if (dbType == DbType.MySql)
|
||||
return string.Format("((6378.138 * 2 * ASIN(POW(SIN(({0} * PI() / 180 - {2} * PI() / 180) / 2), 2) + COS({0} * PI() / 180) * COS({2} * PI() / 180) * POW(SIN(({1} * PI() / 180 - {3} * PI() / 180) / 2), 2))) * 1000)", expInfo.Args[0].MemberName, expInfo.Args[1].MemberName, expInfo.Args[2].MemberName, expInfo.Args[3].MemberName);
|
||||
else if (dbType == DbType.SqlServer)
|
||||
return string.Format("((6378.138 * 2 * ASIN(POWER(SIN(({0} * PI() / 180 - {2} * PI() / 180) / 2), 2) + COS({0} * PI() / 180) * COS({2} * PI() / 180) * POWER(SIN(({1} * PI() / 180 - {3} * PI() / 180) / 2), 2))) * 1000)", expInfo.Args[0].MemberName, expInfo.Args[1].MemberName, expInfo.Args[2].MemberName, expInfo.Args[3].MemberName);
|
||||
else if (dbType == DbType.PostgreSQL)
|
||||
return string.Format("((6378.138 * 2 * ASIN(POWER(SIN(({0} * PI() / 180 - {2} * PI() / 180) / 2), 2) + COS({0} * PI() / 180) * COS({2} * PI() / 180) * POWER(SIN(({1} * PI() / 180 - {3} * PI() / 180) / 2), 2))) * 1000)", expInfo.Args[0].MemberName, expInfo.Args[1].MemberName, expInfo.Args[2].MemberName, expInfo.Args[3].MemberName);
|
||||
else if (dbType == DbType.Oracle)
|
||||
return string.Format("((6378.138 * 2 * ASIN(POWER(SIN(({0} * PI() / 180 - {2} * PI() / 180) / 2), 2) + COS({0} * PI() / 180) * COS({2} * PI() / 180) * POWER(SIN(({1} * PI() / 180 - {3} * PI() / 180) / 2), 2))) * 1000)", expInfo.Args[0].MemberName, expInfo.Args[1].MemberName, expInfo.Args[2].MemberName, expInfo.Args[3].MemberName);
|
||||
else if (dbType == DbType.Sqlite)
|
||||
return string.Format("((6378.138 * 2 * ASIN(POWER(SIN(({0} * PI() / 180 - {2} * PI() / 180) / 2), 2) + COS({0} * PI() / 180) * COS({2} * PI() / 180) * POWER(SIN(({1} * PI() / 180 - {3} * PI() / 180) / 2), 2))) * 1000)", expInfo.Args[0].MemberName, expInfo.Args[1].MemberName, expInfo.Args[2].MemberName, expInfo.Args[3].MemberName);
|
||||
else
|
||||
throw new Exception("未实现");
|
||||
}
|
||||
});
|
||||
//Bd09ToGcj02Lat
|
||||
expMethods.Add(new SqlFuncExternal()
|
||||
{
|
||||
UniqueMethodName = "Bd09ToGcj02Lat",
|
||||
MethodValue = (expInfo, dbType, expContext) =>
|
||||
{
|
||||
if (dbType == DbType.MySql)
|
||||
return string.Format("((SQRT( ({0} - 0.0065) * ({0} - 0.0065) + ({1} - 0.006) * ({1} - 0.006)) - 0.00002 * SIN(({1} - 0.006) * (3.14159265358979324 * 3000.0 / 180.0))) * SIN(ATAN2(({1} - 0.006), ({0} - 0.0065)) - 0.000003 * COS( ({0} - 0.0065) * (3.14159265358979324 * 3000.0 / 180.0))))", expInfo.Args[0].MemberName, expInfo.Args[1].MemberName);
|
||||
else if (dbType == DbType.SqlServer)
|
||||
return string.Format("((SQRT( ({0} - 0.0065) * ({0} - 0.0065) + ({1} - 0.006) * ({1} - 0.006)) - 0.00002 * SIN(({1} - 0.006) * (3.14159265358979324 * 3000.0 / 180.0))) * SIN(ATAN(({1} - 0.006)/({0} - 0.0065)) - 0.000003 * COS( ({0} - 0.0065) * (3.14159265358979324 * 3000.0 / 180.0))))", expInfo.Args[0].MemberName, expInfo.Args[1].MemberName);
|
||||
else if (dbType == DbType.PostgreSQL)
|
||||
return string.Format("((SQRT( ({0} - 0.0065) * ({0} - 0.0065) + ({1} - 0.006) * ({1} - 0.006)) - 0.00002 * SIN(({1} - 0.006) * (3.14159265358979324 * 3000.0 / 180.0))) * SIN(ATAN2(({1} - 0.006), ({0} - 0.0065)) - 0.000003 * COS( ({0} - 0.0065) * (3.14159265358979324 * 3000.0 / 180.0))))", expInfo.Args[0].MemberName, expInfo.Args[1].MemberName);
|
||||
else if (dbType == DbType.Oracle)
|
||||
return string.Format("((SQRT( ({0} - 0.0065) * ({0} - 0.0065) + ({1} - 0.006) * ({1} - 0.006)) - 0.00002 * SIN(({1} - 0.006) * (3.14159265358979324 * 3000.0 / 180.0))) * SIN(ATAN2(({1} - 0.006), ({0} - 0.0065)) - 0.000003 * COS( ({0} - 0.0065) * (3.14159265358979324 * 3000.0 / 180.0))))", expInfo.Args[0].MemberName, expInfo.Args[1].MemberName);
|
||||
else if (dbType == DbType.Sqlite)
|
||||
return string.Format("((SQRT( ({0} - 0.0065) * ({0} - 0.0065) + ({1} - 0.006) * ({1} - 0.006)) - 0.00002 * SIN(({1} - 0.006) * (3.14159265358979324 * 3000.0 / 180.0))) * SIN(ATAN2(({1} - 0.006), ({0} - 0.0065)) - 0.000003 * COS( ({0} - 0.0065) * (3.14159265358979324 * 3000.0 / 180.0))))", expInfo.Args[0].MemberName, expInfo.Args[1].MemberName);
|
||||
else
|
||||
throw new Exception("未实现");
|
||||
}
|
||||
});
|
||||
//Bd09ToGcj02Lon
|
||||
expMethods.Add(new SqlFuncExternal()
|
||||
{
|
||||
UniqueMethodName = "Bd09ToGcj02Lon",
|
||||
MethodValue = (expInfo, dbType, expContext) =>
|
||||
{
|
||||
if (dbType == DbType.MySql)
|
||||
return string.Format("(SQRT(({0} - 0.0065) * ({0} - 0.0065) + ({1} - 0.006) * ({1} - 0.006)) - 0.00002 * SIN(({1} - 0.006) * (3.14159265358979324 * 3000.0 / 180.0))) * COS(ATAN2(({1} - 0.006), ({0} - 0.0065)) - 0.000003 * COS(({0} - 0.0065) * (3.14159265358979324 * 3000.0 / 180.0)))", expInfo.Args[0].MemberName, expInfo.Args[1].MemberName);
|
||||
else if (dbType == DbType.SqlServer)
|
||||
return string.Format("(SQRT(({0} - 0.0065) * ({0} - 0.0065) + ({1} - 0.006) * ({1} - 0.006)) - 0.00002 * SIN(({1} - 0.006) * (3.14159265358979324 * 3000.0 / 180.0))) * COS(ATAN(({1} - 0.006)/({0} - 0.0065)) - 0.000003 * COS(({0} - 0.0065) * (3.14159265358979324 * 3000.0 / 180.0)))", expInfo.Args[0].MemberName, expInfo.Args[1].MemberName);
|
||||
else if (dbType == DbType.PostgreSQL)
|
||||
return string.Format("(SQRT(({0} - 0.0065) * ({0} - 0.0065) + ({1} - 0.006) * ({1} - 0.006)) - 0.00002 * SIN(({1} - 0.006) * (3.14159265358979324 * 3000.0 / 180.0))) * COS(ATAN2(({1} - 0.006), ({0} - 0.0065)) - 0.000003 * COS(({0} - 0.0065) * (3.14159265358979324 * 3000.0 / 180.0)))", expInfo.Args[0].MemberName, expInfo.Args[1].MemberName);
|
||||
else if (dbType == DbType.Oracle)
|
||||
return string.Format("(SQRT(({0} - 0.0065) * ({0} - 0.0065) + ({1} - 0.006) * ({1} - 0.006)) - 0.00002 * SIN(({1} - 0.006) * (3.14159265358979324 * 3000.0 / 180.0))) * COS(ATAN2(({1} - 0.006), ({0} - 0.0065)) - 0.000003 * COS(({0} - 0.0065) * (3.14159265358979324 * 3000.0 / 180.0)))", expInfo.Args[0].MemberName, expInfo.Args[1].MemberName);
|
||||
else if (dbType == DbType.Sqlite)
|
||||
return string.Format("(SQRT(({0} - 0.0065) * ({0} - 0.0065) + ({1} - 0.006) * ({1} - 0.006)) - 0.00002 * SIN(({1} - 0.006) * (3.14159265358979324 * 3000.0 / 180.0))) * COS(ATAN2(({1} - 0.006), ({0} - 0.0065)) - 0.000003 * COS(({0} - 0.0065) * (3.14159265358979324 * 3000.0 / 180.0)))", expInfo.Args[0].MemberName, expInfo.Args[1].MemberName);
|
||||
else
|
||||
throw new Exception("未实现");
|
||||
}
|
||||
});
|
||||
//Gcj02ToBd09Lat
|
||||
expMethods.Add(new SqlFuncExternal()
|
||||
{
|
||||
UniqueMethodName = "Gcj02ToBd09Lat",
|
||||
MethodValue = (expInfo, dbType, expContext) =>
|
||||
{
|
||||
if (dbType == DbType.MySql)
|
||||
return string.Format("((SQRT({0} * {0} + {1} * {1}) - 0.00002 * SIN({1} * (3.14159265358979324 * 3000.0 / 180.0))) * SIN( ATAN2({1},{0}) - 0.000003 * COS({0} * (3.14159265358979324 * 3000.0 / 180.0)))+0.006)", expInfo.Args[0].MemberName, expInfo.Args[1].MemberName);
|
||||
else if (dbType == DbType.SqlServer)
|
||||
return string.Format("((SQRT({0} * {0} + {1} * {1}) - 0.00002 * SIN({1} * (3.14159265358979324 * 3000.0 / 180.0))) * SIN( ATAN({1}/{0}) - 0.000003 * COS({0} * (3.14159265358979324 * 3000.0 / 180.0)))+0.006)", expInfo.Args[0].MemberName, expInfo.Args[1].MemberName);
|
||||
else if (dbType == DbType.PostgreSQL)
|
||||
return string.Format("((SQRT({0} * {0} + {1} * {1}) - 0.00002 * SIN({1} * (3.14159265358979324 * 3000.0 / 180.0))) * SIN( ATAN2({1},{0}) - 0.000003 * COS({0} * (3.14159265358979324 * 3000.0 / 180.0)))+0.006)", expInfo.Args[0].MemberName, expInfo.Args[1].MemberName);
|
||||
else if (dbType == DbType.Oracle)
|
||||
return string.Format("((SQRT({0} * {0} + {1} * {1}) - 0.00002 * SIN({1} * (3.14159265358979324 * 3000.0 / 180.0))) * SIN( ATAN2({1},{0}) - 0.000003 * COS({0} * (3.14159265358979324 * 3000.0 / 180.0)))+0.006)", expInfo.Args[0].MemberName, expInfo.Args[1].MemberName);
|
||||
else if (dbType == DbType.Sqlite)
|
||||
return string.Format("((SQRT({0} * {0} + {1} * {1}) - 0.00002 * SIN({1} * (3.14159265358979324 * 3000.0 / 180.0))) * SIN( ATAN2({1},{0}) - 0.000003 * COS({0} * (3.14159265358979324 * 3000.0 / 180.0)))+0.006)", expInfo.Args[0].MemberName, expInfo.Args[1].MemberName);
|
||||
else
|
||||
throw new Exception("未实现");
|
||||
}
|
||||
});
|
||||
//Gcj02ToBd09Lon
|
||||
expMethods.Add(new SqlFuncExternal()
|
||||
{
|
||||
UniqueMethodName = "Gcj02ToBd09Lon",
|
||||
MethodValue = (expInfo, dbType, expContext) =>
|
||||
{
|
||||
if (dbType == DbType.MySql)
|
||||
return string.Format("((SQRT({0} * {0} + {1} * {1}) - 0.00002 * SIN({1} * (3.14159265358979324 * 3000.0 / 180.0))) * COS(ATAN2({1}, {0}) - 0.000003 * COS({0} * (3.14159265358979324 * 3000.0 / 180.0)))+0.0065)", expInfo.Args[0].MemberName, expInfo.Args[1].MemberName);
|
||||
else if (dbType == DbType.SqlServer)
|
||||
return string.Format("((SQRT({0} * {0} + {1} * {1}) - 0.00002 * SIN({1} * (3.14159265358979324 * 3000.0 / 180.0))) * COS(ATAN({1}/{0}) - 0.000003 * COS({0} * (3.14159265358979324 * 3000.0 / 180.0)))+0.0065)", expInfo.Args[0].MemberName, expInfo.Args[1].MemberName);
|
||||
else if (dbType == DbType.PostgreSQL)
|
||||
return string.Format("((SQRT({0} * {0} + {1} * {1}) - 0.00002 * SIN({1} * (3.14159265358979324 * 3000.0 / 180.0))) * COS(ATAN2({1}, {0}) - 0.000003 * COS({0} * (3.14159265358979324 * 3000.0 / 180.0)))+0.0065)", expInfo.Args[0].MemberName, expInfo.Args[1].MemberName);
|
||||
else if (dbType == DbType.Oracle)
|
||||
return string.Format("((SQRT({0} * {0} + {1} * {1}) - 0.00002 * SIN({1} * (3.14159265358979324 * 3000.0 / 180.0))) * COS(ATAN2({1}, {0}) - 0.000003 * COS({0} * (3.14159265358979324 * 3000.0 / 180.0)))+0.0065)", expInfo.Args[0].MemberName, expInfo.Args[1].MemberName);
|
||||
else if (dbType == DbType.Sqlite)
|
||||
return string.Format("((SQRT({0} * {0} + {1} * {1}) - 0.00002 * SIN({1} * (3.14159265358979324 * 3000.0 / 180.0))) * COS(ATAN2({1}, {0}) - 0.000003 * COS({0} * (3.14159265358979324 * 3000.0 / 180.0)))+0.0065)", expInfo.Args[0].MemberName, expInfo.Args[1].MemberName);
|
||||
else
|
||||
throw new Exception("未实现");
|
||||
}
|
||||
});
|
||||
return expMethods;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
70
DH.RBAC/Utility/Extension/MyEnvironment.cs
Normal file
@ -0,0 +1,70 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DH.RBAC.Utility.Extension
|
||||
{
|
||||
public class MyEnvironment
|
||||
{
|
||||
private static string _currentPath;
|
||||
public static void Init(string currentPath)
|
||||
{
|
||||
_currentPath = currentPath;
|
||||
}
|
||||
|
||||
public static string WebRootPath(string path)
|
||||
{
|
||||
return RootPath("/wwwroot" + path);
|
||||
}
|
||||
|
||||
public static string RootPath(string path)
|
||||
{
|
||||
string basePath = "";
|
||||
#if NETFRAMEWORK
|
||||
basePath = AppDomain.CurrentDomain.BaseDirectory.Replace("/", "\\");
|
||||
if (!basePath.EndsWith("\\"))
|
||||
{
|
||||
basePath += "\\";
|
||||
}
|
||||
path = path.Replace("/", "\\");
|
||||
if (path.StartsWith("\\"))
|
||||
{
|
||||
path = path.Substring(1, path.Length - 1);
|
||||
}
|
||||
return basePath + path;
|
||||
#else
|
||||
if (OperatingSystem.IsWindows())
|
||||
{
|
||||
basePath = AppDomain.CurrentDomain.BaseDirectory.Replace("/", "\\");
|
||||
if (!basePath.EndsWith("\\"))
|
||||
{
|
||||
basePath += "\\";
|
||||
}
|
||||
path = path.Replace("/", "\\");
|
||||
if (path.StartsWith("\\"))
|
||||
{
|
||||
path = path.Substring(1, path.Length - 1);
|
||||
}
|
||||
return basePath + path;
|
||||
}
|
||||
else
|
||||
{
|
||||
basePath = AppDomain.CurrentDomain.BaseDirectory.Replace("\\", "/");
|
||||
if (!basePath.EndsWith("/"))
|
||||
{
|
||||
basePath += "/";
|
||||
}
|
||||
path = path.Replace("\\", "/");
|
||||
if (path.StartsWith("/"))
|
||||
{
|
||||
path = path.Substring(1, path.Length - 1);
|
||||
}
|
||||
return basePath + path;
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
}
|
||||
}
|
108
DH.RBAC/Utility/Other/DESHelper.cs
Normal file
@ -0,0 +1,108 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DH.RBAC.Utility.Other
|
||||
{
|
||||
public static class DESHelper
|
||||
{
|
||||
#region DES加密解密
|
||||
|
||||
/// <summary>
|
||||
/// 默认密钥。
|
||||
/// </summary>
|
||||
private const string DESENCRYPT_KEY = "hsdjxlzf";
|
||||
|
||||
/// <summary>
|
||||
/// DES加密,使用自定义密钥。
|
||||
/// </summary>
|
||||
/// <param name="text">待加密的明文</param>
|
||||
/// <param name="key">8位字符的密钥字符串</param>
|
||||
/// <returns></returns>
|
||||
public static string DESEncrypt(this string text, string key)
|
||||
{
|
||||
if (key.Length != 8)
|
||||
{
|
||||
key = DESENCRYPT_KEY;
|
||||
}
|
||||
DESCryptoServiceProvider des = new DESCryptoServiceProvider();
|
||||
byte[] inputByteArray = Encoding.GetEncoding("UTF-8").GetBytes(text);
|
||||
|
||||
byte[] a = ASCIIEncoding.ASCII.GetBytes(key);
|
||||
des.Key = ASCIIEncoding.ASCII.GetBytes(key);
|
||||
des.IV = ASCIIEncoding.ASCII.GetBytes(key);
|
||||
MemoryStream ms = new MemoryStream();
|
||||
CryptoStream cs = new CryptoStream(ms, des.CreateEncryptor(), CryptoStreamMode.Write);
|
||||
|
||||
cs.Write(inputByteArray, 0, inputByteArray.Length);
|
||||
cs.FlushFinalBlock();
|
||||
|
||||
StringBuilder ret = new StringBuilder();
|
||||
foreach (byte b in ms.ToArray())
|
||||
{
|
||||
ret.AppendFormat("{0:X2}", b);//将第一个参数转换为十六进制数,长度为2,不足前面补0
|
||||
}
|
||||
return ret.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// DES解密,使用自定义密钥。
|
||||
/// </summary>
|
||||
/// <param name="cyphertext">待解密的秘文</param>
|
||||
/// <param name="key">必须是8位字符的密钥字符串(不能有特殊字符)</param>
|
||||
/// <returns></returns>
|
||||
public static string DESDecrypt(this string cyphertext, string key)
|
||||
{
|
||||
if (key.Length != 8)
|
||||
{
|
||||
key = DESENCRYPT_KEY;
|
||||
}
|
||||
if (string.IsNullOrEmpty(cyphertext))
|
||||
return string.Empty;
|
||||
DESCryptoServiceProvider des = new DESCryptoServiceProvider();
|
||||
|
||||
byte[] inputByteArray = new byte[cyphertext.Length / 2];
|
||||
for (int x = 0; x < cyphertext.Length / 2; x++)
|
||||
{
|
||||
int i = (Convert.ToInt32(cyphertext.Substring(x * 2, 2), 16));
|
||||
inputByteArray[x] = (byte)i;
|
||||
}
|
||||
|
||||
des.Key = ASCIIEncoding.ASCII.GetBytes(key);
|
||||
des.IV = ASCIIEncoding.ASCII.GetBytes(key);
|
||||
MemoryStream ms = new MemoryStream();
|
||||
CryptoStream cs = new CryptoStream(ms, des.CreateDecryptor(), CryptoStreamMode.Write);
|
||||
cs.Write(inputByteArray, 0, inputByteArray.Length);
|
||||
cs.FlushFinalBlock();
|
||||
|
||||
StringBuilder ret = new StringBuilder();
|
||||
|
||||
return System.Text.Encoding.GetEncoding("UTF-8").GetString(ms.ToArray());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// DES加密,使用默认密钥。
|
||||
/// </summary>
|
||||
/// <param name="text">待加密的明文</param>
|
||||
/// <returns></returns>
|
||||
public static string DESEncrypt(this string text)
|
||||
{
|
||||
return DESEncrypt(text, DESENCRYPT_KEY);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// DES解密,使用默认密钥。
|
||||
/// </summary>
|
||||
/// <param name="cyphertext">待解密的秘文</param>
|
||||
/// <returns></returns>
|
||||
public static string DESDecrypt(this string cyphertext)
|
||||
{
|
||||
return DESDecrypt(cyphertext, DESENCRYPT_KEY);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
40
DH.RBAC/Utility/Other/FormHelper.cs
Normal file
@ -0,0 +1,40 @@
|
||||
#if NETFRAMEWORK || WINDOWS
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace DH.RBAC.Utility.Other
|
||||
{
|
||||
public class FormHelper
|
||||
{
|
||||
public static Form subForm;
|
||||
|
||||
/// <summary>
|
||||
/// 显示子Form
|
||||
/// </summary>
|
||||
/// <param name="form"></param>
|
||||
public static void ShowSubForm(Form form,UserControl userControl)
|
||||
{
|
||||
//关闭之前的
|
||||
try { if (subForm != null) subForm.Close(); } catch { }
|
||||
//打开现在的
|
||||
subForm = form;
|
||||
form.Show(userControl);
|
||||
|
||||
}
|
||||
|
||||
public static void ShowSubForm(Form form)
|
||||
{
|
||||
//关闭之前的
|
||||
try { if (subForm != null) subForm.Close(); } catch { }
|
||||
//打开现在的
|
||||
subForm = form;
|
||||
form.Show();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
131
DH.RBAC/Utility/Other/JsonHelper.cs
Normal file
@ -0,0 +1,131 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace DH.RBAC.Utility.Other
|
||||
{
|
||||
public static class JsonHelper
|
||||
{
|
||||
/// <summary>
|
||||
/// 对象序列化成JSON字符串。
|
||||
/// </summary>
|
||||
/// <param name="obj">序列化对象</param>
|
||||
/// <param name="ignoreProperties">设置需要忽略的属性</param>
|
||||
/// <returns></returns>
|
||||
public static string ToJson(this object obj)
|
||||
{
|
||||
if (obj == null)
|
||||
return string.Empty;
|
||||
IsoDateTimeConverter timeConverter = new IsoDateTimeConverter();
|
||||
timeConverter.DateTimeFormat = "yyyy-MM-dd HH:mm:ss";
|
||||
return JsonConvert.SerializeObject(obj, timeConverter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// JSON字符串序列化成对象。
|
||||
/// </summary>
|
||||
/// <typeparam name="T">对象类型</typeparam>
|
||||
/// <param name="json">JSON字符串</param>
|
||||
/// <returns></returns>
|
||||
public static T ToObject<T>(this string json)
|
||||
{
|
||||
//var setting = new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore };
|
||||
return json == null ? default(T) : JsonConvert.DeserializeObject<T>(json);//, setting);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// JSON字符串序列化成集合。
|
||||
/// </summary>
|
||||
/// <typeparam name="T">集合类型</typeparam>
|
||||
/// <param name="json">JSON字符串</param>
|
||||
/// <returns></returns>
|
||||
public static List<T> ToList<T>(this string json)
|
||||
{
|
||||
//var setting = new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore };
|
||||
return json == null ? null : JsonConvert.DeserializeObject<List<T>>(json);//, setting);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// JSON字符串序列化成DataTable。
|
||||
/// </summary>
|
||||
/// <param name="json">JSON字符串</param>
|
||||
/// <returns></returns>
|
||||
public static DataTable ToTable(this string json)
|
||||
{
|
||||
return json == null ? null : JsonConvert.DeserializeObject<DataTable>(json);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 将JSON字符串反序列化成对象
|
||||
/// </summary>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
/// <param name="baseEntity"></param>
|
||||
/// <param name="strJson"></param>
|
||||
/// <returns></returns>
|
||||
public static T Json2Obj<T>(T baseEntity, string strJson)
|
||||
{
|
||||
return JsonConvert.DeserializeAnonymousType(strJson, baseEntity);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 将对象转换层JSON字符串
|
||||
/// </summary>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
/// <param name="data"></param>
|
||||
/// <returns></returns>
|
||||
public static string Obj2Json<T>(T data)
|
||||
{
|
||||
return JsonConvert.SerializeObject(data);
|
||||
}
|
||||
|
||||
|
||||
public static List<T> JsonToList<T>(string strJson)
|
||||
{
|
||||
T[] list = JsonConvert.DeserializeObject<T[]>(strJson);
|
||||
return list.ToList();
|
||||
}
|
||||
|
||||
public static T Json2Obj<T>(string strJson)
|
||||
{
|
||||
return JsonConvert.DeserializeObject<T>(strJson);
|
||||
}
|
||||
|
||||
public static DataTable ToDataTable(this string json)
|
||||
{
|
||||
return json.ToTable();
|
||||
}
|
||||
|
||||
public static string FormatJson(this string json)
|
||||
{
|
||||
//格式化json字符串
|
||||
JsonSerializer serializer = new JsonSerializer();
|
||||
TextReader tr = new StringReader(json);
|
||||
JsonTextReader jtr = new JsonTextReader(tr);
|
||||
object obj = serializer.Deserialize(jtr);
|
||||
if (obj != null)
|
||||
{
|
||||
StringWriter textWriter = new StringWriter();
|
||||
JsonTextWriter jsonWriter = new JsonTextWriter(textWriter)
|
||||
{
|
||||
Formatting = Formatting.Indented,
|
||||
Indentation = 4,
|
||||
IndentChar = ' '
|
||||
};
|
||||
serializer.Serialize(jsonWriter, obj);
|
||||
return textWriter.ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
return json;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
117
DH.RBAC/Utility/Other/MD5Helper.cs
Normal file
@ -0,0 +1,117 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DH.RBAC.Utility.Other
|
||||
{
|
||||
public static class MD5Helper
|
||||
{
|
||||
/// <summary>
|
||||
/// 字符串MD5加密。
|
||||
/// </summary>
|
||||
/// <param name="strOri">需要加密的字符串</param>
|
||||
/// <returns></returns>
|
||||
public static string md5(this string text)
|
||||
{
|
||||
return md5(text, Encoding.Default);
|
||||
}
|
||||
public static string MD5(this string text)
|
||||
{
|
||||
return MD5(text, Encoding.Default);
|
||||
}
|
||||
/// <summary>
|
||||
/// 字符串MD5加密。
|
||||
/// </summary>
|
||||
/// <param name="strOri">需要加密的字符串</param>
|
||||
/// <returns></returns>
|
||||
public static string md5(this string text, Encoding encoder)
|
||||
{
|
||||
// Create a new instance of the MD5CryptoServiceProvider object.
|
||||
System.Security.Cryptography.MD5 md5Hasher = System.Security.Cryptography.MD5.Create();
|
||||
// Convert the input string to a byte array and compute the hash.
|
||||
byte[] data = md5Hasher.ComputeHash(encoder.GetBytes(text));
|
||||
// Create a new Stringbuilder to collect the bytes
|
||||
// and create a string.
|
||||
StringBuilder sBuilder = new StringBuilder();
|
||||
// Loop through each byte of the hashed data
|
||||
// and format each one as a hexadecimal string.
|
||||
for (int i = 0; i < data.Length; i++)
|
||||
{
|
||||
sBuilder.Append(data[i].ToString("x2"));
|
||||
}
|
||||
// Return the hexadecimal string.
|
||||
return sBuilder.ToString().ToLower();
|
||||
}
|
||||
public static string MD5(this string text, Encoding encoder)
|
||||
{
|
||||
return md5(text, encoder).ToUpper();
|
||||
}
|
||||
/// <summary>
|
||||
/// 文件流MD5加密。
|
||||
/// </summary>
|
||||
/// <param name="stream">需要加密的文件流</param>
|
||||
/// <returns></returns>
|
||||
public static string md5(this Stream stream)
|
||||
{
|
||||
MD5 md5serv = MD5CryptoServiceProvider.Create();
|
||||
byte[] buffer = md5serv.ComputeHash(stream);
|
||||
StringBuilder sb = new StringBuilder();
|
||||
foreach (byte var in buffer)
|
||||
{
|
||||
sb.Append(var.ToString("x2"));
|
||||
}
|
||||
return sb.ToString().ToLower();
|
||||
}
|
||||
public static string MD5(this Stream stream)
|
||||
{
|
||||
return md5(stream).ToUpper();
|
||||
}
|
||||
|
||||
#region MD5加密
|
||||
/// <summary>
|
||||
/// 字符串MD5加密。
|
||||
/// </summary>
|
||||
/// <param name="strOri">需要加密的字符串</param>
|
||||
/// <returns></returns>
|
||||
public static string MD5Encrypt(this string text)
|
||||
{
|
||||
// Create a new instance of the MD5CryptoServiceProvider object.
|
||||
System.Security.Cryptography.MD5 md5Hasher = System.Security.Cryptography.MD5.Create();
|
||||
// Convert the input string to a byte array and compute the hash.
|
||||
byte[] data = md5Hasher.ComputeHash(Encoding.Default.GetBytes(text));
|
||||
// Create a new Stringbuilder to collect the bytes
|
||||
// and create a string.
|
||||
StringBuilder sBuilder = new StringBuilder();
|
||||
// Loop through each byte of the hashed data
|
||||
// and format each one as a hexadecimal string.
|
||||
for (int i = 0; i < data.Length; i++)
|
||||
{
|
||||
sBuilder.Append(data[i].ToString("x2"));
|
||||
}
|
||||
// Return the hexadecimal string.
|
||||
return sBuilder.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 文件流MD5加密。
|
||||
/// </summary>
|
||||
/// <param name="stream">需要加密的文件流</param>
|
||||
/// <returns></returns>
|
||||
public static string MD5Encrypt(this Stream stream)
|
||||
{
|
||||
MD5 md5serv = MD5CryptoServiceProvider.Create();
|
||||
byte[] buffer = md5serv.ComputeHash(stream);
|
||||
StringBuilder sb = new StringBuilder();
|
||||
foreach (byte var in buffer)
|
||||
{
|
||||
sb.Append(var.ToString("x2"));
|
||||
}
|
||||
return sb.ToString();
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
45
DH.RBAC/Utility/Other/PanelScrollHelper.cs
Normal file
@ -0,0 +1,45 @@
|
||||
#if NETFRAMEWORK || WINDOWS
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace DH.RBAC.Utility.Other
|
||||
{
|
||||
public class PanelScrollHelper
|
||||
{
|
||||
/// <summary>
|
||||
/// 初始化panel
|
||||
/// </summary>
|
||||
/// <param name="panel"></param>
|
||||
public static void InitializePanelScroll(Panel panel)
|
||||
{
|
||||
panel.Click += (obj, arg) => { panel.Select(); };
|
||||
InitializePanelScroll(panel, panel);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 递归初始化panel的内部个容器和控件
|
||||
/// </summary>
|
||||
/// <param name="panel1"></param>
|
||||
/// <param name="panel2"></param>
|
||||
private static void InitializePanelScroll(Control container, Control panelRoot)
|
||||
{
|
||||
foreach (Control control in container.Controls)
|
||||
{
|
||||
if (control is Panel || control is GroupBox || control is SplitContainer || control is TabControl || control is UserControl)
|
||||
{
|
||||
control.Click += (obj, arg) => { panelRoot.Select(); };
|
||||
InitializePanelScroll(control, panelRoot);
|
||||
}
|
||||
else if (control is Label)
|
||||
{
|
||||
control.Click += (obj, arg) => { panelRoot.Select(); };
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
113
DH.RBAC/Utility/Other/ScreenUtils.cs
Normal file
@ -0,0 +1,113 @@
|
||||
#if NETFRAMEWORK || WINDOWS
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace DH.RBAC.Utility.Other
|
||||
{
|
||||
public class ScreenUtils
|
||||
{
|
||||
#region Dll引用
|
||||
[DllImport("User32.dll", EntryPoint = "GetDC")]
|
||||
private extern static IntPtr GetDC(IntPtr hWnd);
|
||||
|
||||
[DllImport("User32.dll", EntryPoint = "ReleaseDC")]
|
||||
private extern static int ReleaseDC(IntPtr hWnd, IntPtr hDC);
|
||||
|
||||
[DllImport("gdi32.dll")]
|
||||
public static extern int GetDeviceCaps(IntPtr hdc, int nIndex);
|
||||
|
||||
[DllImport("User32.dll")]
|
||||
public static extern int GetSystemMetrics(int hWnd);
|
||||
|
||||
|
||||
[DllImport("User32.dll")]
|
||||
private static extern IntPtr MonitorFromPoint([In] System.Drawing.Point pt, [In] uint dwFlags);
|
||||
|
||||
[DllImport("Shcore.dll")]
|
||||
private static extern IntPtr GetDpiForMonitor([In] IntPtr hmonitor, [In] DpiType dpiType, [Out] out uint dpiX, [Out] out uint dpiY);
|
||||
#endregion
|
||||
|
||||
const int DESKTOPVERTRES = 117;
|
||||
const int DESKTOPHORZRES = 118;
|
||||
|
||||
const int SM_CXSCREEN = 0;
|
||||
const int SM_CYSCREEN = 1;
|
||||
|
||||
/// <summary>
|
||||
/// 获取DPI缩放比例
|
||||
/// </summary>
|
||||
/// <param name="dpiscalex"></param>
|
||||
/// <param name="dpiscaley"></param>
|
||||
public static void GetDPIScale(ref float dpiscalex, ref float dpiscaley)
|
||||
{
|
||||
int x = GetSystemMetrics(SM_CXSCREEN);
|
||||
int y = GetSystemMetrics(SM_CYSCREEN);
|
||||
IntPtr hdc = GetDC(IntPtr.Zero);
|
||||
int w = GetDeviceCaps(hdc, DESKTOPHORZRES);
|
||||
int h = GetDeviceCaps(hdc, DESKTOPVERTRES);
|
||||
ReleaseDC(IntPtr.Zero, hdc);
|
||||
dpiscalex = (float)w / x;
|
||||
dpiscaley = (float)h / y;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取分辨率
|
||||
/// </summary>
|
||||
/// <param name="width">宽</param>
|
||||
/// <param name="height">高</param>
|
||||
private static void GetResolving(ref int width, ref int height)
|
||||
{
|
||||
IntPtr hdc = GetDC(IntPtr.Zero);
|
||||
width = GetDeviceCaps(hdc, DESKTOPHORZRES);
|
||||
height = GetDeviceCaps(hdc, DESKTOPVERTRES);
|
||||
ReleaseDC(IntPtr.Zero, hdc);
|
||||
}
|
||||
|
||||
public static int ScreenCount
|
||||
{
|
||||
get
|
||||
{
|
||||
return Screen.AllScreens.Length;
|
||||
}
|
||||
}
|
||||
|
||||
public static ScreenSize GetScreenSize(int index)
|
||||
{
|
||||
if (index > (ScreenCount - 1))
|
||||
throw new Exception("索引异常");
|
||||
Screen screen = Screen.AllScreens[index];
|
||||
uint width = 0;
|
||||
uint height = 0;
|
||||
GetDpi(screen, DpiType.Effective, out width, out height);
|
||||
double scale = width / 96.0;
|
||||
return new ScreenSize { Left = (int)(screen.Bounds.X / scale), Top = screen.Bounds.Y, Width = (int)(screen.Bounds.Width / scale), Height = (int)(screen.Bounds.Height / scale), Scale = scale };
|
||||
}
|
||||
|
||||
public static void GetDpi(Screen screen, DpiType dpiType, out uint dpiX, out uint dpiY)
|
||||
{
|
||||
var pnt = new System.Drawing.Point(screen.Bounds.Left + 800, screen.Bounds.Top + 600);
|
||||
var mon = MonitorFromPoint(pnt, 2);
|
||||
GetDpiForMonitor(mon, dpiType, out dpiX, out dpiY);
|
||||
}
|
||||
|
||||
}
|
||||
public enum DpiType
|
||||
{
|
||||
Effective = 0,
|
||||
Angular = 1,
|
||||
Raw = 2,
|
||||
}
|
||||
|
||||
|
||||
|
||||
public class ScreenSize
|
||||
{
|
||||
public int Left { get; set; }
|
||||
public int Top { get; set; }
|
||||
public int Width { get; set; }
|
||||
public int Height { get; set; }
|
||||
public double Scale { get; set; }
|
||||
}
|
||||
}
|
||||
#endif
|
203
DH.RBAC/Utility/Other/SnowFlakeHelper.cs
Normal file
@ -0,0 +1,203 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DH.RBAC.Utility.Other
|
||||
{
|
||||
public class SnowFlakeHelper
|
||||
{
|
||||
|
||||
private static readonly object _obj = new object();
|
||||
private static SnowFlakeHelper Instance;
|
||||
private SnowFlakeHelper()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取雪花帮助类对象
|
||||
/// </summary>
|
||||
/// <param name="datacenterId">数据中心ID</param>
|
||||
/// <param name="workerId">工作机器Id</param>
|
||||
/// <returns></returns>
|
||||
public static SnowFlakeHelper GetSnowInstance(long datacenterId = 1, long workerId = 1)
|
||||
{
|
||||
//双if 加锁
|
||||
if (Instance == null)
|
||||
{
|
||||
lock (_obj)
|
||||
{
|
||||
if (Instance == null)
|
||||
{
|
||||
Instance = new SnowFlakeHelper(datacenterId, workerId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return Instance;
|
||||
}
|
||||
|
||||
// 开始时间截((new DateTime(2020, 1, 1, 0, 0, 0, DateTimeKind.Utc)-Jan1st1970).TotalMilliseconds)
|
||||
private const long twepoch = 1577836800000L;
|
||||
|
||||
// 机器id所占的位数
|
||||
private const int workerIdBits = 5;
|
||||
|
||||
// 数据标识id所占的位数
|
||||
private const int datacenterIdBits = 5;
|
||||
|
||||
// 支持的最大机器id,结果是31 (这个移位算法可以很快的计算出几位二进制数所能表示的最大十进制数)
|
||||
private const long maxWorkerId = -1L ^ (-1L << workerIdBits);
|
||||
|
||||
// 支持的最大数据标识id,结果是31
|
||||
private const long maxDatacenterId = -1L ^ (-1L << datacenterIdBits);
|
||||
|
||||
// 序列在id中占的位数
|
||||
private const int sequenceBits = 12;
|
||||
|
||||
// 数据标识id向左移17位(12+5)
|
||||
private const int datacenterIdShift = sequenceBits + workerIdBits;
|
||||
|
||||
// 机器ID向左移12位
|
||||
private const int workerIdShift = sequenceBits;
|
||||
|
||||
|
||||
// 时间截向左移22位(5+5+12)
|
||||
private const int timestampLeftShift = sequenceBits + workerIdBits + datacenterIdBits;
|
||||
|
||||
// 生成序列的掩码,这里为4095 (0b111111111111=0xfff=4095)
|
||||
private const long sequenceMask = -1L ^ (-1L << sequenceBits);
|
||||
|
||||
// 数据中心ID(0~31)
|
||||
public long datacenterId { get; private set; }
|
||||
|
||||
// 工作机器ID(0~31)
|
||||
public long workerId { get; private set; }
|
||||
|
||||
// 毫秒内序列(0~4095)
|
||||
public long sequence { get; private set; }
|
||||
|
||||
// 上次生成ID的时间截
|
||||
public long lastTimestamp { get; private set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 雪花ID
|
||||
/// </summary>
|
||||
/// <param name="datacenterId">数据中心ID</param>
|
||||
/// <param name="workerId">工作机器ID</param>
|
||||
private SnowFlakeHelper(long datacenterId, long workerId)
|
||||
{
|
||||
if (datacenterId > maxDatacenterId || datacenterId < 0)
|
||||
{
|
||||
throw new Exception(string.Format("datacenter Id can't be greater than {0} or less than 0", maxDatacenterId));
|
||||
}
|
||||
if (workerId > maxWorkerId || workerId < 0)
|
||||
{
|
||||
throw new Exception(string.Format("worker Id can't be greater than {0} or less than 0", maxWorkerId));
|
||||
}
|
||||
this.workerId = workerId;
|
||||
this.datacenterId = datacenterId;
|
||||
this.sequence = 0L;
|
||||
this.lastTimestamp = -1L;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获得下一个ID
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public long NextId()
|
||||
{
|
||||
lock (this)
|
||||
{
|
||||
long timestamp = GetCurrentTimestamp();
|
||||
if (timestamp > lastTimestamp) //时间戳改变,毫秒内序列重置
|
||||
{
|
||||
sequence = 0L;
|
||||
}
|
||||
else if (timestamp == lastTimestamp) //如果是同一时间生成的,则进行毫秒内序列
|
||||
{
|
||||
sequence = (sequence + 1) & sequenceMask;
|
||||
if (sequence == 0) //毫秒内序列溢出
|
||||
{
|
||||
timestamp = GetNextTimestamp(lastTimestamp); //阻塞到下一个毫秒,获得新的时间戳
|
||||
}
|
||||
}
|
||||
else //当前时间小于上一次ID生成的时间戳,证明系统时钟被回拨,此时需要做回拨处理
|
||||
{
|
||||
sequence = (sequence + 1) & sequenceMask;
|
||||
if (sequence > 0)
|
||||
{
|
||||
timestamp = lastTimestamp; //停留在最后一次时间戳上,等待系统时间追上后即完全度过了时钟回拨问题。
|
||||
}
|
||||
else //毫秒内序列溢出
|
||||
{
|
||||
timestamp = lastTimestamp + 1; //直接进位到下一个毫秒
|
||||
}
|
||||
//throw new Exception(string.Format("Clock moved backwards. Refusing to generate id for {0} milliseconds", lastTimestamp - timestamp));
|
||||
}
|
||||
|
||||
lastTimestamp = timestamp; //上次生成ID的时间截
|
||||
|
||||
//移位并通过或运算拼到一起组成64位的ID
|
||||
var id = ((timestamp - twepoch) << timestampLeftShift)
|
||||
| (datacenterId << datacenterIdShift)
|
||||
| (workerId << workerIdShift)
|
||||
| sequence;
|
||||
return id;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 解析雪花ID
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static string AnalyzeId(long Id)
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
var timestamp = (Id >> timestampLeftShift);
|
||||
var time = Jan1st1970.AddMilliseconds(timestamp + twepoch);
|
||||
sb.Append(time.ToLocalTime().ToString("yyyy-MM-dd HH:mm:ss:fff"));
|
||||
|
||||
var datacenterId = (Id ^ (timestamp << timestampLeftShift)) >> datacenterIdShift;
|
||||
sb.Append("_" + datacenterId);
|
||||
|
||||
var workerId = (Id ^ ((timestamp << timestampLeftShift) | (datacenterId << datacenterIdShift))) >> workerIdShift;
|
||||
sb.Append("_" + workerId);
|
||||
|
||||
var sequence = Id & sequenceMask;
|
||||
sb.Append("_" + sequence);
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 阻塞到下一个毫秒,直到获得新的时间戳
|
||||
/// </summary>
|
||||
/// <param name="lastTimestamp">上次生成ID的时间截</param>
|
||||
/// <returns>当前时间戳</returns>
|
||||
private static long GetNextTimestamp(long lastTimestamp)
|
||||
{
|
||||
long timestamp = GetCurrentTimestamp();
|
||||
while (timestamp <= lastTimestamp)
|
||||
{
|
||||
timestamp = GetCurrentTimestamp();
|
||||
}
|
||||
return timestamp;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取当前时间戳
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private static long GetCurrentTimestamp()
|
||||
{
|
||||
return (long)(DateTime.UtcNow - Jan1st1970).TotalMilliseconds;
|
||||
}
|
||||
|
||||
private static readonly DateTime Jan1st1970 = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
|
||||
}
|
||||
}
|
316
DH.RBAC/Utility/Other/StringHelper.cs
Normal file
@ -0,0 +1,316 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DH.RBAC.Utility.Other
|
||||
{
|
||||
/// <summary>
|
||||
/// 字符串操作类
|
||||
/// </summary>
|
||||
public static class StringHelper
|
||||
{
|
||||
/// <summary>
|
||||
/// 把字符串按照分隔符转换成 List
|
||||
/// </summary>
|
||||
/// <param name="str">源字符串</param>
|
||||
/// <param name="speater">分隔符</param>
|
||||
/// <param name="toLower">是否转换为小写</param>
|
||||
/// <returns></returns>
|
||||
public static List<string> SplitToList(this string str, char speater = ',', bool toLower = false)
|
||||
{
|
||||
List<string> list = new List<string>();
|
||||
string[] ss = str.Split(speater);
|
||||
foreach (string s in ss)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(s) && s != speater.ToString())
|
||||
{
|
||||
string strVal = s;
|
||||
if (toLower)
|
||||
{
|
||||
strVal = s.ToLower();
|
||||
}
|
||||
list.Add(strVal);
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 把 List<string> 按照分隔符组装成 string
|
||||
/// </summary>
|
||||
/// <param name="list"></param>
|
||||
/// <param name="speater"></param>
|
||||
/// <returns></returns>
|
||||
public static string GetStrArray(this List<string> list, string speater = ",")
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (int i = 0; i < list.Count; i++)
|
||||
{
|
||||
if (i == list.Count - 1)
|
||||
{
|
||||
sb.Append(list[i]);
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.Append(list[i]);
|
||||
sb.Append(speater);
|
||||
}
|
||||
}
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 删除最后结尾的指定字符后的字符
|
||||
/// </summary>
|
||||
public static string DelLastChar(this string str, string strChar = ",")
|
||||
{
|
||||
return str.Substring(0, str.LastIndexOf(strChar));
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 转全角的函数(SBC case)
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
public static string ToSBC(string input)
|
||||
{
|
||||
//半角转全角:
|
||||
char[] c = input.ToCharArray();
|
||||
for (int i = 0; i < c.Length; i++)
|
||||
{
|
||||
if (c[i] == 32)
|
||||
{
|
||||
c[i] = (char)12288;
|
||||
continue;
|
||||
}
|
||||
if (c[i] < 127)
|
||||
c[i] = (char)(c[i] + 65248);
|
||||
}
|
||||
return new string(c);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 转半角的函数(SBC case)
|
||||
/// </summary>
|
||||
/// <param name="input">输入</param>
|
||||
/// <returns></returns>
|
||||
public static string ToDBC(string input)
|
||||
{
|
||||
char[] c = input.ToCharArray();
|
||||
for (int i = 0; i < c.Length; i++)
|
||||
{
|
||||
if (c[i] == 12288)
|
||||
{
|
||||
c[i] = (char)32;
|
||||
continue;
|
||||
}
|
||||
if (c[i] > 65280 && c[i] < 65375)
|
||||
c[i] = (char)(c[i] - 65248);
|
||||
}
|
||||
return new string(c);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取正确的Id,如果不是正整数,返回0
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns>返回正确的整数ID,失败返回0</returns>
|
||||
public static int ToInt32(this string value)
|
||||
{
|
||||
if (IsNumberId(value))
|
||||
return int.Parse(value);
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 检查一个字符串是否是纯数字构成的,一般用于查询字符串参数的有效性验证。(0除外)
|
||||
/// </summary>
|
||||
/// <param name="_value">需验证的字符串。。</param>
|
||||
/// <returns>是否合法的bool值。</returns>
|
||||
public static bool IsNumberId(string _value)
|
||||
{
|
||||
return QuickValidate("^[1-9]*[0-9]*$", _value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 快速验证一个字符串是否符合指定的正则表达式。
|
||||
/// </summary>
|
||||
/// <param name="_express">正则表达式的内容。</param>
|
||||
/// <param name="_value">需验证的字符串。</param>
|
||||
/// <returns>是否合法的bool值。</returns>
|
||||
public static bool QuickValidate(string _express, string _value)
|
||||
{
|
||||
if (_value == null) return false;
|
||||
Regex myRegex = new Regex(_express);
|
||||
if (_value.Length == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return myRegex.IsMatch(_value);
|
||||
}
|
||||
/// <summary>
|
||||
/// 得到字符串长度,一个汉字长度为2
|
||||
/// </summary>
|
||||
/// <param name="inputString">参数字符串</param>
|
||||
/// <returns></returns>
|
||||
public static int StrLength(this string inputString)
|
||||
{
|
||||
System.Text.ASCIIEncoding ascii = new System.Text.ASCIIEncoding();
|
||||
int tempLen = 0;
|
||||
byte[] s = ascii.GetBytes(inputString);
|
||||
for (int i = 0; i < s.Length; i++)
|
||||
{
|
||||
if ((int)s[i] == 63)
|
||||
tempLen += 2;
|
||||
else
|
||||
tempLen += 1;
|
||||
}
|
||||
return tempLen;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 截取指定长度字符串
|
||||
/// </summary>
|
||||
/// <param name="inputString">要处理的字符串</param>
|
||||
/// <param name="len">指定长度</param>
|
||||
/// <returns>返回处理后的字符串</returns>
|
||||
public static string splitString(this string inputString, int len)
|
||||
{
|
||||
bool isShowFix = false;
|
||||
if (len % 2 == 1)
|
||||
{
|
||||
isShowFix = true;
|
||||
len--;
|
||||
}
|
||||
System.Text.ASCIIEncoding ascii = new System.Text.ASCIIEncoding();
|
||||
int tempLen = 0;
|
||||
string tempString = "";
|
||||
byte[] s = ascii.GetBytes(inputString);
|
||||
for (int i = 0; i < s.Length; i++)
|
||||
{
|
||||
if ((int)s[i] == 63)
|
||||
tempLen += 2;
|
||||
else
|
||||
tempLen += 1;
|
||||
|
||||
try
|
||||
{
|
||||
tempString += inputString.Substring(i, 1);
|
||||
}
|
||||
catch
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
if (tempLen > len)
|
||||
break;
|
||||
}
|
||||
|
||||
byte[] mybyte = System.Text.Encoding.Default.GetBytes(inputString);
|
||||
if (isShowFix && mybyte.Length > len)
|
||||
tempString += "…";
|
||||
return tempString;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// HTML转行成TEXT
|
||||
/// </summary>
|
||||
/// <param name="strHtml"></param>
|
||||
/// <returns></returns>
|
||||
public static string HtmlToTxt(this string strHtml)
|
||||
{
|
||||
string[] aryReg ={
|
||||
@"<script[^>]*?>.*?</script>",
|
||||
@"<(\/\s*)?!?((\w+:)?\w+)(\w+(\s*=?\s*(([""'])(\\[""'tbnr]|[^\7])*?\7|\w+)|.{0})|\s)*?(\/\s*)?>",
|
||||
@"([\r\n])[\s]+",
|
||||
@"&(quot|#34);",
|
||||
@"&(amp|#38);",
|
||||
@"&(lt|#60);",
|
||||
@"&(gt|#62);",
|
||||
@"&(nbsp|#160);",
|
||||
@"&(iexcl|#161);",
|
||||
@"&(cent|#162);",
|
||||
@"&(pound|#163);",
|
||||
@"&(copy|#169);",
|
||||
@"&#(\d+);",
|
||||
@"-->",
|
||||
@"<!--.*\n"
|
||||
};
|
||||
|
||||
string newReg = aryReg[0];
|
||||
string strOutput = strHtml;
|
||||
for (int i = 0; i < aryReg.Length; i++)
|
||||
{
|
||||
Regex regex = new Regex(aryReg[i], RegexOptions.IgnoreCase);
|
||||
strOutput = regex.Replace(strOutput, string.Empty);
|
||||
}
|
||||
|
||||
strOutput.Replace("<", "");
|
||||
strOutput.Replace(">", "");
|
||||
strOutput.Replace("\r\n", "");
|
||||
|
||||
|
||||
return strOutput;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 判断对象是否为空,为空返回true
|
||||
/// </summary>
|
||||
/// <typeparam name="T">要验证的对象的类型</typeparam>
|
||||
/// <param name="data">要验证的对象</param>
|
||||
public static bool IsNullOrEmpty(this object data)
|
||||
{
|
||||
//如果为null
|
||||
if (data == null)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (string.IsNullOrEmpty(data.ToString().Trim()))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
/// <summary>
|
||||
/// 判断对象是否为空,为空返回true
|
||||
/// </summary>
|
||||
/// <typeparam name="T">要验证的对象的类型</typeparam>
|
||||
/// <param name="data">要验证的对象</param>
|
||||
public static bool IsNullOrEmpty<T>(this List<T> collection)
|
||||
{
|
||||
if (collection == null)
|
||||
return true;
|
||||
if (collection.Count() == 0)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
public static bool IsNullOrEmpty(this DataSet ds)
|
||||
{
|
||||
if (ds == null)
|
||||
return true;
|
||||
if (ds.Tables.Count == 0)
|
||||
return true;
|
||||
return ds.Tables[0].IsNullOrEmpty();
|
||||
}
|
||||
|
||||
public static bool IsNullOrEmpty(this DataTable dt)
|
||||
{
|
||||
if (dt == null)
|
||||
return true;
|
||||
if (dt.Rows.Count == 0)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
55
DH.RBAC/Utility/Other/TreeSelect.cs
Normal file
@ -0,0 +1,55 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace DH.RBAC.Utility.Other
|
||||
{
|
||||
/// <summary>
|
||||
/// Select2树形下拉列表模型。
|
||||
/// </summary>
|
||||
public class TreeSelect
|
||||
{
|
||||
public string id { get; set; }
|
||||
public string text { get; set; }
|
||||
public string parentId { get; set; }
|
||||
public object data { get; set; }
|
||||
}
|
||||
|
||||
public static class TreeSelectHelper
|
||||
{
|
||||
public static string ToTreeSelectJson(this List<TreeSelect> data)
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append("[");
|
||||
sb.Append(ToTreeSelectJson(data, "0", ""));
|
||||
sb.Append("]");
|
||||
return sb.ToString();
|
||||
}
|
||||
private static string ToTreeSelectJson(List<TreeSelect> data, string parentId, string blank)
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
var childList = data.FindAll(t => t.parentId == parentId);
|
||||
|
||||
var tabline = "";
|
||||
if (parentId != "0")
|
||||
{
|
||||
tabline = " ";
|
||||
}
|
||||
if (childList.Count > 0)
|
||||
{
|
||||
tabline = tabline + blank;
|
||||
}
|
||||
foreach (TreeSelect entity in childList)
|
||||
{
|
||||
entity.text = tabline + entity.text;
|
||||
string strJson = JsonConvert.SerializeObject(entity);
|
||||
sb.Append(strJson);
|
||||
sb.Append(ToTreeSelectJson(data, entity.id, tabline));
|
||||
}
|
||||
return sb.ToString().Replace("}{", "},{");
|
||||
}
|
||||
}
|
||||
}
|
277
DH.RBAC/Utility/Other/UIUtils.cs
Normal file
@ -0,0 +1,277 @@
|
||||
#if NETFRAMEWORK || WINDOWS
|
||||
using Sunny.UI;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace DH.RBAC.Utility.Other
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// UI控件多线程赋值专用
|
||||
/// </summary>
|
||||
public static class UIUtils
|
||||
{
|
||||
public delegate void InvokeBackColorDelegate(Control control, Color color);
|
||||
public delegate void InvokeTextDelegate(Control control, string text);
|
||||
public delegate void InvokeVisibleDelegate(Control control, bool enable);
|
||||
public delegate void InvokeDataDelegate(Control control, DataTable dt);
|
||||
public delegate void InvokeLineDelegate(Control control, string[] line);
|
||||
public delegate void InvokeAppendLineDelegate(Control control, string line);
|
||||
public delegate void InvokeAppendLineMaxDelegate(Control control, string line);
|
||||
public delegate void InvokeTabIndex(UITabControl control, int index);
|
||||
public delegate void InvokMESStateDelegate(UILight light, UILightState state);
|
||||
public delegate void InvokeProgressDelegate(UIProcessBar control, int value);
|
||||
public static void InvokeProgressValue(this UIProcessBar control, int value)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (control.InvokeRequired)
|
||||
{
|
||||
control.BeginInvoke(new InvokeProgressDelegate(InvokeProgressValue), new object[] { control, value });
|
||||
}
|
||||
else
|
||||
{
|
||||
control.Value = value;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
public static void InvokMESState(this UILight light, UILightState state)
|
||||
{
|
||||
if (light.InvokeRequired)
|
||||
{
|
||||
light.BeginInvoke(new InvokMESStateDelegate(InvokMESState), new object[] { light, state });
|
||||
}
|
||||
else
|
||||
{
|
||||
light.State = state;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static void InvokeBackColor(this Control control, Color color)
|
||||
{
|
||||
if (control.InvokeRequired)
|
||||
{
|
||||
control.BeginInvoke(new InvokeBackColorDelegate(InvokeBackColor), new object[] { control, color });
|
||||
}
|
||||
else
|
||||
{
|
||||
control.BackColor = color;
|
||||
}
|
||||
}
|
||||
|
||||
public static void InvokeVisible(this Control control, bool enable)
|
||||
{
|
||||
|
||||
if (control.InvokeRequired)
|
||||
{
|
||||
control.BeginInvoke(new InvokeVisibleDelegate(InvokeVisible), new object[] { control, enable });
|
||||
}
|
||||
else
|
||||
{
|
||||
control.Visible = enable;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static void InvokeText(this Control control, string text)
|
||||
{
|
||||
|
||||
if (control.InvokeRequired)
|
||||
{
|
||||
control.BeginInvoke(new InvokeTextDelegate(InvokeText), new object[] { control, text });
|
||||
}
|
||||
else
|
||||
{
|
||||
if (control is UITextBox)
|
||||
{
|
||||
((UITextBox)control).Text = text;
|
||||
}
|
||||
else if (control is TextBox)
|
||||
{
|
||||
((TextBox)control).Text = text;
|
||||
}
|
||||
else if (control is UILabel)
|
||||
{
|
||||
((UILabel)control).Text = text;
|
||||
}
|
||||
else if (control is Label)
|
||||
{
|
||||
((Label)control).Text = text;
|
||||
}
|
||||
else if (control is UIButton)
|
||||
{
|
||||
((UIButton)control).Text = text;
|
||||
}
|
||||
else if (control is Button)
|
||||
{
|
||||
((Button)control).Text = text;
|
||||
}
|
||||
else if (control is UIGroupBox)
|
||||
{
|
||||
((UIGroupBox)control).Text = text;
|
||||
}
|
||||
}
|
||||
}
|
||||
public static void InvokeData(this Control control, DataTable dt)
|
||||
{
|
||||
|
||||
if (control.InvokeRequired)
|
||||
{
|
||||
control.BeginInvoke(new InvokeDataDelegate(InvokeData), new object[] { control, dt });
|
||||
}
|
||||
else
|
||||
{
|
||||
if (control is UIDataGridView)
|
||||
{
|
||||
UIDataGridView dgv = ((UIDataGridView)control);
|
||||
dgv.DataSource = dt;
|
||||
dgv.ClearSelection();
|
||||
dgv.Refresh();
|
||||
}
|
||||
else if (control is DataGridView)
|
||||
{
|
||||
DataGridView dgv = ((DataGridView)control);
|
||||
dgv.DataSource = dt;
|
||||
dgv.ClearSelection();
|
||||
dgv.Refresh();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void InvokeLine(this Control control, string[] line)
|
||||
{
|
||||
|
||||
if (control.InvokeRequired)
|
||||
{
|
||||
control.BeginInvoke(new InvokeLineDelegate(InvokeLine), new object[] { control, line });
|
||||
}
|
||||
else
|
||||
{
|
||||
if (control is UITextBox)
|
||||
{
|
||||
UITextBox tb = ((UITextBox)control);
|
||||
tb.Lines = line;
|
||||
}
|
||||
else if (control is TextBox)
|
||||
{
|
||||
TextBox tb = ((TextBox)control);
|
||||
tb.Lines = line;
|
||||
}
|
||||
}
|
||||
}
|
||||
public static void InvokeLine(this Control control, List<string> line)
|
||||
{
|
||||
InvokeLine(control, line.ToArray());
|
||||
}
|
||||
|
||||
public static void InvokeAppendLine(this Control control, string value)
|
||||
{
|
||||
|
||||
if (control.InvokeRequired)
|
||||
{
|
||||
control.BeginInvoke(new InvokeAppendLineDelegate(InvokeAppendLine), new object[] { control, value });
|
||||
}
|
||||
else
|
||||
{
|
||||
if (control is UITextBox)
|
||||
{
|
||||
UITextBox component = (UITextBox)control;
|
||||
List<string> lines = component.Lines.ToList();
|
||||
lines.Add(value);
|
||||
component.Lines = lines.ToArray();
|
||||
component.Focus();//获取焦点
|
||||
component.Select(component.TextLength, 0);//光标定位到文本最后
|
||||
component.ScrollToCaret();//滚动到光标处
|
||||
}
|
||||
else if (control is TextBox)
|
||||
{
|
||||
TextBox component = (TextBox)control;
|
||||
List<string> lines = component.Lines.ToList();
|
||||
lines.Add(value);
|
||||
component.Lines = lines.ToArray();
|
||||
component.Focus();//获取焦点
|
||||
component.Select(component.TextLength, 0);//光标定位到文本最后
|
||||
component.ScrollToCaret();//滚动到光标处
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public static void InvokeAppendLine(this Control control, string value, int maxLineNum)
|
||||
{
|
||||
if (control.InvokeRequired)
|
||||
{
|
||||
control.BeginInvoke(new InvokeAppendLineMaxDelegate(InvokeAppendLine), new object[] { control, value, maxLineNum });
|
||||
}
|
||||
else
|
||||
{
|
||||
if (control is UITextBox)
|
||||
{
|
||||
UITextBox component = (UITextBox)control;
|
||||
List<string> lines = component.Lines.ToList();
|
||||
lines.Add(value);
|
||||
if (lines.Count > maxLineNum)
|
||||
{
|
||||
int cha = lines.Count - maxLineNum;
|
||||
//lines.Reverse();
|
||||
//差多少,删多少
|
||||
for (int i = 0; i < cha; i++)
|
||||
{
|
||||
lines.RemoveAt(0);
|
||||
}
|
||||
//lines.Reverse();
|
||||
}
|
||||
component.Lines = lines.ToArray();
|
||||
component.Focus();//获取焦点
|
||||
component.Select(component.TextLength, 0);//光标定位到文本最后
|
||||
component.ScrollToCaret();//滚动到光标处
|
||||
}
|
||||
else if (control is TextBox)
|
||||
{
|
||||
TextBox component = (TextBox)control;
|
||||
List<string> lines = component.Lines.ToList();
|
||||
lines.Add(value);
|
||||
if (lines.Count > maxLineNum)
|
||||
{
|
||||
int cha = lines.Count - maxLineNum;
|
||||
//lines.Reverse();
|
||||
//差多少,删多少
|
||||
for (int i = 0; i < cha; i++)
|
||||
{
|
||||
lines.RemoveAt(0);
|
||||
}
|
||||
//lines.Reverse();
|
||||
}
|
||||
component.Lines = lines.ToArray();
|
||||
component.Focus();//获取焦点
|
||||
component.Select(component.TextLength, 0);//光标定位到文本最后
|
||||
component.ScrollToCaret();//滚动到光标处
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static void InvokeIndex(this UITabControl control, int index)
|
||||
{
|
||||
if (control.InvokeRequired)
|
||||
{
|
||||
control.BeginInvoke(new InvokeTabIndex(InvokeIndex), new object[] { control, index });
|
||||
}
|
||||
else
|
||||
{
|
||||
control.SelectedIndex = index;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
52
DH.RBAC/Utility/Other/UUID.cs
Normal file
@ -0,0 +1,52 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DH.RBAC.Utility.Other
|
||||
{
|
||||
public class UUID
|
||||
{
|
||||
public static long SnowId
|
||||
{
|
||||
get
|
||||
{
|
||||
return SnowFlakeHelper.GetSnowInstance().NextId();
|
||||
}
|
||||
}
|
||||
|
||||
public static string StrSnowId
|
||||
{
|
||||
get
|
||||
{
|
||||
return Convert.ToString(SnowId);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static string NewTimeUUID
|
||||
{
|
||||
get
|
||||
{
|
||||
return DateTime.Today.ToString("yyyyMMdd") + Guid.NewGuid().ToString().Replace("-", "").ToUpper().Substring(0, 10);
|
||||
}
|
||||
}
|
||||
|
||||
public static string NewTimeUUID2
|
||||
{
|
||||
get
|
||||
{
|
||||
return DateTime.Today.ToString("yyyyMMdd") + Guid.NewGuid().ToString().Replace("-", "").ToUpper();
|
||||
}
|
||||
}
|
||||
|
||||
public static string NewUUID
|
||||
{
|
||||
get
|
||||
{
|
||||
return Guid.NewGuid().ToString().Replace("-", "").ToUpper();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
34
DH.RBAC/Utility/Other/ZTreeNode.cs
Normal file
@ -0,0 +1,34 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
|
||||
namespace DH.RBAC.Utility.Other
|
||||
{
|
||||
/// <summary>
|
||||
/// zTree单层节点数据模型。
|
||||
/// </summary>
|
||||
public class ZTreeNode
|
||||
{
|
||||
/// <summary>
|
||||
/// 节点ID。
|
||||
/// </summary>
|
||||
public string id { get; set; }
|
||||
/// <summary>
|
||||
/// 父节点ID。
|
||||
/// </summary>
|
||||
public string pId { get; set; }
|
||||
/// <summary>
|
||||
/// 节点名称。
|
||||
/// </summary>
|
||||
public string name { get; set; }
|
||||
/// <summary>
|
||||
/// 是否展开。
|
||||
/// </summary>
|
||||
public bool open { get; set; }
|
||||
/// <summary>
|
||||
/// 是否选中。
|
||||
/// </summary>
|
||||
public bool @checked { get; set; }
|
||||
}
|
||||
}
|
114
DH.RBAC/Utility/PopupTool/GripBounds.cs
Normal file
@ -0,0 +1,114 @@
|
||||
#if NETFRAMEWORK || WINDOWS
|
||||
using System;
|
||||
using System.Drawing;
|
||||
|
||||
internal struct GripBounds
|
||||
{
|
||||
public GripBounds(Rectangle clientRectangle)
|
||||
{
|
||||
this.clientRectangle = clientRectangle;
|
||||
}
|
||||
public Rectangle ClientRectangle
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.clientRectangle;
|
||||
}
|
||||
}
|
||||
|
||||
public Rectangle Bottom
|
||||
{
|
||||
get
|
||||
{
|
||||
Rectangle result = this.ClientRectangle;
|
||||
result.Y = result.Bottom - 6 + 1;
|
||||
result.Height = 6;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
public Rectangle BottomRight
|
||||
{
|
||||
get
|
||||
{
|
||||
Rectangle result = this.ClientRectangle;
|
||||
result.Y = result.Bottom - 12 + 1;
|
||||
result.Height = 12;
|
||||
result.X = result.Width - 12 + 1;
|
||||
result.Width = 12;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
public Rectangle Top
|
||||
{
|
||||
get
|
||||
{
|
||||
Rectangle result = this.ClientRectangle;
|
||||
result.Height = 6;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
public Rectangle TopRight
|
||||
{
|
||||
get
|
||||
{
|
||||
Rectangle result = this.ClientRectangle;
|
||||
result.Height = 12;
|
||||
result.X = result.Width - 12 + 1;
|
||||
result.Width = 12;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
public Rectangle Left
|
||||
{
|
||||
get
|
||||
{
|
||||
Rectangle result = this.ClientRectangle;
|
||||
result.Width = 6;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
public Rectangle BottomLeft
|
||||
{
|
||||
get
|
||||
{
|
||||
Rectangle result = this.ClientRectangle;
|
||||
result.Width = 12;
|
||||
result.Y = result.Height - 12 + 1;
|
||||
result.Height = 12;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
public Rectangle Right
|
||||
{
|
||||
get
|
||||
{
|
||||
Rectangle result = this.ClientRectangle;
|
||||
result.X = result.Right - 6 + 1;
|
||||
result.Width = 6;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
public Rectangle TopLeft
|
||||
{
|
||||
get
|
||||
{
|
||||
Rectangle result = this.ClientRectangle;
|
||||
result.Width = 12;
|
||||
result.Height = 12;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
private const int GripSize = 6;
|
||||
|
||||
private const int CornerGripSize = 12;
|
||||
|
||||
private Rectangle clientRectangle;
|
||||
}
|
||||
#endif
|
524
DH.RBAC/Utility/PopupTool/Popup.cs
Normal file
@ -0,0 +1,524 @@
|
||||
#if NETFRAMEWORK || WINDOWS
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Drawing2D;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security.Permissions;
|
||||
using System.Threading;
|
||||
using System.Windows.Forms;
|
||||
using System.Windows.Forms.VisualStyles;
|
||||
|
||||
namespace PopupTool
|
||||
{
|
||||
[ToolboxItem(false)]
|
||||
public class Popup : ToolStripDropDown
|
||||
{
|
||||
public Control Content
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.content;
|
||||
}
|
||||
}
|
||||
|
||||
public bool UseFadeEffect
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.fade;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (this.fade != value)
|
||||
{
|
||||
this.fade = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public bool FocusOnOpen
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.focusOnOpen;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.focusOnOpen = value;
|
||||
}
|
||||
}
|
||||
public bool AcceptAlt
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.acceptAlt;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.acceptAlt = value;
|
||||
}
|
||||
}
|
||||
|
||||
public bool Resizable
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.resizable && this._resizable;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.resizable = value;
|
||||
}
|
||||
}
|
||||
|
||||
public new Size MinimumSize
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.minSize;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.minSize = value;
|
||||
}
|
||||
}
|
||||
|
||||
public new Size MaximumSize
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.maxSize;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.maxSize = value;
|
||||
}
|
||||
}
|
||||
public bool IsOpen
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._isOpen;
|
||||
}
|
||||
}
|
||||
|
||||
protected override CreateParams CreateParams
|
||||
{
|
||||
[SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.UnmanagedCode)]
|
||||
get
|
||||
{
|
||||
CreateParams createParams = base.CreateParams;
|
||||
createParams.ExStyle |= 134217728;
|
||||
return createParams;
|
||||
}
|
||||
}
|
||||
|
||||
public Popup(Control content)
|
||||
{
|
||||
EventHandler handler = null;
|
||||
EventHandler handler2 = null;
|
||||
PaintEventHandler handler3 = null;
|
||||
this.focusOnOpen = true;
|
||||
this.acceptAlt = true;
|
||||
if (ReferenceEquals(content, null))
|
||||
{
|
||||
throw new ArgumentNullException("content");
|
||||
}
|
||||
this.content = content;
|
||||
this.fade = SystemInformation.IsMenuAnimationEnabled && SystemInformation.IsMenuFadeEnabled;
|
||||
this._resizable = true;
|
||||
this.AutoSize = false;
|
||||
this.DoubleBuffered = true;
|
||||
base.ResizeRedraw = true;
|
||||
this.host = new ToolStripControlHost(content);
|
||||
Padding padding1 = this.host.Margin = Padding.Empty;
|
||||
Padding padding2 = this.host.Padding = padding1;
|
||||
base.Padding = base.Margin = padding2;
|
||||
this.MinimumSize = content.MinimumSize;
|
||||
content.MinimumSize = content.Size;
|
||||
this.MaximumSize = content.MaximumSize;
|
||||
content.MaximumSize = content.Size;
|
||||
base.Size = content.Size;
|
||||
content.Location = Point.Empty;
|
||||
this.Items.Add(this.host);
|
||||
if (handler == null)
|
||||
{
|
||||
handler = delegate (object sender, EventArgs e) {
|
||||
content = null;
|
||||
this.Dispose(true);
|
||||
};
|
||||
}
|
||||
content.Disposed += handler;
|
||||
if (handler2 == null)
|
||||
{
|
||||
handler2 = (sender, e) => this.UpdateRegion();
|
||||
}
|
||||
content.RegionChanged += handler2;
|
||||
if (handler3 == null)
|
||||
{
|
||||
handler3 = (sender, e) => this.PaintSizeGrip(e);
|
||||
}
|
||||
content.Paint += handler3;
|
||||
this.UpdateRegion();
|
||||
}
|
||||
|
||||
protected override bool ProcessDialogKey(Keys keyData)
|
||||
{
|
||||
if (this.acceptAlt && (keyData & Keys.Alt) == Keys.Alt)
|
||||
{
|
||||
if ((keyData & Keys.F4) != Keys.F4)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
base.Close();
|
||||
}
|
||||
return base.ProcessDialogKey(keyData);
|
||||
}
|
||||
|
||||
protected void UpdateRegion()
|
||||
{
|
||||
if (base.Region != null)
|
||||
{
|
||||
base.Region.Dispose();
|
||||
base.Region = null;
|
||||
}
|
||||
if (this.content.Region != null)
|
||||
{
|
||||
base.Region = this.content.Region.Clone();
|
||||
}
|
||||
}
|
||||
|
||||
public void Show(Control control)
|
||||
{
|
||||
this.Show(control, control.ClientRectangle);
|
||||
}
|
||||
|
||||
public void Show(Control control, bool center)
|
||||
{
|
||||
this.Show(control, control.ClientRectangle, center);
|
||||
}
|
||||
|
||||
public void Show(Control control, Rectangle area)
|
||||
{
|
||||
this.Show(control, area, false);
|
||||
}
|
||||
|
||||
public void Show(Control control, Rectangle area, bool center)
|
||||
{
|
||||
if (control == null)
|
||||
{
|
||||
throw new ArgumentNullException("control");
|
||||
}
|
||||
this.SetOwnerItem(control);
|
||||
this.resizableTop = (this.resizableLeft = false);
|
||||
Point point = control.PointToScreen(new Point(area.Left, area.Top + area.Height));
|
||||
Rectangle workingArea = Screen.FromControl(control).WorkingArea;
|
||||
if (center)
|
||||
{
|
||||
if (point.X + (area.Width + base.Size.Width) / 2 > workingArea.Right)
|
||||
{
|
||||
this.resizableLeft = true;
|
||||
point.X = workingArea.Right - base.Size.Width;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.resizableLeft = true;
|
||||
point.X -= (base.Size.Width - area.Width) / 2;
|
||||
}
|
||||
}
|
||||
else if (point.X + base.Size.Width > workingArea.Left + workingArea.Width)
|
||||
{
|
||||
this.resizableLeft = true;
|
||||
point.X = workingArea.Left + workingArea.Width - base.Size.Width;
|
||||
}
|
||||
if (point.Y + base.Size.Height > workingArea.Top + workingArea.Height)
|
||||
{
|
||||
this.resizableTop = true;
|
||||
point.Y -= base.Size.Height + area.Height;
|
||||
}
|
||||
point = control.PointToClient(point);
|
||||
base.Show(control, point, ToolStripDropDownDirection.BelowRight);
|
||||
}
|
||||
|
||||
protected override void SetVisibleCore(bool visible)
|
||||
{
|
||||
double opacity = base.Opacity;
|
||||
if (visible && this.fade && this.focusOnOpen)
|
||||
{
|
||||
base.Opacity = 0.0;
|
||||
}
|
||||
base.SetVisibleCore(visible);
|
||||
if (visible && this.fade && this.focusOnOpen)
|
||||
{
|
||||
for (int i = 1; i <= 5; i++)
|
||||
{
|
||||
if (i > 1)
|
||||
{
|
||||
Thread.Sleep(20);
|
||||
}
|
||||
base.Opacity = opacity * (double)i / 5.0;
|
||||
}
|
||||
base.Opacity = opacity;
|
||||
}
|
||||
}
|
||||
|
||||
private void SetOwnerItem(Control control)
|
||||
{
|
||||
if (control != null)
|
||||
{
|
||||
if (control is Popup)
|
||||
{
|
||||
Popup popup = control as Popup;
|
||||
this.ownerPopup = popup;
|
||||
this.ownerPopup.childPopup = this;
|
||||
base.OwnerItem = popup.Items[0];
|
||||
}
|
||||
else if (control.Parent != null)
|
||||
{
|
||||
this.SetOwnerItem(control.Parent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnSizeChanged(EventArgs e)
|
||||
{
|
||||
this.content.MinimumSize = base.Size;
|
||||
this.content.MaximumSize = base.Size;
|
||||
this.content.Size = base.Size;
|
||||
this.content.Location = Point.Empty;
|
||||
base.OnSizeChanged(e);
|
||||
}
|
||||
|
||||
protected override void OnOpening(CancelEventArgs e)
|
||||
{
|
||||
if (this.content.IsDisposed || this.content.Disposing)
|
||||
{
|
||||
e.Cancel = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.UpdateRegion();
|
||||
base.OnOpening(e);
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnOpened(EventArgs e)
|
||||
{
|
||||
if (this.ownerPopup != null)
|
||||
{
|
||||
this.ownerPopup._resizable = false;
|
||||
}
|
||||
if (this.focusOnOpen)
|
||||
{
|
||||
this.content.Focus();
|
||||
}
|
||||
this._isOpen = true;
|
||||
base.OnOpened(e);
|
||||
}
|
||||
|
||||
protected override void OnClosed(ToolStripDropDownClosedEventArgs e)
|
||||
{
|
||||
if (this.ownerPopup != null)
|
||||
{
|
||||
this.ownerPopup._resizable = true;
|
||||
}
|
||||
this._isOpen = false;
|
||||
base.OnClosed(e);
|
||||
}
|
||||
|
||||
[SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.UnmanagedCode)]
|
||||
protected override void WndProc(ref Message m)
|
||||
{
|
||||
if (!this.InternalProcessResizing(ref m, false))
|
||||
{
|
||||
base.WndProc(ref m);
|
||||
}
|
||||
}
|
||||
|
||||
[SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.UnmanagedCode)]
|
||||
public bool ProcessResizing(ref Message m)
|
||||
{
|
||||
return this.InternalProcessResizing(ref m, true);
|
||||
}
|
||||
|
||||
[SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.UnmanagedCode)]
|
||||
private bool InternalProcessResizing(ref Message m, bool contentControl)
|
||||
{
|
||||
if (m.Msg == 134 && m.WParam != IntPtr.Zero && this.childPopup != null && this.childPopup.Visible)
|
||||
{
|
||||
this.childPopup.Hide();
|
||||
}
|
||||
bool result;
|
||||
if (!this.Resizable)
|
||||
{
|
||||
result = false;
|
||||
}
|
||||
else if (m.Msg == 132)
|
||||
{
|
||||
result = this.OnNcHitTest(ref m, contentControl);
|
||||
}
|
||||
else
|
||||
{
|
||||
result = (m.Msg == 36 && this.OnGetMinMaxInfo(ref m));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
[SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.UnmanagedCode)]
|
||||
private bool OnGetMinMaxInfo(ref Message m)
|
||||
{
|
||||
UnsafeMethods.MINMAXINFO minmaxinfo = (UnsafeMethods.MINMAXINFO)Marshal.PtrToStructure(m.LParam, typeof(UnsafeMethods.MINMAXINFO));
|
||||
minmaxinfo.maxTrackSize = this.MaximumSize;
|
||||
minmaxinfo.minTrackSize = this.MinimumSize;
|
||||
Marshal.StructureToPtr(minmaxinfo, m.LParam, false);
|
||||
return true;
|
||||
}
|
||||
|
||||
private bool OnNcHitTest(ref Message m, bool contentControl)
|
||||
{
|
||||
int x = UnsafeMethods.LOWORD(m.LParam);
|
||||
int y = UnsafeMethods.HIWORD(m.LParam);
|
||||
Point pt = base.PointToClient(new Point(x, y));
|
||||
GripBounds gripBounds = new GripBounds(contentControl ? this.content.ClientRectangle : base.ClientRectangle);
|
||||
IntPtr intPtr = new IntPtr(-1);
|
||||
if (this.resizableTop)
|
||||
{
|
||||
if (this.resizableLeft && gripBounds.TopLeft.Contains(pt))
|
||||
{
|
||||
m.Result = (contentControl ? intPtr : ((IntPtr)13));
|
||||
return true;
|
||||
}
|
||||
if (!this.resizableLeft && gripBounds.TopRight.Contains(pt))
|
||||
{
|
||||
m.Result = (contentControl ? intPtr : ((IntPtr)14));
|
||||
return true;
|
||||
}
|
||||
if (gripBounds.Top.Contains(pt))
|
||||
{
|
||||
m.Result = (contentControl ? intPtr : ((IntPtr)12));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (this.resizableLeft && gripBounds.BottomLeft.Contains(pt))
|
||||
{
|
||||
m.Result = (contentControl ? intPtr : ((IntPtr)16));
|
||||
return true;
|
||||
}
|
||||
if (!this.resizableLeft && gripBounds.BottomRight.Contains(pt))
|
||||
{
|
||||
m.Result = (contentControl ? intPtr : ((IntPtr)17));
|
||||
return true;
|
||||
}
|
||||
if (gripBounds.Bottom.Contains(pt))
|
||||
{
|
||||
m.Result = (contentControl ? intPtr : ((IntPtr)15));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
bool result;
|
||||
if (this.resizableLeft && gripBounds.Left.Contains(pt))
|
||||
{
|
||||
m.Result = (contentControl ? intPtr : ((IntPtr)10));
|
||||
result = true;
|
||||
}
|
||||
else if (!this.resizableLeft && gripBounds.Right.Contains(pt))
|
||||
{
|
||||
m.Result = (contentControl ? intPtr : ((IntPtr)11));
|
||||
result = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
result = false;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public void PaintSizeGrip(PaintEventArgs e)
|
||||
{
|
||||
if (e != null && e.Graphics != null && this.resizable)
|
||||
{
|
||||
Size clientSize = this.content.ClientSize;
|
||||
using (Bitmap bitmap = new Bitmap(16, 16))
|
||||
{
|
||||
using (Graphics graphics = Graphics.FromImage(bitmap))
|
||||
{
|
||||
if (Application.RenderWithVisualStyles)
|
||||
{
|
||||
if (this.sizeGripRenderer == null)
|
||||
{
|
||||
this.sizeGripRenderer = new VisualStyleRenderer(VisualStyleElement.Status.Gripper.Normal);
|
||||
}
|
||||
this.sizeGripRenderer.DrawBackground(graphics, new Rectangle(0, 0, 16, 16));
|
||||
}
|
||||
else
|
||||
{
|
||||
ControlPaint.DrawSizeGrip(graphics, this.content.BackColor, 0, 0, 16, 16);
|
||||
}
|
||||
}
|
||||
GraphicsState gstate = e.Graphics.Save();
|
||||
e.Graphics.ResetTransform();
|
||||
if (this.resizableTop)
|
||||
{
|
||||
if (this.resizableLeft)
|
||||
{
|
||||
e.Graphics.RotateTransform(180f);
|
||||
e.Graphics.TranslateTransform((float)(-(float)clientSize.Width), (float)(-(float)clientSize.Height));
|
||||
}
|
||||
else
|
||||
{
|
||||
e.Graphics.ScaleTransform(1f, -1f);
|
||||
e.Graphics.TranslateTransform(0f, (float)(-(float)clientSize.Height));
|
||||
}
|
||||
}
|
||||
else if (this.resizableLeft)
|
||||
{
|
||||
e.Graphics.ScaleTransform(-1f, 1f);
|
||||
e.Graphics.TranslateTransform((float)(-(float)clientSize.Width), 0f);
|
||||
}
|
||||
e.Graphics.DrawImage(bitmap, clientSize.Width - 16, clientSize.Height - 16 + 1, 16, 16);
|
||||
e.Graphics.Restore(gstate);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private const int frames = 5;
|
||||
|
||||
private const int totalduration = 100;
|
||||
|
||||
private const int frameduration = 20;
|
||||
|
||||
private Control content;
|
||||
|
||||
private bool fade;
|
||||
|
||||
private bool focusOnOpen = true;
|
||||
|
||||
private bool acceptAlt = true;
|
||||
|
||||
private Popup ownerPopup;
|
||||
|
||||
private Popup childPopup;
|
||||
|
||||
private bool _resizable;
|
||||
|
||||
private bool resizable;
|
||||
|
||||
private ToolStripControlHost host;
|
||||
|
||||
private Size minSize;
|
||||
|
||||
private Size maxSize;
|
||||
|
||||
private bool _isOpen;
|
||||
|
||||
private bool resizableTop;
|
||||
|
||||
private bool resizableLeft;
|
||||
|
||||
private VisualStyleRenderer sizeGripRenderer;
|
||||
}
|
||||
}
|
||||
#endif
|
180
DH.RBAC/Utility/PopupTool/UnsafeMethods.cs
Normal file
@ -0,0 +1,180 @@
|
||||
#if NETFRAMEWORK || WINDOWS
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
internal class UnsafeMethods
|
||||
{
|
||||
[DllImport("user32.dll")]
|
||||
public static extern IntPtr GetWindowDC(IntPtr hWnd);
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
public static extern int ReleaseDC(IntPtr hwnd, IntPtr hDC);
|
||||
|
||||
[DllImport("user32")]
|
||||
public static extern bool TrackMouseEvent(ref UnsafeMethods.TRACKMOUSEEVENT lpEventTrack);
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
public static extern bool SendMessage(IntPtr hWnd, int Msg, IntPtr wParam, IntPtr lParam);
|
||||
|
||||
internal static int HIWORD(int n)
|
||||
{
|
||||
return n >> 16 & 65535;
|
||||
}
|
||||
|
||||
internal static int HIWORD(IntPtr n)
|
||||
{
|
||||
return UnsafeMethods.HIWORD((int)((long)n));
|
||||
}
|
||||
|
||||
internal static int LOWORD(int n)
|
||||
{
|
||||
return n & 65535;
|
||||
}
|
||||
|
||||
internal static int LOWORD(IntPtr n)
|
||||
{
|
||||
return UnsafeMethods.LOWORD((int)((long)n));
|
||||
}
|
||||
|
||||
public const int WM_LBUTTONDOWN = 513;
|
||||
|
||||
public const int WM_RBUTTONDOWN = 516;
|
||||
|
||||
public const int WM_MBUTTONDOWN = 519;
|
||||
|
||||
public const int WM_NCLBUTTONDOWN = 161;
|
||||
|
||||
public const int WM_NCRBUTTONDOWN = 164;
|
||||
|
||||
public const int WM_NCMBUTTONDOWN = 167;
|
||||
|
||||
public const int WM_NCCALCSIZE = 131;
|
||||
|
||||
public const int WM_NCHITTEST = 132;
|
||||
|
||||
public const int WM_NCPAINT = 133;
|
||||
|
||||
public const int WM_NCACTIVATE = 134;
|
||||
|
||||
public const int WM_MOUSELEAVE = 675;
|
||||
|
||||
public const int WS_EX_NOACTIVATE = 134217728;
|
||||
|
||||
public const int HTTRANSPARENT = -1;
|
||||
|
||||
public const int HTLEFT = 10;
|
||||
|
||||
public const int HTRIGHT = 11;
|
||||
|
||||
public const int HTTOP = 12;
|
||||
|
||||
public const int HTTOPLEFT = 13;
|
||||
|
||||
public const int HTTOPRIGHT = 14;
|
||||
|
||||
public const int HTBOTTOM = 15;
|
||||
|
||||
public const int HTBOTTOMLEFT = 16;
|
||||
|
||||
public const int HTBOTTOMRIGHT = 17;
|
||||
|
||||
public const int WM_USER = 1024;
|
||||
|
||||
public const int WM_REFLECT = 8192;
|
||||
|
||||
public const int WM_COMMAND = 273;
|
||||
|
||||
public const int CBN_DROPDOWN = 7;
|
||||
|
||||
public const int WM_GETMINMAXINFO = 36;
|
||||
|
||||
public static readonly IntPtr TRUE = new IntPtr(1);
|
||||
|
||||
public static readonly IntPtr FALSE = new IntPtr(0);
|
||||
|
||||
public enum TrackerEventFlags : uint
|
||||
{
|
||||
TME_HOVER = 1U,
|
||||
TME_LEAVE,
|
||||
TME_QUERY = 1073741824U,
|
||||
TME_CANCEL = 2147483648U
|
||||
}
|
||||
internal struct TRACKMOUSEEVENT
|
||||
{
|
||||
public uint cbSize;
|
||||
|
||||
public uint dwFlags;
|
||||
|
||||
public IntPtr hwndTrack;
|
||||
|
||||
public uint dwHoverTime;
|
||||
}
|
||||
|
||||
internal struct MINMAXINFO
|
||||
{
|
||||
public Point reserved;
|
||||
|
||||
public Size maxSize;
|
||||
|
||||
public Point maxPosition;
|
||||
|
||||
public Size minTrackSize;
|
||||
|
||||
public Size maxTrackSize;
|
||||
}
|
||||
|
||||
internal struct RECT
|
||||
{
|
||||
public RECT(int left, int top, int right, int bottom)
|
||||
{
|
||||
this.left = left;
|
||||
this.top = top;
|
||||
this.right = right;
|
||||
this.bottom = bottom;
|
||||
}
|
||||
|
||||
public Rectangle Rect
|
||||
{
|
||||
get
|
||||
{
|
||||
return new Rectangle(this.left, this.top, this.right - this.left, this.bottom - this.top);
|
||||
}
|
||||
}
|
||||
|
||||
public static UnsafeMethods.RECT FromXYWH(int x, int y, int width, int height)
|
||||
{
|
||||
return new UnsafeMethods.RECT(x, y, x + width, y + height);
|
||||
}
|
||||
|
||||
public static UnsafeMethods.RECT FromRectangle(Rectangle rect)
|
||||
{
|
||||
return new UnsafeMethods.RECT(rect.Left, rect.Top, rect.Right, rect.Bottom);
|
||||
}
|
||||
|
||||
public int left;
|
||||
public int top;
|
||||
public int right;
|
||||
public int bottom;
|
||||
}
|
||||
|
||||
internal struct WINDOWPOS
|
||||
{
|
||||
internal IntPtr hwnd;
|
||||
internal IntPtr hWndInsertAfter;
|
||||
internal int x;
|
||||
internal int y;
|
||||
internal int cx;
|
||||
internal int cy;
|
||||
internal uint flags;
|
||||
}
|
||||
|
||||
public struct NCCALCSIZE_PARAMS
|
||||
{
|
||||
public UnsafeMethods.RECT rectProposed;
|
||||
public UnsafeMethods.RECT rectBeforeMove;
|
||||
public UnsafeMethods.RECT rectClientBeforeMove;
|
||||
public UnsafeMethods.WINDOWPOS lpPos;
|
||||
}
|
||||
}
|
||||
#endif
|
63
DH.RBAC/Views/DefaultPage.Designer.cs
generated
Normal file
@ -0,0 +1,63 @@
|
||||
namespace DH.RBAC.Page
|
||||
{
|
||||
partial class DefaultPage
|
||||
{
|
||||
/// <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.uiLabel1 = new Sunny.UI.UILabel();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// uiLabel1
|
||||
//
|
||||
this.uiLabel1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
this.uiLabel1.Location = new System.Drawing.Point(172, 108);
|
||||
this.uiLabel1.Name = "uiLabel1";
|
||||
this.uiLabel1.Size = new System.Drawing.Size(600, 128);
|
||||
this.uiLabel1.Style = Sunny.UI.UIStyle.Custom;
|
||||
this.uiLabel1.TabIndex = 0;
|
||||
this.uiLabel1.Text = "这是默认页面,你想放啥都行";
|
||||
this.uiLabel1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// DefaultPage
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 27F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(241)))), ((int)(((byte)(243)))));
|
||||
this.ClientSize = new System.Drawing.Size(1440, 620);
|
||||
this.Controls.Add(this.uiLabel1);
|
||||
this.Name = "DefaultPage";
|
||||
|
||||
this.Text = "EmptyPage";
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private Sunny.UI.UILabel uiLabel1;
|
||||
}
|
||||
}
|
21
DH.RBAC/Views/DefaultPage.cs
Normal file
@ -0,0 +1,21 @@
|
||||
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
|
||||
{
|
||||
public partial class DefaultPage : MyPage
|
||||
{
|
||||
public DefaultPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
60
DH.RBAC/Views/DefaultPage.resx
Normal file
@ -0,0 +1,60 @@
|
||||
<root>
|
||||
<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>
|
||||
</root>
|
48
DH.RBAC/Views/EmptyPage.Designer.cs
generated
Normal file
@ -0,0 +1,48 @@
|
||||
namespace DH.RBAC.Page
|
||||
{
|
||||
partial class EmptyPage
|
||||
{
|
||||
/// <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.SuspendLayout();
|
||||
//
|
||||
// EmptyPage
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 27F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(241)))), ((int)(((byte)(243)))));
|
||||
this.ClientSize = new System.Drawing.Size(1150, 637);
|
||||
this.Name = "EmptyPage";
|
||||
|
||||
this.Text = "EmptyPage";
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
26
DH.RBAC/Views/EmptyPage.cs
Normal file
@ -0,0 +1,26 @@
|
||||
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
|
||||
{
|
||||
public partial class EmptyPage : MyPage
|
||||
{
|
||||
public EmptyPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public override void Stop()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
120
DH.RBAC/Views/EmptyPage.resx
Normal file
@ -0,0 +1,120 @@
|
||||
<?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>
|
||||
</root>
|
91
DH.RBAC/Views/MyPage.cs
Normal file
@ -0,0 +1,91 @@
|
||||
using AntdUI;
|
||||
using DH.RBAC.Model.Sys;
|
||||
using Sunny.UI;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace DH.RBAC.Page
|
||||
{
|
||||
public class MyPage : UserControl
|
||||
{
|
||||
public virtual void Stop() { }
|
||||
|
||||
public List<SysPermission> ButtonPermissionList
|
||||
{
|
||||
set
|
||||
{
|
||||
List<SysPermission> list = value;
|
||||
SetPermission(list, this.Controls);
|
||||
}
|
||||
}
|
||||
|
||||
private void SetPermission(List<SysPermission> list, Control.ControlCollection controls)
|
||||
{
|
||||
foreach (Control control in controls)
|
||||
{
|
||||
if (control.HasChildren)
|
||||
{
|
||||
SetPermission(list, control.Controls);
|
||||
continue;
|
||||
}
|
||||
if (control is AntdUI.Button)
|
||||
{
|
||||
AntdUI.Button button = (AntdUI.Button)control;
|
||||
object tag = button.Tag;
|
||||
if (tag == null)
|
||||
continue;
|
||||
string strTag = tag as string;
|
||||
if (strTag == null)
|
||||
continue;
|
||||
SysPermission permission = list.Where(it => it.EnCode == strTag).FirstOrDefault();
|
||||
if (permission == null)
|
||||
continue;
|
||||
button.Visible = true;
|
||||
continue;
|
||||
}
|
||||
if (control is UISymbolButton)
|
||||
{
|
||||
UISymbolButton button = (UISymbolButton)control;
|
||||
object tag = button.Tag;
|
||||
if (tag == null)
|
||||
continue;
|
||||
string strTag = tag as string;
|
||||
if (strTag == null)
|
||||
continue;
|
||||
SysPermission permission = list.Where(it => it.EnCode == strTag).FirstOrDefault();
|
||||
if (permission == null)
|
||||
continue;
|
||||
button.Visible = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// MyPage
|
||||
//
|
||||
this.Size = new System.Drawing.Size(1150, 637);
|
||||
this.Name = "MyPage";
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class PageCodeAttribute : Attribute
|
||||
{
|
||||
public string Encode { get; set; }
|
||||
public PageCodeAttribute() { }
|
||||
public PageCodeAttribute(string encode)
|
||||
{
|
||||
this.Encode = encode;
|
||||
}
|
||||
}
|
||||
}
|
60
DH.RBAC/Views/MyPage.resx
Normal file
@ -0,0 +1,60 @@
|
||||
<root>
|
||||
<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>
|
||||
</root>
|
146
DH.RBAC/Views/Sys/BaseSubForm.Designer.cs
generated
Normal 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;
|
||||
}
|
||||
}
|
71
DH.RBAC/Views/Sys/BaseSubForm.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
1161
DH.RBAC/Views/Sys/BaseSubForm.resx
Normal file
706
DH.RBAC/Views/Sys/Organize/AddOrganizeForm.Designer.cs
generated
Normal 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;
|
||||
}
|
||||
}
|
226
DH.RBAC/Views/Sys/Organize/AddOrganizeForm.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
1161
DH.RBAC/Views/Sys/Organize/AddOrganizeForm.resx
Normal file
424
DH.RBAC/Views/Sys/Organize/OrganizePage.Designer.cs
generated
Normal 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;
|
||||
}
|
||||
}
|