lu
2024-11-13 291b43124d537daccc25e4e1613b5ff0cd749050
线程
已修改4个文件
48 ■■■■■ 文件已修改
DevApp/Gs.DevApp/App.config 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/UserControl/UcLookItems.cs 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/UserControl/UcLookSupplier.cs 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/App.config
@@ -28,8 +28,8 @@
        </assemblyBinding>
    </runtime>
    <appSettings>
        <add key="WebApiUrl" value="http://localhost:5263/" />
        <!--<add key="WebApiUrl" value="http://192.168.1.145:81/" />-->
        <!--<add key="WebApiUrl" value="http://localhost:5263/" />-->
        <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" />
DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs
@@ -5,6 +5,7 @@
using System.Drawing;
using System.IO;
using System.Net;
using System.Net.Cache;
using System.Net.Http;
using System.Reflection;
using System.Resources;
@@ -75,6 +76,9 @@
            request.Accept = "*/*";
            request.Timeout = 15000;
            request.AllowAutoRedirect = false;
            request.ServicePoint.Expect100Continue = false;
            HttpRequestCachePolicy noCachePolicy = new HttpRequestCachePolicy(HttpRequestCacheLevel.NoCacheNoStore);
            request.CachePolicy = noCachePolicy;
            using (Stream requestStream = await request.GetRequestStreamAsync())
            {
                byte[] dataBytes = Encoding.UTF8.GetBytes(param);
@@ -109,6 +113,9 @@
            request.Accept = "*/*";
            request.Timeout = 15000;
            request.AllowAutoRedirect = false;
            request.ServicePoint.Expect100Continue = false;
            HttpRequestCachePolicy noCachePolicy = new HttpRequestCachePolicy(HttpRequestCacheLevel.NoCacheNoStore);
            request.CachePolicy = noCachePolicy;
            StreamWriter requestStream = null;
            WebResponse response = null;
            string responseStr = null;
DevApp/Gs.DevApp/UserControl/UcLookItems.cs
@@ -49,16 +49,20 @@
        private async void getSuppler()
        {
            UcLoading _loading = new UcLoading();
            var pgq = new PageQueryModel(1, 999999, "item_name", "asc", "",
                " and fforbidstatus='A'");
            var json = JsonConvert.SerializeObject(pgq);
            var _obj = new
            {
                currentPage = 1,
                everyPageSize = 999999,
                sortName = "",
                keyWhere = "",
            };
            var json = JsonConvert.SerializeObject(_obj);
            try
            {
                var strReturn = await UtilityHelper.HttpPostAsync("",
                    "MesItemsManager/GetListPageByLook", json);
                var rtn = UtilityHelper.ReturnToList(strReturn);
                var dt = rtn.rtnData;
                var strReturn =  UtilityHelper.HttpPost("",
                    "MesItemsManager/GetListSelect", json);
                var rtn = UtilityHelper.ReturnToTablePage(strReturn);
                var dt = rtn.rtnData.list;
                lookSearchSupplier.Properties.DataSource = dt;
                lookSearchSupplier.Properties.DisplayMember = "itemName";
                // lookSearchSupplier.Properties.ValueMember = "depotId";
@@ -68,7 +72,6 @@
            {
                MsgHelper.Warning("提示:" + ex.Message);
            }
            _loading.Close();
        }
        public string GetId()
DevApp/Gs.DevApp/UserControl/UcLookSupplier.cs
@@ -5,6 +5,7 @@
using Gs.DevApp.Entity;
using Gs.DevApp.ToolBox;
using Newtonsoft.Json;
using static DevExpress.XtraPrinting.Native.PageSizeInfo;
namespace Gs.DevApp.UserControl
{
@@ -16,7 +17,6 @@
            lookSearchSupplier.Properties.NullText = "请选择";
            lookSearchSupplier.EditValueChanged +=
                LookSearchSupplier_EditValueChanged;
            getSuppler();
        }
        public bool IsReadly { get; set; }
        private string _KeyFile = "";
@@ -26,6 +26,7 @@
            set
            {
                _KeyFile = value;
                if(!string.IsNullOrEmpty(value))
                getSuppler();
            }
        }
@@ -42,13 +43,18 @@
        private void getSuppler()
        {
            var pgq = new PageQueryModel(1, 999999, "supp_no", "asc", "",
                " and fforbidstatus='A'");
            var json = JsonConvert.SerializeObject(pgq);
            var _obj = new
            {
                currentPage = 1,
                everyPageSize = 999999,
                sortName = "",
                keyWhere = "",
            };
            var json = JsonConvert.SerializeObject(_obj);
            try
            {
                var strReturn = UtilityHelper.HttpPost("",
                    "MesSupplierManager/GetListPage", json);
                    "MesSupplierManager/GetListSelect", json);
                var rtn = UtilityHelper.ReturnToTablePage(strReturn);
                var dt = rtn.rtnData.list;
                lookSearchSupplier.Properties.DataSource = dt;