initial version with inspection edition

This commit is contained in:
2020-04-29 14:08:00 +08:00
commit 6a5629fc3b
186 changed files with 33984 additions and 0 deletions

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.1"/>
</startup>
<appSettings>
<add key="DbConntionString" value="Data Source=192.168.25.215\IRONINTEL;Initial Catalog=IRONINTEL_IRONDEV;Integrated Security=false;User ID=fi;Password=database"/>
<add key="JRE_IronIntelDb" value="Data Source=192.168.25.215\IRONINTEL;Initial Catalog=JRE_IRONINTEL;Integrated Security=false;User ID=fi;Password=database"/>
<add key="MasterDb" value="Data Source=192.168.25.215\IRONINTEL;Initial Catalog=IRONINTEL;Integrated Security=false;User ID=fi;Password=database"/>
<add key="AdminDb" value="Data Source=192.168.25.215\IRONINTEL;Initial Catalog=IRONINTEL_ADMIN;Integrated Security=false;User ID=fi;Password=database"/>
<add key="AppVersion" value="1.16.12.15"/>
<add key="LastUpdateTime" value="10/17/2016 10:36:26.229"/>
</appSettings>
</configuration>

View File

@ -0,0 +1,91 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{62910ED6-A98B-422A-A938-1FC729771F54}</ProjectGuid>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ConsoleApplication1</RootNamespace>
<AssemblyName>ConsoleApplication1</AssemblyName>
<TargetFrameworkVersion>v4.7.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="FICore">
<HintPath>..\Reflib\FICore.dll</HintPath>
</Reference>
<Reference Include="FIWinLib">
<HintPath>..\Reflib\FIWinLib.dll</HintPath>
</Reference>
<Reference Include="ForesightServicesClient">
<HintPath>..\Reflib\ForesightServicesClient.dll</HintPath>
</Reference>
<Reference Include="iisitebase">
<HintPath>..\Reflib\iisitebase.dll</HintPath>
</Reference>
<Reference Include="iisyslib">
<HintPath>..\Reflib\iisyslib.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json">
<HintPath>..\Reflib\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="IronIntelDebugHost.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\IronIntelContractorBusiness\IronIntelContractorBusiness.csproj">
<Project>{515fb61f-f032-4a48-8f32-93b59b9d37f8}</Project>
<Name>IronIntelContractorBusiness</Name>
</ProjectReference>
<ProjectReference Include="..\IronIntelContractorSiteLib\IronIntelContractorSiteLib.csproj">
<Project>{9d398985-9424-4fc7-a637-6b5b204d8f7c}</Project>
<Name>IronIntelContractorSiteLib</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- 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.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@ -0,0 +1,61 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Configuration;
using System.Net.Mail;
using System.Text;
using System.Threading.Tasks;
using IronIntel.DataModel;
using IronIntel.DataModel.Admin.Customers;
using IronIntel.DataModel.Admin.Users;
using Foresight.Services.Log;
namespace ConsoleApplication1
{
class IronIntelDebugHost : IIronIntelHost
{
public CustomerInfo GetCustomerInfo(string custid)
{
throw new NotImplementedException();
}
public CustomerManager GetCustomerManager()
{
return new CustomerManager(ConfigurationManager.AppSettings["MasterDb"]);
}
public string GetIronIntelDbConnectionString(string custid)
{
throw new NotImplementedException();
}
public LoginManager GetLoginManager()
{
return new LoginManager(ConfigurationManager.AppSettings["MasterDb"]);
}
public int SendEmail(string customerid, MailMessage msg)
{
var mail = new Foresight.Services.Mail.MailSender(@"net.tcp://192.168.25.210:20100/fisvcs/systemsvc");
mail.AppName = "fleet_dev";
return (int)mail.SendMail("fleet_dev", customerid, "", msg);
}
public void WriteLog(string logtype, string source, string message, string detail, string extmsg)
{
LogWriter log = new LogWriter(@"net.tcp://192.168.25.210:20100/fisvcs/systemsvc");
log.WriteLog("fleet_dev", "Foresight", "hq-pc", "SystemService", logtype, source, message, detail, extmsg);
}
public void WriteLog(string customerid, string logtype, string source, string message, string detail, string extmsg)
{
LogWriter log = new LogWriter(@"net.tcp://192.168.25.210:20100/fisvcs/systemsvc");
log.WriteLog("fleet_dev", customerid, "hq-pc", "SystemService", logtype, source, message, detail, extmsg);
}
long IIronIntelHost.SendEmail(string customerid, MailMessage msg)
{
throw new NotImplementedException();
}
}
}

View File

@ -0,0 +1,57 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using IronIntel.Contractor.MapView;
using IronIntel.Contractor.Users;
using IronIntel.Contractor.Machines;
using IronIntel.Contractor;
using IronIntel.DataModel;
using IronIntel.DataModel.Admin.Customers;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
// IronIntelHostEnvironment.InitHost(new IronIntelDebugHost());
// Test1();
Guid gd = new Guid("10000000-0000-0000-0000-100000000001");
ContractorHost.Init();
testdemo();
Console.ReadLine();
}
private static void Test1()
{
var cm = IronIntelHostEnvironment.GetCustomerManager();
var db= cm.GetCustomerDatabaseInfo("Foresight", "IRONINTEL_ADMINDB");
Console.WriteLine(db.ToString());
//var loc = cm.GetLocationManager("IRONDEV");
//var locs = loc.GetCustomerLocations();
//Console.WriteLine(locs.ToString());
}
private static void testlogin()
{
var lm = IronIntelHostEnvironment.GetLoginManager();
lm.DeleteUser("6D3A02C7-FC25-47C0-A7A4-97D470EA4CC5", true);
// Console.WriteLine(r.ToString());
}
private static void testdemo()
{
var usermanager = ContractorHost.Instance.GetContractorManager<IronIntel.DataModel.Contractor.Users.UserManager>();
}
}
}

View File

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("ConsoleApplication1")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("ConsoleApplication1")]
[assembly: AssemblyCopyright("Copyright © 2016")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("62910ed6-a98b-422a-a938-1fc729771f54")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]