DevApp/Gs.DevApp/DevFrm/FrmMain.cs
@@ -29,10 +29,12 @@ { int i = 100; Gs.DevApp.UserControl.ShowDialogForm sdf = new Gs.DevApp.UserControl.ShowDialogForm("æç¤º", "", "请èå¿çåï¼æ£å¨æä½ä¸ï¼"); for (int j = 0; j < i; j++) { for (int j = 0; j < i; j++) { sdf.SetCaption("æ§è¡è¿åº¦ï¼" + (j) + "/" +i.ToString() + "ï¼"); } sdf.Close(); getTree(); } private void Tab_CloseButtonClick(object sender, EventArgs e) @@ -54,6 +56,7 @@ strJson = UtilityHelper.HttpPost("", "User/GetUserLoginInfo", JsonConvert.SerializeObject(_obj)); JObject _job = JObject.Parse(strJson); string rtnCode = _job["rtnCode"].ToString(); this.acrd.Clear(); string rtnMsg = _job["rtnMsg"].ToString(); barMsg.Caption = rtnMsg; JArray array = new JArray(); @@ -88,7 +91,7 @@ _itm.Click += _grp_Click; _grp.Elements.Add(_itm); // if (idx == 0) if (idx == 0 && tab.TabPages.Count <= 0) { string tabPageName = _itm.Name + "_page"; string tabText = _itm.Text;//å½åé项å¡é¡µTextæ é¢ DevApp/Gs.DevApp/DevFrm/Sys/DocNoRule.Designer.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,47 @@  namespace Gs.DevApp.DevFrm.Sys { partial class DocNoRule { /// <summary> /// Required designer variable. /// </summary> private System.ComponentModel.IContainer components = null; /// <summary> /// Clean up any resources being used. /// </summary> /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> protected override void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); } base.Dispose(disposing); } #region Windows Form Designer generated code /// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.SuspendLayout(); // // DocNoRule // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 18F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(657, 342); this.Name = "DocNoRule"; this.Text = "DocNoRule"; this.ResumeLayout(false); } #endregion } } DevApp/Gs.DevApp/DevFrm/Sys/DocNoRule.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,21 @@ using DevExpress.XtraEditors; 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.Sys { public partial class DocNoRule : DevExpress.XtraEditors.XtraForm { public DocNoRule() { InitializeComponent(); } } } DevApp/Gs.DevApp/DevFrm/Sys/DocNoRule.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/User/SysMenu.cs
@@ -17,7 +17,6 @@ this.toolBarMenu1.btnDelClick += ToolBarMenu1_btnDelClick; this.toolBarMenu1.btnEdtClick += ToolBarMenu1_btnEdtClick; this.toolBarMenu1.btnLoadClick += ToolBarMenu1_btnLoadClick; } private void ToolBarMenu1_btnLoadClick(object sender, EventArgs e) @@ -70,9 +69,13 @@ private void ToolBarMenu1_btnAddClick(object sender, EventArgs e) { SysMenuAdd frm = new SysMenuAdd(""); frm.UpdateParent += Frm_UpdateParent; frm.ShowDialog(); } private void Frm_UpdateParent(object sender, UpdateParentEventArgs e) { getTree(); } private void getTree() { Models.PageQueryModel pgq = new Models.PageQueryModel(1, 999999, "idx", "asc", "", ""); DevApp/Gs.DevApp/DevFrm/User/SysMenuAdd.Designer.cs
@@ -99,6 +99,11 @@ this.txtIdx.Name = "txtIdx"; this.txtIdx.Size = new System.Drawing.Size(120, 26); this.txtIdx.TabIndex = 113; this.txtIdx.Value = new decimal(new int[] { 2, 0, 0, 0}); // // labelControl1 // DevApp/Gs.DevApp/DevFrm/User/SysMenuAdd.cs
@@ -9,6 +9,8 @@ { public partial class SysMenuAdd : DevExpress.XtraEditors.XtraForm { public event EventHandler<UpdateParentEventArgs> UpdateParent; public SysMenuAdd(string guid) { InitializeComponent(); @@ -42,19 +44,19 @@ private void BtnSave_Click(object sender, EventArgs e) { if (string.IsNullOrEmpty(txtMenuType.Text.Trim()) || txtMenuType.SelectedIndex == 0) { Gs.DevApp.ToolBox.MsgHelper.Warning("èåç±»åä¸è½ä¸ºç©ºï¼"); txtMenuType.Focus(); return; } if (string.IsNullOrEmpty(txtMenuName.Text.Trim())) { Gs.DevApp.ToolBox.MsgHelper.Warning("èååç§°ä¸è½ä¸ºç©ºï¼"); txtMenuName.Focus(); return; } if (string.IsNullOrEmpty(txtMenuType.Text.Trim())) { Gs.DevApp.ToolBox.MsgHelper.Warning("èåç±»åä¸è½ä¸ºç©ºï¼"); txtMenuType.Focus(); return; } if (string.IsNullOrEmpty(txtStatus.Text.Trim())) if (string.IsNullOrEmpty(txtStatus.Text.Trim()) || txtStatus.SelectedIndex == 0) { Gs.DevApp.ToolBox.MsgHelper.Warning("èåç¶æä¸è½ä¸ºç©ºï¼"); txtStatus.Focus(); @@ -83,7 +85,10 @@ strJson = UtilityHelper.HttpPost("", "MenuAction/EditModel", JsonConvert.SerializeObject(_obj)); ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.GetDataByJson(strJson); ToolBox.MsgHelper.Warning("æç¤ºï¼" + _rtn.rtnMsg); if (_rtn.rtnCode > 0) { getTree(); } if (_rtn.rtnCode > 0) { UpdateParent?.Invoke(this, new UpdateParentEventArgs { Data = "" }); } } catch (Exception ex) { @@ -143,5 +148,22 @@ ToolBox.MsgHelper.Warning("æç¤ºï¼" + ex.Message); } } private void cleanTxt() { //guid = lbGuid.Text.Trim(),//主建 // upGuid = _upGuid,//ä¸çº§ç主建 // name = txtMenuName.Text.Trim(),//åç§° // icon = txtMenuIco.Text,//èå徿 // status = txtStatus.SelectedIndex,//ç¶æ // formPath = txtFormNamespace.Text.Trim(),//çªä½è·¯å¾ // idx = int.Parse(txtIdx.Value.ToString()),//æåº // category = txtMenuType.SelectedIndex,//ç±»å //if(lbGuid.Text) } } } DevApp/Gs.DevApp/Gs.DevApp.csproj
@@ -136,6 +136,7 @@ </Compile> <Compile Include="ToolBox\LogHelper.cs" /> <Compile Include="ToolBox\MsgHelper.cs" /> <Compile Include="ToolBox\UpdateParentEventArgs.cs" /> <Compile Include="ToolBox\UtilityHelper.cs" /> <Compile Include="UserControl\PageBar.cs"> <SubType>UserControl</SubType> DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs
@@ -98,12 +98,14 @@ return image2; } /// <summary> /// 读åtoken /// çætoken /// </summary> /// <returns></returns> public static string GetBasicAuthTicket() { string token = Guid.NewGuid().ToString(); string userGuid = string.IsNullOrEmpty(LoginInfoModel.CurrentUser.LoginUserGuid) ? Guid.NewGuid().ToString() : LoginInfoModel.CurrentUser.LoginUserGuid; string orgGuid = string.IsNullOrEmpty(LoginInfoModel.CurrentUser.LoginOrgGuid) ? Guid.NewGuid().ToString() : LoginInfoModel.CurrentUser.LoginOrgGuid; string token = (userGuid + "~" + orgGuid); return token; } /// <summary> @@ -131,10 +133,6 @@ rto.rtnData.list = dt; return rto; } /// <summary> /// æ åjson串è¿åReturnModel->åç¬¦ä¸²ï¼ /// </summary> @@ -149,12 +147,12 @@ rto.rtnData = json["rtnData"]; return rto; } /// <summary> /// 设置系ç»åä½å¤§å°ï¼ç®åå¹¶ä¸éç¨ /// </summary> public static float GetFontSize =10; public static void SetFont(Control control) { public static void SetFont(Control control) { float size = GetFontSize; foreach (Control childControl in control.Controls) { WebApi/.vs/GsMesSolution/DesignTimeBuild/.dtbcache.v2Binary files differ
WebApi/.vs/GsMesSolution/v17/.futdcache.v2Binary files differ
WebApi/.vs/GsMesSolution/v17/DocumentLayout.json
@@ -1,49 +1,12 @@ { "Version": 1, "WorkspaceRootPath": "D:\\GsMesV2\\WebApi\\", "Documents": [ { "AbsoluteMoniker": "D:0:0:{C77F6A1D-0CEA-40DE-9B03-C59B581531E8}|Gs.User\\Gs.User.csproj|d:\\gsmesv2\\webapi\\gs.user\\service\\organizationcontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{C77F6A1D-0CEA-40DE-9B03-C59B581531E8}|Gs.User\\Gs.User.csproj|solutionrelative:gs.user\\service\\organizationcontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" } ], "Documents": [], "DocumentGroupContainers": [ { "Orientation": 0, "VerticalTabListWidth": 256, "DocumentGroups": [ { "DockedWidth": 200, "SelectedChildIndex": 3, "Children": [ { "$type": "Bookmark", "Name": "ST:0:0:{1c4feeaa-4718-4aa9-859d-94ce25d182ba}" }, { "$type": "Bookmark", "Name": "ST:129:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}" }, { "$type": "Bookmark", "Name": "ST:0:0:{aa2115a1-9712-457b-9047-dbb71ca2cdd2}" }, { "$type": "Document", "DocumentIndex": 0, "Title": "OrganizationController.cs", "DocumentMoniker": "D:\\GsMesV2\\WebApi\\Gs.User\\Service\\OrganizationController.cs", "RelativeDocumentMoniker": "Gs.User\\Service\\OrganizationController.cs", "ToolTip": "D:\\GsMesV2\\WebApi\\Gs.User\\Service\\OrganizationController.cs", "RelativeToolTip": "Gs.User\\Service\\OrganizationController.cs", "ViewState": "AQIAABcAAAAAAAAAAAAYwB0AAAArAAAA", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-08-28T00:45:55.543Z", "EditorCaption": "" } ] } ] "DocumentGroups": [] } ] } WebApi/.vs/ProjectEvaluation/gsmessolution.metadata.v8.binBinary files differ
WebApi/.vs/ProjectEvaluation/gsmessolution.projects.v8.binBinary files differ
WebApi/.vs/ProjectEvaluation/gsmessolution.strings.v8.binBinary files differ
WebApi/Gs.HostIIS/Program.cs
@@ -23,6 +23,7 @@ builder.Services.AddCustomConvention(); builder.AddCustomInject(); builder.Services.AddEndpointsApiExplorer(); builder.Services.AddHttpContextAccessor(); builder.Services.AddSwaggerGen(c => { c.SwaggerDoc("v1", new OpenApiInfo { Title = "GS-MES Apiå¼åææ¡£", Version = "v1" }); WebApi/Gs.Toolbox/UtilityHelper.cs
@@ -1,17 +1,46 @@ using System; using Microsoft.AspNetCore.Http; using Microsoft.CodeAnalysis.CSharp.Syntax; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using static System.Net.WebRequestMethods; namespace Gs.Toolbox { public static class UtilityHelper { public static Guid? GetGuid(string? str) { /// <summary> /// string 转guid /// </summary> /// <param name="str"></param> /// <returns></returns> public static Guid? GetGuid(string? str) { if (string.IsNullOrEmpty(str)) return null; return Guid.Parse(str); } /// <summary> /// 读åuserGuid,orgGuid /// </summary> /// <param name="_http"></param> /// <returns></returns> public static (string?, string?) GetUserGuidAndOrgGuid(IHttpContextAccessor _http) { try { string _token = _http.HttpContext.Request.Headers["token"]; string[] _ary = _token.Split("~"); return (_ary[0], _ary[1]); } catch (Exception ex) { Gs.Toolbox.LogHelper.Debug("GetUserGuidAndOrgGuid:", ex.Message); return (null, null); } } } } WebApi/Gs.User/Service/MenuActionController.cs
@@ -10,13 +10,19 @@ using System.Threading.Tasks; using Gs.User.Modes; using Microsoft.Extensions.Primitives; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http.Connections.Features; namespace Gs.User.Service { [ApiGroup(ApiGroupNames.Auth)] public class MenuActionController : IRomteService { private readonly IHttpContextAccessor _http; public MenuActionController(IHttpContextAccessor httpContextAccessor) { _http = httpContextAccessor; } /// <summary> /// 读ååè½èååè¡¨ï¼æ¯æå页 /// </summary> @@ -25,6 +31,8 @@ [RequestMethod(RequestMethods.POST)] public ReturnDto<PageList<MenuAction>> GetListPage([FromBody] PageQuery model) { (string userGuid, string orgGuid) = Gs.Toolbox.UtilityHelper.GetUserGuidAndOrgGuid(_http); Gs.Toolbox.LogHelper.Debug(this.ToString(), "userGuid:" + userGuid + "ï¼orgGuid:" + orgGuid); int currentPage = model.currentPage; int everyPageSize = model.everyPageSize; string sortName = string.IsNullOrEmpty(model.sortName) ? "a.idx" : model.sortName; WebApi/Gs.User/Service/UserController.cs
@@ -84,6 +84,7 @@ public ReturnDto<System.Dynamic.ExpandoObject> GetUserLoginInfo([FromBody] UserLogin model) { Guid userGuid = model.userGuid; Guid orgGuid= model.orgGuid; DataSet dset = new DataSet(); dynamic m = new System.Dynamic.ExpandoObject(); using (SqlConnection conn = new SqlConnection(DbHelperSQL.strConn)) @@ -96,6 +97,7 @@ cmd.CommandType = CommandType.StoredProcedure; SqlParameter[] parameters = new SqlParameter[] { new SqlParameter("@userGuid",userGuid), new SqlParameter("@orgGuid",orgGuid), }; foreach (SqlParameter parameter in parameters) {