Browse Source

忽略测试项目Program

Branch_PaiNaWeiSJob
shiqian.wang 2 months ago
parent
commit
12b3c4f49d
  1. 1
      .gitignore
  2. BIN
      .vs/ICSSoft.FromERP/v16/.suo
  3. 61
      ICSSoft.FromERP/HttpHelper.cs
  4. 2
      ICSSoft.FromERP/ICSSoft.FromERP.csproj
  5. 15
      ICSSoft.FromERP/Model/ApiResult/AbpResultDto.cs
  6. 15
      ICSSoft.FromERP/Model/ApiResult/ErrorDto.cs
  7. 12
      ICSSoft.Test/ICSSoft.Test.csproj
  8. 21
      ICSSoft.Test/Program.cs

1
.gitignore

@ -33,3 +33,4 @@ _ReSharper*/
[Tt]est[Rr]esult* [Tt]est[Rr]esult*
.vs/ .vs/
#Nuget packages folder #Nuget packages folder
/ICSSoft.Test/Program.cs

BIN
.vs/ICSSoft.FromERP/v16/.suo

Binary file not shown.

61
ICSSoft.FromERP/HttpHelper.cs

@ -13,66 +13,7 @@ namespace ICSSoft.FromERP
{ {
public class HttpHelper public class HttpHelper
{ {
#region Get请求
///// <summary>
///// 发送http Get请求
///// </summary>
///// <param name="url"></param>
///// <returns></returns>
//public static string GetRequest(string url)
//{
// HttpWebRequest request = WebRequest.Create(url) as HttpWebRequest;
// request.Method = "GET";
// request.ContentType = "application/x-www-form-urlencoded";//链接类型
// string result = GetResponseString(request.GetResponse() as HttpWebResponse);
// return result;
//}
/// <summary>
/// 从HttpWebResponse对象中提取响应的数据转换为字符串
/// </summary>
/// <param name="webresponse"></param>
/// <returns></returns>
public static string GetResponseString(HttpWebResponse webresponse)
{
using (Stream s = webresponse.GetResponseStream())
{
StreamReader reader = new StreamReader(s, Encoding.UTF8);
return reader.ReadToEnd();
}
}
#endregion
public static bool PingTest(string ip)
{
System.Net.NetworkInformation.Ping ping = new System.Net.NetworkInformation.Ping();
System.Net.NetworkInformation.PingReply pingStatus =
ping.Send(IPAddress.Parse(ip), 1000);
if (pingStatus.Status == System.Net.NetworkInformation.IPStatus.Success)
{
return true;
}
else
{
return false;
}
}
public static bool WebRequestTest(string url)
{
try
{
System.Net.WebRequest myRequest = System.Net.WebRequest.Create(url);
System.Net.WebResponse myResponse = myRequest.GetResponse();
}
catch (System.Net.WebException)
{
return false;
}
return true;
}
/// <summary> /// <summary>
/// POST请求 /// POST请求
/// </summary> /// </summary>

2
ICSSoft.FromERP/ICSSoft.FromERP.csproj

@ -137,6 +137,8 @@
<Compile Include="ICSSDN.cs" /> <Compile Include="ICSSDN.cs" />
<Compile Include="ICSSendEmail.cs" /> <Compile Include="ICSSendEmail.cs" />
<Compile Include="ICSWarehouse.cs" /> <Compile Include="ICSWarehouse.cs" />
<Compile Include="Model\ApiResult\AbpResultDto.cs" />
<Compile Include="Model\ApiResult\ErrorDto.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="ICSInventory.cs" /> <Compile Include="ICSInventory.cs" />
<Compile Include="ICSMo.cs" /> <Compile Include="ICSMo.cs" />

15
ICSSoft.FromERP/Model/ApiResult/AbpResultDto.cs

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ICSSoft.FromERP.Model
{
public class AbpResultDto
{
public object Result { get; set; }
public bool Success { get; set; }
public ErrorDto Error { get; set; }
}
}

15
ICSSoft.FromERP/Model/ApiResult/ErrorDto.cs

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ICSSoft.FromERP.Model
{
public class ErrorDto
{
public int Code { get; set; }
public string Message { get; set; }
public string Details { get; set; }
}
}

12
ICSSoft.Test/ICSSoft.Test.csproj

@ -80,12 +80,6 @@
<SubType>Designer</SubType> <SubType>Designer</SubType>
</None> </None>
</ItemGroup> </ItemGroup>
<ItemGroup>
<ProjectReference Include="..\ICSSoft.FromERP\ICSSoft.FromERP.csproj">
<Project>{71be770c-f5be-46c8-a81c-1897e28db761}</Project>
<Name>ICSSoft.FromERP</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup> <ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.8"> <BootstrapperPackage Include=".NETFramework,Version=v4.8">
<Visible>False</Visible> <Visible>False</Visible>
@ -98,6 +92,12 @@
<Install>false</Install> <Install>false</Install>
</BootstrapperPackage> </BootstrapperPackage>
</ItemGroup> </ItemGroup>
<ItemGroup>
<ProjectReference Include="..\ICSSoft.FromERP\ICSSoft.FromERP.csproj">
<Project>{71BE770C-F5BE-46C8-A81C-1897E28DB761}</Project>
<Name>ICSSoft.FromERP</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets. Other similar extension points exist, see Microsoft.Common.targets.

21
ICSSoft.Test/Program.cs

@ -1,21 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ICSSoft.FromERP;
namespace ICSSoft.Test
{
class Program
{
static void Main(string[] args)
{
//ICSVendor test = new ICSVendor();
//test.Execute();
ICSAddStdWorkHourFromMES test = new ICSAddStdWorkHourFromMES();
test.Execute();
}
}
}
Loading…
Cancel
Save