From dd7c9629d16d81bde03e42b3e9e984088f3e4d2c Mon Sep 17 00:00:00 2001 From: lu <99954486@qq.com> Date: 星期二, 21 一月 2025 17:28:47 +0800 Subject: [PATCH] 细节 --- DevApp/Gs.DevApp/UserControl/ShowLogcs.cs | 2 DevApp/Gs.DevApp/Gs.DevApp.exe.config | 88 +++++++++++++++++++++++++++++ DevApp/Gs.DevApp/DevFrm/FrmLogin.cs | 5 - DevApp/Gs.DevApp/UserControl/UcLookCk.cs | 4 + DevApp/Gs.DevApp/bin/Debug/templeEasyCode/category1/category.cs | 25 ++++++-- DevApp/Gs.DevApp/UserControl/ShowLogcs.Designer.cs | 10 +- DevApp/Gs.DevApp/UserControl/UcLookCk.Designer.cs | 3 - DevApp/Gs.DevApp/App.config | 2 DevApp/Gs.DevApp/bin/Debug/templeEasyCode/category2/category.cs | 23 ++++++- 9 files changed, 137 insertions(+), 25 deletions(-) diff --git a/DevApp/Gs.DevApp/App.config b/DevApp/Gs.DevApp/App.config index dfcd2d5..42d9d92 100644 --- a/DevApp/Gs.DevApp/App.config +++ b/DevApp/Gs.DevApp/App.config @@ -34,7 +34,7 @@ <add key="ProductName" value="骞挎繁绉戞妧 G-MES V2.0" /> <add key="PageSize" value="50" /> <add key="Version" value="0.1" /> - <add key="IsAutoUpdater" value="0" /> + <add key="IsAutoUpdater" value="1" /> <add key="AutoUpdaterXml" value="https://dianbei.top/AutoUpdater/AutoUpdater.xml" /> </appSettings> <userSettings> diff --git a/DevApp/Gs.DevApp/DevFrm/FrmLogin.cs b/DevApp/Gs.DevApp/DevFrm/FrmLogin.cs index 4637b78..63c664f 100644 --- a/DevApp/Gs.DevApp/DevFrm/FrmLogin.cs +++ b/DevApp/Gs.DevApp/DevFrm/FrmLogin.cs @@ -19,8 +19,7 @@ InitializeComponent(); if (ConfigurationManager.AppSettings["IsAutoUpdater"] == "1") _autoUpdate(); - else - _getRemember(); + _getRemember(); Text = lbVersion.Text = ConfigurationManager.AppSettings["ProductName"]; btnLogin.Click += BtnLogin_Click; btnCancel.Click += BtnCancel_Click; @@ -61,7 +60,7 @@ JObject _login = _rtn.rtnData; if (_rtn.rtnCode > 0) { - Settings.Default.userName = ckRemember.Checked? txtUser.Text.Trim() : ""; + Settings.Default.userName = ckRemember.Checked ? txtUser.Text.Trim() : ""; Settings.Default.userPwd = ckRemember.Checked ? txtPwd.Text.Trim() : ""; Settings.Default.remember = ckRemember.Checked; Settings.Default.Save(); diff --git a/DevApp/Gs.DevApp/Gs.DevApp.exe.config b/DevApp/Gs.DevApp/Gs.DevApp.exe.config new file mode 100644 index 0000000..9b71fe1 --- /dev/null +++ b/DevApp/Gs.DevApp/Gs.DevApp.exe.config @@ -0,0 +1,88 @@ +<?xml version="1.0" encoding="utf-8"?> +<configuration> + <configSections> + <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> + <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> + <section name="oracle.manageddataaccess.client" type="OracleInternal.Common.ODPMSectionHandler, Oracle.ManagedDataAccess, Version=4.122.23.1, Culture=neutral, PublicKeyToken=89b483f429c47342" /> + </configSections> + <applicationSettings> + <DevExpress.LookAndFeel.Design.AppSettings> + <setting name="DPIAwarenessMode" serializeAs="String"> + <value>System</value> + </setting> + <setting name="RegisterBonusSkins" serializeAs="String"> + <value>True</value> + </setting> + </DevExpress.LookAndFeel.Design.AppSettings> + </applicationSettings> + <startup> + <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" /> + </startup> + <runtime> + <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> + <probing privatePath="x86" /> + </assemblyBinding> + <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> + <dependentAssembly> + <assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-4.0.1.2" newVersion="4.0.1.2" /> + </dependentAssembly> + </assemblyBinding> + <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> + <dependentAssembly> + <assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" /> + </dependentAssembly> + </assemblyBinding> + </runtime> + <appSettings> + <add key="WebApiUrl" value="http://192.168.1.145:81/" /> + <add key="LogPath" value="logs" /> + <add key="ProductName" value="骞挎繁绉戞妧 G-MES V2.0" /> + <add key="PageSize" value="50" /> + <add key="Version" value="7.2.9" /> + <add key="IsAutoUpdater" value="1" /> + <add key="AutoUpdaterXml" value="https://dianbei.top/AutoUpdater/AutoUpdater.xml" /> + </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="fontSize" serializeAs="String"> + <value>10</value> + </setting> + <setting name="fontName" serializeAs="String"> + <value>Tahoma</value> + </setting> + </Gs.DevApp.Properties.Settings> + </userSettings> + <system.web> + <membership defaultProvider="ClientAuthenticationMembershipProvider"> + <providers> + <add name="ClientAuthenticationMembershipProvider" type="System.Web.ClientServices.Providers.ClientFormsAuthenticationMembershipProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" /> + </providers> + </membership> + <roleManager defaultProvider="ClientRoleProvider" enabled="true"> + <providers> + <add name="ClientRoleProvider" type="System.Web.ClientServices.Providers.ClientRoleProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" cacheTimeout="86400" /> + </providers> + </roleManager> + </system.web> + <system.data> + <DbProviderFactories> + <remove invariant="Oracle.ManagedDataAccess.Client" /> + <add name="ODP.NET, Managed Driver" invariant="Oracle.ManagedDataAccess.Client" description="Oracle Data Provider for .NET, Managed Driver" type="Oracle.ManagedDataAccess.Client.OracleClientFactory, Oracle.ManagedDataAccess, Version=4.122.23.1, Culture=neutral, PublicKeyToken=89b483f429c47342" /> + </DbProviderFactories> + </system.data> +</configuration> \ No newline at end of file diff --git a/DevApp/Gs.DevApp/UserControl/ShowLogcs.Designer.cs b/DevApp/Gs.DevApp/UserControl/ShowLogcs.Designer.cs index f8dcfa3..853b003 100644 --- a/DevApp/Gs.DevApp/UserControl/ShowLogcs.Designer.cs +++ b/DevApp/Gs.DevApp/UserControl/ShowLogcs.Designer.cs @@ -72,13 +72,13 @@ this.gv_operationTime.AppearanceCell.Options.UseFont = true; this.gv_operationTime.Caption = "鎿嶄綔鏃堕棿"; this.gv_operationTime.FieldName = "operationTime"; - this.gv_operationTime.MinWidth = 150; + this.gv_operationTime.MinWidth = 120; this.gv_operationTime.Name = "gv_operationTime"; this.gv_operationTime.OptionsColumn.ReadOnly = true; this.gv_operationTime.ToolTip = "query_a.OPERATION_TIME"; this.gv_operationTime.Visible = true; this.gv_operationTime.VisibleIndex = 0; - this.gv_operationTime.Width = 150; + this.gv_operationTime.Width = 120; // // gv_operationTable // @@ -86,7 +86,7 @@ this.gv_operationTable.AppearanceCell.Options.UseFont = true; this.gv_operationTable.Caption = "鐩稿叧琛�"; this.gv_operationTable.FieldName = "operationTable"; - this.gv_operationTable.MinWidth = 80; + this.gv_operationTable.MinWidth = 50; this.gv_operationTable.Name = "gv_operationTable"; this.gv_operationTable.OptionsColumn.ReadOnly = true; this.gv_operationTable.Tag = "query_a.OPERATION_TABLE"; @@ -100,7 +100,7 @@ this.gv_userName.AppearanceCell.Options.UseFont = true; this.gv_userName.Caption = "鎿嶄綔浜哄憳"; this.gv_userName.FieldName = "userName"; - this.gv_userName.MinWidth = 80; + this.gv_userName.MinWidth = 40; this.gv_userName.Name = "gv_userName"; this.gv_userName.OptionsColumn.ReadOnly = true; this.gv_userName.Tag = "query_a.USER_NAME"; @@ -114,7 +114,7 @@ this.gv_msg.AppearanceCell.Options.UseFont = true; this.gv_msg.Caption = "鎿嶄綔璇︽儏"; this.gv_msg.FieldName = "msg"; - this.gv_msg.MinWidth = 300; + this.gv_msg.MinWidth = 50; this.gv_msg.Name = "gv_msg"; this.gv_msg.OptionsColumn.ReadOnly = true; this.gv_msg.Tag = "query_a.MSG"; diff --git a/DevApp/Gs.DevApp/UserControl/ShowLogcs.cs b/DevApp/Gs.DevApp/UserControl/ShowLogcs.cs index 1c43803..714348b 100644 --- a/DevApp/Gs.DevApp/UserControl/ShowLogcs.cs +++ b/DevApp/Gs.DevApp/UserControl/ShowLogcs.cs @@ -64,11 +64,11 @@ gcMain.BindingContext = new BindingContext(); gcMain.DataSource = dt; gcMain.ForceInitialize(); + gridView1.BestFitColumns(); int dddd = dd.rtnData.pages;//鎬婚〉 pageBar1.TotalPages = dddd; pageBar1.RecordCount = dd.rtnData.total;//璁板綍鎬绘暟 pageBar1.CurrentPage = curPage;//褰撳墠椤� - pageBar1.setTxt(); } else { diff --git a/DevApp/Gs.DevApp/UserControl/UcLookCk.Designer.cs b/DevApp/Gs.DevApp/UserControl/UcLookCk.Designer.cs index ea243ce..39fbe62 100644 --- a/DevApp/Gs.DevApp/UserControl/UcLookCk.Designer.cs +++ b/DevApp/Gs.DevApp/UserControl/UcLookCk.Designer.cs @@ -79,7 +79,6 @@ this.gridColumn1.Caption = "浠撳簱ID"; this.gridColumn1.FieldName = "depotId"; this.gridColumn1.MaxWidth = 100; - this.gridColumn1.MinWidth = 80; this.gridColumn1.Name = "gridColumn1"; this.gridColumn1.UnboundDataType = typeof(string); this.gridColumn1.Width = 80; @@ -88,7 +87,6 @@ // this.gridColumn2.Caption = "浠撳簱缂栧彿"; this.gridColumn2.FieldName = "depotCode"; - this.gridColumn2.MinWidth = 80; this.gridColumn2.Name = "gridColumn2"; this.gridColumn2.UnboundDataType = typeof(string); this.gridColumn2.Visible = true; @@ -99,7 +97,6 @@ // this.gridColumn3.Caption = "浠撳簱鍚嶇О"; this.gridColumn3.FieldName = "depotName"; - this.gridColumn3.MinWidth = 100; this.gridColumn3.Name = "gridColumn3"; this.gridColumn3.Visible = true; this.gridColumn3.VisibleIndex = 2; diff --git a/DevApp/Gs.DevApp/UserControl/UcLookCk.cs b/DevApp/Gs.DevApp/UserControl/UcLookCk.cs index 99b088f..c4c3353 100644 --- a/DevApp/Gs.DevApp/UserControl/UcLookCk.cs +++ b/DevApp/Gs.DevApp/UserControl/UcLookCk.cs @@ -35,7 +35,7 @@ string _keyWhere = ""; if (!string.IsNullOrEmpty(orgId)) _keyWhere = " and a.FSubsidiary ='" + orgId + "'"; - var pgq = new PageQueryModel(1, 999999, "depot_code", "asc", "", + var pgq = new PageQueryModel(1, 999999, "org.FNumber asc ,a.depot_code", "asc", "", " and is_ng='A'"+_keyWhere); var json = JsonConvert.SerializeObject(pgq); try @@ -47,6 +47,8 @@ lookSearchSupplier.Properties.DataSource = dt; lookSearchSupplier.Properties.DisplayMember = "depotName"; lookSearchSupplier.Properties.ValueMember = "depotId"; + lookSearchSupplier.ForceInitialize(); + lookSearchSupplier.Properties.BestFitMode = DevExpress.XtraEditors.Controls.BestFitMode.BestFitResizePopup; } catch (Exception ex) { diff --git a/DevApp/Gs.DevApp/bin/Debug/templeEasyCode/category1/category.cs b/DevApp/Gs.DevApp/bin/Debug/templeEasyCode/category1/category.cs index 888b151..d596a71 100644 --- a/DevApp/Gs.DevApp/bin/Debug/templeEasyCode/category1/category.cs +++ b/DevApp/Gs.DevApp/bin/Debug/templeEasyCode/category1/category.cs @@ -27,7 +27,20 @@ getPageList(1); pageBar1.PagerEvent += PageBar1_PagerEvent; Gs.DevApp.ToolBox.UtilityHelper.SetGridSear(gridView1); - + gridView1.CustomDrawRowIndicator += (s, e) => + { + if (e.Info.IsRowIndicator && e.RowHandle >= 0) + { + e.Info.DisplayText = (e.RowHandle + 1).ToString(); + } + }; + gridView1.CustomDrawEmptyForeground += (s, e) => + { + string str = "鏆傛湭鏌ユ壘鍒板尮閰嶇殑鏁版嵁!"; + Font f = new Font("寰蒋闆呴粦", 16); + Rectangle r = new Rectangle(gridView1.GridControl.Width / 2 - 100, e.Bounds.Top + 45, e.Bounds.Right - 5, e.Bounds.Height - 5); + e.Graphics.DrawString(str, f, Brushes.Gray, r); + }; } private async void GridView1_ColumnFilterChanged(object sender, EventArgs e) { @@ -77,7 +90,7 @@ private void Frm_UpdateParent(object sender, UpdateParentEventArgs e) { _filterList = e.FilterList; - getPageList(1); + getPageList(1, pageBar1.RowsCount); } /// <summary> @@ -217,16 +230,16 @@ /// </summary> /// <param name="curPage">绗嚑椤�</param> /// <param name="pageSize">姣忛〉鍑犳潯</param> - private void getPageList(int curPage) + private async void getPageList(int curPage) { - + UcLoading _loading = new UcLoading(); var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList); var pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "a.create_date", "asc", "", _sbSqlWhere.ToString()); var json = JsonConvert.SerializeObject(pgq); try { - var strReturn = UtilityHelper.HttpPost("", + var strReturn = await UtilityHelper.HttpPostAsync("", _webServiceName + "GetListPage", json); var dd = UtilityHelper.ReturnToTablePage(strReturn); if (dd.rtnCode > 0) @@ -255,7 +268,7 @@ { MsgHelper.Warning("鎻愮ず锛�" + ex.Message); } - + _loading.Stop(); } /// <summary> /// diff --git a/DevApp/Gs.DevApp/bin/Debug/templeEasyCode/category2/category.cs b/DevApp/Gs.DevApp/bin/Debug/templeEasyCode/category2/category.cs index d7dec70..90a25d3 100644 --- a/DevApp/Gs.DevApp/bin/Debug/templeEasyCode/category2/category.cs +++ b/DevApp/Gs.DevApp/bin/Debug/templeEasyCode/category2/category.cs @@ -30,7 +30,20 @@ getPageList(1); pageBar1.PagerEvent += PageBar1_PagerEvent; Gs.DevApp.ToolBox.UtilityHelper.SetGridSear(gridView1); - + gridView1.CustomDrawRowIndicator += (s, e) => + { + if (e.Info.IsRowIndicator && e.RowHandle >= 0) + { + e.Info.DisplayText = (e.RowHandle + 1).ToString(); + } + }; + gridView1.CustomDrawEmptyForeground += (s, e) => + { + string str = "鏆傛湭鏌ユ壘鍒板尮閰嶇殑鏁版嵁!"; + Font f = new Font("寰蒋闆呴粦", 16); + Rectangle r = new Rectangle(gridView1.GridControl.Width / 2 - 100, e.Bounds.Top + 45, e.Bounds.Right - 5, e.Bounds.Height - 5); + e.Graphics.DrawString(str, f, Brushes.Gray, r); + }; } private async void GridView1_ColumnFilterChanged(object sender, EventArgs e) { @@ -222,15 +235,15 @@ /// </summary> /// <param name="curPage">绗嚑椤�</param> /// <param name="pageSize">姣忛〉鍑犳潯</param> - private void getPageList(int curPage) + private async void getPageList(int curPage) { - + UcLoading _loading = new UcLoading(); var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList); PageQueryModel pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "create_date", "asc", "", _sbSqlWhere.ToString()); string json = JsonConvert.SerializeObject(pgq); try { - var strReturn = UtilityHelper.HttpPost("", _webServiceName + "GetListPage", json); + var strReturn = await UtilityHelper.HttpPostAsync("", _webServiceName + "GetListPage", json); ReturnModel<PageListModel> dd = UtilityHelper.ReturnToTablePage(strReturn); if (dd.rtnCode > 0) { @@ -258,7 +271,7 @@ { ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + ex.Message); } - + _loading.Stop(); } private void getModel(string strGuid, bool isEdit, int tabIdx) { -- Gitblit v1.9.3