aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/UpdatePackages/Tango.PPC.Packages.Auth2
diff options
context:
space:
mode:
authorMirta <mirta@twine-s.com>2020-12-30 14:27:05 +0200
committerMirta <mirta@twine-s.com>2020-12-30 14:27:05 +0200
commit1344a54c37f7cbba7a294674b4b733d72ee257ea (patch)
tree4b24c6fa78d7648f4bb7cefafa464bb0b063fec4 /Software/Visual_Studio/PPC/UpdatePackages/Tango.PPC.Packages.Auth2
parent124ad4150f80c6846fdee41dbbda9848c105f6e5 (diff)
parent281610ac56799f6870c587a942495d91cd55b227 (diff)
downloadTango-1344a54c.tar.gz
Tango-1344a54c.zip
Hope it is fine
Diffstat (limited to 'Software/Visual_Studio/PPC/UpdatePackages/Tango.PPC.Packages.Auth2')
-rw-r--r--Software/Visual_Studio/PPC/UpdatePackages/Tango.PPC.Packages.Auth2/Auth2.cs79
-rw-r--r--Software/Visual_Studio/PPC/UpdatePackages/Tango.PPC.Packages.Auth2/Properties/AssemblyInfo.cs36
-rw-r--r--Software/Visual_Studio/PPC/UpdatePackages/Tango.PPC.Packages.Auth2/Tango.PPC.Packages.Auth2.csproj88
-rw-r--r--Software/Visual_Studio/PPC/UpdatePackages/Tango.PPC.Packages.Auth2/app.config39
-rw-r--r--Software/Visual_Studio/PPC/UpdatePackages/Tango.PPC.Packages.Auth2/packages.config4
5 files changed, 0 insertions, 246 deletions
diff --git a/Software/Visual_Studio/PPC/UpdatePackages/Tango.PPC.Packages.Auth2/Auth2.cs b/Software/Visual_Studio/PPC/UpdatePackages/Tango.PPC.Packages.Auth2/Auth2.cs
deleted file mode 100644
index 6ba278511..000000000
--- a/Software/Visual_Studio/PPC/UpdatePackages/Tango.PPC.Packages.Auth2/Auth2.cs
+++ /dev/null
@@ -1,79 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading;
-using System.Threading.Tasks;
-using Tango.BL;
-using Tango.Core;
-using Tango.PPC.Common.UpdatePackages;
-using Tango.PPC.Shared.Updates;
-
-namespace Tango.PPC.Packages.Auth2
-{
- [PPCPackage(PackageType.Pre, "Applying Auth2 Patch", false)]
- public class Auth2 : ExtendedObject, IPPCPackage
- {
- public Task Run(PackageContext context)
- {
- return Task.Factory.StartNew(() =>
- {
- LogManager.Log("Starting Auth2 package procedure...");
-
- using (ObservablesContext db = ObservablesContext.CreateDefault())
- {
- using (var transaction = db.Database.BeginTransaction())
- {
- LogManager.Log("Setting all jobs users to null...");
- context.ReportProgress("Modifying jobs...");
- db.Database.ExecuteSqlCommand("ALTER TABLE JOBS ALTER COLUMN USER_GUID VARCHAR(36) NULL");
- db.Database.ExecuteSqlCommand("UPDATE JOBS SET USER_GUID = NULL");
-
- Thread.Sleep(1000);
-
- LogManager.Log("Setting all job runs users to null...");
- context.ReportProgress("Modifying job runs...");
- db.Database.ExecuteSqlCommand("UPDATE JOB_RUNS SET USER_GUID = NULL");
-
- Thread.Sleep(1000);
-
- LogManager.Log("Setting all events users to null...");
- context.ReportProgress("Modifying events...");
- db.Database.ExecuteSqlCommand("UPDATE MACHINES_EVENTS SET USER_GUID = NULL");
-
- Thread.Sleep(1000);
-
- LogManager.Log("Removing all users...");
- context.ReportProgress("Modifying users...");
- db.Database.ExecuteSqlCommand("DELETE FROM USERS");
-
- Thread.Sleep(1000);
-
- LogManager.Log("Removing redundant addresses...");
- context.ReportProgress("Modifying addresses...");
- db.Database.ExecuteSqlCommand(@"
-DELETE ADDRESSES FROM ADDRESSES
-FULL JOIN ORGANIZATIONS ON ORGANIZATIONS.ADDRESS_GUID = ADDRESSES.GUID
-WHERE ORGANIZATIONS.ADDRESS_GUID IS NULL");
-
- Thread.Sleep(1000);
-
- LogManager.Log("Removing redundant contacts...");
- context.ReportProgress("Modifying contacts...");
- db.Database.ExecuteSqlCommand(@"
-DELETE CONTACTS FROM CONTACTS
-FULL JOIN ORGANIZATIONS ON ORGANIZATIONS.CONTACT_GUID = CONTACTS.GUID
-WHERE ORGANIZATIONS.CONTACT_GUID IS NULL");
-
- Thread.Sleep(1000);
-
- LogManager.Log("Committing transaction...");
- context.ReportProgress("Committing transaction...");
- transaction.Commit();
- }
- }
-
- });
- }
- }
-}
diff --git a/Software/Visual_Studio/PPC/UpdatePackages/Tango.PPC.Packages.Auth2/Properties/AssemblyInfo.cs b/Software/Visual_Studio/PPC/UpdatePackages/Tango.PPC.Packages.Auth2/Properties/AssemblyInfo.cs
deleted file mode 100644
index 998c2463e..000000000
--- a/Software/Visual_Studio/PPC/UpdatePackages/Tango.PPC.Packages.Auth2/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,36 +0,0 @@
-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("Tango.PPC.Packages.Auth2")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("Tango.PPC.Packages.Auth2")]
-[assembly: AssemblyCopyright("Copyright © 2019")]
-[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("ea4233f1-4b7b-4ccf-a6de-2d17612eba90")]
-
-// 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")]
diff --git a/Software/Visual_Studio/PPC/UpdatePackages/Tango.PPC.Packages.Auth2/Tango.PPC.Packages.Auth2.csproj b/Software/Visual_Studio/PPC/UpdatePackages/Tango.PPC.Packages.Auth2/Tango.PPC.Packages.Auth2.csproj
deleted file mode 100644
index bd91c2b60..000000000
--- a/Software/Visual_Studio/PPC/UpdatePackages/Tango.PPC.Packages.Auth2/Tango.PPC.Packages.Auth2.csproj
+++ /dev/null
@@ -1,88 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="15.0" 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>{EA4233F1-4B7B-4CCF-A6DE-2D17612EBA90}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>Tango.PPC.Packages.Auth2</RootNamespace>
- <AssemblyName>Tango.PPC.Packages.Auth2</AssemblyName>
- <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- <Deterministic>true</Deterministic>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>..\..\..\Build\PPC\Debug\Packages\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>..\..\..\Build\PPC\Release\Packages\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
- <HintPath>..\..\..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.dll</HintPath>
- <Private>False</Private>
- </Reference>
- <Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
- <HintPath>..\..\..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.SqlServer.dll</HintPath>
- <Private>False</Private>
- </Reference>
- <Reference Include="System" />
- <Reference Include="System.ComponentModel.DataAnnotations" />
- <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="Auth2.cs" />
- <Compile Include="Properties\AssemblyInfo.cs" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\..\..\Tango.BL\Tango.BL.csproj">
- <Project>{F441FEEE-322A-4943-B566-110E12FD3B72}</Project>
- <Name>Tango.BL</Name>
- <Private>False</Private>
- </ProjectReference>
- <ProjectReference Include="..\..\..\Tango.Core\Tango.Core.csproj">
- <Project>{A34EE0F0-649D-41C8-8489-B6F1CC6924EE}</Project>
- <Name>Tango.Core</Name>
- <Private>False</Private>
- </ProjectReference>
- <ProjectReference Include="..\..\..\Tango.Logging\Tango.Logging.csproj">
- <Project>{bc932dbd-7cdb-488c-99e4-f02cf441f55e}</Project>
- <Name>Tango.Logging</Name>
- <Private>False</Private>
- </ProjectReference>
- <ProjectReference Include="..\..\Tango.PPC.Common\Tango.PPC.Common.csproj">
- <Project>{0be74eee-22cb-4dba-b896-793b9e1a3ac0}</Project>
- <Name>Tango.PPC.Common</Name>
- <Private>False</Private>
- </ProjectReference>
- <ProjectReference Include="..\..\Tango.PPC.Shared\Tango.PPC.Shared.csproj">
- <Project>{208c8bd8-72c6-4e3c-acaa-351091a2acc7}</Project>
- <Name>Tango.PPC.Shared</Name>
- <Private>False</Private>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- <None Include="app.config" />
- <None Include="packages.config" />
- </ItemGroup>
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
-</Project> \ No newline at end of file
diff --git a/Software/Visual_Studio/PPC/UpdatePackages/Tango.PPC.Packages.Auth2/app.config b/Software/Visual_Studio/PPC/UpdatePackages/Tango.PPC.Packages.Auth2/app.config
deleted file mode 100644
index 4e9a59d89..000000000
--- a/Software/Visual_Studio/PPC/UpdatePackages/Tango.PPC.Packages.Auth2/app.config
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<configuration>
- <runtime>
- <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
- <dependentAssembly>
- <assemblyIdentity name="Microsoft.IdentityModel.Clients.ActiveDirectory" publicKeyToken="31bf3856ad364e35" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-5.0.5.0" newVersion="5.0.5.0" />
- </dependentAssembly>
- <dependentAssembly>
- <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
- </dependentAssembly>
- <dependentAssembly>
- <assemblyIdentity name="Microsoft.Data.Edm" publicKeyToken="31bf3856ad364e35" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-5.6.4.0" newVersion="5.6.4.0" />
- </dependentAssembly>
- <dependentAssembly>
- <assemblyIdentity name="Microsoft.Data.Services.Client" publicKeyToken="31bf3856ad364e35" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-5.6.4.0" newVersion="5.6.4.0" />
- </dependentAssembly>
- <dependentAssembly>
- <assemblyIdentity name="Microsoft.Data.OData" publicKeyToken="31bf3856ad364e35" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-5.6.4.0" newVersion="5.6.4.0" />
- </dependentAssembly>
- <dependentAssembly>
- <assemblyIdentity name="Z.EntityFramework.Extensions" publicKeyToken="59b66d028979105b" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-4.0.50.0" newVersion="4.0.50.0" />
- </dependentAssembly>
- <dependentAssembly>
- <assemblyIdentity name="System.Reactive.Core" publicKeyToken="94bc3704cddfc263" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-3.0.3000.0" newVersion="3.0.3000.0" />
- </dependentAssembly>
- <dependentAssembly>
- <assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234" />
- </dependentAssembly>
- </assemblyBinding>
- </runtime>
-</configuration> \ No newline at end of file
diff --git a/Software/Visual_Studio/PPC/UpdatePackages/Tango.PPC.Packages.Auth2/packages.config b/Software/Visual_Studio/PPC/UpdatePackages/Tango.PPC.Packages.Auth2/packages.config
deleted file mode 100644
index b3daf0d6c..000000000
--- a/Software/Visual_Studio/PPC/UpdatePackages/Tango.PPC.Packages.Auth2/packages.config
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<packages>
- <package id="EntityFramework" version="6.2.0" targetFramework="net461" />
-</packages> \ No newline at end of file