lg
2024-09-08 65927056612a7ffef20708aefda33d09be51ef6b
权限整理
已修改31个文件
已添加7个文件
3710 ■■■■■ 文件已修改
DevApp/Gs.DevApp/App.config 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/DevFrm/FrmLogin.Designer.cs 69 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/DevFrm/FrmLogin.cs 56 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/DevFrm/FrmMain.Designer.cs 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/DevFrm/FrmMain.cs 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/DevFrm/Sys/EasyCode.Designer.cs 233 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/DevFrm/Sys/EasyCode.cs 293 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/DevFrm/Sys/EasyCode.resx 120 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/DevFrm/Sys/FileSelector.cs 125 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/DevFrm/User/Organization.Designer.cs 120 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/DevFrm/User/Organization.cs 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/DevFrm/User/Organization.resx 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/DevFrm/User/Role.Designer.cs 86 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/DevFrm/User/Role.cs 101 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/DevFrm/User/Role.resx 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/DevFrm/User/SysMenu.Designer.cs 135 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/DevFrm/User/SysMenu.cs 98 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/DevFrm/User/SysMenu.resx 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/DevFrm/User/User.Designer.cs 208 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/DevFrm/User/User.cs 93 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/DevFrm/User/User.resx 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/DevFrm/User/UserSelectRole.Designer.cs 141 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/DevFrm/User/UserSelectRole.cs 167 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/DevFrm/User/UserSelectRole.resx 120 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/Gs.DevApp.csproj 32 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/Program.cs 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/Properties/Resources.resx 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/Properties/Resources1.Designer.cs 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/Properties/Settings.Designer.cs 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/Properties/Settings.settings 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/Properties/licenses.licx 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/TestForm/TEST.Designer.cs 782 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/TestForm/TEST.cs 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/TestForm/XtraForm1.Designer.cs 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs 124 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/UserControl/ToolBarMenu.Designer.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/UserControl/ToolBarMenu.cs 94 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/UserControl/ToolBarMenu.resx 118 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/App.config
@@ -4,7 +4,10 @@
        <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System">
            <section name="DevExpress.LookAndFeel.Design.AppSettings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
        </sectionGroup>
    </configSections>
     <sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
   <section name="Gs.DevApp.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
  </sectionGroup>
 </configSections>
    <applicationSettings>
        <DevExpress.LookAndFeel.Design.AppSettings>
            <setting name="DPIAwarenessMode" serializeAs="String">
@@ -24,4 +27,20 @@
        <add key="ProductName" value="广深科技 G-MES V2.0"/>
        <add key="PageSize" value="50"/>
    </appSettings>
 <userSettings>
  <Gs.DevApp.Properties.Settings>
   <setting name="userName" serializeAs="String">
    <value />
   </setting>
   <setting name="userPwd" serializeAs="String">
    <value />
   </setting>
   <setting name="remember" serializeAs="String">
    <value>False</value>
   </setting>
   <setting name="orgguid" serializeAs="String">
    <value />
   </setting>
  </Gs.DevApp.Properties.Settings>
 </userSettings>
</configuration>
DevApp/Gs.DevApp/DevFrm/FrmLogin.Designer.cs
@@ -34,17 +34,16 @@
            this.panel1 = new System.Windows.Forms.Panel();
            this.comOrg = new System.Windows.Forms.ComboBox();
            this.txtUser = new DevExpress.XtraEditors.TextEdit();
            this.chkSaveLoginInfo = new DevExpress.XtraEditors.CheckEdit();
            this.ckRemember = new DevExpress.XtraEditors.CheckEdit();
            this.txtPwd = new DevExpress.XtraEditors.TextEdit();
            this.btnCancel = new DevExpress.XtraEditors.SimpleButton();
            this.labelControl3 = new DevExpress.XtraEditors.LabelControl();
            this.btnLogin = new DevExpress.XtraEditors.SimpleButton();
            this.labelControl2 = new DevExpress.XtraEditors.LabelControl();
            this.labelControl1 = new DevExpress.XtraEditors.LabelControl();
            this.lblLoadingInfo = new System.Windows.Forms.Label();
            this.panel1.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.txtUser.Properties)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.chkSaveLoginInfo.Properties)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.ckRemember.Properties)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.txtPwd.Properties)).BeginInit();
            this.SuspendLayout();
            // 
@@ -64,14 +63,14 @@
            this.panel1.BackColor = System.Drawing.Color.Transparent;
            this.panel1.Controls.Add(this.comOrg);
            this.panel1.Controls.Add(this.txtUser);
            this.panel1.Controls.Add(this.chkSaveLoginInfo);
            this.panel1.Controls.Add(this.ckRemember);
            this.panel1.Controls.Add(this.txtPwd);
            this.panel1.Controls.Add(this.btnCancel);
            this.panel1.Controls.Add(this.labelControl3);
            this.panel1.Controls.Add(this.btnLogin);
            this.panel1.Controls.Add(this.labelControl2);
            this.panel1.Controls.Add(this.labelControl1);
            this.panel1.Font = new System.Drawing.Font("Tahoma", 9F);
            this.panel1.Font = new System.Drawing.Font("Tahoma", 10F);
            this.panel1.Location = new System.Drawing.Point(218, 465);
            this.panel1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
            this.panel1.Name = "panel1";
@@ -81,15 +80,16 @@
            // comOrg
            // 
            this.comOrg.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.comOrg.Font = new System.Drawing.Font("Tahoma", 10F);
            this.comOrg.FormattingEnabled = true;
            this.comOrg.Location = new System.Drawing.Point(100, 89);
            this.comOrg.Location = new System.Drawing.Point(101, 97);
            this.comOrg.Name = "comOrg";
            this.comOrg.Size = new System.Drawing.Size(156, 26);
            this.comOrg.Size = new System.Drawing.Size(156, 29);
            this.comOrg.TabIndex = 245;
            // 
            // txtUser
            // 
            this.txtUser.EditValue = "admin";
            this.txtUser.EditValue = "";
            this.txtUser.Location = new System.Drawing.Point(102, 9);
            this.txtUser.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
            this.txtUser.Name = "txtUser";
@@ -99,22 +99,24 @@
            this.txtUser.Size = new System.Drawing.Size(154, 30);
            this.txtUser.TabIndex = 21;
            // 
            // chkSaveLoginInfo
            // ckRemember
            // 
            this.chkSaveLoginInfo.Location = new System.Drawing.Point(102, 139);
            this.chkSaveLoginInfo.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
            this.chkSaveLoginInfo.Name = "chkSaveLoginInfo";
            this.chkSaveLoginInfo.Properties.Appearance.ForeColor = System.Drawing.Color.Black;
            this.chkSaveLoginInfo.Properties.Appearance.Options.UseForeColor = true;
            this.chkSaveLoginInfo.Properties.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.UltraFlat;
            this.chkSaveLoginInfo.Properties.Caption = "保存登录信息";
            this.chkSaveLoginInfo.Size = new System.Drawing.Size(157, 26);
            this.chkSaveLoginInfo.TabIndex = 17;
            this.ckRemember.Location = new System.Drawing.Point(102, 139);
            this.ckRemember.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
            this.ckRemember.Name = "ckRemember";
            this.ckRemember.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 10F);
            this.ckRemember.Properties.Appearance.ForeColor = System.Drawing.Color.Black;
            this.ckRemember.Properties.Appearance.Options.UseFont = true;
            this.ckRemember.Properties.Appearance.Options.UseForeColor = true;
            this.ckRemember.Properties.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.UltraFlat;
            this.ckRemember.Properties.Caption = "保存登录信息";
            this.ckRemember.Size = new System.Drawing.Size(157, 27);
            this.ckRemember.TabIndex = 17;
            // 
            // txtPwd
            // 
            this.txtPwd.EditValue = "123456";
            this.txtPwd.Location = new System.Drawing.Point(102, 52);
            this.txtPwd.EditValue = "";
            this.txtPwd.Location = new System.Drawing.Point(102, 53);
            this.txtPwd.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
            this.txtPwd.Name = "txtPwd";
            this.txtPwd.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 10F);
@@ -126,6 +128,8 @@
            // 
            // btnCancel
            // 
            this.btnCancel.Appearance.Font = new System.Drawing.Font("Tahoma", 10F);
            this.btnCancel.Appearance.Options.UseFont = true;
            this.btnCancel.ButtonStyle = DevExpress.XtraEditors.Controls.BorderStyles.HotFlat;
            this.btnCancel.Cursor = System.Windows.Forms.Cursors.Hand;
            this.btnCancel.ImageOptions.Image = ((System.Drawing.Image)(resources.GetObject("btnCancel.ImageOptions.Image")));
@@ -138,12 +142,14 @@
            // 
            // labelControl3
            // 
            this.labelControl3.Appearance.Font = new System.Drawing.Font("Tahoma", 10F);
            this.labelControl3.Appearance.ForeColor = System.Drawing.Color.Black;
            this.labelControl3.Appearance.Options.UseFont = true;
            this.labelControl3.Appearance.Options.UseForeColor = true;
            this.labelControl3.Appearance.Options.UseTextOptions = true;
            this.labelControl3.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far;
            this.labelControl3.AutoSizeMode = DevExpress.XtraEditors.LabelAutoSizeMode.None;
            this.labelControl3.Location = new System.Drawing.Point(6, 97);
            this.labelControl3.Location = new System.Drawing.Point(6, 102);
            this.labelControl3.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
            this.labelControl3.Name = "labelControl3";
            this.labelControl3.Size = new System.Drawing.Size(93, 18);
@@ -152,6 +158,8 @@
            // 
            // btnLogin
            // 
            this.btnLogin.Appearance.Font = new System.Drawing.Font("Tahoma", 10F);
            this.btnLogin.Appearance.Options.UseFont = true;
            this.btnLogin.ButtonStyle = DevExpress.XtraEditors.Controls.BorderStyles.HotFlat;
            this.btnLogin.Cursor = System.Windows.Forms.Cursors.Hand;
            this.btnLogin.ImageOptions.Image = ((System.Drawing.Image)(resources.GetObject("btnLogin.ImageOptions.Image")));
@@ -171,7 +179,7 @@
            this.labelControl2.Appearance.Options.UseTextOptions = true;
            this.labelControl2.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far;
            this.labelControl2.AutoSizeMode = DevExpress.XtraEditors.LabelAutoSizeMode.None;
            this.labelControl2.Location = new System.Drawing.Point(6, 58);
            this.labelControl2.Location = new System.Drawing.Point(6, 59);
            this.labelControl2.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
            this.labelControl2.Name = "labelControl2";
            this.labelControl2.Size = new System.Drawing.Size(93, 18);
@@ -194,17 +202,6 @@
            this.labelControl1.TabIndex = 231;
            this.labelControl1.Text = "登录帐号:";
            // 
            // lblLoadingInfo
            //
            this.lblLoadingInfo.AutoSize = true;
            this.lblLoadingInfo.BackColor = System.Drawing.Color.Transparent;
            this.lblLoadingInfo.ForeColor = System.Drawing.Color.White;
            this.lblLoadingInfo.Location = new System.Drawing.Point(215, 444);
            this.lblLoadingInfo.Name = "lblLoadingInfo";
            this.lblLoadingInfo.Size = new System.Drawing.Size(83, 18);
            this.lblLoadingInfo.TabIndex = 242;
            this.lblLoadingInfo.Text = "准备就绪...";
            //
            // FrmLogin
            // 
            this.Appearance.BackColor = System.Drawing.Color.Black;
@@ -216,7 +213,6 @@
            this.ClientSize = new System.Drawing.Size(782, 806);
            this.Controls.Add(this.lbVersion);
            this.Controls.Add(this.panel1);
            this.Controls.Add(this.lblLoadingInfo);
            this.DoubleBuffered = true;
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
            this.MaximizeBox = false;
@@ -225,7 +221,7 @@
            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
            this.panel1.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.txtUser.Properties)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.chkSaveLoginInfo.Properties)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.ckRemember.Properties)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.txtPwd.Properties)).EndInit();
            this.ResumeLayout(false);
            this.PerformLayout();
@@ -237,14 +233,13 @@
        private System.Windows.Forms.Label lbVersion;
        private System.Windows.Forms.Panel panel1;
        private DevExpress.XtraEditors.TextEdit txtUser;
        private DevExpress.XtraEditors.CheckEdit chkSaveLoginInfo;
        private DevExpress.XtraEditors.CheckEdit ckRemember;
        private DevExpress.XtraEditors.TextEdit txtPwd;
        private DevExpress.XtraEditors.SimpleButton btnCancel;
        private DevExpress.XtraEditors.LabelControl labelControl3;
        private DevExpress.XtraEditors.SimpleButton btnLogin;
        private DevExpress.XtraEditors.LabelControl labelControl2;
        private DevExpress.XtraEditors.LabelControl labelControl1;
        private System.Windows.Forms.Label lblLoadingInfo;
        private System.Windows.Forms.ComboBox comOrg;
    }
}
DevApp/Gs.DevApp/DevFrm/FrmLogin.cs
@@ -16,13 +16,15 @@
            this.Text = lbVersion.Text = System.Configuration.ConfigurationSettings.AppSettings.Get("ProductName").ToString();
            btnLogin.Click += BtnLogin_Click;
            btnCancel.Click += BtnCancel_Click;
            UtilityHelper.SetFont(panel1);
            getTree();
            getRemember();
        }
        /// <summary>
        /// è¯»å–组织
        /// </summary>
        private void getTree()
        {
            Models.PageQueryModel pgq = new Models.PageQueryModel(1, 999999, "factory", "asc", "", "and upGuid is not null");
            Models.PageQueryModel pgq = new Models.PageQueryModel(1, 999999, "factory", "asc", "", "and status=1");
            string json = JsonConvert.SerializeObject(pgq);
            string strReturn = "";
            try
@@ -30,18 +32,15 @@
                strReturn = UtilityHelper.HttpPost("", "Organization/GetListPage", json);
                ReturnModel<PageListModel> rtn = UtilityHelper.GetTableByJson(strReturn);
                DataTable dt = rtn.rtnData.list;
                DataRow newRow = dt.NewRow();
                newRow["guid"] = "00000000-0000-0000-0000-000000000000";
                newRow["name"] = "-请选择-";
                dt.Rows.Add(newRow);
                comOrg.DataSource = dt;
                comOrg.DisplayMember = "name";
                comOrg.ValueMember = "guid";
                comOrg.SelectedIndex = dt.Rows.Count - 1;
                comOrg.SelectedIndex = 0;
            }
            catch (Exception ex)
            {
                ToolBox.MsgHelper.Warning("提示:" + ex.Message);
                this.Close();
            }
        }
        private void BtnCancel_Click(object sender, EventArgs e)
@@ -54,11 +53,29 @@
        private void BtnLogin_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(txtUser.Text.Trim()))
            {
                Gs.DevApp.ToolBox.MsgHelper.Warning("登录账号不能为空!");
                txtUser.Focus();
                return;
            }
            if (string.IsNullOrEmpty(txtPwd.Text.Trim()))
            {
                Gs.DevApp.ToolBox.MsgHelper.Warning("密码不能为空!");
                txtUser.Focus();
                return;
            }
            if (comOrg.SelectedValue == null || string.IsNullOrEmpty(comOrg.SelectedValue.ToString().Trim()))
            {
                Gs.DevApp.ToolBox.MsgHelper.Warning("组织机构不能为空!");
                txtUser.Focus();
                return;
            }
            var _obj = new
            {
                accountPwd = txtPwd.Text.Trim(),
                accountNo = txtUser.Text.Trim(),
                orgGuid = comOrg.SelectedValue
                orgGuid = comOrg.SelectedValue.ToString().Trim()
            };
            try
            {
@@ -67,6 +84,11 @@
                JObject _login = _rtn.rtnData;
                if (_rtn.rtnCode > 0)
                {
                    Properties.Settings.Default.userName = (ckRemember.Checked ? txtUser.Text.Trim() : "");
                    Properties.Settings.Default.userPwd = (ckRemember.Checked ? txtPwd.Text.Trim() : "");
                    Properties.Settings.Default.orgguid = (ckRemember.Checked ? comOrg.SelectedValue.ToString() : "");
                    Properties.Settings.Default.remember = ckRemember.Checked;
                    Properties.Settings.Default.Save();
                    LoginInfoModel.CurrentUser.LoginUserGuid = _login["loginGuid"].ToString();
                    LoginInfoModel.CurrentUser.LoginOrgGuid = _login["loginOrgGuid"].ToString();
                    LoginInfoModel.CurrentUser.LoginTime = DateTime.Now.ToString("yyyy-MM-dd hh:mm");
@@ -81,10 +103,22 @@
            }
            catch (Exception ex)
            {
                this.DialogResult = DialogResult.Cancel;
                ToolBox.MsgHelper.Warning("提示:" + ex.Message);
                return;
            }
        }
        /// <summary>
        /// è¯»å–记住密码
        /// </summary>
        private void getRemember()
        {
            if (Properties.Settings.Default.remember)
            {
                txtUser.Text = Properties.Settings.Default.userName;
                txtPwd.Text = Properties.Settings.Default.userPwd;
                comOrg.SelectedValue = Properties.Settings.Default.orgguid;
                ckRemember.Checked = true;
            }
        }
    }
}
DevApp/Gs.DevApp/DevFrm/FrmMain.Designer.cs
@@ -32,6 +32,7 @@
            this.components = new System.ComponentModel.Container();
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmMain));
            this.fluentDesignFormContainer1 = new DevExpress.XtraBars.FluentDesignSystem.FluentDesignFormContainer();
            this.tab = new DevExpress.XtraTab.XtraTabControl();
            this.statusStrip1 = new System.Windows.Forms.StatusStrip();
            this.toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel();
            this.tooLoading = new System.Windows.Forms.ToolStripStatusLabel();
@@ -40,7 +41,6 @@
            this.toolStripStatusLabel2 = new System.Windows.Forms.ToolStripStatusLabel();
            this.toolStripStatusLabel5 = new System.Windows.Forms.ToolStripStatusLabel();
            this.toolTime = new System.Windows.Forms.ToolStripStatusLabel();
            this.tab = new DevExpress.XtraTab.XtraTabControl();
            this.fluentDesignFormControl1 = new DevExpress.XtraBars.FluentDesignSystem.FluentDesignFormControl();
            this.barButtonItem1 = new DevExpress.XtraBars.BarButtonItem();
            this.barCheckItem1 = new DevExpress.XtraBars.BarCheckItem();
@@ -74,10 +74,9 @@
            this.barButtonItem5 = new DevExpress.XtraBars.BarButtonItem();
            this.fluentFormDefaultManager1 = new DevExpress.XtraBars.FluentDesignSystem.FluentFormDefaultManager(this.components);
            this.acrd = new DevExpress.XtraBars.Navigation.AccordionControl();
            this.accordionControlElement1 = new DevExpress.XtraBars.Navigation.AccordionControlElement();
            this.fluentDesignFormContainer1.SuspendLayout();
            this.statusStrip1.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.tab)).BeginInit();
            this.statusStrip1.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.fluentDesignFormControl1)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.fluentFormDefaultManager1)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.acrd)).BeginInit();
@@ -92,6 +91,17 @@
            this.fluentDesignFormContainer1.Name = "fluentDesignFormContainer1";
            this.fluentDesignFormContainer1.Size = new System.Drawing.Size(806, 727);
            this.fluentDesignFormContainer1.TabIndex = 0;
            //
            // tab
            //
            this.tab.Appearance.Font = new System.Drawing.Font("Tahoma", 10F);
            this.tab.Appearance.Options.UseFont = true;
            this.tab.ClosePageButtonShowMode = DevExpress.XtraTab.ClosePageButtonShowMode.InActiveTabPageHeader;
            this.tab.Dock = System.Windows.Forms.DockStyle.Fill;
            this.tab.Location = new System.Drawing.Point(0, 0);
            this.tab.Name = "tab";
            this.tab.Size = new System.Drawing.Size(806, 701);
            this.tab.TabIndex = 4;
            // 
            // statusStrip1
            // 
@@ -153,17 +163,6 @@
            this.toolTime.Name = "toolTime";
            this.toolTime.Size = new System.Drawing.Size(89, 20);
            this.toolTime.Text = "登录时间";
            //
            // tab
            //
            this.tab.Appearance.Font = new System.Drawing.Font("Tahoma", 10F);
            this.tab.Appearance.Options.UseFont = true;
            this.tab.ClosePageButtonShowMode = DevExpress.XtraTab.ClosePageButtonShowMode.InActiveTabPageHeader;
            this.tab.Dock = System.Windows.Forms.DockStyle.Fill;
            this.tab.Location = new System.Drawing.Point(0, 0);
            this.tab.Name = "tab";
            this.tab.Size = new System.Drawing.Size(806, 701);
            this.tab.TabIndex = 4;
            // 
            // fluentDesignFormControl1
            // 
@@ -460,19 +459,12 @@
            // acrd
            // 
            this.acrd.Dock = System.Windows.Forms.DockStyle.Left;
            this.acrd.Elements.AddRange(new DevExpress.XtraBars.Navigation.AccordionControlElement[] {
            this.accordionControlElement1});
            this.acrd.Location = new System.Drawing.Point(0, 39);
            this.acrd.Name = "acrd";
            this.acrd.ScrollBarMode = DevExpress.XtraBars.Navigation.ScrollBarMode.Touch;
            this.acrd.Size = new System.Drawing.Size(208, 727);
            this.acrd.TabIndex = 1;
            this.acrd.ViewType = DevExpress.XtraBars.Navigation.AccordionControlViewType.HamburgerMenu;
            //
            // accordionControlElement1
            //
            this.accordionControlElement1.Name = "accordionControlElement1";
            this.accordionControlElement1.Text = "Element1";
            // 
            // FrmMain
            // 
@@ -490,9 +482,9 @@
            this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
            this.fluentDesignFormContainer1.ResumeLayout(false);
            this.fluentDesignFormContainer1.PerformLayout();
            ((System.ComponentModel.ISupportInitialize)(this.tab)).EndInit();
            this.statusStrip1.ResumeLayout(false);
            this.statusStrip1.PerformLayout();
            ((System.ComponentModel.ISupportInitialize)(this.tab)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.fluentDesignFormControl1)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.fluentFormDefaultManager1)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.acrd)).EndInit();
@@ -544,6 +536,5 @@
        private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel1;
        private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel4;
        private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel5;
        private DevExpress.XtraBars.Navigation.AccordionControlElement accordionControlElement1;
    }
}
DevApp/Gs.DevApp/DevFrm/FrmMain.cs
@@ -21,10 +21,14 @@
            InitializeComponent();
            this.Text = System.Configuration.ConfigurationSettings.AppSettings.Get("ProductName").ToString();
            tab.CloseButtonClick += Tab_CloseButtonClick;
            getTree();
            tooLoading.Click += TooLoading_Click;
            getTree();
        }
        /// <summary>
        /// é‡æ–°åŠ è½½ç³»ç»Ÿ
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void TooLoading_Click(object sender, EventArgs e)
        {
            int i = 100;
@@ -36,12 +40,6 @@
            sdf.Close();
            getTree();
        }
        private void Tab_CloseButtonClick(object sender, EventArgs e)
        {
            RemoveTabPage(tab, e);
        }
        private void getTree()
        {
            toolTime.Text = "登录时间" + LoginInfoModel.CurrentUser.LoginTime;
@@ -50,10 +48,9 @@
                userGuid = LoginInfoModel.CurrentUser.LoginUserGuid,
                orgGuid = LoginInfoModel.CurrentUser.LoginOrgGuid,
            };
            string strJson = "";
            try
            {
                strJson = UtilityHelper.HttpPost("", "User/GetUserLoginInfo", JsonConvert.SerializeObject(_obj));
                string strJson = UtilityHelper.HttpPost("", "User/GetUserLoginInfo", JsonConvert.SerializeObject(_obj));
                JObject _job = JObject.Parse(strJson);
                string rtnCode = _job["rtnCode"].ToString();
                if (int.Parse(rtnCode) > 0)
@@ -69,7 +66,7 @@
                    System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmMain));
                    DataTable dt = JsonConvert.DeserializeObject<DataTable>(array.ToString());
                    DataRow[] drGrp = dt.Select("upGuid is null");
                    int idx = 0;
                    int gdx = 0, idx = 0;
                    foreach (DataRow _dy in drGrp)
                    {
                        AccordionControlElement _grp = this.acrd.AddGroup();
@@ -79,6 +76,8 @@
                        _grp.Text = _dy["name"].ToString();
                        _grp.Tag = _dy["formPath"].ToString();//存路径,类名
                        _grp.Click += _grp_Click;
                        if (gdx == 0)
                            _grp.Expanded = true;
                        DataRow[] drItem = dt.Select("upGuid='" + _dy["guid"].ToString() + "'");
                        foreach (DataRow _dy2 in drItem)
                        {
@@ -91,7 +90,6 @@
                            _itm.Tag = _dy2["formPath"].ToString();//存路径,类名
                            _itm.Click += _grp_Click;
                            _grp.Elements.Add(_itm);
                            //
                            if (idx == 0 && tab.TabPages.Count <= 0)
                            {
                                string tabPageName = _itm.Name + "_page";
@@ -101,33 +99,46 @@
                                AddTabpage(tab, tabPageName, tabText, newFormName, imgIcon);
                            }
                            idx++;
                            //
                        };
                        gdx++;
                    }
                }
                else {
                    ToolBox.MsgHelper.ShowError("提示:初始化失败,请联系管理员!" );
                else
                {
                    ToolBox.MsgHelper.ShowError("提示:初始化失败,请联系管理员!");
                }
            }
            catch (Exception ex)
            {
                ToolBox.MsgHelper.ShowError("提示:" + ex.Message);
            }
        }
        /// <summary>
        /// å·¦ä¾§èœå•点击
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void _grp_Click(object sender, EventArgs e)
        {
            AccordionControlElement _acd = (AccordionControlElement)sender;
            if (_acd.Elements.Count > 0) return;
            string tabPageName = _acd.Name + "_page";
            string tabText = _acd.Text;//当前选项卡页Text标题
            string newFormName = _acd.Tag.ToString();//存路径,类名
            string tabText = _acd.Text;
            string newFormName = _acd.Tag.ToString();
            Image imgIcon = _acd.Image;
            AddTabpage(tab, tabPageName, tabText, newFormName, imgIcon);
        }
        /// <summary>
        /// å…³é—­é€‰é¡¹å¡
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Tab_CloseButtonClick(object sender, EventArgs e)
        {
            RemoveTabPage(tab, e);
        }
        /// <summary>
        /// æ–°å¢žé€‰é¡¹å¡é¡µ
        /// </summary>
        /// <param name="tabControl">选项卡控件</param>
DevApp/Gs.DevApp/DevFrm/Sys/EasyCode.Designer.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,233 @@

namespace Gs.DevApp.DevFrm.Sys
{
    partial class EasyCode
    {
        /// <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.xtraTabControl1 = new DevExpress.XtraTab.XtraTabControl();
            this.xtraTabPage1 = new DevExpress.XtraTab.XtraTabPage();
            this.lbMsg = new System.Windows.Forms.Label();
            this.btnOk = new DevExpress.XtraEditors.SimpleButton();
            this.label4 = new System.Windows.Forms.Label();
            this.btnToPath = new System.Windows.Forms.Button();
            this.txtCreateDBPath = new System.Windows.Forms.TextBox();
            this.label5 = new System.Windows.Forms.Label();
            this.txt_category = new System.Windows.Forms.ComboBox();
            this.txt_table = new System.Windows.Forms.ComboBox();
            this.txt_sqlconn = new DevExpress.XtraEditors.MemoEdit();
            this.label3 = new System.Windows.Forms.Label();
            this.label2 = new System.Windows.Forms.Label();
            this.label1 = new System.Windows.Forms.Label();
            ((System.ComponentModel.ISupportInitialize)(this.xtraTabControl1)).BeginInit();
            this.xtraTabControl1.SuspendLayout();
            this.xtraTabPage1.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.txt_sqlconn.Properties)).BeginInit();
            this.SuspendLayout();
            //
            // xtraTabControl1
            //
            this.xtraTabControl1.Dock = System.Windows.Forms.DockStyle.Fill;
            this.xtraTabControl1.Location = new System.Drawing.Point(0, 0);
            this.xtraTabControl1.Name = "xtraTabControl1";
            this.xtraTabControl1.SelectedTabPage = this.xtraTabPage1;
            this.xtraTabControl1.Size = new System.Drawing.Size(889, 524);
            this.xtraTabControl1.TabIndex = 0;
            this.xtraTabControl1.TabPages.AddRange(new DevExpress.XtraTab.XtraTabPage[] {
            this.xtraTabPage1});
            //
            // xtraTabPage1
            //
            this.xtraTabPage1.Appearance.PageClient.BackColor = System.Drawing.Color.White;
            this.xtraTabPage1.Appearance.PageClient.Options.UseBackColor = true;
            this.xtraTabPage1.Controls.Add(this.lbMsg);
            this.xtraTabPage1.Controls.Add(this.btnOk);
            this.xtraTabPage1.Controls.Add(this.label4);
            this.xtraTabPage1.Controls.Add(this.btnToPath);
            this.xtraTabPage1.Controls.Add(this.txtCreateDBPath);
            this.xtraTabPage1.Controls.Add(this.label5);
            this.xtraTabPage1.Controls.Add(this.txt_category);
            this.xtraTabPage1.Controls.Add(this.txt_table);
            this.xtraTabPage1.Controls.Add(this.txt_sqlconn);
            this.xtraTabPage1.Controls.Add(this.label3);
            this.xtraTabPage1.Controls.Add(this.label2);
            this.xtraTabPage1.Controls.Add(this.label1);
            this.xtraTabPage1.Name = "xtraTabPage1";
            this.xtraTabPage1.Size = new System.Drawing.Size(887, 492);
            this.xtraTabPage1.Text = "配置信息";
            //
            // lbMsg
            //
            this.lbMsg.AutoSize = true;
            this.lbMsg.Location = new System.Drawing.Point(214, 368);
            this.lbMsg.Name = "lbMsg";
            this.lbMsg.Size = new System.Drawing.Size(0, 18);
            this.lbMsg.TabIndex = 268;
            //
            // btnOk
            //
            this.btnOk.Location = new System.Drawing.Point(193, 419);
            this.btnOk.Name = "btnOk";
            this.btnOk.Size = new System.Drawing.Size(94, 29);
            this.btnOk.TabIndex = 267;
            this.btnOk.Text = "确定生成";
            this.btnOk.Click += new System.EventHandler(this.btnOk_Click);
            //
            // label4
            //
            this.label4.AutoSize = true;
            this.label4.Location = new System.Drawing.Point(226, 318);
            this.label4.Name = "label4";
            this.label4.Size = new System.Drawing.Size(293, 18);
            this.label4.TabIndex = 266;
            this.label4.Text = "建议你选择项目文件夹,直接生成到项目中";
            //
            // btnToPath
            //
            this.btnToPath.Location = new System.Drawing.Point(544, 288);
            this.btnToPath.Margin = new System.Windows.Forms.Padding(4);
            this.btnToPath.Name = "btnToPath";
            this.btnToPath.Size = new System.Drawing.Size(79, 26);
            this.btnToPath.TabIndex = 265;
            this.btnToPath.Text = "选择路径";
            this.btnToPath.UseVisualStyleBackColor = true;
            this.btnToPath.Click += new System.EventHandler(this.btnToPath_Click_1);
            //
            // txtCreateDBPath
            //
            this.txtCreateDBPath.Location = new System.Drawing.Point(229, 288);
            this.txtCreateDBPath.Margin = new System.Windows.Forms.Padding(4);
            this.txtCreateDBPath.Name = "txtCreateDBPath";
            this.txtCreateDBPath.Size = new System.Drawing.Size(307, 26);
            this.txtCreateDBPath.TabIndex = 264;
            //
            // label5
            //
            this.label5.AutoSize = true;
            this.label5.Location = new System.Drawing.Point(116, 292);
            this.label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
            this.label5.Name = "label5";
            this.label5.Size = new System.Drawing.Size(98, 18);
            this.label5.TabIndex = 263;
            this.label5.Text = "文件创建到:";
            //
            // txt_category
            //
            this.txt_category.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.txt_category.Font = new System.Drawing.Font("Tahoma", 10F);
            this.txt_category.FormattingEnabled = true;
            this.txt_category.Items.AddRange(new object[] {
            "--请选择--",
            "分页列表+双击显示详情"});
            this.txt_category.Location = new System.Drawing.Point(229, 234);
            this.txt_category.Name = "txt_category";
            this.txt_category.Size = new System.Drawing.Size(391, 29);
            this.txt_category.TabIndex = 261;
            //
            // txt_table
            //
            this.txt_table.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.txt_table.Font = new System.Drawing.Font("Tahoma", 10F);
            this.txt_table.FormattingEnabled = true;
            this.txt_table.Location = new System.Drawing.Point(229, 186);
            this.txt_table.Name = "txt_table";
            this.txt_table.Size = new System.Drawing.Size(391, 29);
            this.txt_table.TabIndex = 262;
            //
            // txt_sqlconn
            //
            this.txt_sqlconn.Location = new System.Drawing.Point(229, 90);
            this.txt_sqlconn.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
            this.txt_sqlconn.Name = "txt_sqlconn";
            this.txt_sqlconn.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 10F);
            this.txt_sqlconn.Properties.Appearance.Options.UseFont = true;
            this.txt_sqlconn.Properties.ScrollBars = System.Windows.Forms.ScrollBars.None;
            this.txt_sqlconn.Size = new System.Drawing.Size(391, 68);
            this.txt_sqlconn.TabIndex = 260;
            //
            // label3
            //
            this.label3.AutoSize = true;
            this.label3.Location = new System.Drawing.Point(101, 108);
            this.label3.Name = "label3";
            this.label3.Size = new System.Drawing.Size(98, 18);
            this.label3.TabIndex = 259;
            this.label3.Text = "数据库连接:";
            //
            // label2
            //
            this.label2.AutoSize = true;
            this.label2.Location = new System.Drawing.Point(101, 245);
            this.label2.Name = "label2";
            this.label2.Size = new System.Drawing.Size(113, 18);
            this.label2.TabIndex = 258;
            this.label2.Text = "选择窗体类型:";
            //
            // label1
            //
            this.label1.AutoSize = true;
            this.label1.Location = new System.Drawing.Point(101, 186);
            this.label1.Name = "label1";
            this.label1.Size = new System.Drawing.Size(113, 18);
            this.label1.TabIndex = 257;
            this.label1.Text = "选择表或视图:";
            //
            // EasyCode
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 18F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(889, 524);
            this.Controls.Add(this.xtraTabControl1);
            this.Name = "EasyCode";
            this.Text = "EasyCode";
            ((System.ComponentModel.ISupportInitialize)(this.xtraTabControl1)).EndInit();
            this.xtraTabControl1.ResumeLayout(false);
            this.xtraTabPage1.ResumeLayout(false);
            this.xtraTabPage1.PerformLayout();
            ((System.ComponentModel.ISupportInitialize)(this.txt_sqlconn.Properties)).EndInit();
            this.ResumeLayout(false);
        }
        #endregion
        private DevExpress.XtraTab.XtraTabControl xtraTabControl1;
        private DevExpress.XtraTab.XtraTabPage xtraTabPage1;
        private DevExpress.XtraEditors.SimpleButton btnOk;
        private System.Windows.Forms.Label label4;
        private System.Windows.Forms.Button btnToPath;
        private System.Windows.Forms.TextBox txtCreateDBPath;
        private System.Windows.Forms.Label label5;
        private System.Windows.Forms.ComboBox txt_category;
        private System.Windows.Forms.ComboBox txt_table;
        private DevExpress.XtraEditors.MemoEdit txt_sqlconn;
        private System.Windows.Forms.Label label3;
        private System.Windows.Forms.Label label2;
        private System.Windows.Forms.Label label1;
        private System.Windows.Forms.Label lbMsg;
    }
}
DevApp/Gs.DevApp/DevFrm/Sys/EasyCode.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,293 @@
using DevExpress.XtraEditors;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Gs.DevApp.DevFrm.Sys
{
    public partial class EasyCode : DevExpress.XtraEditors.XtraForm
    {
        public EasyCode()
        {
            InitializeComponent();
            this.txt_sqlconn.Text = "Data Source=2kn4sh70028.vicp.fun,26144;Initial Catalog=gs_Mes;User ID=sa;Password =admin110";
            getTable();
        }
        /// <summary>
        /// è¯»å–数据库表
        /// </summary>
        private void getTable()
        {
            string strConn = txt_sqlconn.Text.Trim();
            DataSet dset = new DataSet();
            using (SqlConnection connection = new SqlConnection(strConn))
            {
                connection.Open();
                SqlCommand cmd = new SqlCommand();
                cmd.Connection = connection;
                cmd.CommandText = "SELECT '--请选择--' as TABLE_NAME union all SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'BASE TABLE' order by TABLE_NAME desc";
                using (SqlDataAdapter dt = new SqlDataAdapter(cmd))
                {
                    dt.Fill(dset, "0");
                }
            }
            if (dset != null && dset.Tables.Count > 0)
            {
                txt_table.DataSource = dset.Tables[0];
                txt_table.DisplayMember = "TABLE_NAME";
                txt_table.ValueMember = "TABLE_NAME";
                txt_category.SelectedIndex = txt_table.SelectedIndex = 0;
            }
        }
        /// <summary>
        /// é€‰æ‹©ç”Ÿæˆè·¯å¾„
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnToPath_Click(object sender, EventArgs e)
        {
            string _GetfilePath = FileSelector.BrowseFilePathForSave();
            txtCreateDBPath.Text = _GetfilePath;
        }
        private void btnOk_Click(object sender, EventArgs e)
        {
            if (txt_sqlconn.Text.Trim() == "")
            {
                MessageBox.Show("请输入数据库连接串");
                return;
            }
            if (txt_table.SelectedIndex <= 0)
            {
                MessageBox.Show("请选择表");
                return;
            }
            if (txt_category.SelectedIndex <= 0)
            {
                MessageBox.Show("请选择类型");
                return;
            }
            if (txtCreateDBPath.Text.Trim() == "")
            {
                MessageBox.Show("请选择生成路径");
                return;
            }
            DataTable dt = _getCol();
            string _strName = _getClassName();
            ReadMainFile(dt, _strName);
            ReadDesignerFile(dt, _strName);
            ReadResxFile(dt, _strName);
            string path = txtCreateDBPath.Text;
            lbMsg.Text = "生成成功,路径:" + path;
        }
        /// <summary>
        /// è¯»å–列名
        /// </summary>
        /// <returns></returns>
        private DataTable _getCol()
        {
            string strConn = txt_sqlconn.Text.Trim();
            DataSet dset = new DataSet();
            using (SqlConnection connection = new SqlConnection(strConn))
            {
                connection.Open();
                SqlCommand cmd = new SqlCommand();
                cmd.Connection = connection;
                cmd.CommandText = "SELECT COLUMN_NAME,DATA_TYPE FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = N'" + txt_table.SelectedValue.ToString() + "'";
                using (SqlDataAdapter dt = new SqlDataAdapter(cmd))
                {
                    dt.Fill(dset, "0");
                }
            }
            if (dset != null && dset.Tables.Count > 0)
            {
                return dset.Tables[0];
            }
            return null;
        }
        /// <summary>
        /// æ¨¡ç‰ˆè·¯å¾„
        /// </summary>
        /// <param name="fileType">cs,Designer.cs</param>
        /// <returns></returns>
        private string _getTemple(string fileType)
        {
            return (@"\templeEasyCode\category1\category1." + fileType);
        }
        /// <summary>
        /// è¯»å–类名
        /// </summary>
        /// <returns></returns>
        private string _getClassName()
        {
            return "Frm" + txt_table.SelectedValue.ToString();
        }
        /// <summary>
        /// ç¬¬ä¸€ä¸ªæ–‡ä»¶
        /// </summary>
        /// <param name="dt"></param>
        /// <param name="_FileName"></param>
        void ReadMainFile(DataTable dt, string _FileName)
        {
            string _Temppath = Application.StartupPath + _getTemple("cs");
            string contents = System.IO.File.ReadAllText(_Temppath);
            string line = Environment.NewLine;
            StringBuilder strbuilder = new StringBuilder();
            strbuilder.Append(contents);
            strbuilder.Replace("{clsName}", _getClassName());
            string _fullPath = txtCreateDBPath.Text + "\\" + _FileName + ".cs";
            if (System.IO.File.Exists(_fullPath))
                System.IO.File.Delete(_fullPath);
            System.IO.StreamWriter sw = System.IO.File.CreateText(_fullPath);
            sw.Write(strbuilder.ToString());
            sw.Close();
            sw.Dispose();
        }
        /// <summary>
        /// ç¬¬äºŒä¸ªæ–‡ä»¶
        /// </summary>
        /// <param name="dt"></param>
        /// <param name="_FileName"></param>
        void ReadDesignerFile(DataTable dt, string _FileName)
        {
            string _Temppath = Application.StartupPath + _getTemple("Designer.cs");
            string contents = System.IO.File.ReadAllText(_Temppath);
            StringBuilder strbuilder = new StringBuilder();
            string line = Environment.NewLine;
            strbuilder.Append(contents);
            strbuilder.Replace("{clsName}", _getClassName());
            int _RowCount = dt.Rows.Count;
            if (dt.Rows.Count > 0)
            {
                string _FieldName = "";//字段名
                string _FieldText = "";//
                string _prefix = "txt_";
                string _Lbfix = "lb_";
                string _gvFix = "gv_";
                int _x = 0, _y = 0, _Tabindex = 210;
                string _ControlType = "";
                string _lbType = "LabelControl";
                System.Text.StringBuilder _gvItemCol = new StringBuilder();
                for (int c = 0; c < _RowCount; c++)
                {
                    _x = 20 + c % 4 * 250;//计算控件在X轴位置
                    if (c % 4 == 0)
                    {
                        _y = 20 + 32 * c / 4;//计算控件在Y轴的位置
                    }
                    _Tabindex = c % 4 + c / 4 + _Tabindex;
                    //多控件类型 è¿™è¾¹å¯ä»¥æ ¹æ®å…·ä½“的需求进行控件的扩展,目前都是文本
                    switch (dt.Rows[c]["DATA_TYPE"].ToString())
                    {
                        case "1111":
                            break;
                        default:
                            _FieldName = ToolBox.UtilityHelper.ToCamelCase(dt.Rows[c]["COLUMN_NAME"].ToString());
                            _FieldText = ToolBox.UtilityHelper.ToCamelCase(dt.Rows[c]["COLUMN_NAME"].ToString());
                            _ControlType = "TextEdit";
                            break;
                    }
                    string _labName = _Lbfix + _FieldName;//label名
                    string _ControlName = _prefix + _FieldName;//文本框名
                    string _gvName = _gvFix + _FieldName;//gv中的列名
                    if (_gvItemCol.Length > 0)
                        _gvItemCol.Append(",");
                    _gvItemCol.Append("this." + _gvName);
                    //BQSetControlObject  å®žä¾‹åŒ–控件
                    string BQSetControlObject = ("BQSetControlObject" + line + "this." + _labName + " =  new DevExpress.XtraEditors." + _lbType + "();" + line);
                    BQSetControlObject = (BQSetControlObject + "this." + _ControlName + " = new DevExpress.XtraEditors." + _ControlType + "(); " + line);
                    BQSetControlObject = (BQSetControlObject + "this." + _gvName + " = new DevExpress.XtraGrid.Columns.GridColumn(); " + line);
                    strbuilder.Replace("BQSetControlObject", BQSetControlObject);
                    //创建对象结束后     this.SuspendLayout();
                    //BQSetControlInfo  è®¾ç½®æŽ§ä»¶ä¿¡æ¯  ä½ç½® å¤§å° åç§°
                    string _ControlName02 = "\"" + _labName + "\"";//给控件Text èµ‹å€¼çš„æ˜¯å¸¦æœ‰åŒå¼•号的字符串 å› æ­¤è¿™ä¸ªé‡Œè¦ç‰¹æ®Šå¤„理下
                    string _FieldName02 = "\"" + _FieldName + "\"";
                    string _FieldText02 = "\"" + (_FieldText + ":") + "\"";
                    string BQSetControlInfo = "BQSetControlInfo" + line
                             //label
                             + "//" + line
                             + "//" + _labName + line
                             + "//" + line
                             + "this." + _labName + ".Location = new System.Drawing.Point(" + _x + ", " + _y + ");" + line//位置
                             + "this." + _labName + ".Name = " + _ControlName02 + ";" + line//给Name赋值
                             + "this." + _labName + ".Size = new System.Drawing.Size(150,21);" + line//大小
                             + "this." + _labName + ".TabIndex = " + _Tabindex + ";" + line
                             + "this." + _labName + ".Tag = " + _FieldName02 + ";" + line//Tag值
                             + "this." + _labName + ".Appearance.Font = new System.Drawing.Font(\"Tahoma\", 10F);" + line
                            + "this." + _labName + ".Text = " + _FieldText02 + ";" + line
                            //文本
                            + "//" + line
                            + "//" + _ControlName + line
                            + "//" + line
                            + "this." + _ControlName + ".Location = new System.Drawing.Point(" + (_x + 60) + ", " + _y + ");" + line//位置
                            + "this." + _ControlName + ".Name = " + _ControlName02 + ";" + line
                            + "this." + _ControlName + ".Size = new System.Drawing.Size(150,21);" + line
                            + "this." + _ControlName + ".TabIndex = " + _Tabindex + ";" + line
                            + "this." + _ControlName + ".Tag = " + _FieldName02 + ";" + line
                            + "this." + _ControlName + ".Properties.Appearance.Font = new System.Drawing.Font(\"Tahoma\", 10F);" + line
                           //gv
                           + "this." + _gvName + ".AppearanceCell.Font = new System.Drawing.Font(\"Tahoma\", 10F);" + line
                           + "this." + _gvName + ".AppearanceCell.Options.UseFont = true;" + line
                           + "this." + _gvName + ".FieldName = " + _FieldName02 + ";" + line
                           + "this." + _gvName + ".Caption = " + _FieldName02 + ";" + line
                           + "this." + _gvName + ".MinWidth = 25;" + line
                           + "this." + _gvName + ".Visible = true;" + line
                           + "this." + _gvName + ".Width =94;" + line
                           + "this." + _gvName + ".VisibleIndex = 0;" + line;
                    strbuilder.Replace("BQSetControlInfo", BQSetControlInfo);
                    //BQAddControltoMContainer//将控件添加到Form å®¹å™¨ä¸­  è¿™ä¸ªå®¹å™¨å¯ä»¥æ˜¯ panel å¯ä»¥æ˜¯groupbox ç­‰ç­‰
                    string BQAddControltoMContainer = "BQAddControltoMContainer" + line + "  this.panel1.Controls.Add(this." + _labName + ");" + line;
                    BQAddControltoMContainer += " this.panel1.Controls.Add(this." + _ControlName + ");" + line;
                    strbuilder.Replace("BQAddControltoMContainer", BQAddControltoMContainer);
                    //BQCreateConrolObejct //创建控件
                    string BQCreateConrolObejct = "BQCreateConrolObejct" + line + "private DevExpress.XtraEditors." + _lbType + " " + _labName + ";" + line;
                    BQCreateConrolObejct += "private DevExpress.XtraEditors." + _ControlType + " " + _ControlName + ";" + line;
                    BQCreateConrolObejct += " private DevExpress.XtraGrid.Columns.GridColumn " + _gvName + ";" + line;
                    strbuilder.Replace("BQCreateConrolObejct", BQCreateConrolObejct);
                }
                strbuilder.Replace("{colList}", _gvItemCol.ToString());
                System.IO.File.Delete(txtCreateDBPath.Text + "\\" + _FileName + ".Designer.cs");
                string path = txtCreateDBPath.Text;
                System.IO.StreamWriter sw = System.IO.File.CreateText(path + "\\" + _FileName + ".Designer.cs");
                sw.Write(strbuilder.ToString());
                sw.Close();
                sw.Dispose();
            }
        }
        /// <summary>
        /// ç¬¬ä¸‰ä¸ªæ–‡ä»¶
        /// </summary>
        /// <param name="dt"></param>
        /// <param name="_FileName"></param>
        void ReadResxFile(DataTable dt, string _FileName)
        {
            string _Temppath = Application.StartupPath + _getTemple("resx");
            string contents = System.IO.File.ReadAllText(_Temppath);
            StringBuilder strbuilder = new StringBuilder();
            string line = Environment.NewLine;
            strbuilder.Append(contents);
            System.IO.File.Delete(txtCreateDBPath.Text + "\\" + _FileName + ".resx");
            string path = txtCreateDBPath.Text;
            System.IO.StreamWriter sw = System.IO.File.CreateText(path + "\\" + _FileName + ".resx");
            sw.Write(strbuilder.ToString());
            sw.Close();
            sw.Dispose();
        }
        private void btnToPath_Click_1(object sender, EventArgs e)
        {
            string _GetfilePath = FileSelector.BrowseFilePathForSave();
            txtCreateDBPath.Text = _GetfilePath;
        }
    }
}
DevApp/Gs.DevApp/DevFrm/Sys/EasyCode.resx
¶Ô±ÈÐÂÎļþ
@@ -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>
DevApp/Gs.DevApp/DevFrm/Sys/FileSelector.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,125 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
namespace Gs.DevApp.DevFrm.Sys
{
    public enum FileType { Txt, Xml, Pdf, Bin, Zip, All, Img, Excel }
    public class FileSelector
    {
        public static string Title = "Please choose the file:";
        public static string Filter = "Text files (*.txt)|*.txt|All files (*.*)|*.*";
        public static FileType FileExtension
        {
            set
            {
                switch (value)
                {
                    case FileType.Txt:
                        Filter = "Text files(*.txt)|*.txt|All files(*.*)|*.*";
                        break;
                    case FileType.Excel:
                        Filter = "Text files(*.xls;*.xlsx)|*.xls;*.xlsx|All files(*.*)|*.*";
                        break;
                    case FileType.Xml:
                        Filter = "XML files(*.xml)|*.xml|Config files(*.config)|*.config|All files(*.*)|*.*";
                        break;
                    case FileType.Pdf:
                        Filter = "Pdf files(*.Pdf)|*.Pdf|Pdf form files(*.fdf)|*.fdf|All files(*.*)|*.*";
                        break;
                    case FileType.Bin:
                        Filter = "Binary files(*.bin)|*.bin|Application files(*.exe;*.lib;*.dll)|*.exe;*.lib;*.dll|All files(*.*)|*.*";
                        break;
                    case FileType.Zip:
                        Filter = "Zip files(*.zip;*.rar)|*.zip;*.rar|All files(*.*)|*.*";
                        break;
                    case FileType.Img:
                        Filter = "GIF(*.gif)|*.gif|Jpeg(*.jpg)|*.jpg|Bmp(*.bmp)|*.bmp|Emf(*.emf)|*.emf|Png(*.png)|*.png";
                        break;
                    case FileType.All:
                        Filter = "All files(*.*)|*.*";
                        break;
                }
            }
        }
        ///<summary>
        ///Get or set the initial directory displayed by the file dialog box.
        ///</summary>
        public static OpenFileDialog OFD = new OpenFileDialog();
        public static SaveFileDialog SFD = new SaveFileDialog();
        public static string InitialPath
        {
            set
            {
                OFD.InitialDirectory = value;
                SFD.InitialDirectory = value;
            }
        }
        public static string BrowseFile()
        {
            OFD.Title = Title;
            OFD.Filter = Filter;
            if (OFD.ShowDialog() == DialogResult.OK)
            {
                return OFD.FileName;
            }
            else
            {
                return null;
            }
        }
        public static string BrowseFileForSave()
        {
            SFD.Title = Title;
            SFD.Filter = Filter;
            if (SFD.ShowDialog() == DialogResult.OK)
            {
                return SFD.FileName;
            }
            else
            {
                return null;
            }
        }
        public static string BrowseFile(FileType type)
        {
            FileExtension = type;
            return BrowseFile();
        }
        public static string BrowseFile(string filter)
        {
            Filter = filter;
            return BrowseFile();
        }
        public static string BrowseFileForSave(FileType type)
        {
            FileExtension = type;
            return BrowseFileForSave();
        }
        public static string BrowseFileForSave(string filter)
        {
            Filter = filter;
            return BrowseFileForSave();
        }
        public static string BrowseFilePathForSave()
        {
            FolderBrowserDialog fbd = new FolderBrowserDialog();
            if (fbd.ShowDialog() == DialogResult.OK)
            {
                return fbd.SelectedPath; //获得选择的文件夹路径
            }
            else
            {
                return "";
            }
        }
    }
}
DevApp/Gs.DevApp/DevFrm/User/Organization.Designer.cs
@@ -29,12 +29,15 @@
        /// </summary>
        private void InitializeComponent()
        {
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Organization));
            this.toolBarMenu1 = new Gs.DevApp.UserControl.ToolBarMenu();
            this.xtraTabControl1 = new DevExpress.XtraTab.XtraTabControl();
            this.xtraTabPage1 = new DevExpress.XtraTab.XtraTabPage();
            this.tlMenu = new System.Windows.Forms.TreeView();
            this.xtraTabPage2 = new DevExpress.XtraTab.XtraTabPage();
            this.panel1 = new System.Windows.Forms.Panel();
            this.txt_factory = new DevExpress.XtraEditors.TextEdit();
            this.labelControl9 = new DevExpress.XtraEditors.LabelControl();
            this.labelControl11 = new DevExpress.XtraEditors.LabelControl();
            this.label1 = new System.Windows.Forms.Label();
            this.labelControl8 = new DevExpress.XtraEditors.LabelControl();
@@ -52,22 +55,21 @@
            this.labelControl3 = new DevExpress.XtraEditors.LabelControl();
            this.txt_name = new DevExpress.XtraEditors.TextEdit();
            this.labelControl2 = new DevExpress.XtraEditors.LabelControl();
            this.txt_factory = new DevExpress.XtraEditors.TextEdit();
            this.labelControl9 = new DevExpress.XtraEditors.LabelControl();
            ((System.ComponentModel.ISupportInitialize)(this.xtraTabControl1)).BeginInit();
            this.xtraTabControl1.SuspendLayout();
            this.xtraTabPage1.SuspendLayout();
            this.xtraTabPage2.SuspendLayout();
            this.panel1.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.txt_factory.Properties)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.txt_status.Properties)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.txt_conTel.Properties)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.txt_conPeople.Properties)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.txt_name.Properties)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.txt_factory.Properties)).BeginInit();
            this.SuspendLayout();
            // 
            // toolBarMenu1
            // 
            this.toolBarMenu1.actions = ((System.Collections.Generic.List<string>)(resources.GetObject("toolBarMenu1.actions")));
            this.toolBarMenu1.Dock = System.Windows.Forms.DockStyle.Top;
            this.toolBarMenu1.isSetBtn = false;
            this.toolBarMenu1.Location = new System.Drawing.Point(0, 0);
@@ -112,6 +114,7 @@
            // 
            // panel1
            // 
            this.panel1.BackColor = System.Drawing.Color.White;
            this.panel1.Controls.Add(this.txt_factory);
            this.panel1.Controls.Add(this.labelControl9);
            this.panel1.Controls.Add(this.labelControl11);
@@ -131,14 +134,34 @@
            this.panel1.Controls.Add(this.labelControl3);
            this.panel1.Controls.Add(this.txt_name);
            this.panel1.Controls.Add(this.labelControl2);
            this.panel1.Font = new System.Drawing.Font("Tahoma", 10F);
            this.panel1.Location = new System.Drawing.Point(21, 17);
            this.panel1.Name = "panel1";
            this.panel1.Size = new System.Drawing.Size(554, 413);
            this.panel1.TabIndex = 1;
            // 
            // txt_factory
            //
            this.txt_factory.Location = new System.Drawing.Point(138, 76);
            this.txt_factory.Name = "txt_factory";
            this.txt_factory.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 10F);
            this.txt_factory.Properties.Appearance.Options.UseFont = true;
            this.txt_factory.Size = new System.Drawing.Size(156, 28);
            this.txt_factory.TabIndex = 135;
            //
            // labelControl9
            //
            this.labelControl9.Appearance.Font = new System.Drawing.Font("Tahoma", 10F);
            this.labelControl9.Appearance.Options.UseFont = true;
            this.labelControl9.Location = new System.Drawing.Point(41, 80);
            this.labelControl9.Name = "labelControl9";
            this.labelControl9.Size = new System.Drawing.Size(85, 21);
            this.labelControl9.TabIndex = 134;
            this.labelControl9.Text = "组织编号:";
            //
            // labelControl11
            // 
            this.labelControl11.Location = new System.Drawing.Point(71, 294);
            this.labelControl11.Location = new System.Drawing.Point(81, 290);
            this.labelControl11.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
            this.labelControl11.Name = "labelControl11";
            this.labelControl11.Size = new System.Drawing.Size(45, 18);
@@ -150,14 +173,16 @@
            this.label1.AutoSize = true;
            this.label1.Location = new System.Drawing.Point(119, 285);
            this.label1.Name = "label1";
            this.label1.Size = new System.Drawing.Size(0, 18);
            this.label1.Size = new System.Drawing.Size(0, 21);
            this.label1.TabIndex = 132;
            // 
            // labelControl8
            // 
            this.labelControl8.Location = new System.Drawing.Point(295, 35);
            this.labelControl8.Appearance.Font = new System.Drawing.Font("Tahoma", 10F);
            this.labelControl8.Appearance.Options.UseFont = true;
            this.labelControl8.Location = new System.Drawing.Point(300, 35);
            this.labelControl8.Name = "labelControl8";
            this.labelControl8.Size = new System.Drawing.Size(120, 18);
            this.labelControl8.Size = new System.Drawing.Size(136, 21);
            this.labelControl8.TabIndex = 120;
            this.labelControl8.Text = "(空将为根组织)";
            // 
@@ -165,33 +190,39 @@
            // 
            this.txt_upGuid.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.txt_upGuid.FormattingEnabled = true;
            this.txt_upGuid.Location = new System.Drawing.Point(133, 32);
            this.txt_upGuid.Location = new System.Drawing.Point(138, 34);
            this.txt_upGuid.Name = "txt_upGuid";
            this.txt_upGuid.Size = new System.Drawing.Size(156, 26);
            this.txt_upGuid.Size = new System.Drawing.Size(156, 29);
            this.txt_upGuid.TabIndex = 119;
            // 
            // labelControl6
            // 
            this.labelControl6.Appearance.Font = new System.Drawing.Font("Tahoma", 10F);
            this.labelControl6.Appearance.Options.UseFont = true;
            this.labelControl6.Location = new System.Drawing.Point(41, 38);
            this.labelControl6.Name = "labelControl6";
            this.labelControl6.Size = new System.Drawing.Size(75, 18);
            this.labelControl6.Size = new System.Drawing.Size(85, 21);
            this.labelControl6.TabIndex = 118;
            this.labelControl6.Text = "上级组织:";
            // 
            // labelControl7
            // 
            this.labelControl7.Location = new System.Drawing.Point(41, 251);
            this.labelControl7.Appearance.Font = new System.Drawing.Font("Tahoma", 10F);
            this.labelControl7.Appearance.Options.UseFont = true;
            this.labelControl7.Location = new System.Drawing.Point(41, 248);
            this.labelControl7.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
            this.labelControl7.Name = "labelControl7";
            this.labelControl7.Size = new System.Drawing.Size(75, 18);
            this.labelControl7.Size = new System.Drawing.Size(85, 21);
            this.labelControl7.TabIndex = 117;
            this.labelControl7.Text = "组织状态:";
            // 
            // txt_status
            // 
            this.txt_status.Location = new System.Drawing.Point(133, 248);
            this.txt_status.Location = new System.Drawing.Point(138, 244);
            this.txt_status.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
            this.txt_status.Name = "txt_status";
            this.txt_status.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 10F);
            this.txt_status.Properties.Appearance.Options.UseFont = true;
            this.txt_status.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
            this.txt_status.Properties.Items.AddRange(new object[] {
@@ -199,7 +230,7 @@
            "正常",
            "禁用"});
            this.txt_status.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
            this.txt_status.Size = new System.Drawing.Size(156, 24);
            this.txt_status.Size = new System.Drawing.Size(156, 28);
            this.txt_status.TabIndex = 116;
            // 
            // lbGuid
@@ -207,14 +238,14 @@
            this.lbGuid.AutoSize = true;
            this.lbGuid.Location = new System.Drawing.Point(138, 295);
            this.lbGuid.Name = "lbGuid";
            this.lbGuid.Size = new System.Drawing.Size(0, 18);
            this.lbGuid.Size = new System.Drawing.Size(0, 21);
            this.lbGuid.TabIndex = 111;
            // 
            // labelControl5
            // 
            this.labelControl5.Appearance.ForeColor = System.Drawing.Color.Red;
            this.labelControl5.Appearance.Options.UseForeColor = true;
            this.labelControl5.Location = new System.Drawing.Point(296, 209);
            this.labelControl5.Location = new System.Drawing.Point(303, 209);
            this.labelControl5.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
            this.labelControl5.Name = "labelControl5";
            this.labelControl5.Size = new System.Drawing.Size(8, 18);
@@ -225,7 +256,7 @@
            // 
            this.labelControl1.Appearance.ForeColor = System.Drawing.Color.Red;
            this.labelControl1.Appearance.Options.UseForeColor = true;
            this.labelControl1.Location = new System.Drawing.Point(296, 160);
            this.labelControl1.Location = new System.Drawing.Point(303, 166);
            this.labelControl1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
            this.labelControl1.Name = "labelControl1";
            this.labelControl1.Size = new System.Drawing.Size(8, 18);
@@ -236,7 +267,7 @@
            // 
            this.labelControl12.Appearance.ForeColor = System.Drawing.Color.Red;
            this.labelControl12.Appearance.Options.UseForeColor = true;
            this.labelControl12.Location = new System.Drawing.Point(296, 112);
            this.labelControl12.Location = new System.Drawing.Point(303, 123);
            this.labelControl12.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
            this.labelControl12.Name = "labelControl12";
            this.labelControl12.Size = new System.Drawing.Size(8, 18);
@@ -245,63 +276,60 @@
            // 
            // txt_conTel
            // 
            this.txt_conTel.Location = new System.Drawing.Point(133, 203);
            this.txt_conTel.Location = new System.Drawing.Point(138, 202);
            this.txt_conTel.Name = "txt_conTel";
            this.txt_conTel.Size = new System.Drawing.Size(156, 24);
            this.txt_conTel.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 10F);
            this.txt_conTel.Properties.Appearance.Options.UseFont = true;
            this.txt_conTel.Size = new System.Drawing.Size(156, 28);
            this.txt_conTel.TabIndex = 7;
            // 
            // labelControl4
            // 
            this.labelControl4.Location = new System.Drawing.Point(26, 209);
            this.labelControl4.Appearance.Font = new System.Drawing.Font("Tahoma", 10F);
            this.labelControl4.Appearance.Options.UseFont = true;
            this.labelControl4.Location = new System.Drawing.Point(24, 206);
            this.labelControl4.Name = "labelControl4";
            this.labelControl4.Size = new System.Drawing.Size(90, 18);
            this.labelControl4.Size = new System.Drawing.Size(102, 21);
            this.labelControl4.TabIndex = 6;
            this.labelControl4.Text = "负责人电话:";
            // 
            // txt_conPeople
            // 
            this.txt_conPeople.Location = new System.Drawing.Point(133, 154);
            this.txt_conPeople.Location = new System.Drawing.Point(138, 160);
            this.txt_conPeople.Name = "txt_conPeople";
            this.txt_conPeople.Size = new System.Drawing.Size(156, 24);
            this.txt_conPeople.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 10F);
            this.txt_conPeople.Properties.Appearance.Options.UseFont = true;
            this.txt_conPeople.Size = new System.Drawing.Size(156, 28);
            this.txt_conPeople.TabIndex = 5;
            // 
            // labelControl3
            // 
            this.labelControl3.Location = new System.Drawing.Point(26, 160);
            this.labelControl3.Appearance.Font = new System.Drawing.Font("Tahoma", 10F);
            this.labelControl3.Appearance.Options.UseFont = true;
            this.labelControl3.Location = new System.Drawing.Point(24, 164);
            this.labelControl3.Name = "labelControl3";
            this.labelControl3.Size = new System.Drawing.Size(90, 18);
            this.labelControl3.Size = new System.Drawing.Size(102, 21);
            this.labelControl3.TabIndex = 4;
            this.labelControl3.Text = "组织负责人:";
            // 
            // txt_name
            // 
            this.txt_name.Location = new System.Drawing.Point(133, 109);
            this.txt_name.Location = new System.Drawing.Point(138, 118);
            this.txt_name.Name = "txt_name";
            this.txt_name.Size = new System.Drawing.Size(156, 24);
            this.txt_name.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 10F);
            this.txt_name.Properties.Appearance.Options.UseFont = true;
            this.txt_name.Size = new System.Drawing.Size(156, 28);
            this.txt_name.TabIndex = 3;
            // 
            // labelControl2
            // 
            this.labelControl2.Location = new System.Drawing.Point(41, 115);
            this.labelControl2.Appearance.Font = new System.Drawing.Font("Tahoma", 10F);
            this.labelControl2.Appearance.Options.UseFont = true;
            this.labelControl2.Location = new System.Drawing.Point(41, 122);
            this.labelControl2.Name = "labelControl2";
            this.labelControl2.Size = new System.Drawing.Size(75, 18);
            this.labelControl2.Size = new System.Drawing.Size(85, 21);
            this.labelControl2.TabIndex = 2;
            this.labelControl2.Text = "组织名称:";
            //
            // txt_factory
            //
            this.txt_factory.Location = new System.Drawing.Point(134, 74);
            this.txt_factory.Name = "txt_factory";
            this.txt_factory.Size = new System.Drawing.Size(156, 24);
            this.txt_factory.TabIndex = 135;
            //
            // labelControl9
            //
            this.labelControl9.Location = new System.Drawing.Point(42, 80);
            this.labelControl9.Name = "labelControl9";
            this.labelControl9.Size = new System.Drawing.Size(75, 18);
            this.labelControl9.TabIndex = 134;
            this.labelControl9.Text = "组织编号:";
            // 
            // Organization
            // 
@@ -318,11 +346,11 @@
            this.xtraTabPage2.ResumeLayout(false);
            this.panel1.ResumeLayout(false);
            this.panel1.PerformLayout();
            ((System.ComponentModel.ISupportInitialize)(this.txt_factory.Properties)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.txt_status.Properties)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.txt_conTel.Properties)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.txt_conPeople.Properties)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.txt_name.Properties)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.txt_factory.Properties)).EndInit();
            this.ResumeLayout(false);
        }
DevApp/Gs.DevApp/DevFrm/User/Organization.cs
@@ -19,8 +19,7 @@
            this.toolBarMenu1.btnDelClick += ToolBarMenu1_btnDelClick1;
            this.toolBarMenu1.btnEscClick += ToolBarMenu1_btnEscClick;
            tlMenu.DoubleClick += TlMenu_DoubleClick;
            GetTree();
            UtilityHelper.SetFont(panel1);
            getTree();
        }
        private void TlMenu_DoubleClick(object sender, EventArgs e)
@@ -29,7 +28,7 @@
            if (clickedNode.FirstNode == null)
            {
                string rowGuid = clickedNode.Name.ToString();
                GetModel(rowGuid, false, 999);
                getModel(rowGuid, false, 999);
            }
        }
        /// <summary>
@@ -71,7 +70,7 @@
            {
                strJson = UtilityHelper.HttpPost("", "Organization/DeleteModel", JsonConvert.SerializeObject(_obj));
                ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.GetDataByJson(strJson);
                if (_rtn.rtnCode > 0) { GetTree(); }
                if (_rtn.rtnCode > 0) { getTree(); }
                ToolBox.MsgHelper.Warning("提示:" + _rtn.rtnMsg);
            }
            catch (Exception ex)
@@ -88,7 +87,7 @@
        private void ToolBarMenu1_btnLoadClick(object sender, EventArgs e)
        {
            UtilityHelper.ChangeTab(xtraTabControl1, 0);
            GetTree();
            getTree();
        }
@@ -100,15 +99,15 @@
        private void ToolBarMenu1_btnEdtClick(object sender, EventArgs e)
        {
            TreeNode clickedNode = tlMenu.SelectedNode;
            if (clickedNode.FirstNode != null)
                return;
            //if (clickedNode.FirstNode != null)
            //    return;
            string rowGuid = clickedNode.Name.ToString();
            if (string.IsNullOrEmpty(rowGuid))
            {
                ToolBox.MsgHelper.Warning("请先选择你要操作的行!");
                return;
            }
            GetModel(rowGuid, true, 1);
            getModel(rowGuid, true, 1);
        }
        /// <summary>
        /// æ–°å¢žäº‹ä»¶
@@ -168,12 +167,11 @@
                conPeople = txt_conPeople.Text,//联系人
                conTel = txt_conPeople.Text,//联系电话
                status = txt_status.SelectedIndex,//状态
                factory = txt_factory.Text,//组织编号
            };
            string strJson = "";
            try
            {
                strJson = UtilityHelper.HttpPost("", "Organization/EditModel", JsonConvert.SerializeObject(_obj));
                string strJson = UtilityHelper.HttpPost("", "Organization/EditModel", JsonConvert.SerializeObject(_obj));
                ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.GetDataByJson(strJson);
                ToolBox.MsgHelper.Warning("提示:" + _rtn.rtnMsg);
                if (_rtn.rtnCode > 0)
@@ -189,7 +187,7 @@
            }
        }
        private void GetTree()
        private void getTree()
        {
            tlMenu.Nodes.Clear();
            ImageList imageList = new ImageList();
@@ -198,10 +196,9 @@
            tlMenu.ImageList = imageList;
            Models.PageQueryModel pgq = new Models.PageQueryModel(1, 999999, "name", "desc", "", "");
            string json = JsonConvert.SerializeObject(pgq);
            string strReturn = "";
            try
            {
                strReturn = UtilityHelper.HttpPost("", "Organization/GetListPage", json);
                string strReturn = UtilityHelper.HttpPost("", "Organization/GetListPage", json);
                ReturnModel<PageListModel> dd = UtilityHelper.GetTableByJson(strReturn);
                DataTable dt = dd.rtnData.list;
                DataRow[] drGrp = dt.Select("upGuid=''");
@@ -237,7 +234,7 @@
            }
        }
        private void GetModel(string strGuid, bool isEdit, int tabIdx)
        private void getModel(string strGuid, bool isEdit, int tabIdx)
        {
            if (string.IsNullOrEmpty(strGuid))
            {
@@ -249,10 +246,9 @@
            {
                guid = strGuid,//主建
            };
            string strJson = "";
            try
            {
                strJson = UtilityHelper.HttpPost("", "Organization/GetModel", JsonConvert.SerializeObject(_obj));
                string strJson = UtilityHelper.HttpPost("", "Organization/GetModel", JsonConvert.SerializeObject(_obj));
                ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.GetDataByJson(strJson);
                if (_rtn.rtnCode > 0)
                {
@@ -268,7 +264,5 @@
                ToolBox.MsgHelper.Warning("提示:" + ex.Message);
            }
        }
    }
}
DevApp/Gs.DevApp/DevFrm/User/Organization.resx
@@ -117,4 +117,17 @@
  <resheader name="writer">
    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  </resheader>
  <data name="toolBarMenu1.actions" mimetype="application/x-microsoft.net.object.binary.base64">
    <value>
        AAEAAAD/////AQAAAAAAAAAMAgAAAJoBbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1u
        ZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XV0sIG1zY29ybGliLCBWZXJzaW9u
        PTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUB
        AAAAMFN5c3RlbS5Db2xsZWN0aW9ucy5HZW5lcmljLkxpc3RgMVtbU3lzdGVtLlN0cmluZwMAAAAGX2l0
        ZW1zBV9zaXplCF92ZXJzaW9uBgAACAgCAAAACQMAAAAQAAAAEAAAABEDAAAAEAAAAAYEAAAABuWinuWK
        oAYFAAAABuWIoOmZpAYGAAAABuS/ruaUuQYHAAAABuS/neWtmAYIAAAABuWPlua2iAYJAAAABuWIt+aW
        sAYKAAAABuWvvOWHugYLAAAABuWuoeaguAYMAAAACeWPjeWuoeaguAYNAAAABuaJk+WNsAYOAAAABuWQ
        iOW5tgYPAAAABuWvvOWFpQYQAAAABuaXpeW/lwYRAAAABuW8gOW3pQYSAAAABuWIl+ihqAYTAAAADOS/
        neWtmOadg+mZkAs=
</value>
  </data>
</root>
DevApp/Gs.DevApp/DevFrm/User/Role.Designer.cs
@@ -29,6 +29,7 @@
        /// </summary>
        private void InitializeComponent()
        {
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Role));
            this.toolBarMenu1 = new Gs.DevApp.UserControl.ToolBarMenu();
            this.xtraTabControl1 = new DevExpress.XtraTab.XtraTabControl();
            this.xtraTabPage1 = new DevExpress.XtraTab.XtraTabPage();
@@ -38,7 +39,7 @@
            this.rolRemark = new DevExpress.XtraGrid.Columns.GridColumn();
            this.status = new DevExpress.XtraGrid.Columns.GridColumn();
            this.createDate = new DevExpress.XtraGrid.Columns.GridColumn();
            this.PageBar1 = new UserControls.Data.PageBar();
            this.pageBar1 = new UserControls.Data.PageBar();
            this.xtraTabPage2 = new DevExpress.XtraTab.XtraTabPage();
            this.panel1 = new System.Windows.Forms.Panel();
            this.labelControl1 = new DevExpress.XtraEditors.LabelControl();
@@ -48,7 +49,6 @@
            this.txt_rolRemark = new DevExpress.XtraEditors.MemoEdit();
            this.labelControl7 = new DevExpress.XtraEditors.LabelControl();
            this.lbGuid = new System.Windows.Forms.Label();
            this.labelControl12 = new DevExpress.XtraEditors.LabelControl();
            this.labelControl9 = new DevExpress.XtraEditors.LabelControl();
            this.labelControl5 = new DevExpress.XtraEditors.LabelControl();
            this.txt_status = new DevExpress.XtraEditors.ComboBoxEdit();
@@ -69,6 +69,7 @@
            // 
            // toolBarMenu1
            // 
            this.toolBarMenu1.actions = ((System.Collections.Generic.List<string>)(resources.GetObject("toolBarMenu1.actions")));
            this.toolBarMenu1.Dock = System.Windows.Forms.DockStyle.Top;
            this.toolBarMenu1.isSetBtn = false;
            this.toolBarMenu1.Location = new System.Drawing.Point(0, 0);
@@ -91,7 +92,7 @@
            // xtraTabPage1
            // 
            this.xtraTabPage1.Controls.Add(this.gcMain);
            this.xtraTabPage1.Controls.Add(this.PageBar1);
            this.xtraTabPage1.Controls.Add(this.pageBar1);
            this.xtraTabPage1.Name = "xtraTabPage1";
            this.xtraTabPage1.Size = new System.Drawing.Size(933, 629);
            this.xtraTabPage1.Text = "数据查询";
@@ -99,6 +100,7 @@
            // gcMain
            // 
            this.gcMain.Dock = System.Windows.Forms.DockStyle.Fill;
            this.gcMain.Font = new System.Drawing.Font("Tahoma", 10F);
            this.gcMain.Location = new System.Drawing.Point(0, 0);
            this.gcMain.MainView = this.gridView1;
            this.gcMain.Name = "gcMain";
@@ -109,6 +111,8 @@
            // 
            // gridView1
            // 
            this.gridView1.Appearance.Row.Font = new System.Drawing.Font("Tahoma", 10F);
            this.gridView1.Appearance.Row.Options.UseFont = true;
            this.gridView1.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] {
            this.roleName,
            this.rolRemark,
@@ -117,6 +121,7 @@
            this.gridView1.GridControl = this.gcMain;
            this.gridView1.Name = "gridView1";
            this.gridView1.OptionsView.ShowButtonMode = DevExpress.XtraGrid.Views.Base.ShowButtonModeEnum.ShowAlways;
            this.gridView1.OptionsView.ShowGroupPanel = false;
            // 
            // roleName
            // 
@@ -162,18 +167,18 @@
            this.createDate.VisibleIndex = 3;
            this.createDate.Width = 94;
            // 
            // PageBar1
            // pageBar1
            // 
            this.PageBar1.CurrentPage = 0;
            this.PageBar1.Dock = System.Windows.Forms.DockStyle.Bottom;
            this.PageBar1.Location = new System.Drawing.Point(0, 589);
            this.PageBar1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
            this.PageBar1.Name = "PageBar1";
            this.PageBar1.RecordCount = 0;
            this.PageBar1.RowsCount = 0;
            this.PageBar1.Size = new System.Drawing.Size(933, 40);
            this.PageBar1.TabIndex = 6;
            this.PageBar1.TotalPages = 0;
            this.pageBar1.CurrentPage = 0;
            this.pageBar1.Dock = System.Windows.Forms.DockStyle.Bottom;
            this.pageBar1.Location = new System.Drawing.Point(0, 589);
            this.pageBar1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
            this.pageBar1.Name = "pageBar1";
            this.pageBar1.RecordCount = 0;
            this.pageBar1.RowsCount = 0;
            this.pageBar1.Size = new System.Drawing.Size(933, 40);
            this.pageBar1.TabIndex = 6;
            this.pageBar1.TotalPages = 0;
            // 
            // xtraTabPage2
            // 
@@ -184,6 +189,7 @@
            // 
            // panel1
            // 
            this.panel1.BackColor = System.Drawing.Color.White;
            this.panel1.Controls.Add(this.labelControl1);
            this.panel1.Controls.Add(this.labelControl10);
            this.panel1.Controls.Add(this.txt_roleName);
@@ -191,10 +197,10 @@
            this.panel1.Controls.Add(this.txt_rolRemark);
            this.panel1.Controls.Add(this.labelControl7);
            this.panel1.Controls.Add(this.lbGuid);
            this.panel1.Controls.Add(this.labelControl12);
            this.panel1.Controls.Add(this.labelControl9);
            this.panel1.Controls.Add(this.labelControl5);
            this.panel1.Controls.Add(this.txt_status);
            this.panel1.Font = new System.Drawing.Font("Tahoma", 10F);
            this.panel1.Location = new System.Drawing.Point(62, 49);
            this.panel1.Name = "panel1";
            this.panel1.Size = new System.Drawing.Size(585, 386);
@@ -213,7 +219,7 @@
            // 
            this.labelControl10.Appearance.ForeColor = System.Drawing.Color.Red;
            this.labelControl10.Appearance.Options.UseForeColor = true;
            this.labelControl10.Location = new System.Drawing.Point(418, 29);
            this.labelControl10.Location = new System.Drawing.Point(426, 25);
            this.labelControl10.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
            this.labelControl10.Name = "labelControl10";
            this.labelControl10.Size = new System.Drawing.Size(8, 18);
@@ -222,36 +228,44 @@
            // 
            // txt_roleName
            // 
            this.txt_roleName.Location = new System.Drawing.Point(115, 16);
            this.txt_roleName.Location = new System.Drawing.Point(123, 16);
            this.txt_roleName.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
            this.txt_roleName.Name = "txt_roleName";
            this.txt_roleName.Size = new System.Drawing.Size(297, 24);
            this.txt_roleName.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 10F);
            this.txt_roleName.Properties.Appearance.Options.UseFont = true;
            this.txt_roleName.Size = new System.Drawing.Size(297, 28);
            this.txt_roleName.TabIndex = 128;
            // 
            // labelControl8
            // 
            this.labelControl8.Appearance.Font = new System.Drawing.Font("Tahoma", 10F);
            this.labelControl8.Appearance.Options.UseFont = true;
            this.labelControl8.Location = new System.Drawing.Point(31, 20);
            this.labelControl8.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
            this.labelControl8.Name = "labelControl8";
            this.labelControl8.Size = new System.Drawing.Size(75, 18);
            this.labelControl8.Size = new System.Drawing.Size(85, 21);
            this.labelControl8.TabIndex = 127;
            this.labelControl8.Text = "角色名称:";
            // 
            // txt_rolRemark
            // 
            this.txt_rolRemark.Location = new System.Drawing.Point(115, 54);
            this.txt_rolRemark.Location = new System.Drawing.Point(123, 67);
            this.txt_rolRemark.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
            this.txt_rolRemark.Name = "txt_rolRemark";
            this.txt_rolRemark.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 10F);
            this.txt_rolRemark.Properties.Appearance.Options.UseFont = true;
            this.txt_rolRemark.Properties.ScrollBars = System.Windows.Forms.ScrollBars.None;
            this.txt_rolRemark.Size = new System.Drawing.Size(297, 68);
            this.txt_rolRemark.TabIndex = 126;
            // 
            // labelControl7
            // 
            this.labelControl7.Appearance.Font = new System.Drawing.Font("Tahoma", 10F);
            this.labelControl7.Appearance.Options.UseFont = true;
            this.labelControl7.Location = new System.Drawing.Point(31, 67);
            this.labelControl7.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
            this.labelControl7.Name = "labelControl7";
            this.labelControl7.Size = new System.Drawing.Size(75, 18);
            this.labelControl7.Size = new System.Drawing.Size(85, 21);
            this.labelControl7.TabIndex = 125;
            this.labelControl7.Text = "角色备注:";
            // 
@@ -260,25 +274,14 @@
            this.lbGuid.AutoSize = true;
            this.lbGuid.Location = new System.Drawing.Point(121, 226);
            this.lbGuid.Name = "lbGuid";
            this.lbGuid.Size = new System.Drawing.Size(0, 18);
            this.lbGuid.Size = new System.Drawing.Size(0, 21);
            this.lbGuid.TabIndex = 1;
            //
            // labelControl12
            //
            this.labelControl12.Appearance.ForeColor = System.Drawing.Color.Red;
            this.labelControl12.Appearance.Options.UseForeColor = true;
            this.labelControl12.Location = new System.Drawing.Point(418, 55);
            this.labelControl12.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
            this.labelControl12.Name = "labelControl12";
            this.labelControl12.Size = new System.Drawing.Size(8, 18);
            this.labelControl12.TabIndex = 107;
            this.labelControl12.Text = "*";
            // 
            // labelControl9
            // 
            this.labelControl9.Appearance.ForeColor = System.Drawing.Color.Red;
            this.labelControl9.Appearance.Options.UseForeColor = true;
            this.labelControl9.Location = new System.Drawing.Point(418, 98);
            this.labelControl9.Location = new System.Drawing.Point(426, 73);
            this.labelControl9.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
            this.labelControl9.Name = "labelControl9";
            this.labelControl9.Size = new System.Drawing.Size(8, 18);
@@ -287,18 +290,22 @@
            // 
            // labelControl5
            // 
            this.labelControl5.Location = new System.Drawing.Point(31, 152);
            this.labelControl5.Appearance.Font = new System.Drawing.Font("Tahoma", 10F);
            this.labelControl5.Appearance.Options.UseFont = true;
            this.labelControl5.Location = new System.Drawing.Point(31, 156);
            this.labelControl5.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
            this.labelControl5.Name = "labelControl5";
            this.labelControl5.Size = new System.Drawing.Size(75, 18);
            this.labelControl5.Size = new System.Drawing.Size(85, 21);
            this.labelControl5.TabIndex = 101;
            this.labelControl5.Text = "角色状态:";
            // 
            // txt_status
            // 
            this.txt_status.Location = new System.Drawing.Point(115, 148);
            this.txt_status.Location = new System.Drawing.Point(123, 152);
            this.txt_status.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
            this.txt_status.Name = "txt_status";
            this.txt_status.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 10F);
            this.txt_status.Properties.Appearance.Options.UseFont = true;
            this.txt_status.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
            this.txt_status.Properties.Items.AddRange(new object[] {
@@ -306,7 +313,7 @@
            "正常",
            "禁用"});
            this.txt_status.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
            this.txt_status.Size = new System.Drawing.Size(297, 24);
            this.txt_status.Size = new System.Drawing.Size(297, 28);
            this.txt_status.TabIndex = 100;
            // 
            // groupBox1
@@ -368,7 +375,7 @@
        private DevExpress.XtraGrid.Columns.GridColumn status;
        private System.Windows.Forms.GroupBox groupBox1;
        private System.Windows.Forms.TreeView trv;
        private UserControls.Data.PageBar PageBar1;
        private UserControls.Data.PageBar pageBar1;
        private System.Windows.Forms.Panel panel1;
        private DevExpress.XtraEditors.LabelControl labelControl10;
        private DevExpress.XtraEditors.TextEdit txt_roleName;
@@ -376,7 +383,6 @@
        private DevExpress.XtraEditors.MemoEdit txt_rolRemark;
        private DevExpress.XtraEditors.LabelControl labelControl7;
        private System.Windows.Forms.Label lbGuid;
        private DevExpress.XtraEditors.LabelControl labelControl12;
        private DevExpress.XtraEditors.LabelControl labelControl9;
        private DevExpress.XtraEditors.LabelControl labelControl5;
        private DevExpress.XtraEditors.ComboBoxEdit txt_status;
DevApp/Gs.DevApp/DevFrm/User/Role.cs
@@ -1,5 +1,6 @@
using DevExpress.XtraGrid.Views.Base;
using DevExpress.XtraTreeList.Nodes;
using DevExpress.XtraGrid.Views.Grid;
using DevExpress.XtraGrid.Views.Grid.ViewInfo;
using Gs.DevApp.Models;
using Gs.DevApp.ToolBox;
using Newtonsoft.Json;
@@ -9,10 +10,11 @@
namespace Gs.DevApp.DevFrm.User
{
    //https://www.cnblogs.com/mkmkbj/p/16771297.html
    //https://blog.csdn.net/m0_54035969/article/details/140716675
    public partial class Role : DevExpress.XtraEditors.XtraForm
    {
        System.Text.StringBuilder sbRolist = new System.Text.StringBuilder();
        System.Text.StringBuilder actionLst = new System.Text.StringBuilder();
        public Role()
        {
            InitializeComponent();
@@ -25,19 +27,21 @@
            this.toolBarMenu1.btnRoleClick += ToolBarMenu1_btnRoleClick;
            gcMain.MouseDoubleClick += GcMain_MouseDoubleClick;
            gridView1.FocusedRowChanged += GridView1_FocusedRowChanged;
            PageBar1.PagerEvent += PageBar1_PagerEvent;
            GetPageList(1, UtilityHelper.GetPageSize());
            pageBar1.PagerEvent += PageBar1_PagerEvent;
            getPageList(1, UtilityHelper.GetPageSize());
            trv.AfterCheck += Trv_AfterCheck;
        }
        /// <summary>
        /// æ¢åˆ‡æ¢äº‹ä»¶
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void GridView1_FocusedRowChanged(object sender, FocusedRowChangedEventArgs e)
        {
            string rowGuid = "";
            DataRow myDataRow = gridView1.GetDataRow(e.FocusedRowHandle);
            rowGuid = myDataRow["guid"].ToString();
            GetTree(rowGuid);
            getTree(rowGuid);
            groupBox1.Text = "请勾选【" + myDataRow["roleName"].ToString() + "】的权限";
        }
        /// <summary>
@@ -47,12 +51,20 @@
        /// <param name="e"></param>
        private void GcMain_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            string rowGuid = "";
            ColumnView cv = (ColumnView)gcMain.FocusedView;
            object rowIdObj = gridView1.GetRowCellValue(cv.FocusedRowHandle, "guid");
            DataRow myDataRow = gridView1.GetDataRow(gridView1.FocusedRowHandle);
            rowGuid = myDataRow["guid"].ToString();
            GetModel(rowGuid, false, 999);
            GridHitInfo info = gridView1.CalcHitInfo(e.Location);
            if (info.InRow)
            {
                GridView view = info.View as GridView;
                if (view != null)
                {
                    DataRow row = view.GetDataRow(info.RowHandle);
                    if (row != null)
                    {
                        string rowGuid = (row["guid"].ToString());
                        getModel(rowGuid, false, 999);
                    }
                }
            }
        }
        /// <summary>
        /// åˆ†é¡µäº‹ä»¶
@@ -61,7 +73,7 @@
        /// <param name="pageSize"></param>
        private void PageBar1_PagerEvent(int curPage, int pageSize)
        {
            GetPageList(curPage, pageSize);
            getPageList(curPage, pageSize);
        }
        /// <summary>
        /// å–消事件
@@ -85,11 +97,11 @@
                ToolBox.MsgHelper.Warning("请先选择你要操作的行!");
                return;
            }
            if (!MsgHelper.AskQuestion("你选择了【" + dr["roleName"].ToString() + "】,确定删除吗?"))
            if (!MsgHelper.AskQuestion("你选择了【" + dr["roleName"].ToString() + "】,确定删除吗?\n该操作将会清空相应的用户权限"))
                return;
            var _obj = new
            {
                guidList = dr["guid"].ToString(),//主建
                guid = dr["guid"].ToString(),//主建
            };
            string strJson = "";
            try
@@ -99,7 +111,7 @@
                if (_rtn.rtnCode > 0)
                {
                    UtilityHelper.ChangeTab(xtraTabControl1, 0);
                    GetPageList(1, UtilityHelper.GetPageSize());
                    getPageList(1, UtilityHelper.GetPageSize());
                }
                ToolBox.MsgHelper.Warning("提示:" + _rtn.rtnMsg);
            }
@@ -116,7 +128,7 @@
        private void ToolBarMenu1_btnLoadClick(object sender, EventArgs e)
        {
            UtilityHelper.ChangeTab(xtraTabControl1, 0);
            GetPageList(1, UtilityHelper.GetPageSize());
            getPageList(1, UtilityHelper.GetPageSize());
        }
        /// <summary>
        /// ä¿®æ”¹äº‹ä»¶
@@ -131,7 +143,7 @@
                ToolBox.MsgHelper.Warning("请先选择你要操作的行!");
                return;
            }
            GetModel(dr["guid"].ToString(), true, 1);
            getModel(dr["guid"].ToString(), true, 1);
        }
        /// <summary>
@@ -165,10 +177,10 @@
                txt_rolRemark.Focus();
                return;
            }
            if (string.IsNullOrEmpty(txt_status.Text.Trim()))
            if (txt_status.SelectedIndex <= 0)
            {
                Gs.DevApp.ToolBox.MsgHelper.Warning("角色状态不能为空!");
                txt_rolRemark.Focus();
                txt_status.Focus();
                return;
            }
            var _obj = new
@@ -178,10 +190,9 @@
                rolRemark = txt_rolRemark.Text.Trim(),
                status = txt_status.SelectedIndex,//状态
            };
            string strJson = "";
            try
            {
                strJson = UtilityHelper.HttpPost("", "Role/EditModel", JsonConvert.SerializeObject(_obj));
                string strJson = UtilityHelper.HttpPost("", "Role/EditModel", JsonConvert.SerializeObject(_obj));
                ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.GetDataByJson(strJson);
                ToolBox.MsgHelper.Warning("提示:" + _rtn.rtnMsg);
                if (_rtn.rtnCode > 0)
@@ -212,23 +223,18 @@
            }
            if (!MsgHelper.AskQuestion("你选择了【" + dr["roleName"].ToString() + "】,确定设置权限吗?"))
                return;
            sbRolist = new System.Text.StringBuilder();
            actionLst = new System.Text.StringBuilder();
            TraverseTreeViewNodes(trv.Nodes);
            var _obj = new
            {
                roleGuid = dr["guid"].ToString(),
                roleLst = sbRolist.ToString(),
                actionLst = actionLst.ToString(),
            };
            string strJson = "";
            try
            {
                strJson = UtilityHelper.HttpPost("", "MenuAction/SetRoleByRolueGuid", JsonConvert.SerializeObject(_obj));
                string strJson = UtilityHelper.HttpPost("", "MenuAction/SetMenuActionByRole", JsonConvert.SerializeObject(_obj));
                ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.GetDataByJson(strJson);
                if (_rtn.rtnCode > 0)
                {
                }
                ToolBox.MsgHelper.Warning("提示:" + _rtn.rtnMsg);
                ToolBox.MsgHelper.Warning("提示:" + _rtn.rtnData.outMsg);
            }
            catch (Exception ex)
            {
@@ -241,32 +247,31 @@
        /// </summary>
        /// <param name="curPage">第几页</param>
        /// <param name="pageSize">每页几条</param>
        private void GetPageList(int curPage, int pageSize)
        private void getPageList(int curPage, int pageSize)
        {
            Models.PageQueryModel pgq = new Models.PageQueryModel(curPage, pageSize, "createDate", "asc", "", "");
            string json = JsonConvert.SerializeObject(pgq);
            string strReturn = "";
            try
            {
                strReturn = UtilityHelper.HttpPost("", "Role/GetListPage", json);
                string strReturn = UtilityHelper.HttpPost("", "Role/GetListPage", json);
                ReturnModel<PageListModel> dd = UtilityHelper.GetTableByJson(strReturn);
                DataTable dt = dd.rtnData.list;
                gcMain.BindingContext = new BindingContext();
                gcMain.DataSource = dt;
                gcMain.ForceInitialize();
                int dddd = dd.rtnData.pages;//总页
                PageBar1.TotalPages = dddd;
                PageBar1.RecordCount = dd.rtnData.total;//记录总数
                PageBar1.CurrentPage = curPage;//当前页
                PageBar1.RowsCount = pageSize;//每页显示
                PageBar1.setTxt();
                pageBar1.TotalPages = dddd;
                pageBar1.RecordCount = dd.rtnData.total;//记录总数
                pageBar1.CurrentPage = curPage;//当前页
                pageBar1.RowsCount = pageSize;//每页显示
                pageBar1.setTxt();
            }
            catch (Exception ex)
            {
                ToolBox.MsgHelper.Warning("提示:" + ex.Message);
            }
        }
        private void GetModel(string strGuid, bool isEdit, int tabIdx)
        private void getModel(string strGuid, bool isEdit, int tabIdx)
        {
            if (string.IsNullOrEmpty(strGuid))
            {
@@ -297,7 +302,7 @@
                ToolBox.MsgHelper.Warning("提示:" + ex.Message);
            }
        }
        private void GetTree(string rolueGuid)
        private void getTree(string roleGuid)
        {
            trv.Nodes.Clear();
            ImageList imageList = new ImageList();
@@ -308,12 +313,12 @@
            trv.ImageList = imageList;
            var _obj = new
            {
                rolueGuid = rolueGuid,//主建
                roleGuid = roleGuid,//主建
            };
            string strReturn = "";
            try
            {
                strReturn = UtilityHelper.HttpPost("", "MenuAction/GetListPageByOrg", JsonConvert.SerializeObject(_obj));
                strReturn = UtilityHelper.HttpPost("", "MenuAction/GetListByRole", JsonConvert.SerializeObject(_obj));
                ReturnModel<PageListModel> dd = UtilityHelper.GetTableByJson(strReturn);
                DataTable dt = dd.rtnData.list;
                DataRow[] drGrp = dt.Select("upGuid='' or upGuid is null");
@@ -324,6 +329,7 @@
                    node.Text = _dy["name"].ToString();//为结点赋值
                    node.Name = _dy["guid"].ToString();
                    node.ImageIndex = 0;
                    node.Checked = (_dy["isCk"].ToString() == "1" ? true : false);
                    DataRow[] drItem = dt.Select("upGuid='" + _dy["guid"].ToString() + "' and orgGuid='" + _dy["guid"].ToString() + "'");
                    foreach (DataRow _dy2 in drItem)
                    {
@@ -331,6 +337,7 @@
                        node22.Text = _dy2["name"].ToString();//为结点赋值
                        node22.Name = _orgGuid + _dy2["guid"].ToString();
                        node22.ImageIndex = 1;
                        node22.Checked = (_dy2["isCk"].ToString() == "1" ? true : false);
                        DataRow[] drItem33 = dt.Select("upGuid='" + _dy2["guid"].ToString() + "' and orgGuid='" + _dy["guid"].ToString() + "'");
                        foreach (DataRow _dy3 in drItem33)
                        {
@@ -338,6 +345,7 @@
                            node33.Text = _dy3["name"].ToString();//为结点赋值
                            node33.Name = _orgGuid + _dy3["guid"].ToString();
                            node33.ImageIndex = 2;
                            node33.Checked = (_dy3["isCk"].ToString() == "1" ? true : false);
                            DataRow[] drItem44 = dt.Select("upGuid='" + _dy3["guid"].ToString() + "' and orgGuid='" + _dy["guid"].ToString() + "'");
                            foreach (DataRow _dy4 in drItem44)
                            {
@@ -345,6 +353,7 @@
                                node44.Text = _dy4["name"].ToString();//为结点赋值
                                node44.Name = _orgGuid + _dy4["guid"].ToString();
                                node44.ImageIndex = 3;
                                node44.Checked = (_dy4["isCk"].ToString() == "1" ? true : false);
                                node33.Nodes.Add(node44);
                            }
                            node22.Nodes.Add(node33);
@@ -378,7 +387,7 @@
            foreach (TreeNode node in nodes)
            {
                if (node.Checked)
                    sbRolist.Append(node.Name + "~");
                    actionLst.Append(node.Name + "~");
                // é€’归遍历子节点
                if (node.Nodes.Count > 0)
                {
DevApp/Gs.DevApp/DevFrm/User/Role.resx
@@ -117,4 +117,17 @@
  <resheader name="writer">
    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  </resheader>
  <data name="toolBarMenu1.actions" mimetype="application/x-microsoft.net.object.binary.base64">
    <value>
        AAEAAAD/////AQAAAAAAAAAMAgAAAJoBbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1u
        ZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XV0sIG1zY29ybGliLCBWZXJzaW9u
        PTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUB
        AAAAMFN5c3RlbS5Db2xsZWN0aW9ucy5HZW5lcmljLkxpc3RgMVtbU3lzdGVtLlN0cmluZwMAAAAGX2l0
        ZW1zBV9zaXplCF92ZXJzaW9uBgAACAgCAAAACQMAAAAQAAAAEAAAABEDAAAAEAAAAAYEAAAABuWinuWK
        oAYFAAAABuWIoOmZpAYGAAAABuS/ruaUuQYHAAAABuS/neWtmAYIAAAABuWPlua2iAYJAAAABuWIt+aW
        sAYKAAAABuWvvOWHugYLAAAABuWuoeaguAYMAAAACeWPjeWuoeaguAYNAAAABuaJk+WNsAYOAAAABuWQ
        iOW5tgYPAAAABuWvvOWFpQYQAAAABuaXpeW/lwYRAAAABuW8gOW3pQYSAAAABuWIl+ihqAYTAAAADOS/
        neWtmOadg+mZkAs=
</value>
  </data>
</root>
DevApp/Gs.DevApp/DevFrm/User/SysMenu.Designer.cs
@@ -29,6 +29,7 @@
        /// </summary>
        private void InitializeComponent()
        {
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SysMenu));
            this.toolBarMenu1 = new Gs.DevApp.UserControl.ToolBarMenu();
            this.xtraTabControl1 = new DevExpress.XtraTab.XtraTabControl();
            this.xtraTabPage1 = new DevExpress.XtraTab.XtraTabPage();
@@ -42,6 +43,8 @@
            this.tlcMenuType = new DevExpress.XtraTreeList.Columns.TreeListColumn();
            this.xtraTabPage2 = new DevExpress.XtraTab.XtraTabPage();
            this.panel1 = new System.Windows.Forms.Panel();
            this.label3 = new System.Windows.Forms.Label();
            this.txt_name = new DevExpress.XtraEditors.ComboBoxEdit();
            this.labelControl11 = new DevExpress.XtraEditors.LabelControl();
            this.lbGuid = new System.Windows.Forms.Label();
            this.label2 = new System.Windows.Forms.Label();
@@ -63,7 +66,6 @@
            this.txt_icon = new DevExpress.XtraEditors.TextEdit();
            this.labelControl4 = new DevExpress.XtraEditors.LabelControl();
            this.labelControl3 = new DevExpress.XtraEditors.LabelControl();
            this.txt_name = new DevExpress.XtraEditors.TextEdit();
            this.labelControl2 = new DevExpress.XtraEditors.LabelControl();
            ((System.ComponentModel.ISupportInitialize)(this.xtraTabControl1)).BeginInit();
            this.xtraTabControl1.SuspendLayout();
@@ -71,6 +73,7 @@
            ((System.ComponentModel.ISupportInitialize)(this.tlMenu)).BeginInit();
            this.xtraTabPage2.SuspendLayout();
            this.panel1.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.txt_name.Properties)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.txt_upGuid.Properties)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.treeListLookUpEdit1TreeList)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.txt_status.Properties)).BeginInit();
@@ -78,11 +81,11 @@
            ((System.ComponentModel.ISupportInitialize)(this.txt_formPath.Properties)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.txt_category.Properties)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.txt_icon.Properties)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.txt_name.Properties)).BeginInit();
            this.SuspendLayout();
            // 
            // toolBarMenu1
            // 
            this.toolBarMenu1.actions = ((System.Collections.Generic.List<string>)(resources.GetObject("toolBarMenu1.actions")));
            this.toolBarMenu1.Dock = System.Windows.Forms.DockStyle.Top;
            this.toolBarMenu1.isSetBtn = false;
            this.toolBarMenu1.Location = new System.Drawing.Point(0, 0);
@@ -212,6 +215,9 @@
            // 
            // panel1
            // 
            this.panel1.BackColor = System.Drawing.Color.White;
            this.panel1.Controls.Add(this.label3);
            this.panel1.Controls.Add(this.txt_name);
            this.panel1.Controls.Add(this.labelControl11);
            this.panel1.Controls.Add(this.lbGuid);
            this.panel1.Controls.Add(this.label2);
@@ -231,16 +237,36 @@
            this.panel1.Controls.Add(this.txt_icon);
            this.panel1.Controls.Add(this.labelControl4);
            this.panel1.Controls.Add(this.labelControl3);
            this.panel1.Controls.Add(this.txt_name);
            this.panel1.Controls.Add(this.labelControl2);
            this.panel1.Font = new System.Drawing.Font("Tahoma", 10F);
            this.panel1.Location = new System.Drawing.Point(29, 34);
            this.panel1.Name = "panel1";
            this.panel1.Size = new System.Drawing.Size(602, 411);
            this.panel1.Size = new System.Drawing.Size(665, 411);
            this.panel1.TabIndex = 2;
            //
            // label3
            //
            this.label3.AutoSize = true;
            this.label3.Location = new System.Drawing.Point(429, 87);
            this.label3.Name = "label3";
            this.label3.Size = new System.Drawing.Size(248, 21);
            this.label3.TabIndex = 132;
            this.label3.Text = "(按钮类型请从下拉框中选择)";
            //
            // txt_name
            //
            this.txt_name.Location = new System.Drawing.Point(111, 83);
            this.txt_name.Name = "txt_name";
            this.txt_name.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 10F);
            this.txt_name.Properties.Appearance.Options.UseFont = true;
            this.txt_name.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
            this.txt_name.Size = new System.Drawing.Size(297, 28);
            this.txt_name.TabIndex = 3;
            // 
            // labelControl11
            // 
            this.labelControl11.Location = new System.Drawing.Point(63, 342);
            this.labelControl11.Location = new System.Drawing.Point(13, 342);
            this.labelControl11.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
            this.labelControl11.Name = "labelControl11";
            this.labelControl11.Size = new System.Drawing.Size(45, 18);
@@ -252,24 +278,24 @@
            this.lbGuid.AutoSize = true;
            this.lbGuid.Location = new System.Drawing.Point(111, 342);
            this.lbGuid.Name = "lbGuid";
            this.lbGuid.Size = new System.Drawing.Size(0, 18);
            this.lbGuid.Size = new System.Drawing.Size(0, 21);
            this.lbGuid.TabIndex = 1;
            // 
            // label2
            // 
            this.label2.AutoSize = true;
            this.label2.Location = new System.Drawing.Point(412, 155);
            this.label2.Location = new System.Drawing.Point(412, 168);
            this.label2.Name = "label2";
            this.label2.Size = new System.Drawing.Size(158, 36);
            this.label2.Size = new System.Drawing.Size(180, 42);
            this.label2.TabIndex = 119;
            this.label2.Text = "(窗体的命名空间全称\r\n   ï¼Œçˆ¶èœå•可为空)";
            this.label2.Text = "(若指赂窗体,则填写\r\n命名空间全称)";
            // 
            // label1
            // 
            this.label1.AutoSize = true;
            this.label1.Location = new System.Drawing.Point(412, 14);
            this.label1.Location = new System.Drawing.Point(412, 15);
            this.label1.Name = "label1";
            this.label1.Size = new System.Drawing.Size(143, 18);
            this.label1.Size = new System.Drawing.Size(163, 21);
            this.label1.TabIndex = 118;
            this.label1.Text = "(空将为一级菜单)";
            // 
@@ -289,10 +315,12 @@
            this.txt_upGuid.EditValue = "无可奈何花落去";
            this.txt_upGuid.Location = new System.Drawing.Point(111, 11);
            this.txt_upGuid.Name = "txt_upGuid";
            this.txt_upGuid.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 10F);
            this.txt_upGuid.Properties.Appearance.Options.UseFont = true;
            this.txt_upGuid.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
            this.txt_upGuid.Properties.TreeList = this.treeListLookUpEdit1TreeList;
            this.txt_upGuid.Size = new System.Drawing.Size(297, 24);
            this.txt_upGuid.Size = new System.Drawing.Size(297, 28);
            this.txt_upGuid.TabIndex = 116;
            // 
            // treeListLookUpEdit1TreeList
@@ -318,18 +346,22 @@
            // 
            // labelControl7
            // 
            this.labelControl7.Location = new System.Drawing.Point(33, 232);
            this.labelControl7.Appearance.Font = new System.Drawing.Font("Tahoma", 10F);
            this.labelControl7.Appearance.Options.UseFont = true;
            this.labelControl7.Location = new System.Drawing.Point(13, 232);
            this.labelControl7.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
            this.labelControl7.Name = "labelControl7";
            this.labelControl7.Size = new System.Drawing.Size(75, 18);
            this.labelControl7.Size = new System.Drawing.Size(85, 21);
            this.labelControl7.TabIndex = 115;
            this.labelControl7.Text = "菜单状态:";
            // 
            // txt_status
            // 
            this.txt_status.Location = new System.Drawing.Point(111, 228);
            this.txt_status.Location = new System.Drawing.Point(111, 231);
            this.txt_status.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
            this.txt_status.Name = "txt_status";
            this.txt_status.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 10F);
            this.txt_status.Properties.Appearance.Options.UseFont = true;
            this.txt_status.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
            this.txt_status.Properties.Items.AddRange(new object[] {
@@ -337,14 +369,14 @@
            "正常",
            "禁用"});
            this.txt_status.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
            this.txt_status.Size = new System.Drawing.Size(297, 24);
            this.txt_status.Size = new System.Drawing.Size(297, 28);
            this.txt_status.TabIndex = 114;
            // 
            // txt_idx
            // 
            this.txt_idx.Location = new System.Drawing.Point(111, 267);
            this.txt_idx.Name = "txt_idx";
            this.txt_idx.Size = new System.Drawing.Size(120, 26);
            this.txt_idx.Size = new System.Drawing.Size(297, 28);
            this.txt_idx.TabIndex = 113;
            this.txt_idx.Value = new decimal(new int[] {
            2,
@@ -354,10 +386,12 @@
            // 
            // labelControl1
            // 
            this.labelControl1.Location = new System.Drawing.Point(33, 275);
            this.labelControl1.Appearance.Font = new System.Drawing.Font("Tahoma", 10F);
            this.labelControl1.Appearance.Options.UseFont = true;
            this.labelControl1.Location = new System.Drawing.Point(13, 275);
            this.labelControl1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
            this.labelControl1.Name = "labelControl1";
            this.labelControl1.Size = new System.Drawing.Size(75, 18);
            this.labelControl1.Size = new System.Drawing.Size(85, 21);
            this.labelControl1.TabIndex = 112;
            this.labelControl1.Text = "菜单排序:";
            // 
@@ -365,7 +399,7 @@
            // 
            this.labelControl12.Appearance.ForeColor = System.Drawing.Color.Red;
            this.labelControl12.Appearance.Options.UseForeColor = true;
            this.labelControl12.Location = new System.Drawing.Point(418, 49);
            this.labelControl12.Location = new System.Drawing.Point(418, 52);
            this.labelControl12.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
            this.labelControl12.Name = "labelControl12";
            this.labelControl12.Size = new System.Drawing.Size(8, 18);
@@ -376,7 +410,7 @@
            // 
            this.labelControl9.Appearance.ForeColor = System.Drawing.Color.Red;
            this.labelControl9.Appearance.Options.UseForeColor = true;
            this.labelControl9.Location = new System.Drawing.Point(418, 89);
            this.labelControl9.Location = new System.Drawing.Point(418, 88);
            this.labelControl9.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
            this.labelControl9.Name = "labelControl9";
            this.labelControl9.Size = new System.Drawing.Size(8, 18);
@@ -385,37 +419,45 @@
            // 
            // labelControl6
            // 
            this.labelControl6.Location = new System.Drawing.Point(33, 155);
            this.labelControl6.Appearance.Font = new System.Drawing.Font("Tahoma", 10F);
            this.labelControl6.Appearance.Options.UseFont = true;
            this.labelControl6.Location = new System.Drawing.Point(13, 155);
            this.labelControl6.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
            this.labelControl6.Name = "labelControl6";
            this.labelControl6.Size = new System.Drawing.Size(75, 18);
            this.labelControl6.Size = new System.Drawing.Size(85, 21);
            this.labelControl6.TabIndex = 103;
            this.labelControl6.Text = "窗体类名:";
            // 
            // txt_formPath
            // 
            this.txt_formPath.Location = new System.Drawing.Point(111, 152);
            this.txt_formPath.Location = new System.Drawing.Point(111, 155);
            this.txt_formPath.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
            this.txt_formPath.Name = "txt_formPath";
            this.txt_formPath.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 10F);
            this.txt_formPath.Properties.Appearance.Options.UseFont = true;
            this.txt_formPath.Properties.ScrollBars = System.Windows.Forms.ScrollBars.None;
            this.txt_formPath.Size = new System.Drawing.Size(297, 68);
            this.txt_formPath.TabIndex = 102;
            // 
            // labelControl5
            // 
            this.labelControl5.Location = new System.Drawing.Point(36, 49);
            this.labelControl5.Appearance.Font = new System.Drawing.Font("Tahoma", 10F);
            this.labelControl5.Appearance.Options.UseFont = true;
            this.labelControl5.Location = new System.Drawing.Point(13, 49);
            this.labelControl5.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
            this.labelControl5.Name = "labelControl5";
            this.labelControl5.Size = new System.Drawing.Size(75, 18);
            this.labelControl5.Size = new System.Drawing.Size(85, 21);
            this.labelControl5.TabIndex = 101;
            this.labelControl5.Text = "菜单类型:";
            // 
            // txt_category
            // 
            this.txt_category.EditValue = "-请选择-";
            this.txt_category.Location = new System.Drawing.Point(111, 45);
            this.txt_category.Location = new System.Drawing.Point(111, 47);
            this.txt_category.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
            this.txt_category.Name = "txt_category";
            this.txt_category.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 10F);
            this.txt_category.Properties.Appearance.Options.UseFont = true;
            this.txt_category.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
            this.txt_category.Properties.Items.AddRange(new object[] {
@@ -423,49 +465,49 @@
            "窗体类型",
            "按钮类型"});
            this.txt_category.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
            this.txt_category.Size = new System.Drawing.Size(297, 24);
            this.txt_category.Size = new System.Drawing.Size(297, 28);
            this.txt_category.TabIndex = 100;
            // 
            // txt_icon
            // 
            this.txt_icon.Location = new System.Drawing.Point(111, 115);
            this.txt_icon.Location = new System.Drawing.Point(111, 119);
            this.txt_icon.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
            this.txt_icon.Name = "txt_icon";
            this.txt_icon.Size = new System.Drawing.Size(297, 24);
            this.txt_icon.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 10F);
            this.txt_icon.Properties.Appearance.Options.UseFont = true;
            this.txt_icon.Size = new System.Drawing.Size(297, 28);
            this.txt_icon.TabIndex = 99;
            // 
            // labelControl4
            // 
            this.labelControl4.Location = new System.Drawing.Point(33, 119);
            this.labelControl4.Appearance.Font = new System.Drawing.Font("Tahoma", 10F);
            this.labelControl4.Appearance.Options.UseFont = true;
            this.labelControl4.Location = new System.Drawing.Point(13, 119);
            this.labelControl4.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
            this.labelControl4.Name = "labelControl4";
            this.labelControl4.Size = new System.Drawing.Size(75, 18);
            this.labelControl4.Size = new System.Drawing.Size(85, 21);
            this.labelControl4.TabIndex = 98;
            this.labelControl4.Text = "菜单图标:";
            // 
            // labelControl3
            // 
            this.labelControl3.Location = new System.Drawing.Point(33, 17);
            this.labelControl3.Appearance.Font = new System.Drawing.Font("Tahoma", 10F);
            this.labelControl3.Appearance.Options.UseFont = true;
            this.labelControl3.Location = new System.Drawing.Point(13, 17);
            this.labelControl3.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
            this.labelControl3.Name = "labelControl3";
            this.labelControl3.Size = new System.Drawing.Size(75, 18);
            this.labelControl3.Size = new System.Drawing.Size(85, 21);
            this.labelControl3.TabIndex = 97;
            this.labelControl3.Text = "父级菜单:";
            // 
            // txt_name
            //
            this.txt_name.Location = new System.Drawing.Point(111, 80);
            this.txt_name.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
            this.txt_name.Name = "txt_name";
            this.txt_name.Size = new System.Drawing.Size(297, 24);
            this.txt_name.TabIndex = 95;
            //
            // labelControl2
            // 
            this.labelControl2.Location = new System.Drawing.Point(33, 84);
            this.labelControl2.Appearance.Font = new System.Drawing.Font("Tahoma", 10F);
            this.labelControl2.Appearance.Options.UseFont = true;
            this.labelControl2.Location = new System.Drawing.Point(13, 84);
            this.labelControl2.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
            this.labelControl2.Name = "labelControl2";
            this.labelControl2.Size = new System.Drawing.Size(75, 18);
            this.labelControl2.Size = new System.Drawing.Size(85, 21);
            this.labelControl2.TabIndex = 94;
            this.labelControl2.Text = "菜单名称:";
            // 
@@ -485,6 +527,7 @@
            this.xtraTabPage2.ResumeLayout(false);
            this.panel1.ResumeLayout(false);
            this.panel1.PerformLayout();
            ((System.ComponentModel.ISupportInitialize)(this.txt_name.Properties)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.txt_upGuid.Properties)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.treeListLookUpEdit1TreeList)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.txt_status.Properties)).EndInit();
@@ -492,7 +535,6 @@
            ((System.ComponentModel.ISupportInitialize)(this.txt_formPath.Properties)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.txt_category.Properties)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.txt_icon.Properties)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.txt_name.Properties)).EndInit();
            this.ResumeLayout(false);
        }
@@ -533,7 +575,8 @@
        private DevExpress.XtraEditors.TextEdit txt_icon;
        private DevExpress.XtraEditors.LabelControl labelControl4;
        private DevExpress.XtraEditors.LabelControl labelControl3;
        private DevExpress.XtraEditors.TextEdit txt_name;
        private DevExpress.XtraEditors.LabelControl labelControl2;
        private DevExpress.XtraEditors.ComboBoxEdit txt_name;
        private System.Windows.Forms.Label label3;
    }
}
DevApp/Gs.DevApp/DevFrm/User/SysMenu.cs
@@ -1,4 +1,5 @@
using DevExpress.XtraTreeList.Nodes;
using DevExpress.XtraTreeList;
using DevExpress.XtraTreeList.Nodes;
using Gs.DevApp.Models;
using Gs.DevApp.ToolBox;
using Newtonsoft.Json;
@@ -18,16 +19,51 @@
            this.toolBarMenu1.btnLoadClick += ToolBarMenu1_btnLoadClick;
            this.toolBarMenu1.btnDelClick += ToolBarMenu1_btnDelClick1;
            this.toolBarMenu1.btnEscClick += ToolBarMenu1_btnEscClick;
            tlMenu.DoubleClick += TlMenu_DoubleClick;
            GetTree();
            GetDownList();
            // txt_category.TextChanged += Txt_category_TextChanged;
            tlMenu.MouseDoubleClick += TlMenu_MouseDoubleClick;
            getTree();
            getDownList();
            getActionList();
        }
        private void TlMenu_DoubleClick(object sender, EventArgs e)
        /// <summary>
        /// èœå•类型改变事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Txt_category_TextChanged(object sender, EventArgs e)
        {
            TreeListNode clickedNode = this.tlMenu.FocusedNode;
            if (clickedNode.FirstNode == null) {
                string rowGuid = clickedNode.GetValue("guid").ToString();
                GetModel(rowGuid, false, 999);
            if (txt_category.SelectedIndex == 1)
            {
                this.txt_formPath.Enabled = true;
                this.txt_icon.Enabled = true;
            }
            else
            {
                this.txt_formPath.Enabled = false;
                this.txt_icon.Enabled = false;
                this.txt_formPath.Text = "";
                this.txt_icon.Text = "";
                MsgHelper.ShowError(txt_formPath.Enabled.ToString());
                MsgHelper.ShowError(txt_icon.Enabled.ToString());
            }
        }
        /// <summary>
        /// åŒå‡»è¡Œäº‹ä»¶
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void TlMenu_MouseDoubleClick(object sender, System.Windows.Forms.MouseEventArgs e)
        {
            TreeListHitInfo info = tlMenu.CalcHitInfo(e.Location);
            if (info.Node != null)
            {
                TreeListNode clickedNode = this.tlMenu.FocusedNode;
                if (clickedNode.FirstNode == null)
                {
                    string rowGuid = clickedNode.GetValue("guid").ToString();
                    getModel(rowGuid, false, 999);
                }
            }
        }
        /// <summary>
@@ -61,12 +97,11 @@
            {
                guid = rowGuid,//主建
            };
            string strJson = "";
            try
            {
                strJson = UtilityHelper.HttpPost("", "MenuAction/DeleteModel", JsonConvert.SerializeObject(_obj));
                string strJson = UtilityHelper.HttpPost("", "MenuAction/DeleteModel", JsonConvert.SerializeObject(_obj));
                ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.GetDataByJson(strJson);
                if (_rtn.rtnCode > 0) { GetTree(); }
                if (_rtn.rtnCode > 0) { getTree(); }
                ToolBox.MsgHelper.Warning("提示:" + _rtn.rtnMsg);
            }
            catch (Exception ex)
@@ -83,10 +118,8 @@
        private void ToolBarMenu1_btnLoadClick(object sender, EventArgs e)
        {
            UtilityHelper.ChangeTab(xtraTabControl1, 0);
            GetTree();
            getTree();
        }
        /// <summary>
        /// ä¿®æ”¹äº‹ä»¶
        /// </summary>
@@ -100,8 +133,7 @@
                ToolBox.MsgHelper.Warning("请先选择你要操作的行!");
                return;
            }
            GetModel(rowGuid, true, 1);
            getModel(rowGuid, true, 1);
        }
        /// <summary>
        /// æ–°å¢žäº‹ä»¶
@@ -141,6 +173,12 @@
                return;
            }
            string _upGuid = txt_upGuid.EditValue.ToString();
            if (txt_category.SelectedIndex == 2 && string.IsNullOrEmpty(_upGuid))
            {
                Gs.DevApp.ToolBox.MsgHelper.Warning("按钮类型必须选择父级菜单!");
                txt_status.Focus();
                return;
            }
            var _obj = new
            {
                guid = lbGuid.Text.Trim(),//主建
@@ -152,10 +190,9 @@
                idx = int.Parse(txt_idx.Value.ToString()),//排序
                category = txt_category.SelectedIndex,//类型
            };
            string strJson = "";
            try
            {
                strJson = UtilityHelper.HttpPost("", "MenuAction/EditModel", JsonConvert.SerializeObject(_obj));
                string strJson = UtilityHelper.HttpPost("", "MenuAction/EditModel", JsonConvert.SerializeObject(_obj));
                ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.GetDataByJson(strJson);
                ToolBox.MsgHelper.Warning("提示:" + _rtn.rtnMsg);
                if (_rtn.rtnCode > 0)
@@ -171,14 +208,13 @@
            }
        }
        private void GetTree()
        private void getTree()
        {
            Models.PageQueryModel pgq = new Models.PageQueryModel(1, 999999, "idx", "asc", "", "");
            string json = JsonConvert.SerializeObject(pgq);
            string strReturn = "";
            try
            {
                strReturn = UtilityHelper.HttpPost("", "MenuAction/GetListPage", json);
                string strReturn = UtilityHelper.HttpPost("", "MenuAction/GetListPage", json);
                ReturnModel<PageListModel> dd = UtilityHelper.GetTableByJson(strReturn);
                DataTable dt = dd.rtnData.list;
                this.tlMenu.DataSource = dt;
@@ -188,10 +224,6 @@
                this.tlMenu.EndUpdate();
                this.tlMenu.ExpandAll();
                tlMenu.OptionsView.CheckBoxStyle = DevExpress.XtraTreeList.DefaultNodeCheckBoxStyle.Default;
                // è®¾ç½®ä¸å…³è”选择
                //tlMenu.OptionsSelection.MultiSelect = true;
                //tlMenu.OptionsSelection.MaintainState = false; // å…³é”®è®¾ç½®
                //this.tlMenu.OptionsBehavior.AllowIndeterminateCheckState = true;
            }
            catch (Exception ex)
            {
@@ -199,7 +231,7 @@
            }
        }
        private void GetModel(string strGuid, bool isEdit, int tabIdx)
        private void getModel(string strGuid, bool isEdit, int tabIdx)
        {
            if (string.IsNullOrEmpty(strGuid))
            {
@@ -211,10 +243,9 @@
            {
                guid = strGuid,//主建
            };
            string strJson = "";
            try
            {
                strJson = UtilityHelper.HttpPost("", "MenuAction/GetModel", JsonConvert.SerializeObject(_obj));
                string strJson = UtilityHelper.HttpPost("", "MenuAction/GetModel", JsonConvert.SerializeObject(_obj));
                ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.GetDataByJson(strJson);
                if (_rtn.rtnCode > 0)
                {
@@ -232,14 +263,13 @@
            }
        }
        private void GetDownList()
        private void getDownList()
        {
            Models.PageQueryModel pgq = new Models.PageQueryModel(1, 999999, "idx", "asc", "", " and category=1");
            string json = JsonConvert.SerializeObject(pgq);
            string strReturn = "";
            try
            {
                strReturn = UtilityHelper.HttpPost("", "MenuAction/GetListPage", json);
                string strReturn = UtilityHelper.HttpPost("", "MenuAction/GetListPage", json);
                ReturnModel<PageListModel> dd = UtilityHelper.GetTableByJson(strReturn);
                DataTable dt = dd.rtnData.list;
                txt_upGuid.Properties.TreeList.KeyFieldName = "guid";
@@ -253,5 +283,9 @@
                ToolBox.MsgHelper.Warning("提示:" + ex.Message);
            }
        }
        private void getActionList()
        {
            txt_name.Properties.Items.AddRange(toolBarMenu1.actions);
        }
    }
}
DevApp/Gs.DevApp/DevFrm/User/SysMenu.resx
@@ -117,4 +117,17 @@
  <resheader name="writer">
    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  </resheader>
  <data name="toolBarMenu1.actions" mimetype="application/x-microsoft.net.object.binary.base64">
    <value>
        AAEAAAD/////AQAAAAAAAAAMAgAAAJoBbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1u
        ZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XV0sIG1zY29ybGliLCBWZXJzaW9u
        PTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUB
        AAAAMFN5c3RlbS5Db2xsZWN0aW9ucy5HZW5lcmljLkxpc3RgMVtbU3lzdGVtLlN0cmluZwMAAAAGX2l0
        ZW1zBV9zaXplCF92ZXJzaW9uBgAACAgCAAAACQMAAAAQAAAAEAAAABEDAAAAEAAAAAYEAAAABuWinuWK
        oAYFAAAABuWIoOmZpAYGAAAABuS/ruaUuQYHAAAABuS/neWtmAYIAAAABuWPlua2iAYJAAAABuWIt+aW
        sAYKAAAABuWvvOWHugYLAAAABuWuoeaguAYMAAAACeWPjeWuoeaguAYNAAAABuaJk+WNsAYOAAAABuWQ
        iOW5tgYPAAAABuWvvOWFpQYQAAAABuaXpeW/lwYRAAAABuW8gOW3pQYSAAAABuWIl+ihqAYTAAAADOS/
        neWtmOadg+mZkAs=
</value>
  </data>
</root>
DevApp/Gs.DevApp/DevFrm/User/User.Designer.cs
@@ -29,6 +29,12 @@
        /// </summary>
        private void InitializeComponent()
        {
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(User));
            DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions1 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions();
            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject1 = new DevExpress.Utils.SerializableAppearanceObject();
            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject2 = new DevExpress.Utils.SerializableAppearanceObject();
            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject3 = new DevExpress.Utils.SerializableAppearanceObject();
            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject4 = new DevExpress.Utils.SerializableAppearanceObject();
            this.toolBarMenu1 = new Gs.DevApp.UserControl.ToolBarMenu();
            this.gcMain = new DevExpress.XtraGrid.GridControl();
            this.gridView1 = new DevExpress.XtraGrid.Views.Grid.GridView();
@@ -40,9 +46,11 @@
            this.lastLoginTime = new DevExpress.XtraGrid.Columns.GridColumn();
            this.isLocked = new DevExpress.XtraGrid.Columns.GridColumn();
            this.loginCounter = new DevExpress.XtraGrid.Columns.GridColumn();
            this.colRole = new DevExpress.XtraGrid.Columns.GridColumn();
            this.repositoryItemButtonEdit1 = new DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit();
            this.xtraTabControl1 = new DevExpress.XtraTab.XtraTabControl();
            this.xtraTabPage1 = new DevExpress.XtraTab.XtraTabPage();
            this.PageBar1 = new UserControls.Data.PageBar();
            this.pageBar1 = new UserControls.Data.PageBar();
            this.xtraTabPage2 = new DevExpress.XtraTab.XtraTabPage();
            this.panel1 = new System.Windows.Forms.Panel();
            this.labelControl11 = new DevExpress.XtraEditors.LabelControl();
@@ -57,7 +65,7 @@
            this.labelControl1 = new DevExpress.XtraEditors.LabelControl();
            this.txt_email = new DevExpress.XtraEditors.TextEdit();
            this.lbGuid = new System.Windows.Forms.Label();
            this.labelControl12 = new DevExpress.XtraEditors.LabelControl();
            this.tipPwd = new DevExpress.XtraEditors.LabelControl();
            this.labelControl9 = new DevExpress.XtraEditors.LabelControl();
            this.labelControl6 = new DevExpress.XtraEditors.LabelControl();
            this.labelControl5 = new DevExpress.XtraEditors.LabelControl();
@@ -68,6 +76,7 @@
            this.labelControl2 = new DevExpress.XtraEditors.LabelControl();
            ((System.ComponentModel.ISupportInitialize)(this.gcMain)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.gridView1)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.repositoryItemButtonEdit1)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.xtraTabControl1)).BeginInit();
            this.xtraTabControl1.SuspendLayout();
            this.xtraTabPage1.SuspendLayout();
@@ -85,6 +94,7 @@
            // 
            // toolBarMenu1
            // 
            this.toolBarMenu1.actions = ((System.Collections.Generic.List<string>)(resources.GetObject("toolBarMenu1.actions")));
            this.toolBarMenu1.Dock = System.Windows.Forms.DockStyle.Top;
            this.toolBarMenu1.isSetBtn = false;
            this.toolBarMenu1.Location = new System.Drawing.Point(0, 0);
@@ -99,6 +109,8 @@
            this.gcMain.Location = new System.Drawing.Point(0, 0);
            this.gcMain.MainView = this.gridView1;
            this.gcMain.Name = "gcMain";
            this.gcMain.RepositoryItems.AddRange(new DevExpress.XtraEditors.Repository.RepositoryItem[] {
            this.repositoryItemButtonEdit1});
            this.gcMain.Size = new System.Drawing.Size(1126, 531);
            this.gcMain.TabIndex = 1;
            this.gcMain.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
@@ -116,10 +128,13 @@
            this.createTime,
            this.lastLoginTime,
            this.isLocked,
            this.loginCounter});
            this.loginCounter,
            this.colRole});
            this.gridView1.GridControl = this.gcMain;
            this.gridView1.Name = "gridView1";
            this.gridView1.OptionsBehavior.Editable = false;
            this.gridView1.OptionsFind.ShowSearchNavButtons = false;
            this.gridView1.OptionsView.ShowAutoFilterRow = true;
            this.gridView1.OptionsView.ShowGroupPanel = false;
            // 
            // account
            // 
@@ -129,6 +144,7 @@
            this.account.FieldName = "account";
            this.account.MinWidth = 25;
            this.account.Name = "account";
            this.account.OptionsColumn.AllowEdit = false;
            this.account.Visible = true;
            this.account.VisibleIndex = 0;
            this.account.Width = 94;
@@ -141,6 +157,7 @@
            this.userName.FieldName = "userName";
            this.userName.MinWidth = 25;
            this.userName.Name = "userName";
            this.userName.OptionsColumn.AllowEdit = false;
            this.userName.Visible = true;
            this.userName.VisibleIndex = 1;
            this.userName.Width = 94;
@@ -153,6 +170,7 @@
            this.tel.FieldName = "tel";
            this.tel.MinWidth = 25;
            this.tel.Name = "tel";
            this.tel.OptionsColumn.AllowEdit = false;
            this.tel.Visible = true;
            this.tel.VisibleIndex = 2;
            this.tel.Width = 94;
@@ -165,6 +183,7 @@
            this.email.FieldName = "email";
            this.email.MinWidth = 25;
            this.email.Name = "email";
            this.email.OptionsColumn.AllowEdit = false;
            this.email.Visible = true;
            this.email.VisibleIndex = 3;
            this.email.Width = 94;
@@ -177,6 +196,7 @@
            this.createTime.FieldName = "createTime";
            this.createTime.MinWidth = 25;
            this.createTime.Name = "createTime";
            this.createTime.OptionsColumn.AllowEdit = false;
            this.createTime.Visible = true;
            this.createTime.VisibleIndex = 4;
            this.createTime.Width = 94;
@@ -189,6 +209,7 @@
            this.lastLoginTime.FieldName = "lastLoginTime";
            this.lastLoginTime.MinWidth = 25;
            this.lastLoginTime.Name = "lastLoginTime";
            this.lastLoginTime.OptionsColumn.AllowEdit = false;
            this.lastLoginTime.Visible = true;
            this.lastLoginTime.VisibleIndex = 5;
            this.lastLoginTime.Width = 94;
@@ -201,6 +222,7 @@
            this.isLocked.FieldName = "isLockedTxt";
            this.isLocked.MinWidth = 25;
            this.isLocked.Name = "isLocked";
            this.isLocked.OptionsColumn.AllowEdit = false;
            this.isLocked.Visible = true;
            this.isLocked.VisibleIndex = 6;
            this.isLocked.Width = 94;
@@ -213,9 +235,36 @@
            this.loginCounter.FieldName = "loginCounter";
            this.loginCounter.MinWidth = 25;
            this.loginCounter.Name = "loginCounter";
            this.loginCounter.OptionsColumn.AllowEdit = false;
            this.loginCounter.Visible = true;
            this.loginCounter.VisibleIndex = 7;
            this.loginCounter.Width = 94;
            //
            // colRole
            //
            this.colRole.Caption = "角色设置";
            this.colRole.ColumnEdit = this.repositoryItemButtonEdit1;
            this.colRole.MinWidth = 25;
            this.colRole.Name = "colRole";
            this.colRole.OptionsFilter.AllowAutoFilter = false;
            this.colRole.OptionsFilter.AllowFilter = false;
            this.colRole.ShowButtonMode = DevExpress.XtraGrid.Views.Base.ShowButtonModeEnum.ShowAlways;
            this.colRole.Visible = true;
            this.colRole.VisibleIndex = 8;
            this.colRole.Width = 94;
            //
            // repositoryItemButtonEdit1
            //
            this.repositoryItemButtonEdit1.AutoHeight = false;
            editorButtonImageOptions1.Image = global::Gs.DevApp.Properties.Resources.bouser_16x161;
            editorButtonImageOptions1.ImageToTextAlignment = DevExpress.XtraEditors.ImageAlignToText.LeftCenter;
            serializableAppearanceObject1.Font = new System.Drawing.Font("Tahoma", 10F);
            serializableAppearanceObject1.Options.UseFont = true;
            this.repositoryItemButtonEdit1.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "设置角色", -1, true, true, false, editorButtonImageOptions1, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject1, serializableAppearanceObject2, serializableAppearanceObject3, serializableAppearanceObject4, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
            this.repositoryItemButtonEdit1.Name = "repositoryItemButtonEdit1";
            this.repositoryItemButtonEdit1.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.HideTextEditor;
            this.repositoryItemButtonEdit1.ButtonClick += new DevExpress.XtraEditors.Controls.ButtonPressedEventHandler(this.repositoryItemButtonEdit1_ButtonClick);
            // 
            // xtraTabControl1
            // 
@@ -232,23 +281,23 @@
            // xtraTabPage1
            // 
            this.xtraTabPage1.Controls.Add(this.gcMain);
            this.xtraTabPage1.Controls.Add(this.PageBar1);
            this.xtraTabPage1.Controls.Add(this.pageBar1);
            this.xtraTabPage1.Name = "xtraTabPage1";
            this.xtraTabPage1.Size = new System.Drawing.Size(1126, 570);
            this.xtraTabPage1.Text = "数据查询";
            // 
            // PageBar1
            // pageBar1
            // 
            this.PageBar1.CurrentPage = 1;
            this.PageBar1.Dock = System.Windows.Forms.DockStyle.Bottom;
            this.PageBar1.Location = new System.Drawing.Point(0, 531);
            this.PageBar1.Margin = new System.Windows.Forms.Padding(3, 5, 3, 5);
            this.PageBar1.Name = "PageBar1";
            this.PageBar1.RecordCount = 0;
            this.PageBar1.RowsCount = 50;
            this.PageBar1.Size = new System.Drawing.Size(1126, 39);
            this.PageBar1.TabIndex = 3;
            this.PageBar1.TotalPages = 0;
            this.pageBar1.CurrentPage = 1;
            this.pageBar1.Dock = System.Windows.Forms.DockStyle.Bottom;
            this.pageBar1.Location = new System.Drawing.Point(0, 531);
            this.pageBar1.Margin = new System.Windows.Forms.Padding(3, 5, 3, 5);
            this.pageBar1.Name = "pageBar1";
            this.pageBar1.RecordCount = 0;
            this.pageBar1.RowsCount = 50;
            this.pageBar1.Size = new System.Drawing.Size(1126, 39);
            this.pageBar1.TabIndex = 3;
            this.pageBar1.TotalPages = 0;
            // 
            // xtraTabPage2
            // 
@@ -260,6 +309,7 @@
            // 
            // panel1
            // 
            this.panel1.BackColor = System.Drawing.Color.White;
            this.panel1.Controls.Add(this.labelControl11);
            this.panel1.Controls.Add(this.labelControl10);
            this.panel1.Controls.Add(this.txt_account);
@@ -272,7 +322,7 @@
            this.panel1.Controls.Add(this.labelControl1);
            this.panel1.Controls.Add(this.txt_email);
            this.panel1.Controls.Add(this.lbGuid);
            this.panel1.Controls.Add(this.labelControl12);
            this.panel1.Controls.Add(this.tipPwd);
            this.panel1.Controls.Add(this.labelControl9);
            this.panel1.Controls.Add(this.labelControl6);
            this.panel1.Controls.Add(this.labelControl5);
@@ -281,6 +331,7 @@
            this.panel1.Controls.Add(this.lbPwd);
            this.panel1.Controls.Add(this.txt_userName);
            this.panel1.Controls.Add(this.labelControl2);
            this.panel1.Font = new System.Drawing.Font("Tahoma", 10F);
            this.panel1.Location = new System.Drawing.Point(76, 20);
            this.panel1.Name = "panel1";
            this.panel1.Size = new System.Drawing.Size(585, 426);
@@ -299,7 +350,7 @@
            // 
            this.labelControl10.Appearance.ForeColor = System.Drawing.Color.Red;
            this.labelControl10.Appearance.Options.UseForeColor = true;
            this.labelControl10.Location = new System.Drawing.Point(418, 29);
            this.labelControl10.Location = new System.Drawing.Point(434, 29);
            this.labelControl10.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
            this.labelControl10.Name = "labelControl10";
            this.labelControl10.Size = new System.Drawing.Size(8, 18);
@@ -308,79 +359,97 @@
            // 
            // txt_account
            // 
            this.txt_account.Location = new System.Drawing.Point(109, 16);
            this.txt_account.Location = new System.Drawing.Point(125, 16);
            this.txt_account.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
            this.txt_account.Name = "txt_account";
            this.txt_account.Size = new System.Drawing.Size(297, 24);
            this.txt_account.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 10F);
            this.txt_account.Properties.Appearance.Options.UseFont = true;
            this.txt_account.Size = new System.Drawing.Size(297, 28);
            this.txt_account.TabIndex = 128;
            // 
            // labelControl8
            // 
            this.labelControl8.Appearance.Font = new System.Drawing.Font("Tahoma", 10F);
            this.labelControl8.Appearance.Options.UseFont = true;
            this.labelControl8.Location = new System.Drawing.Point(31, 20);
            this.labelControl8.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
            this.labelControl8.Name = "labelControl8";
            this.labelControl8.Size = new System.Drawing.Size(75, 18);
            this.labelControl8.Size = new System.Drawing.Size(85, 21);
            this.labelControl8.TabIndex = 127;
            this.labelControl8.Text = "登录账号:";
            // 
            // txt_remark
            // 
            this.txt_remark.Location = new System.Drawing.Point(109, 255);
            this.txt_remark.Location = new System.Drawing.Point(125, 256);
            this.txt_remark.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
            this.txt_remark.Name = "txt_remark";
            this.txt_remark.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 10F);
            this.txt_remark.Properties.Appearance.Options.UseFont = true;
            this.txt_remark.Properties.ScrollBars = System.Windows.Forms.ScrollBars.None;
            this.txt_remark.Size = new System.Drawing.Size(297, 68);
            this.txt_remark.TabIndex = 126;
            // 
            // labelControl7
            // 
            this.labelControl7.Location = new System.Drawing.Point(61, 268);
            this.labelControl7.Appearance.Font = new System.Drawing.Font("Tahoma", 10F);
            this.labelControl7.Appearance.Options.UseFont = true;
            this.labelControl7.Location = new System.Drawing.Point(61, 256);
            this.labelControl7.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
            this.labelControl7.Name = "labelControl7";
            this.labelControl7.Size = new System.Drawing.Size(45, 18);
            this.labelControl7.Size = new System.Drawing.Size(51, 21);
            this.labelControl7.TabIndex = 125;
            this.labelControl7.Text = "备注:";
            // 
            // txt_address
            // 
            this.txt_address.Location = new System.Drawing.Point(109, 223);
            this.txt_address.Location = new System.Drawing.Point(125, 216);
            this.txt_address.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
            this.txt_address.Name = "txt_address";
            this.txt_address.Size = new System.Drawing.Size(297, 24);
            this.txt_address.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 10F);
            this.txt_address.Properties.Appearance.Options.UseFont = true;
            this.txt_address.Size = new System.Drawing.Size(297, 28);
            this.txt_address.TabIndex = 124;
            // 
            // labelControl3
            // 
            this.labelControl3.Location = new System.Drawing.Point(31, 227);
            this.labelControl3.Appearance.Font = new System.Drawing.Font("Tahoma", 10F);
            this.labelControl3.Appearance.Options.UseFont = true;
            this.labelControl3.Location = new System.Drawing.Point(31, 220);
            this.labelControl3.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
            this.labelControl3.Name = "labelControl3";
            this.labelControl3.Size = new System.Drawing.Size(75, 18);
            this.labelControl3.Size = new System.Drawing.Size(85, 21);
            this.labelControl3.TabIndex = 123;
            this.labelControl3.Text = "住宿地址:";
            // 
            // txt_tel
            // 
            this.txt_tel.Location = new System.Drawing.Point(109, 179);
            this.txt_tel.Location = new System.Drawing.Point(125, 176);
            this.txt_tel.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
            this.txt_tel.Name = "txt_tel";
            this.txt_tel.Size = new System.Drawing.Size(297, 24);
            this.txt_tel.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 10F);
            this.txt_tel.Properties.Appearance.Options.UseFont = true;
            this.txt_tel.Size = new System.Drawing.Size(297, 28);
            this.txt_tel.TabIndex = 122;
            // 
            // labelControl1
            // 
            this.labelControl1.Location = new System.Drawing.Point(61, 183);
            this.labelControl1.Appearance.Font = new System.Drawing.Font("Tahoma", 10F);
            this.labelControl1.Appearance.Options.UseFont = true;
            this.labelControl1.Location = new System.Drawing.Point(61, 180);
            this.labelControl1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
            this.labelControl1.Name = "labelControl1";
            this.labelControl1.Size = new System.Drawing.Size(45, 18);
            this.labelControl1.Size = new System.Drawing.Size(51, 21);
            this.labelControl1.TabIndex = 121;
            this.labelControl1.Text = "电话:";
            // 
            // txt_email
            // 
            this.txt_email.Location = new System.Drawing.Point(109, 135);
            this.txt_email.Location = new System.Drawing.Point(125, 136);
            this.txt_email.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
            this.txt_email.Name = "txt_email";
            this.txt_email.Size = new System.Drawing.Size(297, 24);
            this.txt_email.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 10F);
            this.txt_email.Properties.Appearance.Options.UseFont = true;
            this.txt_email.Size = new System.Drawing.Size(297, 28);
            this.txt_email.TabIndex = 120;
            // 
            // lbGuid
@@ -388,25 +457,25 @@
            this.lbGuid.AutoSize = true;
            this.lbGuid.Location = new System.Drawing.Point(112, 388);
            this.lbGuid.Name = "lbGuid";
            this.lbGuid.Size = new System.Drawing.Size(0, 18);
            this.lbGuid.Size = new System.Drawing.Size(0, 21);
            this.lbGuid.TabIndex = 1;
            // 
            // labelControl12
            // tipPwd
            // 
            this.labelControl12.Appearance.ForeColor = System.Drawing.Color.Red;
            this.labelControl12.Appearance.Options.UseForeColor = true;
            this.labelControl12.Location = new System.Drawing.Point(418, 56);
            this.labelControl12.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
            this.labelControl12.Name = "labelControl12";
            this.labelControl12.Size = new System.Drawing.Size(8, 18);
            this.labelControl12.TabIndex = 107;
            this.labelControl12.Text = "*";
            this.tipPwd.Appearance.ForeColor = System.Drawing.Color.Red;
            this.tipPwd.Appearance.Options.UseForeColor = true;
            this.tipPwd.Location = new System.Drawing.Point(434, 59);
            this.tipPwd.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
            this.tipPwd.Name = "tipPwd";
            this.tipPwd.Size = new System.Drawing.Size(8, 18);
            this.tipPwd.TabIndex = 107;
            this.tipPwd.Text = "*";
            // 
            // labelControl9
            // 
            this.labelControl9.Appearance.ForeColor = System.Drawing.Color.Red;
            this.labelControl9.Appearance.Options.UseForeColor = true;
            this.labelControl9.Location = new System.Drawing.Point(418, 96);
            this.labelControl9.Location = new System.Drawing.Point(434, 96);
            this.labelControl9.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
            this.labelControl9.Name = "labelControl9";
            this.labelControl9.Size = new System.Drawing.Size(8, 18);
@@ -415,28 +484,34 @@
            // 
            // labelControl6
            // 
            this.labelControl6.Location = new System.Drawing.Point(61, 138);
            this.labelControl6.Appearance.Font = new System.Drawing.Font("Tahoma", 10F);
            this.labelControl6.Appearance.Options.UseFont = true;
            this.labelControl6.Location = new System.Drawing.Point(61, 140);
            this.labelControl6.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
            this.labelControl6.Name = "labelControl6";
            this.labelControl6.Size = new System.Drawing.Size(45, 18);
            this.labelControl6.Size = new System.Drawing.Size(51, 21);
            this.labelControl6.TabIndex = 103;
            this.labelControl6.Text = "邮箱:";
            // 
            // labelControl5
            // 
            this.labelControl5.Location = new System.Drawing.Point(31, 344);
            this.labelControl5.Appearance.Font = new System.Drawing.Font("Tahoma", 10F);
            this.labelControl5.Appearance.Options.UseFont = true;
            this.labelControl5.Location = new System.Drawing.Point(31, 340);
            this.labelControl5.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
            this.labelControl5.Name = "labelControl5";
            this.labelControl5.Size = new System.Drawing.Size(75, 18);
            this.labelControl5.Size = new System.Drawing.Size(85, 21);
            this.labelControl5.TabIndex = 101;
            this.labelControl5.Text = "锁定状态:";
            // 
            // txt_isLocked
            // 
            this.txt_isLocked.EditValue = "-请选择-";
            this.txt_isLocked.Location = new System.Drawing.Point(109, 340);
            this.txt_isLocked.Location = new System.Drawing.Point(125, 336);
            this.txt_isLocked.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
            this.txt_isLocked.Name = "txt_isLocked";
            this.txt_isLocked.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 10F);
            this.txt_isLocked.Properties.Appearance.Options.UseFont = true;
            this.txt_isLocked.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
            this.txt_isLocked.Properties.Items.AddRange(new object[] {
@@ -444,40 +519,48 @@
            "正常",
            "锁定"});
            this.txt_isLocked.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
            this.txt_isLocked.Size = new System.Drawing.Size(297, 24);
            this.txt_isLocked.Size = new System.Drawing.Size(297, 28);
            this.txt_isLocked.TabIndex = 100;
            // 
            // txt_password
            // 
            this.txt_password.Location = new System.Drawing.Point(109, 53);
            this.txt_password.Location = new System.Drawing.Point(125, 56);
            this.txt_password.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
            this.txt_password.Name = "txt_password";
            this.txt_password.Size = new System.Drawing.Size(297, 24);
            this.txt_password.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 10F);
            this.txt_password.Properties.Appearance.Options.UseFont = true;
            this.txt_password.Size = new System.Drawing.Size(297, 28);
            this.txt_password.TabIndex = 99;
            // 
            // lbPwd
            // 
            this.lbPwd.Location = new System.Drawing.Point(31, 57);
            this.lbPwd.Appearance.Font = new System.Drawing.Font("Tahoma", 10F);
            this.lbPwd.Appearance.Options.UseFont = true;
            this.lbPwd.Location = new System.Drawing.Point(31, 60);
            this.lbPwd.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
            this.lbPwd.Name = "lbPwd";
            this.lbPwd.Size = new System.Drawing.Size(75, 18);
            this.lbPwd.Size = new System.Drawing.Size(85, 21);
            this.lbPwd.TabIndex = 98;
            this.lbPwd.Text = "初始密码:";
            // 
            // txt_userName
            // 
            this.txt_userName.Location = new System.Drawing.Point(109, 89);
            this.txt_userName.Location = new System.Drawing.Point(125, 96);
            this.txt_userName.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
            this.txt_userName.Name = "txt_userName";
            this.txt_userName.Size = new System.Drawing.Size(297, 24);
            this.txt_userName.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 10F);
            this.txt_userName.Properties.Appearance.Options.UseFont = true;
            this.txt_userName.Size = new System.Drawing.Size(297, 28);
            this.txt_userName.TabIndex = 95;
            // 
            // labelControl2
            // 
            this.labelControl2.Location = new System.Drawing.Point(61, 93);
            this.labelControl2.Appearance.Font = new System.Drawing.Font("Tahoma", 10F);
            this.labelControl2.Appearance.Options.UseFont = true;
            this.labelControl2.Location = new System.Drawing.Point(61, 100);
            this.labelControl2.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
            this.labelControl2.Name = "labelControl2";
            this.labelControl2.Size = new System.Drawing.Size(45, 18);
            this.labelControl2.Size = new System.Drawing.Size(51, 21);
            this.labelControl2.TabIndex = 94;
            this.labelControl2.Text = "姓名:";
            // 
@@ -492,6 +575,7 @@
            this.Text = "User";
            ((System.ComponentModel.ISupportInitialize)(this.gcMain)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.gridView1)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.repositoryItemButtonEdit1)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.xtraTabControl1)).EndInit();
            this.xtraTabControl1.ResumeLayout(false);
            this.xtraTabPage1.ResumeLayout(false);
@@ -526,7 +610,7 @@
        private DevExpress.XtraTab.XtraTabControl xtraTabControl1;
        private DevExpress.XtraTab.XtraTabPage xtraTabPage1;
        private DevExpress.XtraTab.XtraTabPage xtraTabPage2;
        private UserControls.Data.PageBar PageBar1;
        private UserControls.Data.PageBar pageBar1;
        private System.Windows.Forms.Panel panel1;
        private DevExpress.XtraEditors.LabelControl labelControl10;
        private DevExpress.XtraEditors.TextEdit txt_account;
@@ -539,7 +623,7 @@
        private DevExpress.XtraEditors.LabelControl labelControl1;
        private DevExpress.XtraEditors.TextEdit txt_email;
        private System.Windows.Forms.Label lbGuid;
        private DevExpress.XtraEditors.LabelControl labelControl12;
        private DevExpress.XtraEditors.LabelControl tipPwd;
        private DevExpress.XtraEditors.LabelControl labelControl9;
        private DevExpress.XtraEditors.LabelControl labelControl6;
        private DevExpress.XtraEditors.LabelControl labelControl5;
@@ -549,5 +633,7 @@
        private DevExpress.XtraEditors.TextEdit txt_userName;
        private DevExpress.XtraEditors.LabelControl labelControl2;
        private DevExpress.XtraEditors.LabelControl labelControl11;
        private DevExpress.XtraGrid.Columns.GridColumn colRole;
        private DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit repositoryItemButtonEdit1;
    }
}
DevApp/Gs.DevApp/DevFrm/User/User.cs
@@ -1,9 +1,13 @@
using DevExpress.XtraGrid.Views.Base;
using DevExpress.XtraEditors;
using DevExpress.XtraGrid.Views.Base;
using DevExpress.XtraGrid.Views.Grid;
using DevExpress.XtraGrid.Views.Grid.ViewInfo;
using Gs.DevApp.Models;
using Gs.DevApp.ToolBox;
using Newtonsoft.Json;
using System;
using System.Data;
using System.Drawing;
using System.Windows.Forms;
namespace Gs.DevApp.DevFrm.User
@@ -20,9 +24,23 @@
            this.toolBarMenu1.btnDelClick += ToolBarMenu1_btnDelClick1;
            this.toolBarMenu1.btnEscClick += ToolBarMenu1_btnEscClick;
            gcMain.MouseDoubleClick += GcMain_MouseDoubleClick;
            PageBar1.PagerEvent += PageBar1_PagerEvent;
            GetPageList(1, UtilityHelper.GetPageSize());
            gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged;
            pageBar1.PagerEvent += PageBar1_PagerEvent;
            getPageList(1, UtilityHelper.GetPageSize());
        }
        private void GridView1_ColumnFilterChanged(object sender, EventArgs e)
        {
            //// èŽ·å–GridView组件
            //GridView view = sender as GridView;
            //// ç¡®ä¿view不为null
            //if (view == null) return;
            //// èŽ·å–åº”ç”¨çš„ç­›é€‰å™¨ä¿¡æ¯
            //string filter = view.ActiveFilterString;
            //MessageBox.Show(filter);
            //getPageList(1, UtilityHelper.GetPageSize());
        }
        /// <summary>
        /// åŒå‡»äº‹ä»¶
        /// </summary>
@@ -30,12 +48,20 @@
        /// <param name="e"></param>
        private void GcMain_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            string rowGuid = "";
            ColumnView cv = (ColumnView)gcMain.FocusedView;
            object rowIdObj = gridView1.GetRowCellValue(cv.FocusedRowHandle, "guid");
            DataRow myDataRow = gridView1.GetDataRow(gridView1.FocusedRowHandle);
            rowGuid = myDataRow["guid"].ToString();
            GetModel(rowGuid, false, 999);
            GridHitInfo info = gridView1.CalcHitInfo(e.Location);
            if (info.InRow)
            {
                GridView view = info.View as GridView;
                if (view != null)
                {
                    DataRow row = view.GetDataRow(info.RowHandle);
                    if (row != null)
                    {
                        string rowGuid = (row["guid"].ToString());
                        getModel(rowGuid, false, 999);
                    }
                }
            }
        }
        /// <summary>
        /// åˆ†é¡µäº‹ä»¶
@@ -44,7 +70,7 @@
        /// <param name="pageSize"></param>
        private void PageBar1_PagerEvent(int curPage, int pageSize)
        {
            GetPageList(curPage, pageSize);
            getPageList(curPage, pageSize);
        }
        /// <summary>
@@ -84,7 +110,7 @@
                if (_rtn.rtnCode > 0)
                {
                    UtilityHelper.ChangeTab(xtraTabControl1, 0);
                    GetPageList(1, UtilityHelper.GetPageSize());
                    getPageList(1, UtilityHelper.GetPageSize());
                }
                ToolBox.MsgHelper.Warning("提示:" + _rtn.rtnMsg);
            }
@@ -102,10 +128,8 @@
        private void ToolBarMenu1_btnLoadClick(object sender, EventArgs e)
        {
            UtilityHelper.ChangeTab(xtraTabControl1, 0);
            GetPageList(1, UtilityHelper.GetPageSize());
            getPageList(1, UtilityHelper.GetPageSize());
        }
        /// <summary>
        /// ä¿®æ”¹äº‹ä»¶
        /// </summary>
@@ -119,8 +143,7 @@
                ToolBox.MsgHelper.Warning("请先选择你要操作的行!");
                return;
            }
            GetModel(dr["guid"].ToString(), true, 1);
            getModel(dr["guid"].ToString(), true, 1);
        }
        /// <summary>
        /// æ–°å¢žäº‹ä»¶
@@ -184,10 +207,9 @@
                departGuid = "",
                isSys = 0
            };
            string strJson = "";
            try
            {
                strJson = UtilityHelper.HttpPost("", "User/EditModel", JsonConvert.SerializeObject(_obj));
                string strJson = UtilityHelper.HttpPost("", "User/EditModel", JsonConvert.SerializeObject(_obj));
                ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.GetDataByJson(strJson);
                ToolBox.MsgHelper.Warning("提示:" + _rtn.rtnMsg);
                if (_rtn.rtnCode > 0)
@@ -203,39 +225,36 @@
            }
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="curPage">第几页</param>
        /// <param name="pageSize">每页几条</param>
        private void GetPageList(int curPage, int pageSize)
        private void getPageList(int curPage, int pageSize)
        {
            Models.PageQueryModel pgq = new Models.PageQueryModel(curPage, pageSize, "createTime", "asc", "", "");
            string json = JsonConvert.SerializeObject(pgq);
            string strReturn = "";
            try
            {
                strReturn = UtilityHelper.HttpPost("", "User/GetListPage", json);
                string strReturn = UtilityHelper.HttpPost("", "User/GetListPage", json);
                ReturnModel<PageListModel> dd = UtilityHelper.GetTableByJson(strReturn);
                DataTable dt = dd.rtnData.list;
                gcMain.BindingContext = new BindingContext();
                gcMain.DataSource = dt;
                gcMain.ForceInitialize();
                int dddd = dd.rtnData.pages;//总页
                PageBar1.TotalPages = dddd;
                PageBar1.RecordCount = dd.rtnData.total;//记录总数
                PageBar1.CurrentPage = curPage;//当前页
                PageBar1.RowsCount = pageSize;//每页显示
                PageBar1.setTxt();
                pageBar1.TotalPages = dddd;
                pageBar1.RecordCount = dd.rtnData.total;//记录总数
                pageBar1.CurrentPage = curPage;//当前页
                pageBar1.RowsCount = pageSize;//每页显示
                pageBar1.setTxt();
            }
            catch (Exception ex)
            {
                ToolBox.MsgHelper.Warning("提示:" + ex.Message);
            }
        }
        private void GetModel(string strGuid, bool isEdit, int tabIdx)
        private void getModel(string strGuid, bool isEdit, int tabIdx)
        {
            if (string.IsNullOrEmpty(strGuid))
            {
@@ -247,10 +266,9 @@
            {
                guid = strGuid,//主建
            };
            string strJson = "";
            try
            {
                strJson = UtilityHelper.HttpPost("", "User/GetModel", JsonConvert.SerializeObject(_obj));
                string strJson = UtilityHelper.HttpPost("", "User/GetModel", JsonConvert.SerializeObject(_obj));
                ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.GetDataByJson(strJson);
                if (_rtn.rtnCode > 0)
                {
@@ -258,7 +276,7 @@
                    lbGuid.Text = strGuid;
                    UtilityHelper.SetValueByObj(this.panel1.Controls, dy, isEdit);
                    txt_account.Enabled = false;
                    txt_password.Enabled = txt_password.Visible = lbPwd.Visible = false;
                    txt_password.Enabled = txt_password.Visible = lbPwd.Visible = tipPwd.Visible = false;
                }
                else
                    ToolBox.MsgHelper.Warning("提示:" + _rtn.rtnMsg);
@@ -268,6 +286,17 @@
                ToolBox.MsgHelper.Warning("提示:" + ex.Message);
            }
        }
        private void repositoryItemButtonEdit1_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
        {
            if (e.Button.Index == 0)
            {
                int rowhandle = gridView1.FocusedRowHandle;
                DataRow dr = gridView1.GetDataRow(rowhandle);
                string userGuid = dr["guid"].ToString();
                UserSelectRole frm = new UserSelectRole(userGuid);
                frm.ShowDialog();
            }
        }
    }
}
DevApp/Gs.DevApp/DevFrm/User/User.resx
@@ -117,4 +117,17 @@
  <resheader name="writer">
    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  </resheader>
  <data name="toolBarMenu1.actions" mimetype="application/x-microsoft.net.object.binary.base64">
    <value>
        AAEAAAD/////AQAAAAAAAAAMAgAAAJoBbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1u
        ZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XV0sIG1zY29ybGliLCBWZXJzaW9u
        PTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUB
        AAAAMFN5c3RlbS5Db2xsZWN0aW9ucy5HZW5lcmljLkxpc3RgMVtbU3lzdGVtLlN0cmluZwMAAAAGX2l0
        ZW1zBV9zaXplCF92ZXJzaW9uBgAACAgCAAAACQMAAAAQAAAAEAAAABEDAAAAEAAAAAYEAAAABuWinuWK
        oAYFAAAABuWIoOmZpAYGAAAABuS/ruaUuQYHAAAABuS/neWtmAYIAAAABuWPlua2iAYJAAAABuWIt+aW
        sAYKAAAABuWvvOWHugYLAAAABuWuoeaguAYMAAAACeWPjeWuoeaguAYNAAAABuaJk+WNsAYOAAAABuWQ
        iOW5tgYPAAAABuWvvOWFpQYQAAAABuaXpeW/lwYRAAAABuW8gOW3pQYSAAAABuWIl+ihqAYTAAAADOS/
        neWtmOadg+mZkAs=
</value>
  </data>
</root>
DevApp/Gs.DevApp/DevFrm/User/UserSelectRole.Designer.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,141 @@

namespace Gs.DevApp.DevFrm.User
{
    partial class UserSelectRole
    {
        /// <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.ckList = new System.Windows.Forms.CheckedListBox();
            this.btnSave = new DevExpress.XtraEditors.SimpleButton();
            this.xtraTabControl1 = new DevExpress.XtraTab.XtraTabControl();
            this.xtraTabPage1 = new DevExpress.XtraTab.XtraTabPage();
            this.panel1 = new System.Windows.Forms.Panel();
            this.xtraTabPage2 = new DevExpress.XtraTab.XtraTabPage();
            this.trv = new System.Windows.Forms.TreeView();
            ((System.ComponentModel.ISupportInitialize)(this.xtraTabControl1)).BeginInit();
            this.xtraTabControl1.SuspendLayout();
            this.xtraTabPage1.SuspendLayout();
            this.panel1.SuspendLayout();
            this.xtraTabPage2.SuspendLayout();
            this.SuspendLayout();
            //
            // ckList
            //
            this.ckList.Dock = System.Windows.Forms.DockStyle.Fill;
            this.ckList.FormattingEnabled = true;
            this.ckList.Location = new System.Drawing.Point(10, 10);
            this.ckList.Name = "ckList";
            this.ckList.Size = new System.Drawing.Size(280, 371);
            this.ckList.TabIndex = 0;
            //
            // btnSave
            //
            this.btnSave.Location = new System.Drawing.Point(35, 3);
            this.btnSave.Name = "btnSave";
            this.btnSave.Size = new System.Drawing.Size(94, 29);
            this.btnSave.TabIndex = 1;
            this.btnSave.Text = "确定保存";
            //
            // xtraTabControl1
            //
            this.xtraTabControl1.Dock = System.Windows.Forms.DockStyle.Fill;
            this.xtraTabControl1.Location = new System.Drawing.Point(0, 0);
            this.xtraTabControl1.Name = "xtraTabControl1";
            this.xtraTabControl1.Padding = new System.Windows.Forms.Padding(10);
            this.xtraTabControl1.SelectedTabPage = this.xtraTabPage1;
            this.xtraTabControl1.Size = new System.Drawing.Size(302, 458);
            this.xtraTabControl1.TabIndex = 2;
            this.xtraTabControl1.TabPages.AddRange(new DevExpress.XtraTab.XtraTabPage[] {
            this.xtraTabPage1,
            this.xtraTabPage2});
            //
            // xtraTabPage1
            //
            this.xtraTabPage1.Controls.Add(this.ckList);
            this.xtraTabPage1.Controls.Add(this.panel1);
            this.xtraTabPage1.Name = "xtraTabPage1";
            this.xtraTabPage1.Padding = new System.Windows.Forms.Padding(10);
            this.xtraTabPage1.Size = new System.Drawing.Size(300, 426);
            this.xtraTabPage1.Text = "设置角色";
            //
            // panel1
            //
            this.panel1.Controls.Add(this.btnSave);
            this.panel1.Dock = System.Windows.Forms.DockStyle.Bottom;
            this.panel1.Location = new System.Drawing.Point(10, 381);
            this.panel1.Name = "panel1";
            this.panel1.Size = new System.Drawing.Size(280, 35);
            this.panel1.TabIndex = 2;
            //
            // xtraTabPage2
            //
            this.xtraTabPage2.Controls.Add(this.trv);
            this.xtraTabPage2.Name = "xtraTabPage2";
            this.xtraTabPage2.Size = new System.Drawing.Size(300, 426);
            this.xtraTabPage2.Text = "查看权限集合";
            //
            // trv
            //
            this.trv.CheckBoxes = true;
            this.trv.Dock = System.Windows.Forms.DockStyle.Fill;
            this.trv.Font = new System.Drawing.Font("Tahoma", 10F);
            this.trv.Location = new System.Drawing.Point(0, 0);
            this.trv.Name = "trv";
            this.trv.Size = new System.Drawing.Size(300, 426);
            this.trv.TabIndex = 3;
            //
            // UserSelectRole
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 18F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(302, 458);
            this.Controls.Add(this.xtraTabControl1);
            this.MaximizeBox = false;
            this.MinimizeBox = false;
            this.Name = "UserSelectRole";
            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
            this.Text = "选择角色";
            ((System.ComponentModel.ISupportInitialize)(this.xtraTabControl1)).EndInit();
            this.xtraTabControl1.ResumeLayout(false);
            this.xtraTabPage1.ResumeLayout(false);
            this.panel1.ResumeLayout(false);
            this.xtraTabPage2.ResumeLayout(false);
            this.ResumeLayout(false);
        }
        #endregion
        private System.Windows.Forms.CheckedListBox ckList;
        private DevExpress.XtraEditors.SimpleButton btnSave;
        private DevExpress.XtraTab.XtraTabControl xtraTabControl1;
        private DevExpress.XtraTab.XtraTabPage xtraTabPage2;
        private DevExpress.XtraTab.XtraTabPage xtraTabPage1;
        private System.Windows.Forms.Panel panel1;
        private System.Windows.Forms.TreeView trv;
    }
}
DevApp/Gs.DevApp/DevFrm/User/UserSelectRole.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,167 @@
using DevExpress.XtraEditors;
using Gs.DevApp.Models;
using Gs.DevApp.ToolBox;
using Newtonsoft.Json;
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 Gs.DevApp.DevFrm.User
{
    public partial class UserSelectRole : DevExpress.XtraEditors.XtraForm
    {
        private string _userGuid;
        public UserSelectRole(string userGuid)
        {
            InitializeComponent();
            this._userGuid = userGuid;
            GetCheckList();
            btnSave.Click += BtnSave_Click;
            GetTree(_userGuid);
        }
        private void BtnSave_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(_userGuid))
            {
                ToolBox.MsgHelper.Warning("请先选择你要操作的用户!");
                return;
            }
            if (!MsgHelper.AskQuestion("你选择了【" + ckList.CheckedItems.Count.ToString() + "】个角色,确定设置权限吗?"))
                return;
            System.Text.StringBuilder roleLst = new StringBuilder();
            foreach (DataRowView box in ckList.CheckedItems)
            {
                if (roleLst.Length > 0)
                    roleLst.Append(",");
                roleLst.Append(box.Row["guid"].ToString());
            }
            var _obj = new
            {
                userGuid = _userGuid,
                roleLst = roleLst.ToString(),
            };
            string strJson = "";
            try
            {
                strJson = UtilityHelper.HttpPost("", "MenuAction/SetRoleByUser", JsonConvert.SerializeObject(_obj));
                ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.GetDataByJson(strJson);
                ToolBox.MsgHelper.Warning("提示:" + _rtn.rtnData.outMsg);
                this.Close();
            }
            catch (Exception ex)
            {
                ToolBox.MsgHelper.Warning("提示:" + ex.Message);
            }
        }
        private void GetCheckList()
        {
            var _obj = new
            {
                userGuid = this._userGuid,
            };
            string strReturn = "";
            try
            {
                strReturn = UtilityHelper.HttpPost("", "MenuAction/GetRoleByUser", JsonConvert.SerializeObject(_obj));
                ReturnModel<DataTable> dd = UtilityHelper.GetNoPageTableByJson(strReturn);
                DataTable dt = dd.rtnData;
                this.ckList.DataSource = dt;
                this.ckList.ValueMember = "guid";
                this.ckList.DisplayMember = "roleName";
                foreach (DataRow row in dt.Rows)
                {
                    // å‡è®¾Condition是决定是否选中的字段
                    bool isChecked = (bool)row["isCk"]; // è½¬æ¢ä¸ºå®žé™…的类型
                    int index = ckList.FindString(row["roleName"].ToString());
                    if (index != ListBox.NoMatches)
                    {
                        ckList.SetItemChecked(index, isChecked);
                    }
                }
            }
            catch (Exception ex)
            {
                ToolBox.MsgHelper.Warning("提示:" + ex.Message);
            }
        }
        private void GetTree(string userGuid)
        {
            trv.Nodes.Clear();
            ImageList imageList = new ImageList();
            imageList.Images.Add("icon0", Properties.Resources.publicfix_32x32);
            imageList.Images.Add("icon1", Properties.Resources.addfooter_32x32);
            imageList.Images.Add("icon2", Properties.Resources.listmultilevel_16x16);
            imageList.Images.Add("icon3", Properties.Resources.addcalculatedfield_16x16);
            trv.ImageList = imageList;
            var _obj = new
            {
                userGuid = userGuid,
            };
            string strReturn = "";
            try
            {
                strReturn = UtilityHelper.HttpPost("", "MenuAction/GetListByUser", JsonConvert.SerializeObject(_obj));
                ReturnModel<PageListModel> dd = UtilityHelper.GetTableByJson(strReturn);
                DataTable dt = dd.rtnData.list;
                DataRow[] drGrp = dt.Select("upGuid='' or upGuid is null");
                foreach (DataRow _dy in drGrp)
                {
                    string _orgGuid = _dy["guid"].ToString() + "&";
                    TreeNode node = new TreeNode();//定义结点
                    node.Text = _dy["name"].ToString();//为结点赋值
                    node.Name = _dy["guid"].ToString();
                    node.ImageIndex = 0;
                    node.Checked = (_dy["isCk"].ToString() == "1" ? true : false);
                    DataRow[] drItem = dt.Select("upGuid='" + _dy["guid"].ToString() + "' and orgGuid='" + _dy["guid"].ToString() + "'");
                    foreach (DataRow _dy2 in drItem)
                    {
                        TreeNode node22 = new TreeNode();//定义结点
                        node22.Text = _dy2["name"].ToString();//为结点赋值
                        node22.Name = _orgGuid + _dy2["guid"].ToString();
                        node22.ImageIndex = 1;
                        node22.Checked = (_dy2["isCk"].ToString() == "1" ? true : false);
                        DataRow[] drItem33 = dt.Select("upGuid='" + _dy2["guid"].ToString() + "' and orgGuid='" + _dy["guid"].ToString() + "'");
                        foreach (DataRow _dy3 in drItem33)
                        {
                            TreeNode node33 = new TreeNode();//定义结点
                            node33.Text = _dy3["name"].ToString();//为结点赋值
                            node33.Name = _orgGuid + _dy3["guid"].ToString();
                            node33.ImageIndex = 2;
                            node33.Checked = (_dy3["isCk"].ToString() == "1" ? true : false);
                            DataRow[] drItem44 = dt.Select("upGuid='" + _dy3["guid"].ToString() + "' and orgGuid='" + _dy["guid"].ToString() + "'");
                            foreach (DataRow _dy4 in drItem44)
                            {
                                TreeNode node44 = new TreeNode();//定义结点
                                node44.Text = _dy4["name"].ToString();//为结点赋值
                                node44.Name = _orgGuid + _dy4["guid"].ToString();
                                node44.ImageIndex = 3;
                                node44.Checked = (_dy4["isCk"].ToString() == "1" ? true : false);
                                node33.Nodes.Add(node44);
                            }
                            node22.Nodes.Add(node33);
                        }
                        node22.Expand();
                        node.Nodes.Add(node22);
                    }
                    node.Expand();
                    trv.Nodes.Add(node);
                }
            }
            catch (Exception ex)
            {
                ToolBox.MsgHelper.Warning("提示:" + ex.Message);
            }
        }
    }
}
DevApp/Gs.DevApp/DevFrm/User/UserSelectRole.resx
¶Ô±ÈÐÂÎļþ
@@ -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>
DevApp/Gs.DevApp/Gs.DevApp.csproj
@@ -43,6 +43,7 @@
    <Reference Include="DevExpress.XtraLayout.v19.2, Version=19.2.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
    <Reference Include="DevExpress.XtraPrinting.v19.2, Version=19.2.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
    <Reference Include="DevExpress.XtraTreeList.v19.2, Version=19.2.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
    <Reference Include="DevExpress.XtraWizard.v19.2, Version=19.2.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
    <Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
      <HintPath>..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
    </Reference>
@@ -65,6 +66,7 @@
    <Compile Include="DevFrm\BasicData\FrmMesItems.Designer.cs">
      <DependentUpon>FrmMesItems.cs</DependentUpon>
    </Compile>
    <Compile Include="DevFrm\Sys\FileSelector.cs" />
    <Compile Include="DevFrm\FrmLogin.cs">
      <SubType>Form</SubType>
    </Compile>
@@ -82,6 +84,12 @@
    </Compile>
    <Compile Include="DevFrm\Sys\DocNoRule.Designer.cs">
      <DependentUpon>DocNoRule.cs</DependentUpon>
    </Compile>
    <Compile Include="DevFrm\Sys\EasyCode.cs">
      <SubType>Form</SubType>
    </Compile>
    <Compile Include="DevFrm\Sys\EasyCode.Designer.cs">
      <DependentUpon>EasyCode.cs</DependentUpon>
    </Compile>
    <Compile Include="DevFrm\User\Organization.cs">
      <SubType>Form</SubType>
@@ -107,6 +115,12 @@
    <Compile Include="DevFrm\User\User.Designer.cs">
      <DependentUpon>User.cs</DependentUpon>
    </Compile>
    <Compile Include="DevFrm\User\UserSelectRole.cs">
      <SubType>Form</SubType>
    </Compile>
    <Compile Include="DevFrm\User\UserSelectRole.Designer.cs">
      <DependentUpon>UserSelectRole.cs</DependentUpon>
    </Compile>
    <Compile Include="Entity\MesItems.cs" />
    <Compile Include="Models\LoginInfoModel.cs" />
    <Compile Include="Models\PageQueryModel.cs" />
@@ -120,11 +134,11 @@
    </Compile>
    <Compile Include="Query\MesItemQuery.cs" />
    <Compile Include="Service\MesItemServices.cs" />
    <Compile Include="TestForm\TEST.cs">
    <Compile Include="TestForm\test.cs">
      <SubType>Form</SubType>
    </Compile>
    <Compile Include="TestForm\TEST.Designer.cs">
      <DependentUpon>TEST.cs</DependentUpon>
    <Compile Include="TestForm\test.Designer.cs">
      <DependentUpon>test.cs</DependentUpon>
    </Compile>
    <Compile Include="TestForm\XtraForm1.cs">
      <SubType>Form</SubType>
@@ -166,6 +180,9 @@
    <EmbeddedResource Include="DevFrm\Sys\DocNoRule.resx">
      <DependentUpon>DocNoRule.cs</DependentUpon>
    </EmbeddedResource>
    <EmbeddedResource Include="DevFrm\Sys\EasyCode.resx">
      <DependentUpon>EasyCode.cs</DependentUpon>
    </EmbeddedResource>
    <EmbeddedResource Include="DevFrm\User\Organization.resx">
      <DependentUpon>Organization.cs</DependentUpon>
    </EmbeddedResource>
@@ -179,12 +196,15 @@
      <DependentUpon>User.cs</DependentUpon>
    </EmbeddedResource>
    <None Include="Properties\licenses.licx" />
    <EmbeddedResource Include="DevFrm\User\UserSelectRole.resx">
      <DependentUpon>UserSelectRole.cs</DependentUpon>
    </EmbeddedResource>
    <EmbeddedResource Include="Properties\Resources.resx">
      <Generator>ResXFileCodeGenerator</Generator>
      <LastGenOutput>Resources1.Designer.cs</LastGenOutput>
    </EmbeddedResource>
    <EmbeddedResource Include="TestForm\TEST.resx">
      <DependentUpon>TEST.cs</DependentUpon>
    <EmbeddedResource Include="TestForm\test.resx">
      <DependentUpon>test.cs</DependentUpon>
    </EmbeddedResource>
    <EmbeddedResource Include="TestForm\XtraForm1.resx">
      <DependentUpon>XtraForm1.cs</DependentUpon>
@@ -266,6 +286,8 @@
    <None Include="Resources\saveall_32x32.png" />
    <None Include="Resources\editrangepermission_32x32.png" />
    <None Include="Resources\editrangepermission_16x16.png" />
    <None Include="Resources\encryptdocument_32x321.png" />
    <None Include="Resources\bouser_16x161.png" />
    <Content Include="Resources\user_16x16.png" />
  </ItemGroup>
  <ItemGroup>
DevApp/Gs.DevApp/Program.cs
@@ -28,13 +28,18 @@
            {
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);
                //Application.Run(new Gs.DevApp.TestForm.FluentDesignForm1());
                //  Application.Run(new Gs.DevApp.DevFrm.EasyCode.EasyCode());
                DevFrm.FrmLogin fmLogin = new DevFrm.FrmLogin();
                fmLogin.ShowDialog();
                if (fmLogin.DialogResult == DialogResult.OK)
                if (fmLogin.IsDisposed == false)
                {
                    Application.Run(new DevFrm.FrmMain());
                    fmLogin.ShowDialog();
                    if (fmLogin.DialogResult == DialogResult.OK)
                    {
                        Application.Run(new DevFrm.FrmMain());
                    }
                }
                else
                    Application.Exit();
            }
        }
    }
DevApp/Gs.DevApp/Properties/Resources.resx
@@ -166,6 +166,9 @@
  <data name="salesperiodlifetime_32x32" type="System.Resources.ResXFileRef, System.Windows.Forms">
    <value>..\Resources\salesperiodlifetime_32x32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
  </data>
  <data name="encryptdocument_32x321" type="System.Resources.ResXFileRef, System.Windows.Forms">
    <value>..\Resources\encryptdocument_32x321.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
  </data>
  <data name="time2_16x16" type="System.Resources.ResXFileRef, System.Windows.Forms">
    <value>..\Resources\time2_16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
  </data>
@@ -241,9 +244,6 @@
  <data name="user_16x16" type="System.Resources.ResXFileRef, System.Windows.Forms">
    <value>..\Resources\user_16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
  </data>
  <data name="editrangepermission_32x32" type="System.Resources.ResXFileRef, System.Windows.Forms">
    <value>..\Resources\editrangepermission_32x32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
  </data>
  <data name="bouser_16x16" type="System.Resources.ResXFileRef, System.Windows.Forms">
    <value>..\Resources\bouser_16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
  </data>
@@ -255,6 +255,9 @@
  </data>
  <data name="3dcylinder_16x16" type="System.Resources.ResXFileRef, System.Windows.Forms">
    <value>..\Resources\3dcylinder_16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
  </data>
  <data name="saveall_32x32" type="System.Resources.ResXFileRef, System.Windows.Forms">
    <value>..\Resources\saveall_32x32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
  </data>
  <data name="login_bg2" type="System.Resources.ResXFileRef, System.Windows.Forms">
    <value>..\Resources\login_bg2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
@@ -283,6 +286,9 @@
  <data name="show_32x32" type="System.Resources.ResXFileRef, System.Windows.Forms">
    <value>..\Resources\show_32x32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
  </data>
  <data name="editrangepermission_16x16" type="System.Resources.ResXFileRef, System.Windows.Forms">
    <value>..\Resources\editrangepermission_16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
  </data>
  <data name="checkbox2_32x32" type="System.Resources.ResXFileRef, System.Windows.Forms">
    <value>..\Resources\checkbox2_32x32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
  </data>
@@ -295,8 +301,8 @@
  <data name="editname_32x32" type="System.Resources.ResXFileRef, System.Windows.Forms">
    <value>..\Resources\editname_32x32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
  </data>
  <data name="saveall_32x32" type="System.Resources.ResXFileRef, System.Windows.Forms">
    <value>..\Resources\saveall_32x32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
  <data name="editrangepermission_32x32" type="System.Resources.ResXFileRef, System.Windows.Forms">
    <value>..\Resources\editrangepermission_32x32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
  </data>
  <data name="converttorange_32x32" type="System.Resources.ResXFileRef, System.Windows.Forms">
    <value>..\Resources\converttorange_32x32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
@@ -337,7 +343,7 @@
  <data name="trackingchanges_trackchanges_16x16" type="System.Resources.ResXFileRef, System.Windows.Forms">
    <value>..\Resources\trackingchanges_trackchanges_16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
  </data>
  <data name="editrangepermission_16x16" type="System.Resources.ResXFileRef, System.Windows.Forms">
    <value>..\Resources\editrangepermission_16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
  <data name="bouser_16x161" type="System.Resources.ResXFileRef, System.Windows.Forms">
    <value>..\Resources\bouser_16x161.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
  </data>
</root>
DevApp/Gs.DevApp/Properties/Resources1.Designer.cs
@@ -183,6 +183,16 @@
        /// <summary>
        ///   æŸ¥æ‰¾ System.Drawing.Bitmap ç±»åž‹çš„æœ¬åœ°åŒ–资源。
        /// </summary>
        internal static System.Drawing.Bitmap bouser_16x161 {
            get {
                object obj = ResourceManager.GetObject("bouser_16x161", resourceCulture);
                return ((System.Drawing.Bitmap)(obj));
            }
        }
        /// <summary>
        ///   æŸ¥æ‰¾ System.Drawing.Bitmap ç±»åž‹çš„æœ¬åœ°åŒ–资源。
        /// </summary>
        internal static System.Drawing.Bitmap chartsshowlegend_32x32 {
            get {
                object obj = ResourceManager.GetObject("chartsshowlegend_32x32", resourceCulture);
@@ -383,6 +393,16 @@
        /// <summary>
        ///   æŸ¥æ‰¾ System.Drawing.Bitmap ç±»åž‹çš„æœ¬åœ°åŒ–资源。
        /// </summary>
        internal static System.Drawing.Bitmap encryptdocument_32x321 {
            get {
                object obj = ResourceManager.GetObject("encryptdocument_32x321", resourceCulture);
                return ((System.Drawing.Bitmap)(obj));
            }
        }
        /// <summary>
        ///   æŸ¥æ‰¾ System.Drawing.Bitmap ç±»åž‹çš„æœ¬åœ°åŒ–资源。
        /// </summary>
        internal static System.Drawing.Bitmap exportfile_16x16 {
            get {
                object obj = ResourceManager.GetObject("exportfile_16x16", resourceCulture);
DevApp/Gs.DevApp/Properties/Settings.Designer.cs
@@ -8,7 +8,7 @@
// </auto-generated>
//------------------------------------------------------------------------------
namespace GsDxApp.Properties {
namespace Gs.DevApp.Properties {
    
    
    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
@@ -22,5 +22,53 @@
                return defaultInstance;
            }
        }
        [global::System.Configuration.UserScopedSettingAttribute()]
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [global::System.Configuration.DefaultSettingValueAttribute("")]
        public string userName {
            get {
                return ((string)(this["userName"]));
            }
            set {
                this["userName"] = value;
            }
        }
        [global::System.Configuration.UserScopedSettingAttribute()]
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [global::System.Configuration.DefaultSettingValueAttribute("")]
        public string userPwd {
            get {
                return ((string)(this["userPwd"]));
            }
            set {
                this["userPwd"] = value;
            }
        }
        [global::System.Configuration.UserScopedSettingAttribute()]
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [global::System.Configuration.DefaultSettingValueAttribute("False")]
        public bool remember {
            get {
                return ((bool)(this["remember"]));
            }
            set {
                this["remember"] = value;
            }
        }
        [global::System.Configuration.UserScopedSettingAttribute()]
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [global::System.Configuration.DefaultSettingValueAttribute("")]
        public string orgguid {
            get {
                return ((string)(this["orgguid"]));
            }
            set {
                this["orgguid"] = value;
            }
        }
    }
}
DevApp/Gs.DevApp/Properties/Settings.settings
@@ -1,7 +1,18 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
  <Profiles>
    <Profile Name="(Default)" />
  </Profiles>
  <Settings />
</SettingsFile>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="Gs.DevApp.Properties" GeneratedClassName="Settings">
  <Profiles />
  <Settings>
    <Setting Name="userName" Type="System.String" Scope="User">
      <Value Profile="(Default)" />
    </Setting>
    <Setting Name="userPwd" Type="System.String" Scope="User">
      <Value Profile="(Default)" />
    </Setting>
    <Setting Name="remember" Type="System.Boolean" Scope="User">
      <Value Profile="(Default)">False</Value>
    </Setting>
    <Setting Name="orgguid" Type="System.String" Scope="User">
      <Value Profile="(Default)" />
    </Setting>
  </Settings>
</SettingsFile>
DevApp/Gs.DevApp/Properties/licenses.licx
@@ -1,13 +1,14 @@
DevExpress.Patch.InMemoryPatch, DevExpress.Patch.Common, Version=6.2.0.0, Culture=neutral, PublicKeyToken=87f9927a37ac6066
DevExpress.XtraEditors.TreeListLookUpEdit, DevExpress.XtraTreeList.v19.2, Version=19.2.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraBars.BarManager, DevExpress.XtraBars.v19.2, Version=19.2.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraLayout.LayoutControl, DevExpress.XtraLayout.v19.2, Version=19.2.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraEditors.DateEdit, DevExpress.XtraEditors.v19.2, Version=19.2.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraEditors.CheckEdit, DevExpress.XtraEditors.v19.2, Version=19.2.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit, DevExpress.XtraEditors.v19.2, Version=19.2.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraTreeList.TreeList, DevExpress.XtraTreeList.v19.2, Version=19.2.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraEditors.Repository.RepositoryItemCheckEdit, DevExpress.XtraEditors.v19.2, Version=19.2.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraEditors.LookUpEdit, DevExpress.XtraEditors.v19.2, Version=19.2.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraEditors.ComboBoxEdit, DevExpress.XtraEditors.v19.2, Version=19.2.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraEditors.TextEdit, DevExpress.XtraEditors.v19.2, Version=19.2.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraWizard.WizardControl, DevExpress.XtraWizard.v19.2, Version=19.2.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraTreeList.TreeList, DevExpress.XtraTreeList.v19.2, Version=19.2.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraBars.BarManager, DevExpress.XtraBars.v19.2, Version=19.2.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraEditors.ComboBoxEdit, DevExpress.XtraEditors.v19.2, Version=19.2.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraGrid.GridControl, DevExpress.XtraGrid.v19.2, Version=19.2.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraEditors.DateEdit, DevExpress.XtraEditors.v19.2, Version=19.2.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraEditors.TreeListLookUpEdit, DevExpress.XtraTreeList.v19.2, Version=19.2.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraEditors.LookUpEdit, DevExpress.XtraEditors.v19.2, Version=19.2.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit, DevExpress.XtraEditors.v19.2, Version=19.2.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraEditors.Repository.RepositoryItemCheckEdit, DevExpress.XtraEditors.v19.2, Version=19.2.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraEditors.CheckEdit, DevExpress.XtraEditors.v19.2, Version=19.2.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraLayout.LayoutControl, DevExpress.XtraLayout.v19.2, Version=19.2.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevApp/Gs.DevApp/TestForm/TEST.Designer.cs
@@ -1,7 +1,6 @@

namespace Gs.DevApp.TestForm
namespace CreateDBClass
{
    partial class TEST
    partial class Form1
    {
        /// <summary>
        /// Required designer variable.
@@ -29,623 +28,248 @@
        /// </summary>
        private void InitializeComponent()
        {
            this.pageBar1 = new UserControls.Data.PageBar();
            this.toolBarMenu1 = new Gs.DevApp.UserControl.ToolBarMenu();
            this.gcSummary = new DevExpress.XtraGrid.GridControl();
            this.gvSummary = new DevExpress.XtraGrid.Views.Grid.GridView();
            this.colflagApp = new DevExpress.XtraGrid.Columns.GridColumn();
            this.colappUser = new DevExpress.XtraGrid.Columns.GridColumn();
            this.colappDate = new DevExpress.XtraGrid.Columns.GridColumn();
            this.colAppNAME = new DevExpress.XtraGrid.Columns.GridColumn();
            this.colID = new DevExpress.XtraGrid.Columns.GridColumn();
            this.colPID = new DevExpress.XtraGrid.Columns.GridColumn();
            this.colCREATE_BY = new DevExpress.XtraGrid.Columns.GridColumn();
            this.colCREATE_DATE = new DevExpress.XtraGrid.Columns.GridColumn();
            this.colCGA001 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.colCGA002 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.colCGA003 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.colCGA004 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.colCGA005 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.colCGA006 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.colCGA007 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.colCGA008 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.colCGA009 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.colCGA010 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.colCGA011 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.colCGA012 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.colCGA013 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.colCGA014 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.colCGA015 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.colCGA016 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.colCGA017 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.colCGA018 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.colCGA019 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.colCGA020 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.colCGA021 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.colCGA022 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.colCGA023 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.colCGA024 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.colCGA025 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.colCGA026 = new DevExpress.XtraGrid.Columns.GridColumn();
            ((System.ComponentModel.ISupportInitialize)(this.gcSummary)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.gvSummary)).BeginInit();
            this.lb_status = new DevExpress.XtraEditors.LabelControl();
            this.txt_status = new DevExpress.XtraEditors.TextEdit();
            this.lb_lastUpdatedBy = new DevExpress.XtraEditors.LabelControl();
            this.txt_lastUpdatedBy = new DevExpress.XtraEditors.TextEdit();
            this.lb_lastUpdateDate = new DevExpress.XtraEditors.LabelControl();
            this.txt_lastUpdateDate = new DevExpress.XtraEditors.TextEdit();
            this.lb_createBy = new DevExpress.XtraEditors.LabelControl();
            this.txt_createBy = new DevExpress.XtraEditors.TextEdit();
            this.lb_createDate = new DevExpress.XtraEditors.LabelControl();
            this.txt_createDate = new DevExpress.XtraEditors.TextEdit();
            this.lb_rolRemark = new DevExpress.XtraEditors.LabelControl();
            this.txt_rolRemark = new DevExpress.XtraEditors.TextEdit();
            this.lb_roleName = new DevExpress.XtraEditors.LabelControl();
            this.txt_roleName = new DevExpress.XtraEditors.TextEdit();
            this.lb_guid = new DevExpress.XtraEditors.LabelControl();
            this.txt_guid = new DevExpress.XtraEditors.TextEdit();
            ((System.ComponentModel.ISupportInitialize)(this.txt_status.Properties)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.txt_lastUpdatedBy.Properties)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.txt_lastUpdateDate.Properties)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.txt_createBy.Properties)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.txt_createDate.Properties)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.txt_rolRemark.Properties)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.txt_roleName.Properties)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.txt_guid.Properties)).BeginInit();
            this.SuspendLayout();
            // 
            // pageBar1
            // lb_status
            // 
            this.pageBar1.CurrentPage = 0;
            this.pageBar1.Dock = System.Windows.Forms.DockStyle.Bottom;
            this.pageBar1.Location = new System.Drawing.Point(0, 636);
            this.pageBar1.Margin = new System.Windows.Forms.Padding(3, 5, 3, 5);
            this.pageBar1.Name = "pageBar1";
            this.pageBar1.RecordCount = 0;
            this.pageBar1.RowsCount = 0;
            this.pageBar1.Size = new System.Drawing.Size(1287, 48);
            this.pageBar1.TabIndex = 0;
            this.pageBar1.TotalPages = 0;
            this.lb_status.Location = new System.Drawing.Point(1027, 65);
            this.lb_status.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
            this.lb_status.Name = "lb_status";
            this.lb_status.Size = new System.Drawing.Size(55, 18);
            this.lb_status.TabIndex = 226;
            this.lb_status.Tag = "status";
            this.lb_status.Text = "status:";
            // 
            // toolBarMenu1
            // txt_status
            // 
            this.toolBarMenu1.Dock = System.Windows.Forms.DockStyle.Top;
            this.toolBarMenu1.Location = new System.Drawing.Point(0, 0);
            this.toolBarMenu1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
            this.toolBarMenu1.Name = "toolBarMenu1";
            this.toolBarMenu1.Size = new System.Drawing.Size(1287, 88);
            this.toolBarMenu1.TabIndex = 1;
            this.txt_status.Location = new System.Drawing.Point(1107, 65);
            this.txt_status.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
            this.txt_status.Name = "txt_status";
            this.txt_status.Size = new System.Drawing.Size(300, 24);
            this.txt_status.TabIndex = 226;
            this.txt_status.Tag = "status";
            // 
            // gcSummary
            // lb_lastUpdatedBy
            // 
            this.gcSummary.Dock = System.Windows.Forms.DockStyle.Fill;
            this.gcSummary.EmbeddedNavigator.Buttons.Append.Visible = false;
            this.gcSummary.EmbeddedNavigator.Buttons.CancelEdit.Visible = false;
            this.gcSummary.EmbeddedNavigator.Buttons.Edit.Visible = false;
            this.gcSummary.EmbeddedNavigator.Buttons.EndEdit.Visible = false;
            this.gcSummary.EmbeddedNavigator.Buttons.NextPage.Visible = false;
            this.gcSummary.EmbeddedNavigator.Buttons.PrevPage.Visible = false;
            this.gcSummary.EmbeddedNavigator.Buttons.Remove.Visible = false;
            this.gcSummary.EmbeddedNavigator.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
            this.gcSummary.Location = new System.Drawing.Point(0, 88);
            this.gcSummary.MainView = this.gvSummary;
            this.gcSummary.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
            this.gcSummary.Name = "gcSummary";
            this.gcSummary.RightToLeft = System.Windows.Forms.RightToLeft.No;
            this.gcSummary.Size = new System.Drawing.Size(1287, 548);
            this.gcSummary.TabIndex = 11;
            this.gcSummary.UseEmbeddedNavigator = true;
            this.gcSummary.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
            this.gvSummary});
            this.lb_lastUpdatedBy.Location = new System.Drawing.Point(693, 65);
            this.lb_lastUpdatedBy.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
            this.lb_lastUpdatedBy.Name = "lb_lastUpdatedBy";
            this.lb_lastUpdatedBy.Size = new System.Drawing.Size(109, 18);
            this.lb_lastUpdatedBy.TabIndex = 222;
            this.lb_lastUpdatedBy.Tag = "lastUpdatedBy";
            this.lb_lastUpdatedBy.Text = "lastUpdatedBy:";
            // 
            // gvSummary
            // txt_lastUpdatedBy
            // 
            this.gvSummary.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] {
            this.colflagApp,
            this.colappUser,
            this.colappDate,
            this.colAppNAME,
            this.colID,
            this.colPID,
            this.colCREATE_BY,
            this.colCREATE_DATE,
            this.colCGA001,
            this.colCGA002,
            this.colCGA003,
            this.colCGA004,
            this.colCGA005,
            this.colCGA006,
            this.colCGA007,
            this.colCGA008,
            this.colCGA009,
            this.colCGA010,
            this.colCGA011,
            this.colCGA012,
            this.colCGA013,
            this.colCGA014,
            this.colCGA015,
            this.colCGA016,
            this.colCGA017,
            this.colCGA018,
            this.colCGA019,
            this.colCGA020,
            this.colCGA021,
            this.colCGA022,
            this.colCGA023,
            this.colCGA024,
            this.colCGA025,
            this.colCGA026});
            this.gvSummary.DetailHeight = 550;
            this.gvSummary.FixedLineWidth = 4;
            this.gvSummary.GridControl = this.gcSummary;
            this.gvSummary.Name = "gvSummary";
            this.gvSummary.OptionsView.ColumnAutoWidth = false;
            this.gvSummary.OptionsView.ShowButtonMode = DevExpress.XtraGrid.Views.Base.ShowButtonModeEnum.ShowAlways;
            this.gvSummary.OptionsView.ShowFooter = true;
            this.gvSummary.OptionsView.ShowGroupPanel = false;
            this.txt_lastUpdatedBy.Location = new System.Drawing.Point(773, 65);
            this.txt_lastUpdatedBy.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
            this.txt_lastUpdatedBy.Name = "txt_lastUpdatedBy";
            this.txt_lastUpdatedBy.Size = new System.Drawing.Size(300, 24);
            this.txt_lastUpdatedBy.TabIndex = 222;
            this.txt_lastUpdatedBy.Tag = "lastUpdatedBy";
            // 
            // colflagApp
            // lb_lastUpdateDate
            // 
            this.colflagApp.AppearanceCell.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
            this.colflagApp.AppearanceCell.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
            this.colflagApp.AppearanceCell.Options.UseBackColor = true;
            this.colflagApp.AppearanceCell.Options.UseForeColor = true;
            this.colflagApp.Caption = "flagApp";
            this.colflagApp.FieldName = "flagApp";
            this.colflagApp.MinWidth = 29;
            this.colflagApp.Name = "colflagApp";
            this.colflagApp.Summary.AddRange(new DevExpress.XtraGrid.GridSummaryItem[] {
            new DevExpress.XtraGrid.GridColumnSummaryItem(DevExpress.Data.SummaryItemType.Count, "flagApp", "条数:{0}")});
            this.colflagApp.Width = 142;
            this.lb_lastUpdateDate.Location = new System.Drawing.Point(360, 65);
            this.lb_lastUpdateDate.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
            this.lb_lastUpdateDate.Name = "lb_lastUpdateDate";
            this.lb_lastUpdateDate.Size = new System.Drawing.Size(115, 18);
            this.lb_lastUpdateDate.TabIndex = 219;
            this.lb_lastUpdateDate.Tag = "lastUpdateDate";
            this.lb_lastUpdateDate.Text = "lastUpdateDate:";
            // 
            // colappUser
            // txt_lastUpdateDate
            // 
            this.colappUser.AppearanceCell.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
            this.colappUser.AppearanceCell.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
            this.colappUser.AppearanceCell.Options.UseBackColor = true;
            this.colappUser.AppearanceCell.Options.UseForeColor = true;
            this.colappUser.Caption = "appUser";
            this.colappUser.FieldName = "appUser";
            this.colappUser.MinWidth = 29;
            this.colappUser.Name = "colappUser";
            this.colappUser.Width = 142;
            this.txt_lastUpdateDate.Location = new System.Drawing.Point(440, 65);
            this.txt_lastUpdateDate.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
            this.txt_lastUpdateDate.Name = "txt_lastUpdateDate";
            this.txt_lastUpdateDate.Size = new System.Drawing.Size(300, 24);
            this.txt_lastUpdateDate.TabIndex = 219;
            this.txt_lastUpdateDate.Tag = "lastUpdateDate";
            // 
            // colappDate
            // lb_createBy
            // 
            this.colappDate.AppearanceCell.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
            this.colappDate.AppearanceCell.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
            this.colappDate.AppearanceCell.Options.UseBackColor = true;
            this.colappDate.AppearanceCell.Options.UseForeColor = true;
            this.colappDate.Caption = "appDate";
            this.colappDate.FieldName = "appDate";
            this.colappDate.MinWidth = 29;
            this.colappDate.Name = "colappDate";
            this.colappDate.Width = 142;
            this.lb_createBy.Location = new System.Drawing.Point(27, 65);
            this.lb_createBy.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
            this.lb_createBy.Name = "lb_createBy";
            this.lb_createBy.Size = new System.Drawing.Size(73, 18);
            this.lb_createBy.TabIndex = 217;
            this.lb_createBy.Tag = "createBy";
            this.lb_createBy.Text = "createBy:";
            // 
            // colAppNAME
            // txt_createBy
            // 
            this.colAppNAME.AppearanceCell.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
            this.colAppNAME.AppearanceCell.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
            this.colAppNAME.AppearanceCell.Options.UseBackColor = true;
            this.colAppNAME.AppearanceCell.Options.UseForeColor = true;
            this.colAppNAME.Caption = "AppNAME";
            this.colAppNAME.FieldName = "AppNAME";
            this.colAppNAME.MinWidth = 29;
            this.colAppNAME.Name = "colAppNAME";
            this.colAppNAME.Width = 142;
            this.txt_createBy.Location = new System.Drawing.Point(107, 65);
            this.txt_createBy.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
            this.txt_createBy.Name = "txt_createBy";
            this.txt_createBy.Size = new System.Drawing.Size(300, 24);
            this.txt_createBy.TabIndex = 217;
            this.txt_createBy.Tag = "createBy";
            // 
            // colID
            // lb_createDate
            // 
            this.colID.AppearanceCell.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
            this.colID.AppearanceCell.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
            this.colID.AppearanceCell.Options.UseBackColor = true;
            this.colID.AppearanceCell.Options.UseForeColor = true;
            this.colID.Caption = "ID";
            this.colID.FieldName = "ID";
            this.colID.MinWidth = 29;
            this.colID.Name = "colID";
            this.colID.Width = 142;
            this.lb_createDate.Location = new System.Drawing.Point(1027, 25);
            this.lb_createDate.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
            this.lb_createDate.Name = "lb_createDate";
            this.lb_createDate.Size = new System.Drawing.Size(87, 18);
            this.lb_createDate.TabIndex = 216;
            this.lb_createDate.Tag = "createDate";
            this.lb_createDate.Text = "createDate:";
            // 
            // colPID
            // txt_createDate
            // 
            this.colPID.AppearanceCell.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
            this.colPID.AppearanceCell.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
            this.colPID.AppearanceCell.Options.UseBackColor = true;
            this.colPID.AppearanceCell.Options.UseForeColor = true;
            this.colPID.Caption = "PID";
            this.colPID.FieldName = "PID";
            this.colPID.MinWidth = 29;
            this.colPID.Name = "colPID";
            this.colPID.Width = 142;
            this.txt_createDate.Location = new System.Drawing.Point(1107, 25);
            this.txt_createDate.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
            this.txt_createDate.Name = "txt_createDate";
            this.txt_createDate.Size = new System.Drawing.Size(300, 24);
            this.txt_createDate.TabIndex = 216;
            this.txt_createDate.Tag = "createDate";
            // 
            // colCREATE_BY
            // lb_rolRemark
            // 
            this.colCREATE_BY.AppearanceCell.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
            this.colCREATE_BY.AppearanceCell.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
            this.colCREATE_BY.AppearanceCell.Options.UseBackColor = true;
            this.colCREATE_BY.AppearanceCell.Options.UseForeColor = true;
            this.colCREATE_BY.Caption = "CREATE_BY";
            this.colCREATE_BY.FieldName = "CREATE_BY";
            this.colCREATE_BY.MinWidth = 29;
            this.colCREATE_BY.Name = "colCREATE_BY";
            this.colCREATE_BY.Width = 142;
            this.lb_rolRemark.Location = new System.Drawing.Point(693, 25);
            this.lb_rolRemark.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
            this.lb_rolRemark.Name = "lb_rolRemark";
            this.lb_rolRemark.Size = new System.Drawing.Size(80, 18);
            this.lb_rolRemark.TabIndex = 213;
            this.lb_rolRemark.Tag = "rolRemark";
            this.lb_rolRemark.Text = "rolRemark:";
            // 
            // colCREATE_DATE
            // txt_rolRemark
            // 
            this.colCREATE_DATE.AppearanceCell.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
            this.colCREATE_DATE.AppearanceCell.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
            this.colCREATE_DATE.AppearanceCell.Options.UseBackColor = true;
            this.colCREATE_DATE.AppearanceCell.Options.UseForeColor = true;
            this.colCREATE_DATE.Caption = "CREATE_DATE";
            this.colCREATE_DATE.FieldName = "CREATE_DATE";
            this.colCREATE_DATE.MinWidth = 29;
            this.colCREATE_DATE.Name = "colCREATE_DATE";
            this.colCREATE_DATE.Width = 142;
            this.txt_rolRemark.Location = new System.Drawing.Point(773, 25);
            this.txt_rolRemark.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
            this.txt_rolRemark.Name = "txt_rolRemark";
            this.txt_rolRemark.Size = new System.Drawing.Size(300, 24);
            this.txt_rolRemark.TabIndex = 213;
            this.txt_rolRemark.Tag = "rolRemark";
            // 
            // colCGA001
            // lb_roleName
            // 
            this.colCGA001.AppearanceCell.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
            this.colCGA001.AppearanceCell.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
            this.colCGA001.AppearanceCell.Options.UseBackColor = true;
            this.colCGA001.AppearanceCell.Options.UseForeColor = true;
            this.colCGA001.Caption = "采购单号";
            this.colCGA001.FieldName = "CGA001";
            this.colCGA001.MinWidth = 29;
            this.colCGA001.Name = "colCGA001";
            this.colCGA001.Visible = true;
            this.colCGA001.VisibleIndex = 0;
            this.colCGA001.Width = 142;
            this.lb_roleName.Location = new System.Drawing.Point(360, 25);
            this.lb_roleName.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
            this.lb_roleName.Name = "lb_roleName";
            this.lb_roleName.Size = new System.Drawing.Size(77, 18);
            this.lb_roleName.TabIndex = 211;
            this.lb_roleName.Tag = "roleName";
            this.lb_roleName.Text = "roleName:";
            // 
            // colCGA002
            // txt_roleName
            // 
            this.colCGA002.AppearanceCell.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
            this.colCGA002.AppearanceCell.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
            this.colCGA002.AppearanceCell.Options.UseBackColor = true;
            this.colCGA002.AppearanceCell.Options.UseForeColor = true;
            this.colCGA002.Caption = "CGA002";
            this.colCGA002.FieldName = "CGA002";
            this.colCGA002.MinWidth = 29;
            this.colCGA002.Name = "colCGA002";
            this.colCGA002.Width = 142;
            this.txt_roleName.Location = new System.Drawing.Point(440, 25);
            this.txt_roleName.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
            this.txt_roleName.Name = "txt_roleName";
            this.txt_roleName.Size = new System.Drawing.Size(300, 24);
            this.txt_roleName.TabIndex = 211;
            this.txt_roleName.Tag = "roleName";
            // 
            // colCGA003
            // lb_guid
            // 
            this.colCGA003.AppearanceCell.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
            this.colCGA003.AppearanceCell.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
            this.colCGA003.AppearanceCell.Options.UseBackColor = true;
            this.colCGA003.AppearanceCell.Options.UseForeColor = true;
            this.colCGA003.Caption = "采购日期";
            this.colCGA003.FieldName = "CGA003";
            this.colCGA003.MinWidth = 29;
            this.colCGA003.Name = "colCGA003";
            this.colCGA003.Visible = true;
            this.colCGA003.VisibleIndex = 1;
            this.colCGA003.Width = 142;
            //
            // colCGA004
            //
            this.colCGA004.AppearanceCell.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
            this.colCGA004.AppearanceCell.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
            this.colCGA004.AppearanceCell.Options.UseBackColor = true;
            this.colCGA004.AppearanceCell.Options.UseForeColor = true;
            this.colCGA004.Caption = "单据日期";
            this.colCGA004.FieldName = "CGA004";
            this.colCGA004.MinWidth = 29;
            this.colCGA004.Name = "colCGA004";
            this.colCGA004.Visible = true;
            this.colCGA004.VisibleIndex = 2;
            this.colCGA004.Width = 142;
            //
            // colCGA005
            //
            this.colCGA005.AppearanceCell.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
            this.colCGA005.AppearanceCell.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
            this.colCGA005.AppearanceCell.Options.UseBackColor = true;
            this.colCGA005.AppearanceCell.Options.UseForeColor = true;
            this.colCGA005.Caption = "单据类型";
            this.colCGA005.FieldName = "CGA005";
            this.colCGA005.MinWidth = 29;
            this.colCGA005.Name = "colCGA005";
            this.colCGA005.Visible = true;
            this.colCGA005.VisibleIndex = 3;
            this.colCGA005.Width = 142;
            //
            // colCGA006
            //
            this.colCGA006.AppearanceCell.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
            this.colCGA006.AppearanceCell.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
            this.colCGA006.AppearanceCell.Options.UseBackColor = true;
            this.colCGA006.AppearanceCell.Options.UseForeColor = true;
            this.colCGA006.Caption = "供应商";
            this.colCGA006.FieldName = "CGA006";
            this.colCGA006.MinWidth = 29;
            this.colCGA006.Name = "colCGA006";
            this.colCGA006.Visible = true;
            this.colCGA006.VisibleIndex = 4;
            this.colCGA006.Width = 142;
            //
            // colCGA007
            //
            this.colCGA007.AppearanceCell.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
            this.colCGA007.AppearanceCell.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
            this.colCGA007.AppearanceCell.Options.UseBackColor = true;
            this.colCGA007.AppearanceCell.Options.UseForeColor = true;
            this.colCGA007.Caption = "CGA007";
            this.colCGA007.FieldName = "CGA007";
            this.colCGA007.MinWidth = 29;
            this.colCGA007.Name = "colCGA007";
            this.colCGA007.Width = 142;
            //
            // colCGA008
            //
            this.colCGA008.AppearanceCell.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
            this.colCGA008.AppearanceCell.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
            this.colCGA008.AppearanceCell.Options.UseBackColor = true;
            this.colCGA008.AppearanceCell.Options.UseForeColor = true;
            this.colCGA008.Caption = "关闭状态";
            this.colCGA008.FieldName = "CGA008";
            this.colCGA008.MinWidth = 29;
            this.colCGA008.Name = "colCGA008";
            this.colCGA008.Visible = true;
            this.colCGA008.VisibleIndex = 9;
            this.colCGA008.Width = 142;
            //
            // colCGA009
            //
            this.colCGA009.AppearanceCell.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
            this.colCGA009.AppearanceCell.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
            this.colCGA009.AppearanceCell.Options.UseBackColor = true;
            this.colCGA009.AppearanceCell.Options.UseForeColor = true;
            this.colCGA009.Caption = "CGA009";
            this.colCGA009.FieldName = "CGA009";
            this.colCGA009.MinWidth = 29;
            this.colCGA009.Name = "colCGA009";
            this.colCGA009.Width = 142;
            //
            // colCGA010
            //
            this.colCGA010.AppearanceCell.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
            this.colCGA010.AppearanceCell.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
            this.colCGA010.AppearanceCell.Options.UseBackColor = true;
            this.colCGA010.AppearanceCell.Options.UseForeColor = true;
            this.colCGA010.Caption = "CGA010";
            this.colCGA010.FieldName = "CGA010";
            this.colCGA010.MinWidth = 29;
            this.colCGA010.Name = "colCGA010";
            this.colCGA010.Width = 142;
            //
            // colCGA011
            //
            this.colCGA011.AppearanceCell.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
            this.colCGA011.AppearanceCell.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
            this.colCGA011.AppearanceCell.Options.UseBackColor = true;
            this.colCGA011.AppearanceCell.Options.UseForeColor = true;
            this.colCGA011.Caption = "交易币种";
            this.colCGA011.FieldName = "CGA011";
            this.colCGA011.MinWidth = 29;
            this.colCGA011.Name = "colCGA011";
            this.colCGA011.Visible = true;
            this.colCGA011.VisibleIndex = 5;
            this.colCGA011.Width = 142;
            //
            // colCGA012
            //
            this.colCGA012.AppearanceCell.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
            this.colCGA012.AppearanceCell.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
            this.colCGA012.AppearanceCell.Options.UseBackColor = true;
            this.colCGA012.AppearanceCell.Options.UseForeColor = true;
            this.colCGA012.Caption = "营业";
            this.colCGA012.FieldName = "CGA012";
            this.colCGA012.MinWidth = 29;
            this.colCGA012.Name = "colCGA012";
            this.colCGA012.Width = 142;
            //
            // colCGA013
            //
            this.colCGA013.AppearanceCell.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
            this.colCGA013.AppearanceCell.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
            this.colCGA013.AppearanceCell.Options.UseBackColor = true;
            this.colCGA013.AppearanceCell.Options.UseForeColor = true;
            this.colCGA013.Caption = "CGA013";
            this.colCGA013.FieldName = "CGA013";
            this.colCGA013.MinWidth = 29;
            this.colCGA013.Name = "colCGA013";
            this.colCGA013.Width = 142;
            //
            // colCGA014
            //
            this.colCGA014.AppearanceCell.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
            this.colCGA014.AppearanceCell.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
            this.colCGA014.AppearanceCell.Options.UseBackColor = true;
            this.colCGA014.AppearanceCell.Options.UseForeColor = true;
            this.colCGA014.Caption = "CGA014";
            this.colCGA014.FieldName = "CGA014";
            this.colCGA014.MinWidth = 29;
            this.colCGA014.Name = "colCGA014";
            this.colCGA014.Width = 142;
            //
            // colCGA015
            //
            this.colCGA015.AppearanceCell.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
            this.colCGA015.AppearanceCell.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
            this.colCGA015.AppearanceCell.Options.UseBackColor = true;
            this.colCGA015.AppearanceCell.Options.UseForeColor = true;
            this.colCGA015.Caption = "审核者";
            this.colCGA015.FieldName = "CGA015";
            this.colCGA015.MinWidth = 29;
            this.colCGA015.Name = "colCGA015";
            this.colCGA015.Visible = true;
            this.colCGA015.VisibleIndex = 6;
            this.colCGA015.Width = 142;
            //
            // colCGA016
            //
            this.colCGA016.AppearanceCell.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
            this.colCGA016.AppearanceCell.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
            this.colCGA016.AppearanceCell.Options.UseBackColor = true;
            this.colCGA016.AppearanceCell.Options.UseForeColor = true;
            this.colCGA016.Caption = "审核日期";
            this.colCGA016.FieldName = "CGA016";
            this.colCGA016.MinWidth = 29;
            this.colCGA016.Name = "colCGA016";
            this.colCGA016.Visible = true;
            this.colCGA016.VisibleIndex = 7;
            this.colCGA016.Width = 142;
            //
            // colCGA017
            //
            this.colCGA017.AppearanceCell.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
            this.colCGA017.AppearanceCell.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
            this.colCGA017.AppearanceCell.Options.UseBackColor = true;
            this.colCGA017.AppearanceCell.Options.UseForeColor = true;
            this.colCGA017.Caption = "备注";
            this.colCGA017.FieldName = "CGA017";
            this.colCGA017.MinWidth = 29;
            this.colCGA017.Name = "colCGA017";
            this.colCGA017.Visible = true;
            this.colCGA017.VisibleIndex = 8;
            this.colCGA017.Width = 142;
            //
            // colCGA018
            //
            this.colCGA018.AppearanceCell.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
            this.colCGA018.AppearanceCell.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
            this.colCGA018.AppearanceCell.Options.UseBackColor = true;
            this.colCGA018.AppearanceCell.Options.UseForeColor = true;
            this.colCGA018.Caption = "CGA018";
            this.colCGA018.FieldName = "CGA018";
            this.colCGA018.MinWidth = 29;
            this.colCGA018.Name = "colCGA018";
            this.colCGA018.Width = 142;
            //
            // colCGA019
            //
            this.colCGA019.AppearanceCell.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
            this.colCGA019.AppearanceCell.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
            this.colCGA019.AppearanceCell.Options.UseBackColor = true;
            this.colCGA019.AppearanceCell.Options.UseForeColor = true;
            this.colCGA019.Caption = "CGA019";
            this.colCGA019.FieldName = "CGA019";
            this.colCGA019.MinWidth = 29;
            this.colCGA019.Name = "colCGA019";
            this.colCGA019.Width = 142;
            //
            // colCGA020
            //
            this.colCGA020.AppearanceCell.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
            this.colCGA020.AppearanceCell.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
            this.colCGA020.AppearanceCell.Options.UseBackColor = true;
            this.colCGA020.AppearanceCell.Options.UseForeColor = true;
            this.colCGA020.Caption = "CGA020";
            this.colCGA020.FieldName = "CGA020";
            this.colCGA020.MinWidth = 29;
            this.colCGA020.Name = "colCGA020";
            this.colCGA020.Width = 142;
            //
            // colCGA021
            //
            this.colCGA021.AppearanceCell.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
            this.colCGA021.AppearanceCell.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
            this.colCGA021.AppearanceCell.Options.UseBackColor = true;
            this.colCGA021.AppearanceCell.Options.UseForeColor = true;
            this.colCGA021.Caption = "CGA021";
            this.colCGA021.FieldName = "CGA021";
            this.colCGA021.MinWidth = 29;
            this.colCGA021.Name = "colCGA021";
            this.colCGA021.Width = 142;
            //
            // colCGA022
            //
            this.colCGA022.AppearanceCell.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
            this.colCGA022.AppearanceCell.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
            this.colCGA022.AppearanceCell.Options.UseBackColor = true;
            this.colCGA022.AppearanceCell.Options.UseForeColor = true;
            this.colCGA022.Caption = "CGA022";
            this.colCGA022.FieldName = "CGA022";
            this.colCGA022.MinWidth = 29;
            this.colCGA022.Name = "colCGA022";
            this.colCGA022.Width = 142;
            //
            // colCGA023
            //
            this.colCGA023.AppearanceCell.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
            this.colCGA023.AppearanceCell.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
            this.colCGA023.AppearanceCell.Options.UseBackColor = true;
            this.colCGA023.AppearanceCell.Options.UseForeColor = true;
            this.colCGA023.Caption = "CGA023";
            this.colCGA023.FieldName = "CGA023";
            this.colCGA023.MinWidth = 29;
            this.colCGA023.Name = "colCGA023";
            this.colCGA023.Width = 142;
            //
            // colCGA024
            //
            this.colCGA024.AppearanceCell.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
            this.colCGA024.AppearanceCell.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
            this.colCGA024.AppearanceCell.Options.UseBackColor = true;
            this.colCGA024.AppearanceCell.Options.UseForeColor = true;
            this.colCGA024.Caption = "CGA024";
            this.colCGA024.FieldName = "CGA024";
            this.colCGA024.MinWidth = 29;
            this.colCGA024.Name = "colCGA024";
            this.colCGA024.Width = 142;
            //
            // colCGA025
            //
            this.colCGA025.AppearanceCell.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
            this.colCGA025.AppearanceCell.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
            this.colCGA025.AppearanceCell.Options.UseBackColor = true;
            this.colCGA025.AppearanceCell.Options.UseForeColor = true;
            this.colCGA025.Caption = "CGA025";
            this.colCGA025.FieldName = "CGA025";
            this.colCGA025.MinWidth = 29;
            this.colCGA025.Name = "colCGA025";
            this.colCGA025.Width = 142;
            this.lb_guid.Location = new System.Drawing.Point(27, 25);
            this.lb_guid.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
            this.lb_guid.Name = "lb_guid";
            this.lb_guid.Size = new System.Drawing.Size(41, 18);
            this.lb_guid.TabIndex = 210;
            this.lb_guid.Tag = "guid";
            this.lb_guid.Text = "guid:";
            // 
            // colCGA026
            // txt_guid
            // 
            this.colCGA026.AppearanceCell.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
            this.colCGA026.AppearanceCell.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
            this.colCGA026.AppearanceCell.Options.UseBackColor = true;
            this.colCGA026.AppearanceCell.Options.UseForeColor = true;
            this.colCGA026.Caption = "CGA026";
            this.colCGA026.FieldName = "CGA026";
            this.colCGA026.MinWidth = 29;
            this.colCGA026.Name = "colCGA026";
            this.colCGA026.Width = 142;
            this.txt_guid.Location = new System.Drawing.Point(107, 25);
            this.txt_guid.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
            this.txt_guid.Name = "txt_guid";
            this.txt_guid.Size = new System.Drawing.Size(300, 24);
            this.txt_guid.TabIndex = 210;
            this.txt_guid.Tag = "guid";
            // 
            // TEST
            // Form1
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(10F, 22F);
            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(1287, 684);
            this.Controls.Add(this.gcSummary);
            this.Controls.Add(this.toolBarMenu1);
            this.Controls.Add(this.pageBar1);
            this.Name = "TEST";
            this.Text = "TEST";
            ((System.ComponentModel.ISupportInitialize)(this.gcSummary)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.gvSummary)).EndInit();
            this.ClientSize = new System.Drawing.Size(1189, 328);
            this.Controls.Add(this.lb_status);
            this.Controls.Add(this.txt_status);
            this.Controls.Add(this.lb_lastUpdatedBy);
            this.Controls.Add(this.txt_lastUpdatedBy);
            this.Controls.Add(this.lb_lastUpdateDate);
            this.Controls.Add(this.txt_lastUpdateDate);
            this.Controls.Add(this.lb_createBy);
            this.Controls.Add(this.txt_createBy);
            this.Controls.Add(this.lb_createDate);
            this.Controls.Add(this.txt_createDate);
            this.Controls.Add(this.lb_rolRemark);
            this.Controls.Add(this.txt_rolRemark);
            this.Controls.Add(this.lb_roleName);
            this.Controls.Add(this.txt_roleName);
            this.Controls.Add(this.lb_guid);
            this.Controls.Add(this.txt_guid);
            this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
            this.Name = "Form1";
            this.Text = "Form1";
            ((System.ComponentModel.ISupportInitialize)(this.txt_status.Properties)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.txt_lastUpdatedBy.Properties)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.txt_lastUpdateDate.Properties)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.txt_createBy.Properties)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.txt_createDate.Properties)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.txt_rolRemark.Properties)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.txt_roleName.Properties)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.txt_guid.Properties)).EndInit();
            this.ResumeLayout(false);
            this.PerformLayout();
        }
        #endregion
        //BQCreateConrolObejct
private DevExpress.XtraEditors.LabelControl lb_status;
private DevExpress.XtraEditors.TextEdit txt_status;
        private UserControls.Data.PageBar pageBar1;
        private UserControl.ToolBarMenu toolBarMenu1;
        private DevExpress.XtraGrid.GridControl gcSummary;
        private DevExpress.XtraGrid.Views.Grid.GridView gvSummary;
        private DevExpress.XtraGrid.Columns.GridColumn colflagApp;
        private DevExpress.XtraGrid.Columns.GridColumn colappUser;
        private DevExpress.XtraGrid.Columns.GridColumn colappDate;
        private DevExpress.XtraGrid.Columns.GridColumn colAppNAME;
        private DevExpress.XtraGrid.Columns.GridColumn colID;
        private DevExpress.XtraGrid.Columns.GridColumn colPID;
        private DevExpress.XtraGrid.Columns.GridColumn colCREATE_BY;
        private DevExpress.XtraGrid.Columns.GridColumn colCREATE_DATE;
        private DevExpress.XtraGrid.Columns.GridColumn colCGA001;
        private DevExpress.XtraGrid.Columns.GridColumn colCGA002;
        private DevExpress.XtraGrid.Columns.GridColumn colCGA003;
        private DevExpress.XtraGrid.Columns.GridColumn colCGA004;
        private DevExpress.XtraGrid.Columns.GridColumn colCGA005;
        private DevExpress.XtraGrid.Columns.GridColumn colCGA006;
        private DevExpress.XtraGrid.Columns.GridColumn colCGA007;
        private DevExpress.XtraGrid.Columns.GridColumn colCGA008;
        private DevExpress.XtraGrid.Columns.GridColumn colCGA009;
        private DevExpress.XtraGrid.Columns.GridColumn colCGA010;
        private DevExpress.XtraGrid.Columns.GridColumn colCGA011;
        private DevExpress.XtraGrid.Columns.GridColumn colCGA012;
        private DevExpress.XtraGrid.Columns.GridColumn colCGA013;
        private DevExpress.XtraGrid.Columns.GridColumn colCGA014;
        private DevExpress.XtraGrid.Columns.GridColumn colCGA015;
        private DevExpress.XtraGrid.Columns.GridColumn colCGA016;
        private DevExpress.XtraGrid.Columns.GridColumn colCGA017;
        private DevExpress.XtraGrid.Columns.GridColumn colCGA018;
        private DevExpress.XtraGrid.Columns.GridColumn colCGA019;
        private DevExpress.XtraGrid.Columns.GridColumn colCGA020;
        private DevExpress.XtraGrid.Columns.GridColumn colCGA021;
        private DevExpress.XtraGrid.Columns.GridColumn colCGA022;
        private DevExpress.XtraGrid.Columns.GridColumn colCGA023;
        private DevExpress.XtraGrid.Columns.GridColumn colCGA024;
        private DevExpress.XtraGrid.Columns.GridColumn colCGA025;
        private DevExpress.XtraGrid.Columns.GridColumn colCGA026;
private DevExpress.XtraEditors.LabelControl lb_lastUpdatedBy;
private DevExpress.XtraEditors.TextEdit txt_lastUpdatedBy;
private DevExpress.XtraEditors.LabelControl lb_lastUpdateDate;
private DevExpress.XtraEditors.TextEdit txt_lastUpdateDate;
private DevExpress.XtraEditors.LabelControl lb_createBy;
private DevExpress.XtraEditors.TextEdit txt_createBy;
private DevExpress.XtraEditors.LabelControl lb_createDate;
private DevExpress.XtraEditors.TextEdit txt_createDate;
private DevExpress.XtraEditors.LabelControl lb_rolRemark;
private DevExpress.XtraEditors.TextEdit txt_rolRemark;
private DevExpress.XtraEditors.LabelControl lb_roleName;
private DevExpress.XtraEditors.TextEdit txt_roleName;
private DevExpress.XtraEditors.LabelControl lb_guid;
private DevExpress.XtraEditors.TextEdit txt_guid;
    }
}
DevApp/Gs.DevApp/TestForm/TEST.cs
@@ -1,4 +1,3 @@
using DevExpress.XtraEditors;
using System;
using System.Collections.Generic;
using System.ComponentModel;
@@ -6,28 +5,15 @@
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Gs.DevApp.TestForm
namespace CreateDBClass
{
    public partial class TEST : DevExpress.XtraEditors.XtraForm
    public partial class Form1 : Form
    {
        public TEST()
        public Form1()
        {
            InitializeComponent();
            toolBarMenu1.btnAddClick += ToolBarMenu1_btnAddClick;
            toolBarMenu1.btnKGClick += ToolBarMenu1_btnKGClick;
        }
        private void ToolBarMenu1_btnKGClick(object sender, EventArgs e)
        {
            MessageBox.Show("开工");
        }
        private void ToolBarMenu1_btnAddClick(object sender, EventArgs e)
        {
            MessageBox.Show("111");
        }
    }
}
}
DevApp/Gs.DevApp/TestForm/XtraForm1.Designer.cs
@@ -32,6 +32,10 @@
            this.button1 = new System.Windows.Forms.Button();
            this.pageBar1 = new UserControls.Data.PageBar();
            this.simpleButton1 = new DevExpress.XtraEditors.SimpleButton();
            this.treeListLookUpEdit1 = new DevExpress.XtraEditors.TreeListLookUpEdit();
            this.treeListLookUpEdit1TreeList = new DevExpress.XtraTreeList.TreeList();
            ((System.ComponentModel.ISupportInitialize)(this.treeListLookUpEdit1.Properties)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.treeListLookUpEdit1TreeList)).BeginInit();
            this.SuspendLayout();
            // 
            // button1
@@ -64,16 +68,37 @@
            this.simpleButton1.TabIndex = 1;
            this.simpleButton1.Text = "simpleButton1";
            // 
            // treeListLookUpEdit1
            //
            this.treeListLookUpEdit1.Location = new System.Drawing.Point(261, 168);
            this.treeListLookUpEdit1.Name = "treeListLookUpEdit1";
            this.treeListLookUpEdit1.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
            this.treeListLookUpEdit1.Properties.TreeList = this.treeListLookUpEdit1TreeList;
            this.treeListLookUpEdit1.Size = new System.Drawing.Size(125, 24);
            this.treeListLookUpEdit1.TabIndex = 3;
            //
            // treeListLookUpEdit1TreeList
            //
            this.treeListLookUpEdit1TreeList.Location = new System.Drawing.Point(0, 0);
            this.treeListLookUpEdit1TreeList.Name = "treeListLookUpEdit1TreeList";
            this.treeListLookUpEdit1TreeList.OptionsView.ShowIndentAsRowStyle = true;
            this.treeListLookUpEdit1TreeList.Size = new System.Drawing.Size(400, 200);
            this.treeListLookUpEdit1TreeList.TabIndex = 0;
            //
            // XtraForm1
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 18F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(842, 424);
            this.Controls.Add(this.treeListLookUpEdit1);
            this.Controls.Add(this.pageBar1);
            this.Controls.Add(this.simpleButton1);
            this.Controls.Add(this.button1);
            this.Name = "XtraForm1";
            this.Text = "XtraForm1";
            ((System.ComponentModel.ISupportInitialize)(this.treeListLookUpEdit1.Properties)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.treeListLookUpEdit1TreeList)).EndInit();
            this.ResumeLayout(false);
        }
@@ -83,5 +108,7 @@
        private System.Windows.Forms.Button button1;
        private DevExpress.XtraEditors.SimpleButton simpleButton1;
        private UserControls.Data.PageBar pageBar1;
        private DevExpress.XtraEditors.TreeListLookUpEdit treeListLookUpEdit1;
        private DevExpress.XtraTreeList.TreeList treeListLookUpEdit1TreeList;
    }
}
DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs
@@ -1,6 +1,5 @@
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Data;
using System.IO;
using System.Linq;
@@ -15,6 +14,7 @@
using static System.Windows.Forms.Control;
using DevExpress.XtraEditors;
using DevExpress.XtraTab;
using System.Text.RegularExpressions;
namespace Gs.DevApp.ToolBox
{
@@ -150,19 +150,30 @@
            rto.rtnData = json["rtnData"];
            return rto;
        }
        /// <summary>
        /// è®¾ç½®ç³»ç»Ÿå­—体大小,目前并不通用
        /// æ ‡å‡†json串返回ReturnModel-->table,
        /// </summary>
        public static float GetFontSize = 10;
        public static void SetFont(Control control)
        /// <param name="strReturn"></param>
        /// <returns></returns>
        public static ReturnModel<DataTable> GetNoPageTableByJson(string strReturn)
        {
            float size = GetFontSize;
            foreach (Control childControl in control.Controls)
            ReturnModel<DataTable> rto = new ReturnModel<DataTable>();
            JObject json = JObject.Parse(strReturn);
            rto.rtnCode = int.Parse(json["rtnCode"].ToString());
            rto.rtnMsg = json["rtnMsg"].ToString();
            rto.rtnData = new DataTable();
            JArray array = new JArray();
            var d = json["rtnData"];
            foreach (var a in d)
            {
                childControl.Font = new Font(childControl.Font.FontFamily, size, childControl.Font.Style);
                SetFont(childControl);
                array.Add(a);
            }
            DataTable dt = JsonConvert.DeserializeObject<DataTable>(array.ToString());
            rto.rtnData = dt;
            return rto;
        }
        /// <summary>
        /// è¯»å–默认页大小
@@ -170,19 +181,20 @@
        /// <returns></returns>
        public static int GetPageSize()
        {
            return int.Parse(System.Configuration.ConfigurationSettings.AppSettings.Get("PageSize").ToString());
            return 50;
            // return int.Parse(System.Configuration.ConfigurationSettings.AppSettings.Get("PageSize").ToString());
        }
        /// <summary>
        /// æ ¹æ®å¯¹è±¡æ‰¹é‡è®¾ç½®æ–‡æœ¬å€¼,
        /// æ ¹æ®å¯¹è±¡æ‰¹é‡è®¾ç½®æ–‡æœ¬å€¼
        /// </summary>
        /// <param name="controls"></param>
        /// <param name="dynamicObject"></param>
        /// <param name="controls">controls:为groupBox1.Controls/panel1.Controls</param>
        /// <param name="dynamicObject">对像</param>
        /// <param name="isEdt">是否可编辑</param>
        public static void SetValueByObj(ControlCollection controls, dynamic dynamicObject, Boolean isEdt)
        {
            foreach (JProperty property in dynamicObject.Properties())
            {
                //Console.WriteLine("Name: {0}, Value: {1}", property.Name, property.Value);
                string strName = property.Name;
                string strVal = property.Value.ToString();
                //    // å¦‚æžœvalue是一个对象,可以递归遍历
@@ -198,41 +210,73 @@
                if (cols.Length > 0)
                {
                    Control colType = cols[0];
                    //下拉
                    if (colType is ComboBoxEdit)
                    {
                        ComboBoxEdit txt = colType as ComboBoxEdit;
                        txt.SelectedIndex = int.Parse(strVal);
                        if (txt.Properties.TextEditStyle == DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor)
                            txt.SelectedIndex = int.Parse(strVal);
                        else
                            txt.Text = strVal;
                        txt.Enabled = isEdt;
                        continue;
                    }
                    //文本
                    if (colType is TextEdit)
                    {
                        TextEdit txt = colType as TextEdit;
                        if (txt != null)
                        {
                            txt.Text = strVal;
                            txt.Enabled = isEdt;
                        }
                        txt.Enabled = isEdt;
                        continue;
                    }
                     //数字卡
                    if (colType is NumericUpDown)
                    {
                        NumericUpDown txt = colType as NumericUpDown;
                        if (txt != null)
                            txt.Text = strVal;
                        txt.Enabled = isEdt;
                        continue;
                    }
                }
            }
        }
        /// <summary>
        /// æ¸…空容器里面的控件
        /// </summary>
        /// <param name="controls">容器</param>
        /// <param name="isEdt">清空后是否可编辑</param>
        /// <param name="controls">controls:为groupBox1.Controls/panel1.Controls</param>
        /// <param name="isEdt">是否可编辑</param>
        public static void CleanValue(ControlCollection controls, Boolean isEdt)
        {
            foreach (Control ctrl in controls)//或为groupBox1.Controls/panel1.Controls
            foreach (Control ctrl in controls)
            {
                ctrl.Enabled = isEdt;
                //多行文本
                if (ctrl is MemoEdit)
                {
                    MemoEdit txt = ctrl as MemoEdit;
                    txt.Text = "";
                    txt.Enabled = isEdt;
                    continue;
                }
                //下拉
                if (ctrl is ComboBoxEdit)
                {
                    ComboBoxEdit txt = ctrl as ComboBoxEdit;
                    if (txt.Properties.TextEditStyle == DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor)
                        txt.SelectedIndex = 0;
                    else
                        txt.Text = "";
                    txt.Enabled = isEdt;
                    continue;
                }
                //文本
                if (ctrl is TextEdit)
                {
                    ctrl.Text = "";
                    ctrl.Enabled = isEdt;
                    continue;
                }
            }
        }
@@ -240,14 +284,25 @@
        /// <summary>
        /// ç¦ç”¨æˆ–启用容器里面的控件
        /// </summary>
        /// <param name="controls">容器</param>
        /// <param name="controls">controls:为groupBox1.Controls/panel1.Controls</param>
        /// <param name="isEdt">是否可编辑</param>
        public static void ChangeEnable(ControlCollection controls, Boolean isEdt)
        {
            foreach (Control ctrl in controls)//或为groupBox1.Controls/panel1.Controls
            foreach (Control ctrl in controls)
            {
                //文本
                if (ctrl is TextEdit)
                {
                    ctrl.Enabled = isEdt;
                    continue;
                }
                //数字卡
                if (ctrl is NumericUpDown)
                {
                    ctrl.Enabled = isEdt;
                    continue;
                }
            }
        }
@@ -323,5 +378,26 @@
            }
        }
        /// <summary>
        /// è½¬é©¼å³°å‘½å
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        public static string ToCamelCase(string input)
        {
            if (string.IsNullOrEmpty(input))
                return input;
            // åŒ¹é…éžå­—母数字字符后的第一个字母,并将其转换为大写
            return Regex.Replace(
                input,
                "([a-z])([A-Z])",
                "$1$2",
                RegexOptions.CultureInvariant
            ).Trim();
        }
    }
}
DevApp/Gs.DevApp/UserControl/ToolBarMenu.Designer.cs
@@ -75,7 +75,7 @@
            this.barDockControlLeft.Dock = System.Windows.Forms.DockStyle.Left;
            this.barDockControlLeft.Location = new System.Drawing.Point(0, 74);
            this.barDockControlLeft.Manager = this.barManager1;
            this.barDockControlLeft.Size = new System.Drawing.Size(0, 0);
            this.barDockControlLeft.Size = new System.Drawing.Size(0, 3);
            // 
            // barManager1
            // 
@@ -301,7 +301,7 @@
            // 
            this.barDockControlBottom.CausesValidation = false;
            this.barDockControlBottom.Dock = System.Windows.Forms.DockStyle.Bottom;
            this.barDockControlBottom.Location = new System.Drawing.Point(0, 72);
            this.barDockControlBottom.Location = new System.Drawing.Point(0, 77);
            this.barDockControlBottom.Manager = this.barManager1;
            this.barDockControlBottom.Size = new System.Drawing.Size(1119, 0);
            // 
@@ -311,7 +311,7 @@
            this.barDockControlRight.Dock = System.Windows.Forms.DockStyle.Right;
            this.barDockControlRight.Location = new System.Drawing.Point(1119, 74);
            this.barDockControlRight.Manager = this.barManager1;
            this.barDockControlRight.Size = new System.Drawing.Size(0, 0);
            this.barDockControlRight.Size = new System.Drawing.Size(0, 3);
            // 
            // barLargeButtonItem5
            // 
@@ -328,7 +328,7 @@
            this.Controls.Add(this.barDockControlBottom);
            this.Controls.Add(this.barDockControlTop);
            this.Name = "ToolBarMenu";
            this.Size = new System.Drawing.Size(1119, 72);
            this.Size = new System.Drawing.Size(1119, 77);
            ((System.ComponentModel.ISupportInitialize)(this.barManager1)).EndInit();
            this.ResumeLayout(false);
            this.PerformLayout();
DevApp/Gs.DevApp/UserControl/ToolBarMenu.cs
@@ -1,15 +1,20 @@
using DevExpress.XtraBars;
using DevExpress.XtraEditors;
using Gs.DevApp.Models;
using Gs.DevApp.ToolBox;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Windows.Forms;
namespace Gs.DevApp.UserControl
{
    public partial class ToolBarMenu : DevExpress.XtraEditors.XtraUserControl
    {
        public bool isSetBtn { get; set; }
        public List<string> actions { get; set; }
        /// <summary>
        /// æ–°å¢ž
        /// </summary>
@@ -63,16 +68,34 @@
            this.btnEsc.ItemClick += BtnEsc_ItemClick;
            this.btnRole.ItemClick += BtnRole_ItemClick;
            initialization();
            List<string> lst = new List<string>();
            foreach (BarItem item in barManager1.Items)
            {
                if (item is BarLargeButtonItem largeButtonItem)
                {
                    lst.Add(item.Caption);
                }
            }
            this.actions = lst;
        }
        private void initialization() {
        protected override void OnCreateControl()
        {
            base.OnCreateControl();
            if (this.Parent != null)
            {
                getNamespace();
            }
        }
        private void initialization()
        {
            List<string> lst = new List<string>();
            lst.Add(btnAdd.Name);
            lst.Add(btnEdit.Name);
            lst.Add(btnLoad.Name);
            lst.Add(btnDel.Name);
            lst.Add(btnRole.Name);
            setBtn(lst);
        }
        private void BtnEsc_ItemClick(object sender, ItemClickEventArgs e)
@@ -84,6 +107,7 @@
                lst.Add(btnEdit.Name);
                lst.Add(btnLoad.Name);
                lst.Add(btnDel.Name);
                lst.Add(btnRole.Name);
                setBtn(lst);
                if (btnEscClick != null)
                {
@@ -105,7 +129,8 @@
            if (btnSaveClick != null)
            {
                btnSaveClick(this, e);
                if (isSetBtn == true) {
                if (isSetBtn == true)
                {
                    List<string> lst = new List<string>();
                    lst.Add(btnAdd.Name);
                    lst.Add(btnEdit.Name);
@@ -117,12 +142,12 @@
        private void BtnLoad_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (btnLoadClick != null)
            {
                List<string> lst = new List<string>();
                lst.Add(btnRole.Name);
                setBtn(lst);
                //List<string> lst = new List<string>();
                //lst.Add(btnRole.Name);
                //setBtn(lst);
                btnLoadClick(this, e);
            }
@@ -133,7 +158,7 @@
            List<string> lst = new List<string>();
            lst.Add(btnSave.Name);
            lst.Add(btnEsc.Name);
            setBtn(lst);
            if (btnEdtClick != null)
            {
@@ -191,5 +216,54 @@
                }
            }
        }
        /// <summary>
        /// æ ¹æ®å‘½åç©ºé—´ï¼Œè¯»å–该窗体下面的按钮集合
        /// </summary>
        private void getNamespace()
        {
            string _formNamespace = "";
            Control parentControl = this;
            while (parentControl.Parent != null)
            {
                if (parentControl.Parent is Form parentForm)
                {
                    Type formType = parentForm.GetType();
                    _formNamespace = formType.FullName;
                    break;
                }
                parentControl = parentControl.Parent;
            }
            var _obj = new
            {
                userGuid = LoginInfoModel.CurrentUser.LoginUserGuid,
                orgGuid = LoginInfoModel.CurrentUser.LoginOrgGuid,
                formNamespace = _formNamespace,
            };
            string strReturn = "";
            try
            {
                strReturn = UtilityHelper.HttpPost("", "MenuAction/GetListByUserOrgSpace", JsonConvert.SerializeObject(_obj));
                ReturnModel<DataTable> dd = UtilityHelper.GetNoPageTableByJson(strReturn);
                DataTable dt = dd.rtnData;
                foreach (BarItem item in barManager1.Items)
                {
                    if (item.Caption == "取消" || item.Caption == "刷新" || item.Caption == "保存")
                    {
                        item.Visibility = BarItemVisibility.Always;
                        continue;
                    }
                    bool exists = dt.AsEnumerable().Any(row => row.Field<string>("name") == item.Caption);
                    if (exists == false)
                        item.Visibility = BarItemVisibility.Never;
                    else
                        item.Visibility = BarItemVisibility.Always;
                }
            }
            catch (Exception ex)
            {
                ToolBox.MsgHelper.Warning("提示:" + ex.Message);
            }
        }
    }
}
DevApp/Gs.DevApp/UserControl/ToolBarMenu.resx
@@ -187,6 +187,65 @@
        f+6EnGfdugKwnQr2BIeDYf6s2JhN/P3hT7WuAGyDQf4foiES/RvDCa9FOGI5gAAAAABJRU5ErkJggg==
</value>
  </data>
  <data name="barLargeButtonItem8.ImageOptions.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
    <value>
        iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAB10RVh0VGl0
        bGUARXhwb3J0O1hscztFeHBvcnRUb1hscztMoJn+AAACZklEQVQ4T2WTWWsTYRSGszdtg1r/Rk3Tmv4S
        RWhUEAQFJVqLF7FNmqSpXdKqRazQDW/0pimBghKsuMRWaNJ7b70UsWaZJTOTmSSv5/tmGqY68CQzgfc5
        3zln4qDLSbgIN+Gx8Nrw/QP7zQnAwWCXK7tZKi5vHYGxtFVGdrOMJWJx44goYWG9jIW1Q8yvlZBZLe4z
        iV3gyW6U0aEnDn2YdDjtE9ommRffWMpvF3jn1g95SNVaUIiGaiIrBkdSWhAJvdVGamWfpfrsAh+zMoGs
        moGTEA/KLQgNA3WiabQRf/KFpfpPCVIrX/lxJUWH1NCpmtENMWqyjiqhNdv4cPDjP0HPFFlZnwIFJ3JX
        MDrfg9E5hg/hxz5cnGV4MTLjxXCaSHkQSroRSrjzTOCPLX7kgpps8HBTNxAmgarpCFO4oerd8PO9JOqi
        hpqoIphw8SP0TszuoUUTrko6CXzQaJCsskIzGcn4eFvDaQ+vXJc0DE27MUTh4JQliKYKXHBcb/LKLz/P
        8PDqpzRV9kBsNLvHXnmfRFVQEIy7SeDkgr47ibcwWh38rmu2yl7ILEiVRVkze7YqPy1M47iq4MKkKei/
        PbkLg1b0q6rxgSm0DdazRIIQVRasnp9RsFJTeXj5XRyDj0xB4GZsFzoJflZURN9ctgZm9swqd3uOu6gq
        w0lhBwZjDr6FwI2Hef6SiLRzgQZWp53z3Ys6KoKOP4JG89F4i/nCd1Z1wP4e+CN3XxevP9jB1fEdsO9r
        4zlE7ufoeRuRe3QfNRmLbuPSrVcHlDn1IrG/ci9xhjhLnLMYsHHegt0HCLcpgOMvLlVmbi0MtN8AAAAA
        SUVORK5CYII=
</value>
  </data>
  <data name="barLargeButtonItem8.ImageOptions.LargeImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
    <value>
        iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAAB10RVh0VGl0
        bGUARXhwb3J0O1hscztFeHBvcnRUb1hscztMoJn+AAAIXUlEQVRYR8WXeVSU1xnG2SGmSkia9Nictqfp
        Hz0JcUFQwBVEWcQQREUEVJaBKI0EEAYG2RFcUARRE1ojDWrSVqNWo2kbMdVq7DEJGo5VWVxA1lnYmRkY
        4On73pkhGAbT//qd85w7fHPme37vdr+LGQCznJycMdFlbpCFQZbPkJUJ8X3z8c+cTOxtCsCi9I/XL5dW
        foUDH32FUlbFdRyo0K8lJP16DSVHr2H/h9dQTGvxh/8Sytl3Mc8AwvDPBJkAwD8gWbLpj12Dgzr0qwfR
        3aNGh7IXj5904uuaZlRdr0fazjP59BxrkoC4W9c+IVAW3zMFYFXy0XX2gG5kFDrdCK0jGNKNCg3S3yy1
        Roe+gUF09mjQpuhDQ6MKRX+4gtFR4Nylu0jIObmDnmVDEhDjfYzie6YBKKV8DZERy2g6OEQAQyPQGqTW
        DKK3fxAK1QAeNCqw49AlAdCn1uHMP+5gs+x4AT3PlmSyLyYDsL5R3SgA2HCIjPTmelOxDo5AQyXQGsqg
        7FajvlGJzL0XBYCavmeIUxe+Q1Ti0UJ6ph1pAsQYwNydtlUuhXZwKbCF8w5bzMm3EXLKI+VYY3aOFWZl
        WWNmliVmZlhhRoYlIo8sJSMd1FodVNQH9Y8USC44KwC4VBoBMYw/natGWNz7JiHGAFwKbbHqhAMCj9lj
        ZaU9/CumwffoNHgf+QmW/X4KvMqnwPN9O3gcssPiMlssKrXBm+kWwrxfO4SuXg3qHimxNeskPQ4CYniE
        QIYZZBgfn7mJYEkpQ4iemADgTJEHHHOg9Oqw8NBz0NBD55fZYUAzBPdSW7jvt8XBK9no7tUKM5ciS7wp
        s0A/fd9PzdhF9x+1diGj6DxiU09AknIckuTjiN7GOkaluEXl+ZzczKZwFkwCcORa7TAWHLQTHT7/gB11
        OQHst4FrsQ26+7Rw2WstzF32WMJRZi4AemkSekgdnQNoaOrE7futuFnTiBvVj3H15kNcvlGPq/9uMAJM
        NQnA9ea0l9/IE+YfXMsVkfPD2XzePmuUfZlNI6eGM5k777KAY5o5etVDVGeaBFo5C4ou2hNoIlrlfWhq
        6cYDAqp9qKAJUSJ99wUGmEaymghAzeZHNTdG3k/GbiUE0K+FK5nP20tRU+QlVZlQdKoxp9ACb6TqAXpY
        NIqcIV67aO1kGJqMdlU/Wjp6aaPqQ9ru8wxgbxLAKdcavtRwanoYR84bjBtF3mOoeenlLKi6NMK8+IsM
        ODGA1BzdZNjTR+YCQK8uo+i3coJoo4xw5qQFAuAFkwCzCcCbup3N3Ups4MZ1F5F/X3Pn3RYi8jkFFnAq
        MNcDPGU4CBWtKl57tFAa1EFl4Uwm559lAAeTALNyrD6flc2zboWZmSSa8xnbqdNp1LjbHVlUc0dKO6f+
        DakZIsu9xyJlc15VJKOxkrZoRbdefZTZbfmnGeBFkwDGG3TxRjH1S+rcURpmUVtjmkWkbGYwNHwWjUcT
        wPVmtRnUqugVapH30u81+OxSDQNMJz1P4releD+YApjGI8MAxtoaI+UIjeIo5WRcePgUJKllCJVkIy23
        HCnZh5GUXoatacXYklQESXwhNm3JQ5gkEyvWxCMoIgMB4alXycfaFACT2ctoZEYYgIzHmwqNpViLFoow
        WlqK/H2VWBeZAXnXgMiGPiMDogFblSzKCMk7cAvS8srxVpiUs/HcZAAvpO36DCP0KuaGUnK0rDFjfV3l
        9Lm5owcRSfuQu6cCazbKhPGdh0rUNCjwXYMct+vl+O2M5Xh9pg++re2A10oJQmOysWJdEgM8PxmAg7Tw
        r3oANiRzBa0KNjaad/OIadDU1onw+N3I3HkEgaEpImo2v03mt+rkqK6Vw9HJD+4eG9Cs6McS3wiERGfC
        e3U8A0ydDODFlB1nBIDemDcVFhvr1cGifeFRiwLr4wogy6e0BieINN+qUwhzjvgb0mzXVVjsF4MntDsu
        XL4BwZHb4fV2HAPYmwLgY9RLSbmn6W02+gND6nYybSeJVaWmU5AcwbG5SMk5DN+g3wmA6roOfHufzElf
        k27ea0cTb80dfXD3DBWl8vCPZQCHyQB+mpD96RgAmxnF5mzMaiXVPm7H6qgsJGYcxLKAd7DUPwaeK6Kx
        xCcSi302YeGycMz3CiPj9XDzCIHrknUICk/FIp9oBnjpKQC6xGmI9PJ7macEgD5SMicZTYWUarSQ7j1o
        Q+DGdMSnlSBscx5C38nD+tgchFCjrYvOQjDVe21EOlZvkiFoQyoCqfsDQ6VYsGwTA7w8KcC7GX+Bjk4U
        bM5iw1beXAzjxObNtN6pe4KV1HxxKcUIoX3gxy5/6pOAkBS4eYYzwM/o1gQAPrG8EifTAwhjg9i0hTqZ
        xR3NqqlthG9wEmIS9mANNRdfxr1CRROjohLqm1hD50YNvKn5/NcmYd7iUAaYbgpA9MDmtE/oOEWnXjpy
        DfCxi17TevH7nw4hLDqsNDxuhndQPKLfLURguFQAGEdViEoop+ZlcRN7+EngtzoRzguCGeBVUwBiJ4xK
        OHolVnoCMSmkZDpikaKTj4kjVhQdsaKSSImVqPikCksD4mirzRfpzTxXi+1n7yP19D0kn7yHhD/fxdaP
        /4O4E3REr7yDhV4b4bPqPTi5r2GAXzwFYIDgfyL4HM8Hh1dI/PL4uUGvmtAcjxWxtLvlivQWXW3Hrn+2
        oaCqFblftCDjb82QXXgC6bkmbCO5LgmlLMTS3hDEAL80BcBZYAjOBPcDwzxL0109Qr5ZsDyCxk+CwNwq
        vJV1CX6yv8NbehGeieexaOtZuG/+FHNjTsJl/lrMXbQer8/yqabfPj0F40UXg/wvEj1D+hXp1+P02jj9
        5gfi7zm7378N/3+C2X8Bg3DBnOf3rOsAAAAASUVORK5CYII=
</value>
  </data>
  <data name="barLargeButtonItem1.ImageOptions.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
    <value>
        iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAABx0RVh0VGl0
@@ -309,65 +368,6 @@
        36fjyQVpePKV9Xhifgoef9mAWXM+3PbLtybjF2+QhZPw89cmKp6aP04i18VDqVdD78k/BA7dqBiRQpJs
        PaQxQ/su88NEMiezfJ9I5J7B4jKGE3oQ2hiYLSnegRkbLnNyjVw7JO1hYWFh/wecxwMOH7dYDAAAAABJ
        RU5ErkJggg==
</value>
  </data>
  <data name="barLargeButtonItem8.ImageOptions.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
    <value>
        iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAB10RVh0VGl0
        bGUARXhwb3J0O1hscztFeHBvcnRUb1hscztMoJn+AAACZklEQVQ4T2WTWWsTYRSGszdtg1r/Rk3Tmv4S
        RWhUEAQFJVqLF7FNmqSpXdKqRazQDW/0pimBghKsuMRWaNJ7b70UsWaZJTOTmSSv5/tmGqY68CQzgfc5
        3zln4qDLSbgIN+Gx8Nrw/QP7zQnAwWCXK7tZKi5vHYGxtFVGdrOMJWJx44goYWG9jIW1Q8yvlZBZLe4z
        iV3gyW6U0aEnDn2YdDjtE9ommRffWMpvF3jn1g95SNVaUIiGaiIrBkdSWhAJvdVGamWfpfrsAh+zMoGs
        moGTEA/KLQgNA3WiabQRf/KFpfpPCVIrX/lxJUWH1NCpmtENMWqyjiqhNdv4cPDjP0HPFFlZnwIFJ3JX
        MDrfg9E5hg/hxz5cnGV4MTLjxXCaSHkQSroRSrjzTOCPLX7kgpps8HBTNxAmgarpCFO4oerd8PO9JOqi
        hpqoIphw8SP0TszuoUUTrko6CXzQaJCsskIzGcn4eFvDaQ+vXJc0DE27MUTh4JQliKYKXHBcb/LKLz/P
        8PDqpzRV9kBsNLvHXnmfRFVQEIy7SeDkgr47ibcwWh38rmu2yl7ILEiVRVkze7YqPy1M47iq4MKkKei/
        PbkLg1b0q6rxgSm0DdazRIIQVRasnp9RsFJTeXj5XRyDj0xB4GZsFzoJflZURN9ctgZm9swqd3uOu6gq
        w0lhBwZjDr6FwI2Hef6SiLRzgQZWp53z3Ys6KoKOP4JG89F4i/nCd1Z1wP4e+CN3XxevP9jB1fEdsO9r
        4zlE7ufoeRuRe3QfNRmLbuPSrVcHlDn1IrG/ci9xhjhLnLMYsHHegt0HCLcpgOMvLlVmbi0MtN8AAAAA
        SUVORK5CYII=
</value>
  </data>
  <data name="barLargeButtonItem8.ImageOptions.LargeImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
    <value>
        iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAAB10RVh0VGl0
        bGUARXhwb3J0O1hscztFeHBvcnRUb1hscztMoJn+AAAIXUlEQVRYR8WXeVSU1xnG2SGmSkia9Nictqfp
        Hz0JcUFQwBVEWcQQREUEVJaBKI0EEAYG2RFcUARRE1ojDWrSVqNWo2kbMdVq7DEJGo5VWVxA1lnYmRkY
        4On73pkhGAbT//qd85w7fHPme37vdr+LGQCznJycMdFlbpCFQZbPkJUJ8X3z8c+cTOxtCsCi9I/XL5dW
        foUDH32FUlbFdRyo0K8lJP16DSVHr2H/h9dQTGvxh/8Sytl3Mc8AwvDPBJkAwD8gWbLpj12Dgzr0qwfR
        3aNGh7IXj5904uuaZlRdr0fazjP59BxrkoC4W9c+IVAW3zMFYFXy0XX2gG5kFDrdCK0jGNKNCg3S3yy1
        Roe+gUF09mjQpuhDQ6MKRX+4gtFR4Nylu0jIObmDnmVDEhDjfYzie6YBKKV8DZERy2g6OEQAQyPQGqTW
        DKK3fxAK1QAeNCqw49AlAdCn1uHMP+5gs+x4AT3PlmSyLyYDsL5R3SgA2HCIjPTmelOxDo5AQyXQGsqg
        7FajvlGJzL0XBYCavmeIUxe+Q1Ti0UJ6ph1pAsQYwNydtlUuhXZwKbCF8w5bzMm3EXLKI+VYY3aOFWZl
        WWNmliVmZlhhRoYlIo8sJSMd1FodVNQH9Y8USC44KwC4VBoBMYw/natGWNz7JiHGAFwKbbHqhAMCj9lj
        ZaU9/CumwffoNHgf+QmW/X4KvMqnwPN9O3gcssPiMlssKrXBm+kWwrxfO4SuXg3qHimxNeskPQ4CYniE
        QIYZZBgfn7mJYEkpQ4iemADgTJEHHHOg9Oqw8NBz0NBD55fZYUAzBPdSW7jvt8XBK9no7tUKM5ciS7wp
        s0A/fd9PzdhF9x+1diGj6DxiU09AknIckuTjiN7GOkaluEXl+ZzczKZwFkwCcORa7TAWHLQTHT7/gB11
        OQHst4FrsQ26+7Rw2WstzF32WMJRZi4AemkSekgdnQNoaOrE7futuFnTiBvVj3H15kNcvlGPq/9uMAJM
        NQnA9ea0l9/IE+YfXMsVkfPD2XzePmuUfZlNI6eGM5k777KAY5o5etVDVGeaBFo5C4ou2hNoIlrlfWhq
        6cYDAqp9qKAJUSJ99wUGmEaymghAzeZHNTdG3k/GbiUE0K+FK5nP20tRU+QlVZlQdKoxp9ACb6TqAXpY
        NIqcIV67aO1kGJqMdlU/Wjp6aaPqQ9ru8wxgbxLAKdcavtRwanoYR84bjBtF3mOoeenlLKi6NMK8+IsM
        ODGA1BzdZNjTR+YCQK8uo+i3coJoo4xw5qQFAuAFkwCzCcCbup3N3Ups4MZ1F5F/X3Pn3RYi8jkFFnAq
        MNcDPGU4CBWtKl57tFAa1EFl4Uwm559lAAeTALNyrD6flc2zboWZmSSa8xnbqdNp1LjbHVlUc0dKO6f+
        DakZIsu9xyJlc15VJKOxkrZoRbdefZTZbfmnGeBFkwDGG3TxRjH1S+rcURpmUVtjmkWkbGYwNHwWjUcT
        wPVmtRnUqugVapH30u81+OxSDQNMJz1P4releD+YApjGI8MAxtoaI+UIjeIo5WRcePgUJKllCJVkIy23
        HCnZh5GUXoatacXYklQESXwhNm3JQ5gkEyvWxCMoIgMB4alXycfaFACT2ctoZEYYgIzHmwqNpViLFoow
        WlqK/H2VWBeZAXnXgMiGPiMDogFblSzKCMk7cAvS8srxVpiUs/HcZAAvpO36DCP0KuaGUnK0rDFjfV3l
        9Lm5owcRSfuQu6cCazbKhPGdh0rUNCjwXYMct+vl+O2M5Xh9pg++re2A10oJQmOysWJdEgM8PxmAg7Tw
        r3oANiRzBa0KNjaad/OIadDU1onw+N3I3HkEgaEpImo2v03mt+rkqK6Vw9HJD+4eG9Cs6McS3wiERGfC
        e3U8A0ydDODFlB1nBIDemDcVFhvr1cGifeFRiwLr4wogy6e0BieINN+qUwhzjvgb0mzXVVjsF4MntDsu
        XL4BwZHb4fV2HAPYmwLgY9RLSbmn6W02+gND6nYybSeJVaWmU5AcwbG5SMk5DN+g3wmA6roOfHufzElf
        k27ea0cTb80dfXD3DBWl8vCPZQCHyQB+mpD96RgAmxnF5mzMaiXVPm7H6qgsJGYcxLKAd7DUPwaeK6Kx
        xCcSi302YeGycMz3CiPj9XDzCIHrknUICk/FIp9oBnjpKQC6xGmI9PJ7macEgD5SMicZTYWUarSQ7j1o
        Q+DGdMSnlSBscx5C38nD+tgchFCjrYvOQjDVe21EOlZvkiFoQyoCqfsDQ6VYsGwTA7w8KcC7GX+Bjk4U
        bM5iw1beXAzjxObNtN6pe4KV1HxxKcUIoX3gxy5/6pOAkBS4eYYzwM/o1gQAPrG8EifTAwhjg9i0hTqZ
        xR3NqqlthG9wEmIS9mANNRdfxr1CRROjohLqm1hD50YNvKn5/NcmYd7iUAaYbgpA9MDmtE/oOEWnXjpy
        DfCxi17TevH7nw4hLDqsNDxuhndQPKLfLURguFQAGEdViEoop+ZlcRN7+EngtzoRzguCGeBVUwBiJ4xK
        OHolVnoCMSmkZDpikaKTj4kjVhQdsaKSSImVqPikCksD4mirzRfpzTxXi+1n7yP19D0kn7yHhD/fxdaP
        /4O4E3REr7yDhV4b4bPqPTi5r2GAXzwFYIDgfyL4HM8Hh1dI/PL4uUGvmtAcjxWxtLvlivQWXW3Hrn+2
        oaCqFblftCDjb82QXXgC6bkmbCO5LgmlLMTS3hDEAL80BcBZYAjOBPcDwzxL0109Qr5ZsDyCxk+CwNwq
        vJV1CX6yv8NbehGeieexaOtZuG/+FHNjTsJl/lrMXbQer8/yqabfPj0F40UXg/wvEj1D+hXp1+P02jj9
        5gfi7zm7378N/3+C2X8Bg3DBnOf3rOsAAAAASUVORK5CYII=
</value>
  </data>
  <data name="barLargeButtonItem3.ImageOptions.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">