Сервис синхронзации приказов студентов
This commit is contained in:
parent
34fe571fdc
commit
9df61f850d
@ -31,9 +31,13 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ToolsDesktop", "Common\Tool
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CoreDatabase", "Common\CoreDatabase\CoreDatabase.csproj", "{C2AADB97-4122-48AB-9E48-6C2A9C33BFE4}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SecurityContract", "Security\SecurityContract\SecurityContract.csproj", "{E9F9B0D8-18F3-40C3-843F-53D2F8B2293E}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SecurityContract", "Security\SecurityContract\SecurityContract.csproj", "{E9F9B0D8-18F3-40C3-843F-53D2F8B2293E}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DepartmentContract", "Department\DepartmentContract\DepartmentContract.csproj", "{5AA4DBD9-FD82-46D6-8A62-78DB269296B3}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DepartmentContract", "Department\DepartmentContract\DepartmentContract.csproj", "{5AA4DBD9-FD82-46D6-8A62-78DB269296B3}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "WindowServices", "WindowServices", "{045965BC-9297-45DF-96E1-6986C286A81B}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WindowServiceSyncStudentOrders", "WindowServices\WindowServiceSyncStudentOrders\WindowServiceSyncStudentOrders.csproj", "{4A68AC9F-07F9-43C3-83E6-359A9CFBC80E}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
@ -93,6 +97,10 @@ Global
|
||||
{5AA4DBD9-FD82-46D6-8A62-78DB269296B3}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{5AA4DBD9-FD82-46D6-8A62-78DB269296B3}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{5AA4DBD9-FD82-46D6-8A62-78DB269296B3}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{4A68AC9F-07F9-43C3-83E6-359A9CFBC80E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{4A68AC9F-07F9-43C3-83E6-359A9CFBC80E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{4A68AC9F-07F9-43C3-83E6-359A9CFBC80E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{4A68AC9F-07F9-43C3-83E6-359A9CFBC80E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
@ -110,6 +118,7 @@ Global
|
||||
{C2AADB97-4122-48AB-9E48-6C2A9C33BFE4} = {6F154F8D-3437-45EE-9D89-02B96BDF3E8E}
|
||||
{E9F9B0D8-18F3-40C3-843F-53D2F8B2293E} = {7DA26C36-778E-4563-9AEC-966E26EA7B2A}
|
||||
{5AA4DBD9-FD82-46D6-8A62-78DB269296B3} = {A19E7709-6AD8-4E9B-B3AB-4339C67D9F39}
|
||||
{4A68AC9F-07F9-43C3-83E6-359A9CFBC80E} = {045965BC-9297-45DF-96E1-6986C286A81B}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {FBA0CB49-EF2D-4538-9D00-FCEDA24879A9}
|
||||
|
@ -0,0 +1,37 @@
|
||||
using CoreDatabase;
|
||||
using DepartmentContract.Logics.IGenericEntityLogic;
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using ToolsModule.ManagmentDependency;
|
||||
using ToolsModule.ManagmentSecurity;
|
||||
|
||||
namespace WindowServiceSyncStudentOrders
|
||||
{
|
||||
class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
Console.WriteLine("Start sync student orders");
|
||||
try
|
||||
{
|
||||
DependencyManager.Instance.RegisterType<ISecurityManager, SecurityManager>();
|
||||
DependencyManager.InitDependency();
|
||||
var logic = DependencyManager.Instance.Resolve<IOrderSyncHistoryLogic>();
|
||||
var task = Task.Run(() => logic.SyncOrders());
|
||||
Task.WaitAll(new Task[] { task });
|
||||
if (task.Result)
|
||||
{
|
||||
Console.WriteLine("Student orders sync success");
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("Student orders sync fail");
|
||||
}
|
||||
}
|
||||
catch(Exception ex)
|
||||
{
|
||||
Console.WriteLine(ex.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\Common\CoreDatabase\CoreDatabase.csproj" />
|
||||
<ProjectReference Include="..\..\Common\ToolsModule\ToolsModule.csproj" />
|
||||
<ProjectReference Include="..\..\Department\DepartmentContract\DepartmentContract.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
Loading…
Reference in New Issue
Block a user