Codebasis als Dateien ins Arbeitsrepo statt als Gitlink

QuellCode/CentronERP war nur als Gitlink (Submodul-Referenz auf 79c1142)
getrackt, ohne .gitmodules und ohne erreichbares Remote. Der
Untersuchungsgegenstand der Versuchsreihe war damit nicht reproduzierbar
gesichert: Ein Klon haette ein leeres Verzeichnis erhalten, und die Belege
der 3.287 Anforderungen waeren nicht ueberpruefbar gewesen.

Umstellung:
- Historie nach c:\DEV\CentronERP_git_snapshot_79c1142 ausgelagert
  (vollstaendig lesbar, enthaelt 79c1142 und Vorgaenger 89ccfd6)
- Gitlink aus dem Index entfernt
- Dateiinhalt aufgenommen: 24.557 Dateien, rund 333 MB

Die verschachtelte .gitignore der Codebasis gilt weiter, Build-Artefakte
bleiben ausgeschlossen. Details in Versuche/Versuch_01/_Codebasis-Nachweis.md
This commit is contained in:
Christoph Schwörer
2026-08-26 07:43:51 +02:00
parent 18edae75b6
commit f045b99a25
24664 changed files with 5846716 additions and 1 deletions
@@ -0,0 +1,43 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\backend\Centron.BL\Centron.BL.csproj" />
<ProjectReference Include="..\..\src\backend\Centron.DAO\Centron.DAO.csproj" />
<ProjectReference Include="..\..\src\webservice\Centron.Host\Centron.Host.csproj" />
<ProjectReference Include="..\..\src\webservice\Centron.WebServices.Core\Centron.WebServices.Core.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.5.1" />
<PackageReference Include="System.Drawing.Common" Version="10.0.7" />
<PackageReference Include="xunit" Version="2.9.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.5" PrivateAssets="all" />
<PackageReference Include="Xunit.Extensions.AssemblyFixture" Version="2.6.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />
</ItemGroup>
<ItemGroup>
<None Update="Infrastructure\DatabaseBackup.bak" CopyToOutputDirectory="PreserveNewest" />
<None Update="nlog.config" CopyToOutputDirectory="PreserveNewest" />
<None Remove="Tests\**\*.actual.txt" />
<EmbeddedResource Include="**\*.xml" />
<EmbeddedResource Include="**\*.docx" />
<EmbeddedResource Include="**\*.pdf" />
<EmbeddedResource Include="**\*.rtf" />
<EmbeddedResource Include="**\*.xlsx" />
<EmbeddedResource Include="**\*.msg" />
<EmbeddedResource Include="**\*.eml" />
<EmbeddedResource Include="**\*.zip" />
</ItemGroup>
<!-- Linked Files -->
<ItemGroup>
<Compile Include="..\..\src\shared\Centron.Controls\Common\RichEditFormattingHelper.cs" Link="Shared\RichEditFormattingHelper.cs" />
<Compile Include="..\..\src\shared\Centron.Controls\PositionGrid\ViewModels\ColorHelper.cs" Link="Shared\ColorHelper.cs" />
</ItemGroup>
</Project>
@@ -0,0 +1,23 @@
using Centron.Tests.EndToEnd.Infrastructure.Verifier;
using Xunit.Abstractions;
using Centron.Core;
using Centron.Tests.EndToEnd.Infrastructure.Fixtures;
using Xunit.Extensions.AssemblyFixture;
namespace Centron.Tests.EndToEnd.Infrastructure
{
public abstract class CentronTest :
IAssemblyFixture<CultureAssemblyFixture>
{
public ITestOutputHelper TestOutputHelper { get; }
public CentronVerifier Verifier { get; }
public CentronTest(ITestOutputHelper testOutputHelper)
{
Guard.NotNull(testOutputHelper, nameof(testOutputHelper));
this.TestOutputHelper = testOutputHelper;
this.Verifier = new CentronVerifier();
}
}
}
@@ -0,0 +1,357 @@
using System;
using System.Data.SqlClient;
using System.IO;
using System.IO.Compression;
using System.Runtime.ExceptionServices;
using Centron.BusinessLogic;
using Centron.BusinessLogic.Administration.Scripts;
using Centron.BusinessLogic.Sales.Receipts;
using Centron.Common;
using Centron.Core.Extensions;
using Centron.Core.Utils;
using Centron.DAO;
using Centron.DAO.DAOConnections;
using Centron.Interfaces.BL;
using Xunit;
namespace Centron.Tests.EndToEnd.Infrastructure
{
public class Database
{
#region Database Server
public static string Server
{
get
{
var server = GetEnvironmentVariable("CENTRON_TESTS_DATABASE_SERVER");
if (string.IsNullOrWhiteSpace(server) == false)
return server;
throw new Exception("You have to configure the SQL server for EndToEndTests");
// return "YOUR-MACHINE\\SQL2017"; //Enter your local SQL server here
}
}
public static string Username
{
get
{
var username = GetEnvironmentVariable("CENTRON_TESTS_DATABASE_USERNAME");
if (string.IsNullOrWhiteSpace(username) == false)
return username;
throw new Exception("You have to configure the SQL server username for EndToEndTests");
// return "sql-username"; //Enter your local SQL username here
}
}
public static string Password
{
get
{
var password = GetEnvironmentVariable("CENTRON_TESTS_DATABASE_PASSWORD");
if (string.IsNullOrWhiteSpace(password) == false)
return password;
throw new Exception("You have to configure the SQL server password for EndToEndTests");
// return "password"; //Enter your local SQL password here
}
}
#endregion
private static object _lock = new object();
private static Exception _initializeException;
private static string _databaseName;
private static string _snapshotName;
public static IDisposable Initialize()
{
lock (_lock)
{
if (string.IsNullOrWhiteSpace(_databaseName) == false || string.IsNullOrWhiteSpace(_snapshotName) == false)
throw new Exception("Database.Initialize can only be called once.");
// If there was an error when initializing the Database before
// Rethrow that exception here, so we don't waste a lot of time restoring the database again
if (_initializeException is not null)
ExceptionDispatchInfo.Throw(_initializeException); // This keeps the original exception stack-trace
// Start database initialization in the beginning to let it run parallel to database restore
DAOFactory.Instance.InitializeAsync();
string databaseName = GetDatabaseName();
string snapshotName = GetSnapshotName(databaseName);
RestoreDatabase(databaseName);
try
{
Connect(databaseName);
UpdateDatabase();
}
catch (Exception e)
{
try
{
// If something fails when connecting to the database, or executing scripts
// we want to Drop the database again.
// The test will not be able to run, but we were leaving old database backups behind.
// So, lets clean up after ourselves and Drop the database if something goes wrong.
DropDatabase(databaseName);
}
catch
{
// Dropping the database failed. Unlucky, but not much we can do.
}
_initializeException = e;
throw;
}
try
{
CreateSnapshot(snapshotName, databaseName);
}
catch (Exception e)
{
// The test will not be able to run, but we were leaving old database backups behind.
// So, lets clean up after ourselves and Drop the database if something goes wrong.
try
{
DropSnapshot(snapshotName);
}
catch
{
//Dropping the snapshot failed. Unlucky, but not much we can do.
}
try
{
DropDatabase(databaseName);
}
catch
{
//Dropping the database failed. Unlucky, but not much we can do.
}
_initializeException = e;
throw;
}
_databaseName = databaseName;
_snapshotName = snapshotName;
return new DisposableAction(() =>
{
DropSnapshot(snapshotName);
DropDatabase(databaseName);
});
}
}
public static void RestoreFromSnapshot()
{
RestoreFromSnapshot(_databaseName, _snapshotName);
ReceiptItemSpecialArticleHelperBL.ClearSpecialArticlesCache();
}
#region Names
private static string GetDatabaseName()
{
var user = Environment.UserName;
var time = DateTime.Now.ToString("dd-MM-yyyy-HH:mm:ss");
var guid = Guid.NewGuid().ToString("N");
return $"EndToEndTests-{user}-{time}-{guid}".Truncate(120); // The MSSQL server database name max length is 128 characters, just make sure to not go too long
}
private static string GetSnapshotName(string databaseName)
{
return databaseName + "-snapshot";
}
#endregion
#region Snapshots
private static void CreateSnapshot(string snapshotName, string databaseName)
{
ExecuteSql(command =>
{
command.CommandText = GetCreateSnapshotSQL(snapshotName, databaseName);
command.ExecuteNonQuery();
});
}
private static string GetCreateSnapshotSQL(string snapshotName, string databaseName)
{
string dataPath = null;
ExecuteSql(command =>
{
command.CommandText = "SELECT serverproperty('InstanceDefaultDataPath')";
using (var reader = command.ExecuteReader())
{
while (reader.Read())
{
dataPath = reader.GetString(0);
}
}
});
return $@"CREATE DATABASE [{snapshotName}] ON
(
NAME = CentronWork_Data,
FILENAME = N'{dataPath}{databaseName.Replace("-", "").Replace(":", "")}.ss'
)
AS SNAPSHOT OF [{databaseName}]";
}
private static void DropSnapshot(string snapshotName)
{
ExecuteSql(command =>
{
command.CommandText = GetDropSnapshotSQL(snapshotName);
command.ExecuteNonQuery();
});
}
private static string GetDropSnapshotSQL(string snapshotName)
{
return $"DROP DATABASE [{snapshotName}]";
}
private static void RestoreFromSnapshot(string databaseName, string snapshotName)
{
ExecuteSql(command =>
{
command.CommandText = GetRestoreFromSnapshotSQL(databaseName, snapshotName);
command.ExecuteNonQuery();
});
}
private static string GetRestoreFromSnapshotSQL(string databaseName, string snapshotName)
{
return $@"
ALTER DATABASE [{databaseName}] SET SINGLE_USER WITH ROLLBACK IMMEDIATE;
RESTORE DATABASE [{databaseName}]
FROM DATABASE_SNAPSHOT = '{snapshotName}';
ALTER DATABASE [{databaseName}] SET MULTI_USER WITH ROLLBACK IMMEDIATE; ";
}
#endregion
#region Database
private static void RestoreDatabase(string databaseName)
{
ExecuteSql(command =>
{
command.CommandText = GetRestoreDatabaseSQL(databaseName);
command.CommandTimeout = (int)TimeSpan.FromMinutes(2).TotalSeconds;
command.ExecuteNonQuery();
});
}
private static string GetRestoreDatabaseSQL(string databaseName)
{
var backupPath = GetEnvironmentVariable("DATABASE_BACKUP_PATH");
if (string.IsNullOrEmpty(backupPath))
backupPath = Path.GetFullPath(".\\Infrastructure\\DatabaseBackup.bak");
string dataPath = null;
string logPath = null;
ExecuteSql(command =>
{
command.CommandText = "SELECT serverproperty('InstanceDefaultDataPath'), serverproperty('InstanceDefaultLogPath')";
using (var reader = command.ExecuteReader())
{
while (reader.Read())
{
dataPath = reader.GetString(0);
logPath = reader.GetString(1);
}
}
});
return $@"RESTORE DATABASE [{databaseName}] FROM DISK = N'{backupPath}'
WITH
REPLACE,
MOVE N'CentronWork_Data' TO N'{dataPath}{databaseName.Replace("-", "").Replace(":", "")}.mdf',
MOVE N'CentronWork_Log' TO N'{logPath}{databaseName.Replace("-", "").Replace(":", "")}.ldf'";
}
private static void DropDatabase(string databaseName)
{
ExecuteSql(command =>
{
command.CommandText = GetDropDatabaseSQL(databaseName);
command.ExecuteNonQuery();
});
}
private static string GetDropDatabaseSQL(string databaseName)
{
return $"ALTER DATABASE [{databaseName}] SET SINGLE_USER WITH ROLLBACK IMMEDIATE; DROP DATABASE [{databaseName}]";
}
#endregion
#region Private Methods
private static void Connect(string databaseName)
{
DAOFactory.Instance.SetConnection(new InCodeDAOConnection(Server, databaseName, Username, Password), "c-entron Tests");
DAOFactory.Instance.InitializeAsync().Wait();
Assert.True(DAOFactory.Instance.IsInitialized, "DAOFactory.Instance.IsInitialized");
Assert.True(DAOFactory.Instance.HasConnection, "DAOFactory.Instance.HasConnection");
}
private static void UpdateDatabase()
{
using (var session = new BLSession())
{
var scriptEngineBL = session.GetBL<ScriptEngineBL>();
var version = new Version(20, 0, 0, 0);
var result = scriptEngineBL.ExecuteScripts(currentVersionOverride: version);
Assert.Null(result.Message);
Assert.Equal(ResultStatus.Success, result.Status);
}
}
private static void ExecuteSql(Action<SqlCommand> execute)
{
var builder = new SqlConnectionStringBuilder
{
DataSource = Server,
UserID = Username,
Password = Password,
InitialCatalog = "master"
};
using (var connection = new SqlConnection(builder.ToString()))
{
connection.Open();
using (var command = connection.CreateCommand())
{
execute(command);
}
}
}
private static string GetEnvironmentVariable(string name)
{
var targets = new[]
{
EnvironmentVariableTarget.Process,
EnvironmentVariableTarget.User,
EnvironmentVariableTarget.Machine
};
foreach (var target in targets)
{
var value = Environment.GetEnvironmentVariable(name, target);
if (string.IsNullOrWhiteSpace(value) == false)
return value;
}
return null;
}
#endregion
}
}
@@ -0,0 +1,137 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using Centron.BusinessLogic;
using Centron.BusinessLogic.Administration.Logins;
using Centron.BusinessLogic.EmployeeArea;
using Centron.BusinessLogic.Mail.Factory;
using Centron.DAO;
using Centron.Data.Entities.Administration.Logins;
using Centron.Tests.EndToEnd.Infrastructure.Fixtures;
using Xunit;
using Xunit.Abstractions;
using Xunit.Extensions.AssemblyFixture;
using Centron.Core;
using Centron.Interfaces.Administration.Logins;
using Centron.Interfaces.BL;
namespace Centron.Tests.EndToEnd.Infrastructure
{
public abstract class EndToEndTest : CentronTest,
IAssemblyFixture<DatabaseAssemblyFixture>,
IAssemblyFixture<LicensingAssemblyFixture>,
IAssemblyFixture<InitializeObjectMapperAssemblyFixture>
{
[Fact]
public abstract void Execute();
protected LoggedInUser GetLoggedInUser(int userI3D = 11)
{
using var session = new BLSession();
return new LoggedInUser(session.GetBL<AppUserBL>().GetAppUser(f => f.I3D == userI3D));
}
private Dictionary<int, string> _ticketId = new();
protected LoggedInUser GetLoggedInUserWebAccount(int webAccountI3D = 6)
{
using var session = new BLSession();
var webAccountAppUser = session.GetBL<AppUserBL>().GetAppUserForWebaccounts().ThrowIfError();
var emp = webAccountAppUser.Employee; //Make sure the employee is loaded too
var appUser = emp.AppUser; //Make sure this is loaded as well
var webAccount = session.GetBL<WebAccountBL>().GetWebAccountByI3D(webAccountI3D);
var rights = webAccount.WebRights.ToList(); //Make sure the rights are loaded too
var existingTicketId = this._ticketId.TryGetValue(webAccountI3D, out var i) ? i : null;
var ticket = existingTicketId switch
{
not null => session.GetBL<TicketBL>().GetTicket(existingTicketId).ThrowIfError(),
null => session.GetBL<TicketBL>().CreateNewTicket(
ApplicationKind.Developer,
LicenseGuids.Developer,
"Test-Device",
webAccountAppUser,
webAccount).ThrowIfError()
};
// Update web-account, to make sure we get current version of the web-account, with the current rights
ticket.WebAccount = webAccount;
this._ticketId[webAccountI3D] = ticket.TicketId;
return new LoggedInUser(webAccountAppUser, ticket);
}
public EndToEndTest(ITestOutputHelper testOutputHelper)
: base(testOutputHelper)
{
Guard.NotNull(testOutputHelper, nameof(testOutputHelper));
Database.RestoreFromSnapshot();
}
public void Sql(string statement, Action<IDbCommand> addParametersAction = null)
{
using (var session = new DAOSession())
{
session.Advanced.RawSqlAccess.ExecuteNonQueryTransactionSave(statement, addParametersAction).ThrowIfError();
}
}
public T Sql<T>(string statement, Action<IDbCommand> addParametersAction = null)
{
using (var session = new DAOSession())
{
return session.Advanced.RawSqlAccess.ExecuteScalarTransactionSave<T>(statement, addParametersAction).ThrowIfError();
}
}
public void ExecuteMatrix<T1>(T1[] input1, Action<T1> execute)
{
this.ExecuteMatrix<T1, object>(
input1,
new object[]{null},
(inputItem1, _) => execute(inputItem1));
}
public void ExecuteMatrix<T1, T2>(T1[] input1, T2[] input2, Action<T1, T2> execute)
{
this.ExecuteMatrix<T1, T2, object>(
input1,
input2,
new object[] {null},
(inputItem1, inputItem2, _) => execute(inputItem1, inputItem2));
}
public void ExecuteMatrix<T1, T2, T3>(T1[] input1, T2[] input2, T3[] input3, Action<T1, T2, T3> execute)
{
foreach (var inputItem1 in input1)
{
foreach (var inputItem2 in input2)
{
foreach (var inputItem3 in input3)
{
execute(inputItem1, inputItem2, inputItem3);
}
}
}
}
public void WithSession(Action<BLSession> action)
{
using (var session = new BLSession())
{
action(session);
}
}
public T WithSession<T>(Func<BLSession, T> getter)
{
using (var session = new BLSession())
{
return getter(session);
}
}
}
}
@@ -0,0 +1,18 @@
using System.Globalization;
using Centron.Common.UtilClasses;
namespace Centron.Tests.EndToEnd.Infrastructure.Fixtures
{
public class CultureAssemblyFixture
{
public CultureAssemblyFixture()
{
// Even if this application is started on a windows machine with different language
// The c-entron.NET and Web-Service don't work with all cultures, so use the CultureUtils to get one that is compatible with us
CultureInfo.DefaultThreadCurrentCulture = CultureUtils.GetCultureInfoForThisMachine();
// Also set the text-language
CultureInfo.DefaultThreadCurrentUICulture = CultureInfo.DefaultThreadCurrentCulture;
}
}
}
@@ -0,0 +1,19 @@
using System;
namespace Centron.Tests.EndToEnd.Infrastructure.Fixtures
{
public class DatabaseAssemblyFixture : IDisposable
{
private readonly IDisposable _database;
public DatabaseAssemblyFixture()
{
this._database = Database.Initialize();
}
public void Dispose()
{
this._database.Dispose();
}
}
}
@@ -0,0 +1,12 @@
using Centron.BusinessLogic.WebServices;
namespace Centron.Tests.EndToEnd.Infrastructure.Fixtures
{
public class InitializeObjectMapperAssemblyFixture
{
public InitializeObjectMapperAssemblyFixture()
{
ObjectMapper.InitializeAsync().Wait();
}
}
}
@@ -0,0 +1,32 @@
using System;
using System.Collections.Generic;
using Centron.BusinessLogic.Administration.Licensing;
using Centron.Interfaces.Administration.Logins;
namespace Centron.Tests.EndToEnd.Infrastructure.Fixtures
{
public class LicensingAssemblyFixture
{
public LicensingAssemblyFixture()
{
var products = new Dictionary<Guid, string>
{
[LicenseGuids.Centron] = "c-entron.NET",
[LicenseGuids.RiversuiteInventory] = "Riversuite Inventory",
[LicenseGuids.TaskManagementReportServer] = "Reportserver",
[LicenseGuids.CRMPro] = "CRMPro",
[LicenseGuids.ProductionManagement] = "Production",
[LicenseGuids.ServiceBoardWebDev] = "Tasks",
[LicenseGuids.ServiceBoard] = "Serviceboard",
[LicenseGuids.MspModule] = "Modul MSP",
[LicenseGuids.DocumentProcessing] = "Modul Dokumentenweiterverarbeitung",
[LicenseGuids.WebCart2] = "WebCart 2.0",
[LicenseGuids.OnlineBanking_FinApi] = "Online-Banking (finAPI)",
[LicenseGuids.PasswordManager] = "Passwort-Manager"
};
LicenseManager.Initialize(LicenseManager.SettingsForTests(products));
LicenseManager.Instance.LoadLicenses().Wait();
}
}
}
@@ -0,0 +1,66 @@
using System;
using System.Diagnostics;
using Xunit;
using Xunit.Abstractions;
namespace Centron.Tests.EndToEnd.Infrastructure
{
public abstract class PerformanceTest : EndToEndTest
{
protected PerformanceTest(ITestOutputHelper testOutputHelper)
: base(testOutputHelper)
{
}
public override void Execute()
{
this.Prepare();
var watch = Stopwatch.StartNew();
this.Measure();
watch.Stop();
this.AssertResults();
bool FinishedInTime(double factor)
{
return this.AllowedDuration == null ||
watch.Elapsed.TotalSeconds <= this.AllowedDuration.Value.TotalSeconds * factor;
}
bool finishedPerfect = FinishedInTime(factor: 1.0);
bool finishedGood = FinishedInTime(factor: 1.1);
bool finishedBad = FinishedInTime(factor: 1.5);
var status = finishedPerfect
? "PERFECT"
: finishedGood
? "GOOD"
: finishedBad
? "BAD"
: string.Empty;
if (string.IsNullOrWhiteSpace(status))
{
this.TestOutputHelper.WriteLine($"{this.GetType().Name} did not finish in time. Max duration is {this.AllowedDuration?.ToString() ?? "(infinite)"}, but it took {watch.Elapsed}");
}
else
{
this.TestOutputHelper.WriteLine($"{this.GetType().Name} did finish {status} in {watch.Elapsed}");
}
}
protected virtual TimeSpan? AllowedDuration { get; }
protected virtual void Prepare()
{
}
protected abstract void Measure();
protected virtual void AssertResults()
{
}
}
}
@@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Centron.Tests.EndToEnd.Infrastructure
{
public class RegexHelper
{
public const string Date = "\\d{2}\\.\\d{2}\\.\\d{4}"; //Beispiel: 01.01.2010
public const string RtfCreatedDate = "{\\\\creatim\\\\yr\\d{4}\\\\mo\\d{1,2}\\\\dy\\d{1,2}\\\\hr\\d{1,2}\\\\min\\d{1,2}}"; //Beispiel: {\\creatim\\yr2020\\mo1\\dy7\\hr13\\min41}
// Matches the whole RTF \info author region up to the trailing {\version token. This swallows the
// \upr/\ud unicode-author fallback DevExpress emits when the OS user name contains non-ANSI chars
// (e.g. "Müller"), so the normalized baseline stays "{\info{\author John Doe}{\version1}}" regardless
// of who regenerates it. Replacement is "{\info{\author John Doe}", leaving {\version...} intact.
public const string RtfInfo = "{\\\\info.*?(?={\\\\version)";
public const string Guid = "[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}";
}
}
@@ -0,0 +1,13 @@
using System.Runtime.InteropServices;
using Xunit;
namespace Centron.Tests.EndToEnd.Infrastructure;
public sealed class SkipOnLinuxFact: FactAttribute
{
public SkipOnLinuxFact() {
if(RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) {
Skip = "Ignore on Linux";
}
}
}
@@ -0,0 +1,197 @@
using Centron.DAO;
using Centron.Data.WebServices.Sales.Receipts;
using Centron.Tests.EndToEnd.Infrastructure.Verifier;
using DevExpress.CodeParser;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Data;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Windows.Forms;
using Xunit;
using Centron.Core;
using Centron.Core.Utils;
using DevExpress.Spreadsheet;
namespace Centron.Tests.EndToEnd.Infrastructure.Verifier
{
public class CentronVerifier
{
public CentronVerifier()
{
this.Settings = new CentronVerifierSettings();
this.Settings.IgnoreProperty<ReceiptBaseDTO>(f => f.CreatedThroughApplicationVersion);
this.Settings.IgnoreProperty<ReceiptBaseDTO>(f => f.ChangedThroughApplicationVersion);
}
public CentronVerifierSettings Settings { get; }
public bool OverrideExpectedFiles { get; set; }
public void VerifyTable(string name, string tableName, string where = null, CentronVerifierSettings settings = null, [CallerFilePath] string sourceFile = "")
{
where = where ?? "1 = 1";
string sqlStatement = $"SELECT * FROM {tableName} WHERE {where}";
this.VerifySql(name, sqlStatement, settings, sourceFile);
}
public void VerifySql(string name, string sqlStatement, CentronVerifierSettings settings = null, [CallerFilePath] string sourceFile = "")
{
using (var session = new DAOSession())
{
var table = session.Advanced.RawSqlAccess.GetRawSqlResult(sqlStatement);
this.Verify(name, table, settings, sourceFile: sourceFile);
}
}
public void VerifyExcel(string fileName, byte[] excel, [CallerFilePath] string sourceFile = "")
{
var workbook = new Workbook();
workbook.LoadDocument(excel);
var worksheet = workbook.Worksheets[0];
string[,] excelCellValues = new string[worksheet.Rows.LastUsedIndex + 1, worksheet.Columns.LastUsedIndex + 1];
for (int i = 0; i <= worksheet.Rows.LastUsedIndex; i++)
for (int j = 0; j <= worksheet.Columns.LastUsedIndex; j++)
{
var testCell = worksheet.Cells[i, j].Value.ToString();
excelCellValues[i, j] = testCell;
}
this.Verify(fileName, excelCellValues, sourceFile: sourceFile);
}
public void Verify(string name, object data, CentronVerifierSettings settings = null, [CallerFilePath] string sourceFile = "")
{
Guard.NotNullOrWhiteSpace(name, nameof(name));
//data can be NULL
//differentPerTargetFramework can be anything
//settings can be NULL
Guard.NotNullOrWhiteSpace(sourceFile, nameof(sourceFile));
if (settings != null)
{
settings.MergeWith(this.Settings);
}
else
{
settings = this.Settings;
}
var json = this.SerializeAsJson(data, settings);
var expectedFileName = this.GetExpectedFileName(name, sourceFile);
var actualFileName = this.GetActualFileName(name, sourceFile);
var directory = Path.GetDirectoryName(expectedFileName);
if (Directory.Exists(directory) == false)
Directory.CreateDirectory(directory);
if (this.OverrideExpectedFiles)
{
File.WriteAllText(expectedFileName, json, Encoding.UTF8);
return;
}
File.WriteAllText(actualFileName, json, Encoding.UTF8);
var expected = File.Exists(expectedFileName)
? File.ReadAllText(expectedFileName, Encoding.UTF8)
: string.Empty;
expected = expected.Replace(@"\r", @"");
json = json.Replace(@"\r", @"");
try
{
Assert.Equal(expected, json, ignoreLineEndingDifferences:true);
}
catch (Exception e)
{
if(Debugger.IsAttached)
this.StartDiffTool(expectedFileName, actualFileName);
Console.WriteLine(json);
throw new Exception(name + " failed", e);
}
}
private string SerializeAsJson(object data, CentronVerifierSettings verifierSettings)
{
var settings = new JsonSerializerSettings
{
Formatting = Newtonsoft.Json.Formatting.Indented,
Converters = new List<JsonConverter>
{
verifierSettings.CleanupGuidValues ? new CleanupValuesConverter<Guid>() : null,
verifierSettings.CleanupDateTimeValues ? new CleanupValuesConverter<DateTime>(new DateTimeEqualityComparer()) : null,
verifierSettings.CleanupDateTimeOffsetValues ? new CleanupValuesConverter<DateTimeOffset>(new DateTimeOffsetEqualityComparer()) : null,
}
.Where(f => f != null)
.ToList(),
ContractResolver = verifierSettings.GetContractResolver(),
};
var ignoredColumns = verifierSettings.GetIgnoredColumns();
if (ignoredColumns.Any() && data is DataTable table)
{
foreach (var ignoredColumn in ignoredColumns)
{
if (table.Columns.Contains(ignoredColumn))
table.Columns.Remove(ignoredColumn);
}
}
var serializer = JsonSerializer.Create(settings);
var builder = new StringBuilder();
using (var stringWriter = new StringWriter(builder))
using (var writer = new JsonTextWriter(stringWriter) { QuoteChar = '\'', QuoteName = false })
{
serializer.Serialize(writer, data);
}
builder.Replace(@"\\", @"\");
return builder.ToString();
}
private string GetExpectedFileName(string name, string sourceFile)
{
return $"{Path.GetDirectoryName(sourceFile)}/{name}.expected.txt";
}
private string GetActualFileName(string name, string sourceFile)
{
return $"{Path.GetDirectoryName(sourceFile)}/{name}.actual.txt";
}
private void StartDiffTool(string expectedFileName, string actualFileName)
{
try
{
if (File.Exists(expectedFileName) == false || File.Exists(actualFileName) == false)
return;
string vsPath = @"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\devenv.exe";
if (File.Exists(vsPath))
ProcessHelper.Start(vsPath, $"/diff \"{actualFileName}\" \"{expectedFileName}\"");
else
ProcessHelper.Start("code", $"--diff \"{actualFileName}\" \"{expectedFileName}\"");
}
catch (Exception)
{
//Ooops
}
}
}
}
@@ -0,0 +1,273 @@
using DevExpress.CodeParser;
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
using System.Text.RegularExpressions;
using Centron.Core;
namespace Centron.Tests.EndToEnd.Infrastructure.Verifier
{
public class CentronVerifierSettings
{
private readonly List<string> _ignoredColumns;
private readonly Dictionary<Type, List<string>> _ignoredProperties;
private readonly Dictionary<(Type type, string propertyName), List<(string regex, string replace)>> _cleanupProperties;
private readonly Dictionary<Type, List<string>> _noDateCleanupProperties;
public CentronVerifierSettings()
{
this._ignoredColumns = new List<string>();
this._ignoredProperties = new Dictionary<Type, List<string>>();
this._cleanupProperties = new Dictionary<(Type type, string propertyName), List<(string regex, string replace)>>();
this._noDateCleanupProperties = new Dictionary<Type, List<string>>();
this.CleanupGuidValues = true;
this.CleanupDateTimeValues = true;
this.CleanupDateTimeOffsetValues = true;
}
public void IgnoreColumn(string columnName)
{
this._ignoredColumns.Add(columnName);
}
public void IgnoreProperties<T>(params Expression<Func<T, object>> [] properties)
{
foreach (var property in properties)
this.IgnoreProperty(property);
}
public void IgnoreProperty<T>(Expression<Func<T, object>> property)
{
Guard.NotNull(property, nameof(property));
if (this._ignoredProperties.ContainsKey(typeof(T)) == false)
{
this._ignoredProperties[typeof(T)] = new List<string>();
}
this._ignoredProperties[typeof(T)].Add(this.GetPropertyName(property));
}
public void CleanupProperty<T>(Expression<Func<T, object>> property, string regex, string replace)
{
Guard.NotNull(property, nameof(property));
Guard.NotNullOrWhiteSpace(regex, nameof(regex));
//replace can be null
var propertyName = this.GetPropertyName(property);
var key = (typeof(T), propertyName);
if (this._cleanupProperties.ContainsKey(key) == false)
{
this._cleanupProperties[key] = new List<(string regex, string replace)>();
}
this._cleanupProperties[key].Add((regex, replace));
}
public void NoDateCleanup<T>(Expression<Func<T, string>> property)
{
Guard.NotNull(property, nameof(property));
var propertyName = this.GetPropertyName(property);
if (this._noDateCleanupProperties.ContainsKey(typeof(T)) == false)
{
this._noDateCleanupProperties[typeof(T)] = new List<string>();
}
this._noDateCleanupProperties[typeof(T)].Add(propertyName);
}
public void MergeWith(CentronVerifierSettings settings)
{
Guard.NotNull(settings, nameof(settings));
foreach (var ignoredProperty in settings._ignoredProperties)
{
if (this._ignoredProperties.ContainsKey(ignoredProperty.Key) == false)
{
this._ignoredProperties.Add(ignoredProperty.Key, new List<string>(ignoredProperty.Value)); //Make sure to create a copy of the list, so we can't change the original one by accident
}
else
{
this._ignoredProperties[ignoredProperty.Key].AddRange(ignoredProperty.Value);
}
}
foreach (var cleanupProperty in settings._cleanupProperties)
{
if (this._cleanupProperties.ContainsKey(cleanupProperty.Key) == false)
{
this._cleanupProperties.Add(cleanupProperty.Key, new List<(string, string)>(cleanupProperty.Value)); //Make sure to create a copy of the list, so we can't change the original one by accident
}
else
{
this._cleanupProperties[cleanupProperty.Key].AddRange(cleanupProperty.Value);
}
}
foreach (var noDate in settings._noDateCleanupProperties)
{
if (this._noDateCleanupProperties.ContainsKey(noDate.Key) == false)
{
this._noDateCleanupProperties.Add(noDate.Key, new List<string>(noDate.Value)); //Make sure to create a copy of the list, so we can't change the original one by accident
}
else
{
this._noDateCleanupProperties[noDate.Key].AddRange(noDate.Value);
}
}
this.CleanupGuidValues = settings.CleanupGuidValues || this.CleanupGuidValues;
this.CleanupDateTimeValues = settings.CleanupDateTimeValues || this.CleanupDateTimeValues;
this.CleanupDateTimeOffsetValues = settings.CleanupDateTimeOffsetValues || this.CleanupDateTimeOffsetValues;
}
public IContractResolver GetContractResolver()
{
return new VerifierContractResolver(this);
}
public List<string> GetIgnoredColumns()
{
return this._ignoredColumns;
}
public bool CleanupGuidValues { get; set; }
public bool CleanupDateTimeValues { get; set; }
public bool CleanupDateTimeOffsetValues { get; set; }
private string GetPropertyName<T, TResult>(Expression<Func<T, TResult>> property)
{
var unary = property.Body as UnaryExpression;
var expr = property.Body as MemberExpression ?? unary?.Operand as MemberExpression;
var prop = expr.Member as PropertyInfo;
return prop.Name;
}
#region Internal
private class VerifierContractResolver : DefaultContractResolver
{
private readonly CentronVerifierSettings _settings;
public VerifierContractResolver(CentronVerifierSettings settings)
{
Guard.NotNull(settings, nameof(settings));
this._settings = settings;
}
protected override IList<JsonProperty> CreateProperties(Type type, MemberSerialization memberSerialization)
{
return base.CreateProperties(type, memberSerialization).OrderBy(f => f.PropertyName).ToList();
}
protected override JsonProperty CreateProperty(MemberInfo member, MemberSerialization memberSerialization)
{
var property = base.CreateProperty(member, memberSerialization);
foreach (var ignoredProperty in this._settings._ignoredProperties)
{
if (property.DeclaringType.IsAssignableFrom(ignoredProperty.Key) && ignoredProperty.Value.Contains(property.PropertyName))
{
property.Ignored = true;
}
}
foreach (var cleanupProperty in this._settings._cleanupProperties)
{
if (property.DeclaringType.IsAssignableFrom(cleanupProperty.Key.type) && cleanupProperty.Key.propertyName == property.PropertyName)
{
foreach (var cleanup in cleanupProperty.Value)
{
property.ValueProvider = new CleanupValueProvider(property.ValueProvider, cleanup.regex, cleanup.replace);
}
}
}
if (property.PropertyType == typeof(string))
{
bool doNotCleanupDate = this._settings._noDateCleanupProperties
.Where(f => property.DeclaringType.IsAssignableFrom(f.Key))
.Where(f => f.Value.Contains(property.PropertyName))
.Any();
if (doNotCleanupDate == false)
property.ValueProvider = new CleanupDateValueProvider(property.ValueProvider);
}
return property;
}
}
private class CleanupValueProvider : IValueProvider
{
private readonly IValueProvider _inner;
private readonly string _regex;
private readonly string _replace;
public CleanupValueProvider(IValueProvider inner, string regex, string replace)
{
Guard.NotNull(inner, nameof(inner));
Guard.NotNullOrWhiteSpace(regex, nameof(regex));
//replace can be NULL
this._inner = inner;
this._regex = regex;
this._replace = replace;
}
public object GetValue(object target)
{
var value = this._inner.GetValue(target);
if (value == null)
return null;
return Regex.Replace((string)value, this._regex, this._replace);
}
public void SetValue(object target, object value)
{
this._inner.SetValue(target, value);
}
}
private class CleanupDateValueProvider : IValueProvider
{
private readonly IValueProvider _inner;
public CleanupDateValueProvider(IValueProvider inner)
{
Guard.NotNull(inner, nameof(inner));
this._inner = inner;
}
public object GetValue(object target)
{
var value = this._inner.GetValue(target);
if (value == null)
return null;
value = Regex.Replace((string)value, RegexHelper.Date, "EinDatum");
value = Regex.Replace((string)value, RegexHelper.RtfCreatedDate, string.Empty);
return value;
}
public void SetValue(object target, object value)
{
this._inner.SetValue(target, value);
}
}
#endregion
}
}
@@ -0,0 +1,34 @@
using Newtonsoft.Json;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Threading;
namespace Centron.Tests.EndToEnd.Infrastructure.Verifier
{
internal class CleanupValuesConverter<T> : JsonConverter
where T : struct
{
public CleanupValuesConverter(IEqualityComparer<T> equalityComparer = null)
{
}
public override bool CanConvert(Type objectType)
{
return objectType == typeof(T) || objectType == typeof(T?);
}
public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
{
throw new NotSupportedException();
}
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
{
if (value == null)
return;
writer.WriteRawValue(typeof(T).Name);
}
}
}
@@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
namespace Centron.Tests.EndToEnd.Infrastructure.Verifier
{
internal class DateTimeEqualityComparer : EqualityComparer<DateTime>
{
public override bool Equals(DateTime x, DateTime y)
{
return x.Year == y.Year &&
x.Month == y.Month &&
x.Day == y.Day &&
x.Hour == y.Hour &&
x.Minute == y.Minute &&
x.Second == y.Second;
}
public override int GetHashCode(DateTime obj)
{
return Tuple.Create(obj.Year, obj.Month, obj.Day, obj.Hour, obj.Minute, obj.Second).GetHashCode();
}
}
}
@@ -0,0 +1,24 @@
using System;
using System.Collections.Generic;
namespace Centron.Tests.EndToEnd.Infrastructure.Verifier
{
internal class DateTimeOffsetEqualityComparer : EqualityComparer<DateTimeOffset>
{
public override bool Equals(DateTimeOffset x, DateTimeOffset y)
{
return x.Year == y.Year &&
x.Month == y.Month &&
x.Day == y.Day &&
x.Hour == y.Hour &&
x.Minute == y.Minute &&
x.Second == y.Second &&
x.Offset == y.Offset;
}
public override int GetHashCode(DateTimeOffset obj)
{
return Tuple.Create(obj.Year, obj.Month, obj.Day, obj.Hour, obj.Minute, obj.Second, obj.Offset).GetHashCode();
}
}
}
@@ -0,0 +1,5 @@
using Xunit;
using Xunit.Extensions.AssemblyFixture;
[assembly: CollectionBehavior(DisableTestParallelization = true)]
[assembly: TestFramework(AssemblyFixtureFramework.TypeName, AssemblyFixtureFramework.AssemblyName)]
@@ -0,0 +1,140 @@
using System.Collections.Generic;
using System.Linq;
using Centron.BusinessLogic;
using Centron.BusinessLogic.Administration.Rights;
using Centron.BusinessLogic.WebServices.Accounts;
using Centron.Interfaces.Accounts;
using Centron.Interfaces.BL;
using Centron.Tests.EndToEnd.Infrastructure;
using CentronSoftware.Centron.WebServices.Entities.Accounts;
using Xunit;
using Xunit.Abstractions;
namespace Centron.Tests.EndToEnd.Tests.Account.AccountAddresses
{
public class AccountAddressTests : EndToEndTest
{
public AccountAddressTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper)
{
this.Verifier.Settings.IgnoreProperty<AccountAddressDTO>(f => f.CreatedVersion);
this.Verifier.Settings.IgnoreProperty<AccountAddressDTO>(f => f.ChangedVersion);
this.Verifier.Settings.IgnoreProperty<AccountAddressContactDTO>(f => f.CreatedVersion);
this.Verifier.Settings.IgnoreProperty<AccountAddressContactDTO>(f => f.ChangedVersion);
}
public override void Execute()
{
TestLoadWithContacts();
GetSingleAccountAddressWithContacts();
GetDefaultAddressForAccount();
TestUserHasNoShowRightsForAccounts();
PrepareUserWithSpecialRights();
TestUserHasRightOnlyToSeeOwnAccountsSuccessful();
TestUserHasRightOnlyToSeeOwnAccountsFailed();
}
private void TestUserHasRightOnlyToSeeOwnAccountsFailed()
{
using var session = new BLSession();
var result = session.GetBL<AccountAddressWebServiceBL>().GetAccountAddresses(GetLoggedInUser(16),
new GetAccountAddressesFilter()
{
IsDefault = true,
AccountI3Ds = new List<int>() { 5, 11 }
});
Assert.True(result.Status == ResultStatus.Error, "Expected error, because user should have no show rights");
Assert.True(result.MessageCode == DefaultMessageCodes.RightCheckFailed, "Expected right check failed message code");
Assert.True(result.Data == null || !result.Data.Any(), "Expected empty result list");
}
private void TestUserHasRightOnlyToSeeOwnAccountsSuccessful()
{
using var session = new BLSession();
var result = session.GetBL<AccountAddressWebServiceBL>().GetAccountAddresses(GetLoggedInUser(16),
new GetAccountAddressesFilter()
{
IsDefault = true,
AccountI3Ds = new List<int>() { 5 }
});
Assert.True(result.Status == ResultStatus.Success, result.Message);
Assert.True(result.Data.Count == 1, "Expected 1 address");
}
private void PrepareUserWithSpecialRights()
{
using var session = new BLSession();
session.GetBL<AppRightsBL>().AddRightToRightGroup(
UserRightsConst.Sales.Customer.CustomerCommon.SHOW_ONLY_OWN_CUSTOMER, 40, GetLoggedInUser().User);
}
private void TestUserHasNoShowRightsForAccounts()
{
using var session = new BLSession();
var result = session.GetBL<AccountAddressWebServiceBL>().GetAccountAddresses(GetLoggedInUser(18),
new GetAccountAddressesFilter()
{
IsDefault = true,
AccountI3Ds = new List<int>() { 10, 16 }
});
Assert.True(result.Status == ResultStatus.Error, "Expected error, because user should have no show rights");
Assert.True(result.MessageCode == DefaultMessageCodes.RightCheckFailed, "Expected right check failed message code");
Assert.True(result.Data == null || !result.Data.Any(), "Expected empty result list");
}
private void GetDefaultAddressForAccount()
{
using var session = new BLSession();
var result = session.GetBL<AccountAddressWebServiceBL>().GetAccountAddresses(GetLoggedInUser(),
new GetAccountAddressesFilter()
{
IsDefault = true,
AccountI3Ds = new List<int>() { 10, 16 }
});
Assert.True(result.Status == ResultStatus.Success, result.Message);
Assert.True(result.Data.Count == 2, "Expected 2 addresses");
Assert.True(result.Data.All(f => f.IsDefault), "Expected only default addresses");
Assert.True(result.Data.All(f => f.Contacts == null || !f.Contacts.Any()), "Expected empty contact list");
}
private void GetSingleAccountAddressWithContacts()
{
using var session = new BLSession();
var result = session.GetBL<AccountAddressWebServiceBL>().GetAccountAddresses(GetLoggedInUser(),
new GetAccountAddressesFilter()
{
AddressI3Ds = new List<int>()
{
25
},
IncludeContacts = true
});
Assert.True(result.Status == ResultStatus.Success, result.Message);
Assert.True(result.Data.Count == 1 && result.Data.All(f => f.I3D == 25), "Expected 1 item with I3D = 25");
Assert.True(result.Data.First().Contacts.Any(), "Expected a contact list for account address");
}
public void TestLoadWithContacts()
{
var result = this.WithSession(s => s.GetBL<AccountAddressWebServiceBL>().GetAccountAddresses(this.GetLoggedInUser(), new GetAccountAddressesFilter
{
AccountI3Ds = new List<int>
{
10,
16
},
IncludeClosedAddresses = true,
IncludeContacts = true
})).ThrowIfError();
this.Verifier.Verify("AddressesWithContacts", result);
}
}
}
@@ -0,0 +1,560 @@
[
{
AccountI3D: 10,
AddressKind: 1,
BookKeepingNumber: null,
ChangedByI3D: 27,
ChangedDate: DateTime,
City: 'Frankfurt',
Comment: '',
Contacts: [
{
AccountAddressI3D: 18,
Birthday: DateTime,
ChangedByI3D: 27,
ChangedDate: DateTime,
Comment: 'am besten erreichbar zwischen 10-12 Uhr',
CreatedByI3D: 31,
CreatedDate: DateTime,
DefaultSubstitute: false,
DefaultTicket: false,
DepartmentI3D: null,
DepartmentText: '',
Email1: 'mw@c-entron.de',
Email2: '',
Fax1: '',
Fax2: '',
Firstname: 'Markus',
FullName: 'Walter, Markus',
I3D: 25,
IsActive: true,
IsDefault: true,
IsInvoiceMailCCReceiver: false,
IsMailingAtEmail1Active: true,
IsMailingAtEmail2Active: false,
Job: '',
Lastname: 'Walter',
OldReferenceI3D: 45,
OldReferenceKind: 0,
Phone1: '',
Phone2: '',
Phone3: '',
Phone4: '',
Phone5: '',
Picture: '',
PictureExtension: null,
SalutationI3D: 2,
SAMAccountName: null,
SearchTag: null,
SID: null,
VariableTextField01: '',
VariableTextField02: ''
}
],
CountryI3D: 1,
CreatedByI3D: 31,
CreatedDate: DateTime,
CurrencyI3D: 1,
Department: '',
GeoInfo: {
Latitude: 50.1309033,
Longitude: 8.7369357
},
GeoInfoUpdateFailed: false,
I3D: 18,
IsActive: true,
IsDefault: true,
IsPostOfficeBoxActive: false,
IsRMARequired: false,
LanguageI3D: 1,
OldReferenceI3D: 35,
OldReferenceKind: 0,
PostOfficeBox: '',
PrintAddressContact: true,
PrintDepartment: false,
PrintDepartmentAddressContact: false,
PrintName: true,
StateI3D: null,
Street: 'Liststrasse 1',
VariableBoolField01: false,
Zip: '40506'
},
{
AccountI3D: 10,
AddressKind: 1,
BookKeepingNumber: null,
ChangedByI3D: 31,
ChangedDate: DateTime,
City: 'Blaustein',
Comment: '',
Contacts: [
{
AccountAddressI3D: 19,
Birthday: null,
ChangedByI3D: 40,
ChangedDate: DateTime,
Comment: '',
CreatedByI3D: 31,
CreatedDate: DateTime,
DefaultSubstitute: false,
DefaultTicket: false,
DepartmentI3D: null,
DepartmentText: '',
Email1: '',
Email2: '',
Fax1: '',
Fax2: '',
Firstname: '',
FullName: 'Fischer, ',
I3D: 26,
IsActive: true,
IsDefault: true,
IsInvoiceMailCCReceiver: false,
IsMailingAtEmail1Active: false,
IsMailingAtEmail2Active: false,
Job: '',
Lastname: 'Fischer',
OldReferenceI3D: 46,
OldReferenceKind: 0,
Phone1: '',
Phone2: '',
Phone3: '',
Phone4: '',
Phone5: '',
Picture: '',
PictureExtension: null,
SalutationI3D: 4,
SAMAccountName: null,
SearchTag: null,
SID: null,
VariableTextField01: null,
VariableTextField02: null
},
{
AccountAddressI3D: 19,
Birthday: null,
ChangedByI3D: 40,
ChangedDate: DateTime,
Comment: null,
CreatedByI3D: 40,
CreatedDate: DateTime,
DefaultSubstitute: false,
DefaultTicket: false,
DepartmentI3D: null,
DepartmentText: null,
Email1: 'info@c-entron.de',
Email2: null,
Fax1: '',
Fax2: '',
Firstname: 'Ru',
FullName: 'Kakau, Ru',
I3D: 27,
IsActive: true,
IsDefault: false,
IsInvoiceMailCCReceiver: false,
IsMailingAtEmail1Active: false,
IsMailingAtEmail2Active: false,
Job: null,
Lastname: 'Kakau',
OldReferenceI3D: 78,
OldReferenceKind: 0,
Phone1: '01701234567',
Phone2: '',
Phone3: '',
Phone4: null,
Phone5: '',
Picture: '',
PictureExtension: null,
SalutationI3D: 2,
SAMAccountName: null,
SearchTag: null,
SID: null,
VariableTextField01: null,
VariableTextField02: null
}
],
CountryI3D: 1,
CreatedByI3D: 31,
CreatedDate: DateTime,
CurrencyI3D: 1,
Department: '',
GeoInfo: null,
GeoInfoUpdateFailed: true,
I3D: 19,
IsActive: true,
IsDefault: false,
IsPostOfficeBoxActive: false,
IsRMARequired: false,
LanguageI3D: 1,
OldReferenceI3D: 36,
OldReferenceKind: 0,
PostOfficeBox: '',
PrintAddressContact: true,
PrintDepartment: false,
PrintDepartmentAddressContact: false,
PrintName: true,
StateI3D: null,
Street: 'Rechnungsadresse 1',
VariableBoolField01: false,
Zip: '89134'
},
{
AccountI3D: 10,
AddressKind: 1,
BookKeepingNumber: null,
ChangedByI3D: 31,
ChangedDate: DateTime,
City: '',
Comment: '',
Contacts: [
{
AccountAddressI3D: 20,
Birthday: null,
ChangedByI3D: 31,
ChangedDate: DateTime,
Comment: '',
CreatedByI3D: 31,
CreatedDate: DateTime,
DefaultSubstitute: false,
DefaultTicket: false,
DepartmentI3D: null,
DepartmentText: '',
Email1: '',
Email2: '',
Fax1: '',
Fax2: '',
Firstname: '',
FullName: ' , ',
I3D: 28,
IsActive: true,
IsDefault: true,
IsInvoiceMailCCReceiver: false,
IsMailingAtEmail1Active: false,
IsMailingAtEmail2Active: false,
Job: '',
Lastname: ' ',
OldReferenceI3D: 47,
OldReferenceKind: 0,
Phone1: '',
Phone2: '',
Phone3: '',
Phone4: '',
Phone5: '',
Picture: '',
PictureExtension: null,
SalutationI3D: null,
SAMAccountName: null,
SearchTag: null,
SID: null,
VariableTextField01: '',
VariableTextField02: ''
}
],
CountryI3D: 1,
CreatedByI3D: 31,
CreatedDate: DateTime,
CurrencyI3D: 1,
Department: '',
GeoInfo: null,
GeoInfoUpdateFailed: true,
I3D: 20,
IsActive: true,
IsDefault: false,
IsPostOfficeBoxActive: false,
IsRMARequired: false,
LanguageI3D: 1,
OldReferenceI3D: 37,
OldReferenceKind: 0,
PostOfficeBox: '',
PrintAddressContact: true,
PrintDepartment: false,
PrintDepartmentAddressContact: false,
PrintName: true,
StateI3D: null,
Street: '',
VariableBoolField01: false,
Zip: ''
},
{
AccountI3D: 16,
AddressKind: 1,
BookKeepingNumber: null,
ChangedByI3D: 27,
ChangedDate: DateTime,
City: 'Tuttlingen',
Comment: '',
Contacts: [
{
AccountAddressI3D: 27,
Birthday: null,
ChangedByI3D: 27,
ChangedDate: DateTime,
Comment: '',
CreatedByI3D: 27,
CreatedDate: DateTime,
DefaultSubstitute: false,
DefaultTicket: false,
DepartmentI3D: null,
DepartmentText: '',
Email1: 'info@tuttlingen.de',
Email2: '',
Fax1: '',
Fax2: '',
Firstname: '',
FullName: 'Weber, ',
I3D: 35,
IsActive: true,
IsDefault: true,
IsInvoiceMailCCReceiver: false,
IsMailingAtEmail1Active: false,
IsMailingAtEmail2Active: false,
Job: '',
Lastname: 'Weber',
OldReferenceI3D: 68,
OldReferenceKind: 0,
Phone1: '07461-99-0',
Phone2: '',
Phone3: '',
Phone4: '',
Phone5: '',
Picture: '',
PictureExtension: null,
SalutationI3D: 2,
SAMAccountName: null,
SearchTag: null,
SID: null,
VariableTextField01: '',
VariableTextField02: ''
},
{
AccountAddressI3D: 27,
Birthday: null,
ChangedByI3D: 27,
ChangedDate: DateTime,
Comment: '',
CreatedByI3D: 27,
CreatedDate: DateTime,
DefaultSubstitute: false,
DefaultTicket: false,
DepartmentI3D: null,
DepartmentText: '',
Email1: 'eva.schulze@tuttlingen.de',
Email2: '',
Fax1: '',
Fax2: '',
Firstname: 'Eva',
FullName: 'Schulze, Eva',
I3D: 36,
IsActive: true,
IsDefault: false,
IsInvoiceMailCCReceiver: false,
IsMailingAtEmail1Active: false,
IsMailingAtEmail2Active: false,
Job: '',
Lastname: 'Schulze',
OldReferenceI3D: 69,
OldReferenceKind: 0,
Phone1: '',
Phone2: '',
Phone3: '',
Phone4: '',
Phone5: '',
Picture: '',
PictureExtension: null,
SalutationI3D: 1,
SAMAccountName: null,
SearchTag: null,
SID: null,
VariableTextField01: '',
VariableTextField02: ''
}
],
CountryI3D: 1,
CreatedByI3D: 27,
CreatedDate: DateTime,
CurrencyI3D: 1,
Department: 'Rathaus',
GeoInfo: {
Latitude: 47.98479,
Longitude: 8.81799
},
GeoInfoUpdateFailed: false,
I3D: 27,
IsActive: true,
IsDefault: true,
IsPostOfficeBoxActive: false,
IsRMARequired: false,
LanguageI3D: 1,
OldReferenceI3D: 54,
OldReferenceKind: 0,
PostOfficeBox: '',
PrintAddressContact: true,
PrintDepartment: true,
PrintDepartmentAddressContact: false,
PrintName: true,
StateI3D: null,
Street: 'Rathausstrasse 1',
VariableBoolField01: false,
Zip: '78532'
},
{
AccountI3D: 16,
AddressKind: 1,
BookKeepingNumber: null,
ChangedByI3D: 27,
ChangedDate: DateTime,
City: 'Tuttlingen',
Comment: '',
Contacts: [
{
AccountAddressI3D: 28,
Birthday: null,
ChangedByI3D: 27,
ChangedDate: DateTime,
Comment: '',
CreatedByI3D: 27,
CreatedDate: DateTime,
DefaultSubstitute: false,
DefaultTicket: false,
DepartmentI3D: null,
DepartmentText: '',
Email1: '',
Email2: '',
Fax1: '',
Fax2: '',
Firstname: '',
FullName: 'Kern, ',
I3D: 37,
IsActive: true,
IsDefault: true,
IsInvoiceMailCCReceiver: false,
IsMailingAtEmail1Active: false,
IsMailingAtEmail2Active: false,
Job: '',
Lastname: 'Kern',
OldReferenceI3D: 70,
OldReferenceKind: 0,
Phone1: '',
Phone2: '',
Phone3: '',
Phone4: '',
Phone5: '',
Picture: '',
PictureExtension: null,
SalutationI3D: 2,
SAMAccountName: null,
SearchTag: null,
SID: null,
VariableTextField01: '',
VariableTextField02: ''
}
],
CountryI3D: 1,
CreatedByI3D: 27,
CreatedDate: DateTime,
CurrencyI3D: 1,
Department: 'Lehramt',
GeoInfo: {
Latitude: 47.97895,
Longitude: 8.81794
},
GeoInfoUpdateFailed: false,
I3D: 28,
IsActive: true,
IsDefault: false,
IsPostOfficeBoxActive: false,
IsRMARequired: false,
LanguageI3D: 1,
OldReferenceI3D: 55,
OldReferenceKind: 0,
PostOfficeBox: '',
PrintAddressContact: true,
PrintDepartment: true,
PrintDepartmentAddressContact: false,
PrintName: true,
StateI3D: null,
Street: 'Talstrasse 12',
VariableBoolField01: false,
Zip: '78532'
},
{
AccountI3D: 16,
AddressKind: 1,
BookKeepingNumber: null,
ChangedByI3D: 27,
ChangedDate: DateTime,
City: 'Tuttlingen',
Comment: '',
Contacts: [
{
AccountAddressI3D: 29,
Birthday: null,
ChangedByI3D: 27,
ChangedDate: DateTime,
Comment: 'Technischer Leiter',
CreatedByI3D: 27,
CreatedDate: DateTime,
DefaultSubstitute: false,
DefaultTicket: false,
DepartmentI3D: null,
DepartmentText: '',
Email1: '',
Email2: '',
Fax1: '',
Fax2: '',
Firstname: 'Karl',
FullName: 'Huber, Karl',
I3D: 38,
IsActive: true,
IsDefault: true,
IsInvoiceMailCCReceiver: false,
IsMailingAtEmail1Active: false,
IsMailingAtEmail2Active: false,
Job: '',
Lastname: 'Huber',
OldReferenceI3D: 71,
OldReferenceKind: 0,
Phone1: '',
Phone2: '',
Phone3: '',
Phone4: '',
Phone5: '',
Picture: '',
PictureExtension: null,
SalutationI3D: 2,
SAMAccountName: null,
SearchTag: null,
SID: null,
VariableTextField01: '',
VariableTextField02: ''
}
],
CountryI3D: 1,
CreatedByI3D: 27,
CreatedDate: DateTime,
CurrencyI3D: 1,
Department: 'Bauhof',
GeoInfo: {
Latitude: 48.073356,
Longitude: 8.7391238
},
GeoInfoUpdateFailed: false,
I3D: 29,
IsActive: true,
IsDefault: false,
IsPostOfficeBoxActive: false,
IsRMARequired: false,
LanguageI3D: 1,
OldReferenceI3D: 56,
OldReferenceKind: 0,
PostOfficeBox: '',
PrintAddressContact: true,
PrintDepartment: true,
PrintDepartmentAddressContact: false,
PrintName: true,
StateI3D: null,
Street: 'Hauptstrasse 100',
VariableBoolField01: false,
Zip: '78534'
}
]
@@ -0,0 +1,260 @@
{
AccountTypes: [
{
AccountType: {
I3D: 2,
IsActive: true,
IsFavorite: false,
Kind: 1,
Name: 'Lieferant'
},
CustomerData: null,
I3D: 1092,
SupplierData: {
BookKeepingCollectionAccount: null,
BookKeepingExportDate: null,
BookKeepingExportEmployeeI3D: null,
BookKeepingNumber: '',
CarrierShortSign: null,
CommentCreditVoucher: null,
CommentDeliveryList: null,
CommentInvoice: null,
CommentOffer: null,
CommentOrder: null,
ConcertoSupplierNumber: null,
Discount: 0.00,
EDIKind: 0,
EgisSupplierNumber: '',
FreightCost: 0.00,
FreightCostDirectDelivery: 0.00,
FreightCostFree: 0.00,
FreightCostFreeAtDirectDelivery: 0.00,
I3D: 10,
IsAlkaSupplier: false,
IsBookKeepingExportDeaktivated: false,
IsBookKeepingExportDone: false,
IsCarrier: false,
IsDirectDelivery: false,
IsDiscountAtPriceBase: false,
IsDistributor: false,
IsExclusiveOfVAT: false,
IsFavorite: false,
IsIsoCertified: false,
IsManufacturer: true,
ItScopeSupplierNumber: null,
Limit: 0.00,
LimitCalculationKind: null,
MinimumOrderValue: 0.00,
MinimumOrderValueAtDirectDelivery: 0.00,
Number: 70010,
OwnCustomerNumber: '',
PbsEasySupplierNumber: null,
PbsEasyX400MailAddress: null,
ReceiptConditionCreditVoucherI3D: null,
ReceiptConditionDeliveryOfferI3D: null,
ReceiptConditionDeliveryOrderI3D: null,
ReceiptConditionInvoiceI3D: null,
ReceiptConditionOfferI3D: null,
ReceiptConditionOrderI3D: null,
RMAInfo: '',
RMANeeded: false,
RootDirI3D: 247,
SmallQuantitiesExtraCharge: 0.00,
SmallQuantitiesExtraChargeAtDirectDelivery: 0.00,
SupplierClassification: -1,
TradersGuideSupplierI3D: null,
WarehouseI3D: null,
WEEE: ''
}
},
{
AccountType: {
I3D: 3,
IsActive: true,
IsFavorite: false,
Kind: 2,
Name: 'Kontakt'
},
CustomerData: null,
I3D: 1093,
SupplierData: null
}
],
Addresses: [
{
AccountI3D: 1037,
AddressKind: 0,
BookKeepingNumber: null,
ChangedByI3D: 22,
City: '',
Comment: '',
Contacts: [
{
AccountAddressI3D: 1050,
Birthday: null,
ChangedByI3D: 22,
Comment: '',
CreatedByI3D: 44,
DefaultSubstitute: false,
DefaultTicket: false,
DepartmentI3D: null,
DepartmentText: null,
Email1: '',
Email2: '',
Fax1: '',
Fax2: '',
Firstname: '',
FullName: ' , ',
I3D: 1062,
IsActive: true,
IsDefault: true,
IsInvoiceMailCCReceiver: false,
IsMailingAtEmail1Active: false,
IsMailingAtEmail2Active: false,
Job: '',
Lastname: ' ',
OldReferenceI3D: 21,
OldReferenceKind: 0,
Phone1: '',
Phone2: '',
Phone3: '',
Phone4: '',
Phone5: '',
Picture: '',
PictureExtension: null,
SalutationI3D: null,
SAMAccountName: null,
SearchTag: null,
SID: null,
VariableTextField01: null,
VariableTextField02: null
}
],
CountryI3D: 1,
CreatedByI3D: 44,
CurrencyI3D: 1,
Department: null,
GeoInfo: null,
GeoInfoUpdateFailed: false,
I3D: 1050,
IsActive: true,
IsDefault: true,
IsPostOfficeBoxActive: false,
IsRMARequired: false,
LanguageI3D: 15,
OldReferenceI3D: 18,
OldReferenceKind: 0,
PostOfficeBox: '',
PrintAddressContact: true,
PrintDepartment: false,
PrintDepartmentAddressContact: false,
PrintName: true,
StateI3D: null,
Street: '',
VariableBoolField01: false,
Zip: ''
},
{
AccountI3D: 1037,
AddressKind: 0,
BookKeepingNumber: null,
ChangedByI3D: 22,
City: 'Vienna',
Comment: 'Has a better castle than france.',
Contacts: [],
CountryI3D: 15,
CreatedByI3D: 22,
CurrencyI3D: 0,
Department: 'Vienna',
GeoInfo: null,
GeoInfoUpdateFailed: false,
I3D: 1067,
IsActive: true,
IsDefault: false,
IsPostOfficeBoxActive: false,
IsRMARequired: false,
LanguageI3D: 0,
OldReferenceI3D: 1072,
OldReferenceKind: 0,
PostOfficeBox: null,
PrintAddressContact: false,
PrintDepartment: false,
PrintDepartmentAddressContact: false,
PrintName: false,
StateI3D: null,
Street: null,
VariableBoolField01: null,
Zip: '1010'
},
{
AccountI3D: 1037,
AddressKind: 0,
BookKeepingNumber: null,
ChangedByI3D: 22,
City: 'Vienna',
Comment: 'Has a better castle than france.',
Contacts: [],
CountryI3D: 15,
CreatedByI3D: 22,
CurrencyI3D: 0,
Department: 'Vienna',
GeoInfo: null,
GeoInfoUpdateFailed: false,
I3D: 1068,
IsActive: true,
IsDefault: false,
IsPostOfficeBoxActive: false,
IsRMARequired: false,
LanguageI3D: 0,
OldReferenceI3D: 1073,
OldReferenceKind: 0,
PostOfficeBox: null,
PrintAddressContact: false,
PrintDepartment: false,
PrintDepartmentAddressContact: false,
PrintName: false,
StateI3D: null,
Street: null,
VariableBoolField01: null,
Zip: '1010'
}
],
AdvertisingNotAllowed: false,
AdvertisingNotAllowedInfo: null,
Adviser1I3D: null,
Adviser2I3D: null,
Adviser3I3D: null,
Adviser4I3D: null,
Adviser5I3D: null,
Adviser6I3D: null,
ChangedByI3D: 22,
Comment: 'Geändert für Test',
CommercialRegisterPage: null,
CompanyGroupI3D: null,
CreatedByI3D: 27,
CreatedThrough: 7,
Email: 'account@Test.test',
Fax: '',
FaxDistributor: false,
FreeText01: null,
I3D: 1037,
InstructionI3D: null,
InvoiceMailBCCReceiver: null,
IsActive: true,
IsInstructionActive: false,
IsLocked: false,
MailDistributor: false,
MandatorI3D: null,
Matchcode: 'uwu',
Name: 'Acer GmbH1',
Number: 38,
OriginI3D: null,
Phone: '111222333',
RevenueIdentificationNumber: '',
SalesAreaI3D: null,
TaxNumber: '',
TermsAndConditionEmployeeI3D: null,
TermsAndConditionReceivedDate: null,
UseSettingsFromCompanyGroupForReceipts: false,
WebSite: ''
}
@@ -0,0 +1,260 @@
{
AccountTypes: [
{
AccountType: {
I3D: 2,
IsActive: true,
IsFavorite: false,
Kind: 1,
Name: 'Lieferant'
},
CustomerData: null,
I3D: 1092,
SupplierData: {
BookKeepingCollectionAccount: null,
BookKeepingExportDate: null,
BookKeepingExportEmployeeI3D: null,
BookKeepingNumber: '',
CarrierShortSign: null,
CommentCreditVoucher: null,
CommentDeliveryList: null,
CommentInvoice: null,
CommentOffer: null,
CommentOrder: null,
ConcertoSupplierNumber: null,
Discount: 0.00,
EDIKind: 0,
EgisSupplierNumber: '',
FreightCost: 0.00,
FreightCostDirectDelivery: 0.00,
FreightCostFree: 0.00,
FreightCostFreeAtDirectDelivery: 0.00,
I3D: 10,
IsAlkaSupplier: false,
IsBookKeepingExportDeaktivated: false,
IsBookKeepingExportDone: false,
IsCarrier: false,
IsDirectDelivery: false,
IsDiscountAtPriceBase: false,
IsDistributor: false,
IsExclusiveOfVAT: false,
IsFavorite: false,
IsIsoCertified: false,
IsManufacturer: true,
ItScopeSupplierNumber: null,
Limit: 0.00,
LimitCalculationKind: null,
MinimumOrderValue: 0.00,
MinimumOrderValueAtDirectDelivery: 0.00,
Number: 70010,
OwnCustomerNumber: '',
PbsEasySupplierNumber: null,
PbsEasyX400MailAddress: null,
ReceiptConditionCreditVoucherI3D: null,
ReceiptConditionDeliveryOfferI3D: null,
ReceiptConditionDeliveryOrderI3D: null,
ReceiptConditionInvoiceI3D: null,
ReceiptConditionOfferI3D: null,
ReceiptConditionOrderI3D: null,
RMAInfo: '',
RMANeeded: false,
RootDirI3D: 247,
SmallQuantitiesExtraCharge: 0.00,
SmallQuantitiesExtraChargeAtDirectDelivery: 0.00,
SupplierClassification: -1,
TradersGuideSupplierI3D: null,
WarehouseI3D: null,
WEEE: ''
}
},
{
AccountType: {
I3D: 3,
IsActive: true,
IsFavorite: false,
Kind: 2,
Name: 'Kontakt'
},
CustomerData: null,
I3D: 1093,
SupplierData: null
}
],
Addresses: [
{
AccountI3D: 1037,
AddressKind: 0,
BookKeepingNumber: null,
ChangedByI3D: 22,
City: '',
Comment: '',
Contacts: [
{
AccountAddressI3D: 1050,
Birthday: null,
ChangedByI3D: 22,
Comment: '',
CreatedByI3D: 44,
DefaultSubstitute: false,
DefaultTicket: false,
DepartmentI3D: null,
DepartmentText: null,
Email1: '',
Email2: '',
Fax1: '',
Fax2: '',
Firstname: '',
FullName: ' , ',
I3D: 1062,
IsActive: true,
IsDefault: true,
IsInvoiceMailCCReceiver: false,
IsMailingAtEmail1Active: false,
IsMailingAtEmail2Active: false,
Job: '',
Lastname: ' ',
OldReferenceI3D: 21,
OldReferenceKind: 0,
Phone1: '',
Phone2: '',
Phone3: '',
Phone4: '',
Phone5: '',
Picture: '',
PictureExtension: null,
SalutationI3D: null,
SAMAccountName: null,
SearchTag: null,
SID: null,
VariableTextField01: null,
VariableTextField02: null
}
],
CountryI3D: 1,
CreatedByI3D: 44,
CurrencyI3D: 1,
Department: null,
GeoInfo: null,
GeoInfoUpdateFailed: false,
I3D: 1050,
IsActive: true,
IsDefault: true,
IsPostOfficeBoxActive: false,
IsRMARequired: false,
LanguageI3D: 15,
OldReferenceI3D: 18,
OldReferenceKind: 0,
PostOfficeBox: '',
PrintAddressContact: true,
PrintDepartment: false,
PrintDepartmentAddressContact: false,
PrintName: true,
StateI3D: null,
Street: '',
VariableBoolField01: false,
Zip: ''
},
{
AccountI3D: 1037,
AddressKind: 0,
BookKeepingNumber: null,
ChangedByI3D: 22,
City: 'Vienna',
Comment: 'Has a better castle than france.',
Contacts: [],
CountryI3D: 15,
CreatedByI3D: 22,
CurrencyI3D: 0,
Department: 'Vienna',
GeoInfo: null,
GeoInfoUpdateFailed: false,
I3D: 1067,
IsActive: true,
IsDefault: false,
IsPostOfficeBoxActive: false,
IsRMARequired: false,
LanguageI3D: 0,
OldReferenceI3D: 1072,
OldReferenceKind: 0,
PostOfficeBox: null,
PrintAddressContact: false,
PrintDepartment: false,
PrintDepartmentAddressContact: false,
PrintName: false,
StateI3D: null,
Street: null,
VariableBoolField01: null,
Zip: '1010'
},
{
AccountI3D: 1037,
AddressKind: 0,
BookKeepingNumber: null,
ChangedByI3D: 22,
City: 'Vienna',
Comment: 'Has a better castle than france.',
Contacts: [],
CountryI3D: 15,
CreatedByI3D: 22,
CurrencyI3D: 0,
Department: 'Vienna',
GeoInfo: null,
GeoInfoUpdateFailed: false,
I3D: 1068,
IsActive: true,
IsDefault: false,
IsPostOfficeBoxActive: false,
IsRMARequired: false,
LanguageI3D: 0,
OldReferenceI3D: 1073,
OldReferenceKind: 0,
PostOfficeBox: null,
PrintAddressContact: false,
PrintDepartment: false,
PrintDepartmentAddressContact: false,
PrintName: false,
StateI3D: null,
Street: null,
VariableBoolField01: null,
Zip: '1010'
}
],
AdvertisingNotAllowed: false,
AdvertisingNotAllowedInfo: null,
Adviser1I3D: null,
Adviser2I3D: null,
Adviser3I3D: null,
Adviser4I3D: null,
Adviser5I3D: null,
Adviser6I3D: null,
ChangedByI3D: 22,
Comment: 'Geändert für Test',
CommercialRegisterPage: null,
CompanyGroupI3D: null,
CreatedByI3D: 27,
CreatedThrough: 7,
Email: 'account@Test.test',
Fax: '',
FaxDistributor: false,
FreeText01: null,
I3D: 1037,
InstructionI3D: null,
InvoiceMailBCCReceiver: null,
IsActive: true,
IsInstructionActive: false,
IsLocked: false,
MailDistributor: false,
MandatorI3D: null,
Matchcode: 'uwu',
Name: 'Acer GmbH1',
Number: 38,
OriginI3D: null,
Phone: '111222333',
RevenueIdentificationNumber: '',
SalesAreaI3D: null,
TaxNumber: '',
TermsAndConditionEmployeeI3D: null,
TermsAndConditionReceivedDate: null,
UseSettingsFromCompanyGroupForReceipts: false,
WebSite: ''
}
@@ -0,0 +1,260 @@
{
AccountTypes: [
{
AccountType: {
I3D: 2,
IsActive: true,
IsFavorite: false,
Kind: 1,
Name: 'Lieferant'
},
CustomerData: null,
I3D: 1092,
SupplierData: {
BookKeepingCollectionAccount: null,
BookKeepingExportDate: null,
BookKeepingExportEmployeeI3D: null,
BookKeepingNumber: '',
CarrierShortSign: null,
CommentCreditVoucher: null,
CommentDeliveryList: null,
CommentInvoice: null,
CommentOffer: null,
CommentOrder: null,
ConcertoSupplierNumber: null,
Discount: 0.00,
EDIKind: 0,
EgisSupplierNumber: '',
FreightCost: 0.00,
FreightCostDirectDelivery: 0.00,
FreightCostFree: 0.00,
FreightCostFreeAtDirectDelivery: 0.00,
I3D: 10,
IsAlkaSupplier: false,
IsBookKeepingExportDeaktivated: false,
IsBookKeepingExportDone: false,
IsCarrier: false,
IsDirectDelivery: false,
IsDiscountAtPriceBase: false,
IsDistributor: false,
IsExclusiveOfVAT: false,
IsFavorite: false,
IsIsoCertified: false,
IsManufacturer: true,
ItScopeSupplierNumber: null,
Limit: 0.00,
LimitCalculationKind: null,
MinimumOrderValue: 0.00,
MinimumOrderValueAtDirectDelivery: 0.00,
Number: 70010,
OwnCustomerNumber: '',
PbsEasySupplierNumber: null,
PbsEasyX400MailAddress: null,
ReceiptConditionCreditVoucherI3D: null,
ReceiptConditionDeliveryOfferI3D: null,
ReceiptConditionDeliveryOrderI3D: null,
ReceiptConditionInvoiceI3D: null,
ReceiptConditionOfferI3D: null,
ReceiptConditionOrderI3D: null,
RMAInfo: '',
RMANeeded: false,
RootDirI3D: 247,
SmallQuantitiesExtraCharge: 0.00,
SmallQuantitiesExtraChargeAtDirectDelivery: 0.00,
SupplierClassification: -1,
TradersGuideSupplierI3D: null,
WarehouseI3D: null,
WEEE: ''
}
},
{
AccountType: {
I3D: 3,
IsActive: true,
IsFavorite: false,
Kind: 2,
Name: 'Kontakt'
},
CustomerData: null,
I3D: 1093,
SupplierData: null
}
],
Addresses: [
{
AccountI3D: 1037,
AddressKind: 0,
BookKeepingNumber: null,
ChangedByI3D: 22,
City: '',
Comment: '',
Contacts: [
{
AccountAddressI3D: 1050,
Birthday: null,
ChangedByI3D: 22,
Comment: '',
CreatedByI3D: 44,
DefaultSubstitute: false,
DefaultTicket: false,
DepartmentI3D: null,
DepartmentText: null,
Email1: '',
Email2: '',
Fax1: '',
Fax2: '',
Firstname: '',
FullName: ' , ',
I3D: 1062,
IsActive: true,
IsDefault: true,
IsInvoiceMailCCReceiver: false,
IsMailingAtEmail1Active: false,
IsMailingAtEmail2Active: false,
Job: '',
Lastname: ' ',
OldReferenceI3D: 21,
OldReferenceKind: 0,
Phone1: '',
Phone2: '',
Phone3: '',
Phone4: '',
Phone5: '',
Picture: '',
PictureExtension: null,
SalutationI3D: null,
SAMAccountName: null,
SearchTag: null,
SID: null,
VariableTextField01: null,
VariableTextField02: null
}
],
CountryI3D: 1,
CreatedByI3D: 44,
CurrencyI3D: 1,
Department: null,
GeoInfo: null,
GeoInfoUpdateFailed: false,
I3D: 1050,
IsActive: true,
IsDefault: true,
IsPostOfficeBoxActive: false,
IsRMARequired: false,
LanguageI3D: 15,
OldReferenceI3D: 18,
OldReferenceKind: 0,
PostOfficeBox: '',
PrintAddressContact: true,
PrintDepartment: false,
PrintDepartmentAddressContact: false,
PrintName: true,
StateI3D: null,
Street: '',
VariableBoolField01: false,
Zip: ''
},
{
AccountI3D: 1037,
AddressKind: 0,
BookKeepingNumber: null,
ChangedByI3D: 22,
City: 'Vienna',
Comment: 'Has a better castle than france.',
Contacts: [],
CountryI3D: 15,
CreatedByI3D: 22,
CurrencyI3D: 0,
Department: 'Vienna',
GeoInfo: null,
GeoInfoUpdateFailed: false,
I3D: 1067,
IsActive: true,
IsDefault: false,
IsPostOfficeBoxActive: false,
IsRMARequired: false,
LanguageI3D: 0,
OldReferenceI3D: 1072,
OldReferenceKind: 0,
PostOfficeBox: null,
PrintAddressContact: false,
PrintDepartment: false,
PrintDepartmentAddressContact: false,
PrintName: false,
StateI3D: null,
Street: null,
VariableBoolField01: null,
Zip: '1010'
},
{
AccountI3D: 1037,
AddressKind: 0,
BookKeepingNumber: null,
ChangedByI3D: 22,
City: 'Vienna',
Comment: 'Has a better castle than france.',
Contacts: [],
CountryI3D: 15,
CreatedByI3D: 22,
CurrencyI3D: 0,
Department: 'Vienna',
GeoInfo: null,
GeoInfoUpdateFailed: false,
I3D: 1068,
IsActive: true,
IsDefault: false,
IsPostOfficeBoxActive: false,
IsRMARequired: false,
LanguageI3D: 0,
OldReferenceI3D: 1073,
OldReferenceKind: 0,
PostOfficeBox: null,
PrintAddressContact: false,
PrintDepartment: false,
PrintDepartmentAddressContact: false,
PrintName: false,
StateI3D: null,
Street: null,
VariableBoolField01: null,
Zip: '1010'
}
],
AdvertisingNotAllowed: false,
AdvertisingNotAllowedInfo: null,
Adviser1I3D: null,
Adviser2I3D: null,
Adviser3I3D: null,
Adviser4I3D: null,
Adviser5I3D: null,
Adviser6I3D: null,
ChangedByI3D: 22,
Comment: 'Geändert für Test',
CommercialRegisterPage: null,
CompanyGroupI3D: null,
CreatedByI3D: 27,
CreatedThrough: 7,
Email: 'account@Test.test',
Fax: '',
FaxDistributor: false,
FreeText01: null,
I3D: 1037,
InstructionI3D: null,
InvoiceMailBCCReceiver: null,
IsActive: true,
IsInstructionActive: false,
IsLocked: false,
MailDistributor: false,
MandatorI3D: null,
Matchcode: 'uwu',
Name: 'Acer GmbH1',
Number: 38,
OriginI3D: null,
Phone: '111222333',
RevenueIdentificationNumber: '',
SalesAreaI3D: null,
TaxNumber: '',
TermsAndConditionEmployeeI3D: null,
TermsAndConditionReceivedDate: null,
UseSettingsFromCompanyGroupForReceipts: false,
WebSite: ''
}
@@ -0,0 +1,260 @@
{
AccountTypes: [
{
AccountType: {
I3D: 2,
IsActive: true,
IsFavorite: false,
Kind: 1,
Name: 'Lieferant'
},
CustomerData: null,
I3D: 1092,
SupplierData: {
BookKeepingCollectionAccount: null,
BookKeepingExportDate: null,
BookKeepingExportEmployeeI3D: null,
BookKeepingNumber: '',
CarrierShortSign: null,
CommentCreditVoucher: null,
CommentDeliveryList: null,
CommentInvoice: null,
CommentOffer: null,
CommentOrder: null,
ConcertoSupplierNumber: null,
Discount: 0.00,
EDIKind: 0,
EgisSupplierNumber: '',
FreightCost: 0.00,
FreightCostDirectDelivery: 0.00,
FreightCostFree: 0.00,
FreightCostFreeAtDirectDelivery: 0.00,
I3D: 10,
IsAlkaSupplier: false,
IsBookKeepingExportDeaktivated: false,
IsBookKeepingExportDone: false,
IsCarrier: false,
IsDirectDelivery: false,
IsDiscountAtPriceBase: false,
IsDistributor: false,
IsExclusiveOfVAT: false,
IsFavorite: false,
IsIsoCertified: false,
IsManufacturer: true,
ItScopeSupplierNumber: null,
Limit: 0.00,
LimitCalculationKind: null,
MinimumOrderValue: 0.00,
MinimumOrderValueAtDirectDelivery: 0.00,
Number: 70010,
OwnCustomerNumber: '',
PbsEasySupplierNumber: null,
PbsEasyX400MailAddress: null,
ReceiptConditionCreditVoucherI3D: null,
ReceiptConditionDeliveryOfferI3D: null,
ReceiptConditionDeliveryOrderI3D: null,
ReceiptConditionInvoiceI3D: null,
ReceiptConditionOfferI3D: null,
ReceiptConditionOrderI3D: null,
RMAInfo: '',
RMANeeded: false,
RootDirI3D: 247,
SmallQuantitiesExtraCharge: 0.00,
SmallQuantitiesExtraChargeAtDirectDelivery: 0.00,
SupplierClassification: -1,
TradersGuideSupplierI3D: null,
WarehouseI3D: null,
WEEE: ''
}
},
{
AccountType: {
I3D: 3,
IsActive: true,
IsFavorite: false,
Kind: 2,
Name: 'Kontakt'
},
CustomerData: null,
I3D: 1093,
SupplierData: null
}
],
Addresses: [
{
AccountI3D: 1037,
AddressKind: 0,
BookKeepingNumber: null,
ChangedByI3D: 22,
City: '',
Comment: '',
Contacts: [
{
AccountAddressI3D: 1050,
Birthday: null,
ChangedByI3D: 22,
Comment: '',
CreatedByI3D: 44,
DefaultSubstitute: false,
DefaultTicket: false,
DepartmentI3D: null,
DepartmentText: null,
Email1: '',
Email2: '',
Fax1: '',
Fax2: '',
Firstname: '',
FullName: ' , ',
I3D: 1062,
IsActive: true,
IsDefault: true,
IsInvoiceMailCCReceiver: false,
IsMailingAtEmail1Active: false,
IsMailingAtEmail2Active: false,
Job: '',
Lastname: ' ',
OldReferenceI3D: 21,
OldReferenceKind: 0,
Phone1: '',
Phone2: '',
Phone3: '',
Phone4: '',
Phone5: '',
Picture: '',
PictureExtension: null,
SalutationI3D: null,
SAMAccountName: null,
SearchTag: null,
SID: null,
VariableTextField01: null,
VariableTextField02: null
}
],
CountryI3D: 1,
CreatedByI3D: 44,
CurrencyI3D: 1,
Department: null,
GeoInfo: null,
GeoInfoUpdateFailed: false,
I3D: 1050,
IsActive: true,
IsDefault: true,
IsPostOfficeBoxActive: false,
IsRMARequired: false,
LanguageI3D: 15,
OldReferenceI3D: 18,
OldReferenceKind: 0,
PostOfficeBox: '',
PrintAddressContact: true,
PrintDepartment: false,
PrintDepartmentAddressContact: false,
PrintName: true,
StateI3D: null,
Street: '',
VariableBoolField01: false,
Zip: ''
},
{
AccountI3D: 1037,
AddressKind: 0,
BookKeepingNumber: null,
ChangedByI3D: 22,
City: 'Vienna',
Comment: 'Has a better castle than france.',
Contacts: [],
CountryI3D: 15,
CreatedByI3D: 22,
CurrencyI3D: 0,
Department: 'Vienna',
GeoInfo: null,
GeoInfoUpdateFailed: false,
I3D: 1067,
IsActive: true,
IsDefault: false,
IsPostOfficeBoxActive: false,
IsRMARequired: false,
LanguageI3D: 0,
OldReferenceI3D: 1072,
OldReferenceKind: 0,
PostOfficeBox: null,
PrintAddressContact: false,
PrintDepartment: false,
PrintDepartmentAddressContact: false,
PrintName: false,
StateI3D: null,
Street: null,
VariableBoolField01: null,
Zip: '1010'
},
{
AccountI3D: 1037,
AddressKind: 0,
BookKeepingNumber: null,
ChangedByI3D: 22,
City: 'Vienna',
Comment: 'Has a better castle than france.',
Contacts: [],
CountryI3D: 15,
CreatedByI3D: 22,
CurrencyI3D: 0,
Department: 'Vienna',
GeoInfo: null,
GeoInfoUpdateFailed: false,
I3D: 1068,
IsActive: true,
IsDefault: false,
IsPostOfficeBoxActive: false,
IsRMARequired: false,
LanguageI3D: 0,
OldReferenceI3D: 1073,
OldReferenceKind: 0,
PostOfficeBox: null,
PrintAddressContact: false,
PrintDepartment: false,
PrintDepartmentAddressContact: false,
PrintName: false,
StateI3D: null,
Street: null,
VariableBoolField01: null,
Zip: '1010'
}
],
AdvertisingNotAllowed: false,
AdvertisingNotAllowedInfo: null,
Adviser1I3D: null,
Adviser2I3D: null,
Adviser3I3D: null,
Adviser4I3D: null,
Adviser5I3D: null,
Adviser6I3D: null,
ChangedByI3D: 22,
Comment: 'Geändert für Test',
CommercialRegisterPage: null,
CompanyGroupI3D: null,
CreatedByI3D: 27,
CreatedThrough: 7,
Email: 'account@Test.test',
Fax: '',
FaxDistributor: false,
FreeText01: null,
I3D: 1037,
InstructionI3D: null,
InvoiceMailBCCReceiver: null,
IsActive: true,
IsInstructionActive: false,
IsLocked: false,
MailDistributor: false,
MandatorI3D: null,
Matchcode: 'uwu',
Name: 'Acer GmbH1',
Number: 38,
OriginI3D: null,
Phone: '111222333',
RevenueIdentificationNumber: '',
SalesAreaI3D: null,
TaxNumber: '',
TermsAndConditionEmployeeI3D: null,
TermsAndConditionReceivedDate: null,
UseSettingsFromCompanyGroupForReceipts: false,
WebSite: ''
}
@@ -0,0 +1,7 @@
{
Data: 0,
Error: null,
Message: 'Fehlendes Recht (Kunden Bankverbindung ändern) um Bankverbindung zu bearbeiten.',
MessageCode: 10000,
Status: 2
}
@@ -0,0 +1,7 @@
{
Data: 0,
Error: null,
Message: 'Der User besitzt nicht das Recht Kunden Infos zu bearbeiten.',
MessageCode: 10000,
Status: 2
}
@@ -0,0 +1,8 @@
{
AddressI3D: 1,
ContactI3D: 23,
CustomerI3D: 10000,
I3D: 0,
Message: null,
Success: true
}
@@ -0,0 +1,8 @@
{
AddressI3D: 1,
ContactI3D: 23,
CustomerI3D: 10000,
I3D: 0,
Message: null,
Success: true
}
@@ -0,0 +1,260 @@
{
AccountTypes: [
{
AccountType: {
I3D: 2,
IsActive: true,
IsFavorite: false,
Kind: 1,
Name: 'Lieferant'
},
CustomerData: null,
I3D: 1092,
SupplierData: {
BookKeepingCollectionAccount: null,
BookKeepingExportDate: null,
BookKeepingExportEmployeeI3D: null,
BookKeepingNumber: '',
CarrierShortSign: null,
CommentCreditVoucher: null,
CommentDeliveryList: null,
CommentInvoice: null,
CommentOffer: null,
CommentOrder: null,
ConcertoSupplierNumber: null,
Discount: 0.00,
EDIKind: 0,
EgisSupplierNumber: '',
FreightCost: 0.00,
FreightCostDirectDelivery: 0.00,
FreightCostFree: 0.00,
FreightCostFreeAtDirectDelivery: 0.00,
I3D: 10,
IsAlkaSupplier: false,
IsBookKeepingExportDeaktivated: false,
IsBookKeepingExportDone: false,
IsCarrier: false,
IsDirectDelivery: false,
IsDiscountAtPriceBase: false,
IsDistributor: false,
IsExclusiveOfVAT: false,
IsFavorite: false,
IsIsoCertified: false,
IsManufacturer: true,
ItScopeSupplierNumber: null,
Limit: 0.00,
LimitCalculationKind: null,
MinimumOrderValue: 0.00,
MinimumOrderValueAtDirectDelivery: 0.00,
Number: 70010,
OwnCustomerNumber: '',
PbsEasySupplierNumber: null,
PbsEasyX400MailAddress: null,
ReceiptConditionCreditVoucherI3D: null,
ReceiptConditionDeliveryOfferI3D: null,
ReceiptConditionDeliveryOrderI3D: null,
ReceiptConditionInvoiceI3D: null,
ReceiptConditionOfferI3D: null,
ReceiptConditionOrderI3D: null,
RMAInfo: '',
RMANeeded: false,
RootDirI3D: 247,
SmallQuantitiesExtraCharge: 0.00,
SmallQuantitiesExtraChargeAtDirectDelivery: 0.00,
SupplierClassification: -1,
TradersGuideSupplierI3D: null,
WarehouseI3D: null,
WEEE: ''
}
},
{
AccountType: {
I3D: 3,
IsActive: true,
IsFavorite: false,
Kind: 2,
Name: 'Kontakt'
},
CustomerData: null,
I3D: 1093,
SupplierData: null
}
],
Addresses: [
{
AccountI3D: 1037,
AddressKind: 0,
BookKeepingNumber: null,
ChangedByI3D: 22,
City: '',
Comment: '',
Contacts: [
{
AccountAddressI3D: 1050,
Birthday: null,
ChangedByI3D: 22,
Comment: '',
CreatedByI3D: 44,
DefaultSubstitute: false,
DefaultTicket: false,
DepartmentI3D: null,
DepartmentText: null,
Email1: '',
Email2: '',
Fax1: '',
Fax2: '',
Firstname: '',
FullName: ' , ',
I3D: 1062,
IsActive: true,
IsDefault: true,
IsInvoiceMailCCReceiver: false,
IsMailingAtEmail1Active: false,
IsMailingAtEmail2Active: false,
Job: '',
Lastname: ' ',
OldReferenceI3D: 21,
OldReferenceKind: 0,
Phone1: '',
Phone2: '',
Phone3: '',
Phone4: '',
Phone5: '',
Picture: '',
PictureExtension: null,
SalutationI3D: null,
SAMAccountName: null,
SearchTag: null,
SID: null,
VariableTextField01: null,
VariableTextField02: null
}
],
CountryI3D: 1,
CreatedByI3D: 44,
CurrencyI3D: 1,
Department: null,
GeoInfo: null,
GeoInfoUpdateFailed: false,
I3D: 1050,
IsActive: true,
IsDefault: true,
IsPostOfficeBoxActive: false,
IsRMARequired: false,
LanguageI3D: 1,
OldReferenceI3D: 18,
OldReferenceKind: 0,
PostOfficeBox: '',
PrintAddressContact: true,
PrintDepartment: false,
PrintDepartmentAddressContact: false,
PrintName: true,
StateI3D: null,
Street: '',
VariableBoolField01: false,
Zip: ''
},
{
AccountI3D: 1037,
AddressKind: 0,
BookKeepingNumber: null,
ChangedByI3D: 22,
City: 'Vienna',
Comment: 'Has a better castle than france.',
Contacts: [],
CountryI3D: 15,
CreatedByI3D: 22,
CurrencyI3D: 0,
Department: 'Vienna',
GeoInfo: null,
GeoInfoUpdateFailed: false,
I3D: 1067,
IsActive: true,
IsDefault: false,
IsPostOfficeBoxActive: false,
IsRMARequired: false,
LanguageI3D: 0,
OldReferenceI3D: 1072,
OldReferenceKind: 0,
PostOfficeBox: null,
PrintAddressContact: false,
PrintDepartment: false,
PrintDepartmentAddressContact: false,
PrintName: false,
StateI3D: null,
Street: null,
VariableBoolField01: null,
Zip: '1010'
},
{
AccountI3D: 1037,
AddressKind: 0,
BookKeepingNumber: null,
ChangedByI3D: 22,
City: 'Vienna',
Comment: 'Has a better castle than france.',
Contacts: [],
CountryI3D: 15,
CreatedByI3D: 22,
CurrencyI3D: 0,
Department: 'Vienna',
GeoInfo: null,
GeoInfoUpdateFailed: false,
I3D: 1068,
IsActive: true,
IsDefault: false,
IsPostOfficeBoxActive: false,
IsRMARequired: false,
LanguageI3D: 0,
OldReferenceI3D: 1073,
OldReferenceKind: 0,
PostOfficeBox: null,
PrintAddressContact: false,
PrintDepartment: false,
PrintDepartmentAddressContact: false,
PrintName: false,
StateI3D: null,
Street: null,
VariableBoolField01: null,
Zip: '1010'
}
],
AdvertisingNotAllowed: false,
AdvertisingNotAllowedInfo: null,
Adviser1I3D: null,
Adviser2I3D: null,
Adviser3I3D: null,
Adviser4I3D: null,
Adviser5I3D: null,
Adviser6I3D: null,
ChangedByI3D: 22,
Comment: 'Geändert für Test',
CommercialRegisterPage: null,
CompanyGroupI3D: null,
CreatedByI3D: 27,
CreatedThrough: 7,
Email: 'account@Test.test',
Fax: '',
FaxDistributor: false,
FreeText01: null,
I3D: 1037,
InstructionI3D: null,
InvoiceMailBCCReceiver: null,
IsActive: true,
IsInstructionActive: false,
IsLocked: false,
MailDistributor: false,
MandatorI3D: null,
Matchcode: 'uwu',
Name: 'Acer GmbH1',
Number: 38,
OriginI3D: null,
Phone: '111222333',
RevenueIdentificationNumber: '',
SalesAreaI3D: null,
TaxNumber: '',
TermsAndConditionEmployeeI3D: null,
TermsAndConditionReceivedDate: null,
UseSettingsFromCompanyGroupForReceipts: false,
WebSite: ''
}
@@ -0,0 +1,228 @@
{
AccountTypes: [
{
AccountType: {
I3D: 2,
IsActive: true,
IsFavorite: false,
Kind: 1,
Name: 'Lieferant'
},
CustomerData: null,
I3D: 1092,
SupplierData: {
BookKeepingCollectionAccount: null,
BookKeepingExportDate: null,
BookKeepingExportEmployeeI3D: null,
BookKeepingNumber: '',
CarrierShortSign: null,
CommentCreditVoucher: null,
CommentDeliveryList: null,
CommentInvoice: null,
CommentOffer: null,
CommentOrder: null,
ConcertoSupplierNumber: null,
Discount: 0.00,
EDIKind: 0,
EgisSupplierNumber: '',
FreightCost: 0.00,
FreightCostDirectDelivery: 0.00,
FreightCostFree: 0.00,
FreightCostFreeAtDirectDelivery: 0.00,
I3D: 10,
IsAlkaSupplier: false,
IsBookKeepingExportDeaktivated: false,
IsBookKeepingExportDone: false,
IsCarrier: false,
IsDirectDelivery: false,
IsDiscountAtPriceBase: false,
IsDistributor: false,
IsExclusiveOfVAT: false,
IsFavorite: false,
IsIsoCertified: false,
IsManufacturer: true,
ItScopeSupplierNumber: null,
Limit: 0.00,
LimitCalculationKind: null,
MinimumOrderValue: 0.00,
MinimumOrderValueAtDirectDelivery: 0.00,
Number: 70010,
OwnCustomerNumber: '',
PbsEasySupplierNumber: null,
PbsEasyX400MailAddress: null,
ReceiptConditionCreditVoucherI3D: null,
ReceiptConditionDeliveryOfferI3D: null,
ReceiptConditionDeliveryOrderI3D: null,
ReceiptConditionInvoiceI3D: null,
ReceiptConditionOfferI3D: null,
ReceiptConditionOrderI3D: null,
RMAInfo: '',
RMANeeded: false,
RootDirI3D: 247,
SmallQuantitiesExtraCharge: 0.00,
SmallQuantitiesExtraChargeAtDirectDelivery: 0.00,
SupplierClassification: -1,
TradersGuideSupplierI3D: null,
WarehouseI3D: null,
WEEE: ''
}
},
{
AccountType: {
I3D: 3,
IsActive: true,
IsFavorite: false,
Kind: 2,
Name: 'Kontakt'
},
CustomerData: null,
I3D: 1093,
SupplierData: null
}
],
Addresses: [
{
AccountI3D: 1037,
AddressKind: 0,
BookKeepingNumber: null,
ChangedByI3D: 22,
City: '',
Comment: '',
Contacts: [
{
AccountAddressI3D: 1050,
Birthday: null,
ChangedByI3D: 22,
Comment: '',
CreatedByI3D: 44,
DefaultSubstitute: false,
DefaultTicket: false,
DepartmentI3D: null,
DepartmentText: null,
Email1: '',
Email2: '',
Fax1: '',
Fax2: '',
Firstname: '',
FullName: ' , ',
I3D: 1062,
IsActive: true,
IsDefault: true,
IsInvoiceMailCCReceiver: false,
IsMailingAtEmail1Active: false,
IsMailingAtEmail2Active: false,
Job: '',
Lastname: ' ',
OldReferenceI3D: 21,
OldReferenceKind: 0,
Phone1: '',
Phone2: '',
Phone3: '',
Phone4: '',
Phone5: '',
Picture: '',
PictureExtension: null,
SalutationI3D: null,
SAMAccountName: null,
SearchTag: null,
SID: null,
VariableTextField01: null,
VariableTextField02: null
}
],
CountryI3D: 1,
CreatedByI3D: 44,
CurrencyI3D: 1,
Department: null,
GeoInfo: null,
GeoInfoUpdateFailed: false,
I3D: 1050,
IsActive: true,
IsDefault: true,
IsPostOfficeBoxActive: false,
IsRMARequired: false,
LanguageI3D: 1,
OldReferenceI3D: 18,
OldReferenceKind: 0,
PostOfficeBox: '',
PrintAddressContact: true,
PrintDepartment: false,
PrintDepartmentAddressContact: false,
PrintName: true,
StateI3D: null,
Street: '',
VariableBoolField01: false,
Zip: ''
},
{
AccountI3D: 1037,
AddressKind: 0,
BookKeepingNumber: null,
ChangedByI3D: 22,
City: 'Vienna',
Comment: 'Has a better castle than france.',
Contacts: [],
CountryI3D: 15,
CreatedByI3D: 22,
CurrencyI3D: 0,
Department: 'Vienna',
GeoInfo: null,
GeoInfoUpdateFailed: false,
I3D: 1067,
IsActive: true,
IsDefault: false,
IsPostOfficeBoxActive: false,
IsRMARequired: false,
LanguageI3D: 0,
OldReferenceI3D: 1072,
OldReferenceKind: 0,
PostOfficeBox: null,
PrintAddressContact: false,
PrintDepartment: false,
PrintDepartmentAddressContact: false,
PrintName: false,
StateI3D: null,
Street: null,
VariableBoolField01: null,
Zip: '1010'
}
],
AdvertisingNotAllowed: false,
AdvertisingNotAllowedInfo: null,
Adviser1I3D: null,
Adviser2I3D: null,
Adviser3I3D: null,
Adviser4I3D: null,
Adviser5I3D: null,
Adviser6I3D: null,
ChangedByI3D: 22,
Comment: 'Geändert für Test',
CommercialRegisterPage: null,
CompanyGroupI3D: null,
CreatedByI3D: 27,
CreatedThrough: 7,
Email: 'account@Test.test',
Fax: '',
FaxDistributor: false,
FreeText01: null,
I3D: 1037,
InstructionI3D: null,
InvoiceMailBCCReceiver: null,
IsActive: true,
IsInstructionActive: false,
IsLocked: false,
MailDistributor: false,
MandatorI3D: null,
Matchcode: 'uwu',
Name: 'Acer GmbH1',
Number: 38,
OriginI3D: null,
Phone: '111222333',
RevenueIdentificationNumber: '',
SalesAreaI3D: null,
TaxNumber: '',
TermsAndConditionEmployeeI3D: null,
TermsAndConditionReceivedDate: null,
UseSettingsFromCompanyGroupForReceipts: false,
WebSite: ''
}
@@ -0,0 +1,7 @@
{
Data: 0,
Error: null,
Message: 'Fehlendes Recht (Kunden Bankverbindung anlegen) um eine Bankverbindung anzulegen.',
MessageCode: 10000,
Status: 2
}
@@ -0,0 +1,50 @@
{
Data: {
AccountAddressI3D: 2,
Birthday: null,
ChangedByI3D: 44,
ChangedDate: DateTime,
ChangedVersion: '2.0.32.14',
Comment: '',
CreatedByI3D: 27,
CreatedDate: DateTime,
CreatedVersion: '2.0.27.5',
DefaultSubstitute: false,
DefaultTicket: false,
DepartmentI3D: 250,
DepartmentText: 'Schulungsverantwortlich',
Email1: 'support@c-entron.de',
Email2: '',
Fax1: '0731 96 88 4 72',
Fax2: '',
Firstname: 'Stephan',
FullName: 'Pitan, Stephan',
I3D: 4,
IsActive: true,
IsDefault: true,
IsInvoiceMailCCReceiver: false,
IsMailingAtEmail1Active: true,
IsMailingAtEmail2Active: false,
Job: '',
Lastname: 'Pitan',
OldReferenceI3D: 4,
OldReferenceKind: 0,
Phone1: '0731 96 88 4 321',
Phone2: '',
Phone3: '',
Phone4: '',
Phone5: '',
Picture: '',
PictureExtension: null,
SalutationI3D: 2,
SAMAccountName: null,
SearchTag: null,
SID: null,
VariableTextField01: 'Englisch\r\n',
VariableTextField02: ''
},
Error: null,
Message: null,
MessageCode: null,
Status: 0
}
@@ -0,0 +1,7 @@
{
Data: null,
Error: null,
Message: 'Der Ansprechpartner konnte nicht eindeutig identifiziert werden!',
MessageCode: null,
Status: 2
}
@@ -0,0 +1,50 @@
{
Data: {
AccountAddressI3D: 1,
Birthday: null,
ChangedByI3D: 44,
ChangedDate: DateTime,
ChangedVersion: '2.0.32.14',
Comment: '',
CreatedByI3D: 27,
CreatedDate: DateTime,
CreatedVersion: '2.0.27.5',
DefaultSubstitute: false,
DefaultTicket: false,
DepartmentI3D: 242,
DepartmentText: 'Geschäftsleitung',
Email1: 'bortoli@c-entron.de',
Email2: '',
Fax1: '',
Fax2: '',
Firstname: 'Andreas',
FullName: 'Bortoli, Andreas',
I3D: 1,
IsActive: true,
IsDefault: false,
IsInvoiceMailCCReceiver: false,
IsMailingAtEmail1Active: true,
IsMailingAtEmail2Active: false,
Job: '',
Lastname: 'Bortoli',
OldReferenceI3D: 2,
OldReferenceKind: 0,
Phone1: '0731.140399.333',
Phone2: '',
Phone3: '0160.90998665',
Phone4: '',
Phone5: '',
Picture: '',
PictureExtension: null,
SalutationI3D: 2,
SAMAccountName: null,
SearchTag: 'SearchTag',
SID: null,
VariableTextField01: '',
VariableTextField02: ''
},
Error: null,
Message: null,
MessageCode: null,
Status: 0
}
@@ -0,0 +1,50 @@
{
Data: {
AccountAddressI3D: 1,
Birthday: null,
ChangedByI3D: 44,
ChangedDate: DateTime,
ChangedVersion: '2.0.32.14',
Comment: 'EinDatum 09:31, ABO: hat neu Nachwuchs bekommen\r\n\r\nEinDatum 16:28, ABO: Mag Tennis und Schwimmen gerne',
CreatedByI3D: 27,
CreatedDate: DateTime,
CreatedVersion: '2.0.27.5',
DefaultSubstitute: false,
DefaultTicket: false,
DepartmentI3D: 244,
DepartmentText: 'Sekretariat',
Email1: 'ff@c-entron.de',
Email2: '',
Fax1: '0731-140399-399',
Fax2: '',
Firstname: 'Franziska',
FullName: 'Franzen, Franziska',
I3D: 2,
IsActive: true,
IsDefault: true,
IsInvoiceMailCCReceiver: false,
IsMailingAtEmail1Active: true,
IsMailingAtEmail2Active: false,
Job: '',
Lastname: 'Franzen',
OldReferenceI3D: 23,
OldReferenceKind: 0,
Phone1: '0731-140399-0',
Phone2: '',
Phone3: '',
Phone4: '',
Phone5: '',
Picture: '',
PictureExtension: null,
SalutationI3D: 1,
SAMAccountName: null,
SearchTag: null,
SID: null,
VariableTextField01: '',
VariableTextField02: ''
},
Error: null,
Message: null,
MessageCode: null,
Status: 0
}
@@ -0,0 +1,57 @@
using Centron.BusinessLogic;
using Centron.BusinessLogic.WebServices.Accounts;
using Centron.Tests.EndToEnd.Infrastructure;
using Xunit.Abstractions;
namespace Centron.Tests.EndToEnd.Tests.Account
{
public class AccountContactTests : EndToEndTest
{
private int _referenceAccountI3D = 1;
public AccountContactTests(ITestOutputHelper testOutputHelper)
: base(testOutputHelper)
{
}
public override void Execute()
{
this.PrepareDatabase();
this.SearchAccountContactsByAdSearchstring();
}
private void PrepareDatabase()
{
this.Sql("UPDATE AccountAddressContacts SET SearchTag = 'SearchTag' WHERE I3D = 1");
}
private void SearchAccountContactsByAdSearchstring()
{
using (var session = new BLSession())
{
var byEmailResult = session.GetBL<AccountSearchWebServiceBL>()
.SearchAccountContactByAdSearchstring(this._referenceAccountI3D, "support@c-entron.de");
this.Verifier.Verify("AccountContactByEmailResult", byEmailResult);
var bySearchtag = session.GetBL<AccountSearchWebServiceBL>()
.SearchAccountContactByAdSearchstring(this._referenceAccountI3D, "Searchtag");
this.Verifier.Verify("AccountContactBySearchTagResult", bySearchtag);
var defaultResult = session.GetBL<AccountSearchWebServiceBL>()
.SearchAccountContactByAdSearchstring(this._referenceAccountI3D, "youWontFindThisTextAnywhere");
this.Verifier.Verify("AccountContactDefaultResult", defaultResult);
this.Sql("UPDATE AccountAddressContacts SET SearchTag = 'SearchTag' WHERE I3D = 2");
var bySearchtag2 = session.GetBL<AccountSearchWebServiceBL>()
.SearchAccountContactByAdSearchstring(this._referenceAccountI3D, "Searchtag");
this.Verifier.Verify("AccountContactBySearchTag2Result", bySearchtag2);
}
}
}
}
@@ -0,0 +1,112 @@
using System.Collections.Generic;
using Centron.BusinessLogic;
using Centron.BusinessLogic.WebServices.Accounts.AccountContracts;
using Centron.Interfaces.Accounts.AccountContracts;
using Centron.Tests.EndToEnd.Infrastructure;
using Centron.Tests.EndToEnd.Infrastructure.Verifier;
using CentronSoftware.Centron.WebServices.Entities.Accounts.AccountContracts;
using Xunit.Abstractions;
namespace Centron.Tests.EndToEnd.Tests.Account.AccountContracts
{
public class AccountContractKindTests : EndToEndTest
{
public AccountContractKindTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper)
{
Verifier.Settings.IgnoreProperty<AccountContractKindDTO>(f => f.CreatedVersion);
Verifier.Settings.IgnoreProperty<AccountContractKindDTO>(f => f.ChangedVersion);
Verifier.Settings.IgnoreProperty<AccountContractKindDTO>(f => f.CreatedDate);
Verifier.Settings.IgnoreProperty<AccountContractKindDTO>(f => f.ChangedDate);
}
public override void Execute()
{
using (var session = new BLSession())
{
var testedBL = session.GetBL<AccountContractKindWebServiceBL>();
CreateAccountContractKind(testedBL);
CreateAccountContractKindFailing(testedBL);
GetAccountContractKindByI3D(testedBL);
// insert additional contracts
CreateAdditionalAccountContractKinds(testedBL);
GetAccountContractKinds(testedBL);
CreateAccountContractFromKind(session.GetBL<AccountContractWebServiceBL>());
}
}
private void CreateAccountContractKind(AccountContractKindWebServiceBL testedBL)
{
var newEntity = CreateTestAccountContractKind();
var saveResult = testedBL.SaveAccountContractKind(this.GetLoggedInUser(), newEntity);
this.Verifier.Verify("SaveNewAccountContractKind_Successful", saveResult);
}
private void CreateAccountContractKindFailing(AccountContractKindWebServiceBL testedBL)
{
var newEntity = new AccountContractKindDTO();
var saveResult = testedBL.SaveAccountContractKind(this.GetLoggedInUser(), newEntity);
this.Verifier.Verify("SaveNewAccountContractKind_Failing", saveResult);
}
private void GetAccountContractKindByI3D(AccountContractKindWebServiceBL testedBL)
{
var result = testedBL.GetAccountContractKindByI3D(this.GetLoggedInUser(), 1);
this.Verifier.Verify("GetAccountContractKindByI3D_Result", result);
}
private void GetAccountContractKinds(AccountContractKindWebServiceBL testedBL)
{
var filter = new GetAccountContractKindsFilter();
filter.IsActive = true;
filter.BranchI3Ds = new List<int> { 0 };
var result = testedBL.GetAccountContractKinds(this.GetLoggedInUser(), filter);
this.Verifier.Verify("GetAccountContractKinds", result);
}
private void CreateAdditionalAccountContractKinds(AccountContractKindWebServiceBL testedBL)
{
var newEntity = CreateTestAccountContractKind();
newEntity.Name = "Vorlage 1";
newEntity.BranchI3D = 1;
testedBL.SaveAccountContractKind(this.GetLoggedInUser(), newEntity);
newEntity = CreateTestAccountContractKind();
newEntity.Name = "Vorlage 2";
newEntity.BranchI3D = 0;
newEntity.IsDeleted = true;
testedBL.SaveAccountContractKind(this.GetLoggedInUser(), newEntity);
newEntity = CreateTestAccountContractKind();
newEntity.Name = "Vorlage 3";
newEntity.BranchI3D = 0;
testedBL.SaveAccountContractKind(this.GetLoggedInUser(), newEntity);
}
private void CreateAccountContractFromKind(AccountContractWebServiceBL testedBL)
{
var verifier = new CentronVerifierSettings();
verifier.IgnoreProperty<AccountContractDTO>(f => f.CreatedVersion);
verifier.IgnoreProperty<AccountContractDTO>(f => f.ChangedVersion);
verifier.IgnoreProperty<AccountContractDTO>(f => f.CreatedDate);
verifier.IgnoreProperty<AccountContractDTO>(f => f.ChangedDate);
var result = testedBL.CreateAccountContractFromKind(this.GetLoggedInUser(), 1, 1029);
Verifier.Verify("CreateAccountContractFromKind_WithAccountRef", result, verifier);
result = testedBL.CreateAccountContractFromKind(this.GetLoggedInUser(), 1, null);
Verifier.Verify("CreateAccountContractFromKind_WithoutAccountRef", result, verifier);
}
private AccountContractKindDTO CreateTestAccountContractKind()
{
var entity = new AccountContractKindDTO();
entity.Name = "Telekom Handy Vertrag";
entity.AutomatedProlongation = true;
entity.Prolongation = 12;
entity.BranchI3D = 0;
entity.CountryI3D = 1;
return entity;
}
}
}
@@ -0,0 +1,113 @@
using System;
using System.Collections.Generic;
using Centron.BusinessLogic;
using Centron.BusinessLogic.WebServices.Accounts.AccountContracts;
using Centron.Interfaces.Accounts.AccountContracts;
using Centron.Tests.EndToEnd.Infrastructure;
using CentronSoftware.Centron.WebServices.Entities.Accounts.AccountContracts;
using Xunit.Abstractions;
namespace Centron.Tests.EndToEnd.Tests.Account.AccountContracts
{
public class AccountContractTests : EndToEndTest
{
public AccountContractTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper)
{
Verifier.Settings.IgnoreProperty<AccountContractDTO>(f => f.CreatedVersion);
Verifier.Settings.IgnoreProperty<AccountContractDTO>(f => f.ChangedVersion);
Verifier.Settings.IgnoreProperty<AccountContractDTO>(f => f.CreatedDate);
Verifier.Settings.IgnoreProperty<AccountContractDTO>(f => f.ChangedDate);
}
public override void Execute()
{
using (var session = new BLSession())
{
var accountContractBL = session.GetBL<AccountContractWebServiceBL>();
CreateAccountContract(accountContractBL);
CreateAccountContractFailing(accountContractBL);
GetAccountContractByI3D(accountContractBL);
// insert additional contracts
CreateAdditionalAccountContracts(accountContractBL);
GetAccountContracts(accountContractBL);
}
}
private void CreateAccountContract(AccountContractWebServiceBL accountContractBL)
{
var newAccountContract = CreateTestAccountContract();
var saveResult = accountContractBL.SaveAccountContract(this.GetLoggedInUser(), newAccountContract);
this.Verifier.Verify("SaveNewAccountContract_Successful", saveResult);
}
private void CreateAccountContractFailing(AccountContractWebServiceBL accountContractBL)
{
var newAccountContract = new AccountContractDTO();
var saveResult = accountContractBL.SaveAccountContract(this.GetLoggedInUser(), newAccountContract);
this.Verifier.Verify("SaveNewAccountContract_Failing", saveResult);
}
private void GetAccountContractByI3D(AccountContractWebServiceBL accountContractBL)
{
var result = accountContractBL.GetAccountContractByI3D(this.GetLoggedInUser(), 1);
this.Verifier.Verify("GetAccountContractByI3D_Result", result);
}
private void GetAccountContracts(AccountContractWebServiceBL accountContractBL)
{
var filter = new GetAccountContractsFilter();
filter.IsActive = true;
filter.AccountI3Ds = new List<int> { 1029 };
filter.BranchI3Ds = new List<int> { 0 };
filter.AccountContractKindI3Ds = new List<int> { 1 };
var result = accountContractBL.GetAccountContracts(this.GetLoggedInUser(), filter);
this.Verifier.Verify("GetAccountContracts", result);
}
private void CreateAdditionalAccountContracts(AccountContractWebServiceBL accountContractBL)
{
var newAccountContract = CreateTestAccountContract();
newAccountContract.Name = "Handy Vertrag Thomas Bauer";
newAccountContract.BranchI3D = 1;
accountContractBL.SaveAccountContract(this.GetLoggedInUser(), newAccountContract);
newAccountContract = CreateTestAccountContract();
newAccountContract.Name = "Handy Vertrag Sandra Hallow";
newAccountContract.BranchI3D = 0;
newAccountContract.IsClosed = true;
accountContractBL.SaveAccountContract(this.GetLoggedInUser(), newAccountContract);
newAccountContract = CreateTestAccountContract();
newAccountContract.Name = "Handy Vertrag Klara Walz";
newAccountContract.BranchI3D = 0;
newAccountContract.IsClosed = false;
accountContractBL.SaveAccountContract(this.GetLoggedInUser(), newAccountContract);
}
private AccountContractDTO CreateTestAccountContract()
{
var accountContract = new AccountContractDTO();
accountContract.ReferenceNumber = "Ref123";
accountContract.Date = new DateTime(2021, 2, 5);
accountContract.AccountI3D = 1029;
accountContract.Name = "Handy Vertrag James Müller";
accountContract.ContractBegin = new DateTime(2021,1,1);
accountContract.AutomatedProlongation = true;
accountContract.Prolongation = 12;
accountContract.BranchI3D = 0;
accountContract.NetTotalPrice = 40;
accountContract.GrossTotalPrice = 47.6m;
accountContract.CurrencyI3D = 1;
accountContract.CurrencyFactor = 1;
accountContract.CurrencyString = "€";
accountContract.AdditionalText = "Telekom MagentaMobil M";
accountContract.Email = "miller@telekom.de";
accountContract.CountryI3D = 1;
accountContract.AccountContractKindI3D = 1;
return accountContract;
}
}
}
@@ -0,0 +1,48 @@
{
Data: {
AccountContractKindI3D: 1,
AccountI3D: 1029,
AdditionalText: null,
AutomatedProlongation: true,
BranchI3D: 0,
ChangedByI3D: 0,
ContractBegin: null,
ContractEnd: null,
ContractTermination: null,
CountryI3D: 1,
CreatedByI3D: 0,
CurrencyFactor: 1.0,
CurrencyI3D: 0,
CurrencyString: null,
Date: DateTime,
DirectoryI3D: null,
Duration: null,
DurationKind: null,
DurationTime: null,
Email: 'Tabea.Reibestein@ingrammicro.de',
EmployeeI3D: null,
Fax: '089-4208-1475',
FinishDate: null,
GrossTotalPrice: 0.0,
I3D: 0,
Information: null,
IsClosed: false,
Name: 'Telekom Handy Vertrag',
NetTotalPrice: 0.0,
Phone: '089-4208-0',
Prolongation: 12,
ReferenceNumber: null,
ReminderDate: null,
TerminationDeadlineDuration1: null,
TerminationDeadlineDuration2: null,
TerminationDeadlineKind1: null,
TerminationDeadlineKind2: null,
TerminationKind: null,
TerminationReason: null,
ToDoI3D: null
},
Error: null,
Message: null,
MessageCode: null,
Status: 0
}
@@ -0,0 +1,48 @@
{
Data: {
AccountContractKindI3D: 1,
AccountI3D: 0,
AdditionalText: null,
AutomatedProlongation: true,
BranchI3D: 0,
ChangedByI3D: 0,
ContractBegin: null,
ContractEnd: null,
ContractTermination: null,
CountryI3D: 1,
CreatedByI3D: 0,
CurrencyFactor: 1.0,
CurrencyI3D: 0,
CurrencyString: null,
Date: DateTime,
DirectoryI3D: null,
Duration: null,
DurationKind: null,
DurationTime: null,
Email: null,
EmployeeI3D: null,
Fax: null,
FinishDate: null,
GrossTotalPrice: 0.0,
I3D: 0,
Information: null,
IsClosed: false,
Name: 'Telekom Handy Vertrag',
NetTotalPrice: 0.0,
Phone: null,
Prolongation: 12,
ReferenceNumber: null,
ReminderDate: null,
TerminationDeadlineDuration1: null,
TerminationDeadlineDuration2: null,
TerminationDeadlineKind1: null,
TerminationDeadlineKind2: null,
TerminationKind: null,
TerminationReason: null,
ToDoI3D: null
},
Error: null,
Message: null,
MessageCode: null,
Status: 0
}
@@ -0,0 +1,48 @@
{
Data: {
AccountContractKindI3D: 1,
AccountI3D: 1029,
AdditionalText: 'Telekom MagentaMobil M',
AutomatedProlongation: true,
BranchI3D: 0,
ChangedByI3D: 22,
ContractBegin: DateTime,
ContractEnd: null,
ContractTermination: null,
CountryI3D: 1,
CreatedByI3D: 22,
CurrencyFactor: 1.0,
CurrencyI3D: 1,
CurrencyString: '€',
Date: DateTime,
DirectoryI3D: 22396,
Duration: null,
DurationKind: null,
DurationTime: null,
Email: 'miller@telekom.de',
EmployeeI3D: null,
Fax: null,
FinishDate: null,
GrossTotalPrice: 47.6,
I3D: 1,
Information: null,
IsClosed: false,
Name: 'Handy Vertrag James Müller',
NetTotalPrice: 40.0,
Phone: null,
Prolongation: 12,
ReferenceNumber: 'Ref123',
ReminderDate: null,
TerminationDeadlineDuration1: null,
TerminationDeadlineDuration2: null,
TerminationDeadlineKind1: null,
TerminationDeadlineKind2: null,
TerminationKind: null,
TerminationReason: null,
ToDoI3D: null
},
Error: null,
Message: null,
MessageCode: null,
Status: 0
}
@@ -0,0 +1,32 @@
{
Data: {
AutomatedProlongation: true,
BranchI3D: 0,
ChangedByI3D: 22,
CountryI3D: 1,
CreatedByI3D: 22,
CurrencyFactor: null,
CurrencyI3D: null,
CurrencyString: null,
Duration: null,
DurationKind: null,
DurationTime: null,
GrossTotalPrice: null,
I3D: 1,
Information: null,
IsDeleted: false,
Name: 'Telekom Handy Vertrag',
NetTotalPrice: null,
Prolongation: 12,
TerminationDeadlineDuration1: null,
TerminationDeadlineDuration2: null,
TerminationDeadlineKind1: null,
TerminationDeadlineKind2: null,
TerminationKind: null,
TerminationReason: null
},
Error: null,
Message: null,
MessageCode: null,
Status: 0
}
@@ -0,0 +1,60 @@
{
Data: [
{
AutomatedProlongation: true,
BranchI3D: 0,
ChangedByI3D: 22,
CountryI3D: 1,
CreatedByI3D: 22,
CurrencyFactor: null,
CurrencyI3D: null,
CurrencyString: null,
Duration: null,
DurationKind: null,
DurationTime: null,
GrossTotalPrice: null,
I3D: 1,
Information: null,
IsDeleted: false,
Name: 'Telekom Handy Vertrag',
NetTotalPrice: null,
Prolongation: 12,
TerminationDeadlineDuration1: null,
TerminationDeadlineDuration2: null,
TerminationDeadlineKind1: null,
TerminationDeadlineKind2: null,
TerminationKind: null,
TerminationReason: null
},
{
AutomatedProlongation: true,
BranchI3D: 0,
ChangedByI3D: 22,
CountryI3D: 1,
CreatedByI3D: 22,
CurrencyFactor: null,
CurrencyI3D: null,
CurrencyString: null,
Duration: null,
DurationKind: null,
DurationTime: null,
GrossTotalPrice: null,
I3D: 4,
Information: null,
IsDeleted: false,
Name: 'Vorlage 3',
NetTotalPrice: null,
Prolongation: 12,
TerminationDeadlineDuration1: null,
TerminationDeadlineDuration2: null,
TerminationDeadlineKind1: null,
TerminationDeadlineKind2: null,
TerminationKind: null,
TerminationReason: null
}
],
Error: null,
Message: null,
MessageCode: null,
Status: 0
}
@@ -0,0 +1,92 @@
{
Data: [
{
AccountContractKindI3D: 1,
AccountI3D: 1029,
AdditionalText: 'Telekom MagentaMobil M',
AutomatedProlongation: true,
BranchI3D: 0,
ChangedByI3D: 22,
ContractBegin: DateTime,
ContractEnd: null,
ContractTermination: null,
CountryI3D: 1,
CreatedByI3D: 22,
CurrencyFactor: 1.0,
CurrencyI3D: 1,
CurrencyString: '€',
Date: DateTime,
DirectoryI3D: 22396,
Duration: null,
DurationKind: null,
DurationTime: null,
Email: 'miller@telekom.de',
EmployeeI3D: null,
Fax: null,
FinishDate: null,
GrossTotalPrice: 47.6,
I3D: 1,
Information: null,
IsClosed: false,
Name: 'Handy Vertrag James Müller',
NetTotalPrice: 40.0,
Phone: null,
Prolongation: 12,
ReferenceNumber: 'Ref123',
ReminderDate: null,
TerminationDeadlineDuration1: null,
TerminationDeadlineDuration2: null,
TerminationDeadlineKind1: null,
TerminationDeadlineKind2: null,
TerminationKind: null,
TerminationReason: null,
ToDoI3D: null
},
{
AccountContractKindI3D: 1,
AccountI3D: 1029,
AdditionalText: 'Telekom MagentaMobil M',
AutomatedProlongation: true,
BranchI3D: 0,
ChangedByI3D: 22,
ContractBegin: DateTime,
ContractEnd: null,
ContractTermination: null,
CountryI3D: 1,
CreatedByI3D: 22,
CurrencyFactor: 1.0,
CurrencyI3D: 1,
CurrencyString: '€',
Date: DateTime,
DirectoryI3D: 22399,
Duration: null,
DurationKind: null,
DurationTime: null,
Email: 'miller@telekom.de',
EmployeeI3D: null,
Fax: null,
FinishDate: null,
GrossTotalPrice: 47.6,
I3D: 4,
Information: null,
IsClosed: false,
Name: 'Handy Vertrag Klara Walz',
NetTotalPrice: 40.0,
Phone: null,
Prolongation: 12,
ReferenceNumber: 'Ref123',
ReminderDate: null,
TerminationDeadlineDuration1: null,
TerminationDeadlineDuration2: null,
TerminationDeadlineKind1: null,
TerminationDeadlineKind2: null,
TerminationKind: null,
TerminationReason: null,
ToDoI3D: null
}
],
Error: null,
Message: null,
MessageCode: null,
Status: 0
}
@@ -0,0 +1,7 @@
{
Data: null,
Error: null,
Message: 'Kein Name angegeben\r\n',
MessageCode: 10005,
Status: 2
}
@@ -0,0 +1,32 @@
{
Data: {
AutomatedProlongation: true,
BranchI3D: 0,
ChangedByI3D: 22,
CountryI3D: 1,
CreatedByI3D: 22,
CurrencyFactor: null,
CurrencyI3D: null,
CurrencyString: null,
Duration: null,
DurationKind: null,
DurationTime: null,
GrossTotalPrice: null,
I3D: 1,
Information: null,
IsDeleted: false,
Name: 'Telekom Handy Vertrag',
NetTotalPrice: null,
Prolongation: 12,
TerminationDeadlineDuration1: null,
TerminationDeadlineDuration2: null,
TerminationDeadlineKind1: null,
TerminationDeadlineKind2: null,
TerminationKind: null,
TerminationReason: null
},
Error: null,
Message: null,
MessageCode: null,
Status: 0
}
@@ -0,0 +1,7 @@
{
Data: null,
Error: null,
Message: 'Kein Konto angegeben\r\nKein Name angegeben\r\n',
MessageCode: 10005,
Status: 2
}
@@ -0,0 +1,48 @@
{
Data: {
AccountContractKindI3D: 1,
AccountI3D: 1029,
AdditionalText: 'Telekom MagentaMobil M',
AutomatedProlongation: true,
BranchI3D: 0,
ChangedByI3D: 22,
ContractBegin: DateTime,
ContractEnd: null,
ContractTermination: null,
CountryI3D: 1,
CreatedByI3D: 22,
CurrencyFactor: 1.0,
CurrencyI3D: 1,
CurrencyString: '€',
Date: DateTime,
DirectoryI3D: 22396,
Duration: null,
DurationKind: null,
DurationTime: null,
Email: 'miller@telekom.de',
EmployeeI3D: null,
Fax: null,
FinishDate: null,
GrossTotalPrice: 47.6,
I3D: 1,
Information: null,
IsClosed: false,
Name: 'Handy Vertrag James Müller',
NetTotalPrice: 40.0,
Phone: null,
Prolongation: 12,
ReferenceNumber: 'Ref123',
ReminderDate: null,
TerminationDeadlineDuration1: null,
TerminationDeadlineDuration2: null,
TerminationDeadlineKind1: null,
TerminationDeadlineKind2: null,
TerminationKind: null,
TerminationReason: null,
ToDoI3D: null
},
Error: null,
Message: null,
MessageCode: null,
Status: 0
}
@@ -0,0 +1,129 @@
using System;
using Centron.BusinessLogic;
using Centron.BusinessLogic.Accounts;
using Centron.Interfaces.Accounts;
using Centron.Interfaces.BL;
using Centron.Tests.EndToEnd.Infrastructure;
using CentronSoftware.Centron.WebServices.Entities.Accounts;
using Xunit.Abstractions;
namespace Centron.Tests.EndToEnd.Tests.Account
{
public class AccountRelationshipTests : EndToEndTest
{
// Example Partners
private const int MicrosoftAccountI3D = 1036;
private const int MicrosoftAccountContactI3D = 1061;
private const int HPAccountI3D = 1034;
private const int HPAccountContactI3D = 1059;
// Example Accounts
private const int CentronAccountI3D = 1;
private const int CentronAccountContactI3D = 4;
private const int MuellerAccountI3D = 10;
private const int StadtvTuttlAccountI3D = 16;
private const int CelosSoftAccountI3D = 1028;
public AccountRelationshipTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper)
{
}
public override void Execute()
{
using (var session = new BLSession())
{
CreateRelationships(session);
UpdateRelationshipSettings(session);
ValidateRelationships(session, 1);
RemoveRelationship(session);
ValidateRelationships(session, 2);
CreateDublicateRelationship(session);
SearchSpecificRelationships(session);
}
}
private void CreateRelationships(BLSession session)
{
var bl = session.GetBL<AccountBL>();
// Add some accounts to Microsoft GmbH
bl.AddPartnerTooAccount(CentronAccountI3D, MicrosoftAccountI3D, MicrosoftAccountContactI3D);
bl.AddPartnerTooAccount(MuellerAccountI3D, MicrosoftAccountI3D, MicrosoftAccountContactI3D);
bl.AddPartnerTooAccount(StadtvTuttlAccountI3D, MicrosoftAccountI3D, MicrosoftAccountContactI3D);
bl.AddPartnerTooAccount(CelosSoftAccountI3D, MicrosoftAccountI3D, MicrosoftAccountContactI3D);
bl.AddPartnerTooAccount(HPAccountI3D, MicrosoftAccountI3D, MicrosoftAccountContactI3D);
// Add some accounts to Hewlett Packard
bl.AddPartnerTooAccount(MuellerAccountI3D, HPAccountI3D, HPAccountContactI3D);
bl.AddPartnerTooAccount(StadtvTuttlAccountI3D, HPAccountI3D, HPAccountContactI3D);
bl.AddPartnerTooAccount(CelosSoftAccountI3D, HPAccountI3D, HPAccountContactI3D);
bl.AddPartnerTooAccount(StadtvTuttlAccountI3D, CentronAccountI3D, CentronAccountContactI3D);
}
private void CreateDublicateRelationship(BLSession session)
{
var bl = session.GetBL<AccountBL>();
bl.AddPartnerTooAccount(CentronAccountI3D, MicrosoftAccountI3D, MicrosoftAccountContactI3D);
}
private void UpdateRelationshipSettings(BLSession session)
{
var bl = session.GetBL<AccountBL>();
var relationship = new AccountRelationshipDTO()
{
AccountI3D = StadtvTuttlAccountI3D,
PartnerAccountI3D = MicrosoftAccountI3D,
PartnerAccountContactI3D = MicrosoftAccountContactI3D,
NotifyAtCrmActivities = true,
NotifyAtOrders = true,
IsTelekomDivePartner = true
};
bl.UpdatePartnerInfo(relationship);
}
private void ValidateRelationships(BLSession session, int runCount)
{
var bl = session.GetBL<AccountBL>();
var result = bl.GetAccountRelationships(new AccountRelationshipFilter()
{
FilterKind = AccountRelationshipFilterKind.GetAllPartners
});
Verifier.Verify($"AccountRelationship_ValidateRelationships[{runCount}]_AllPartners", result);
result = bl.GetAccountRelationships(new AccountRelationshipFilter()
{
FilterKind = AccountRelationshipFilterKind.GetRelationshipsForAccount,
AccountI3D = MicrosoftAccountI3D
});
Verifier.Verify($"AccountRelationship_ValidateRelationships[{runCount}]_RelationshipsMicrosoftGmbHAccount", result);
result = bl.GetAccountRelationships(new AccountRelationshipFilter()
{
FilterKind = AccountRelationshipFilterKind.GetRelationshipsForAccount,
AccountI3D = CentronAccountI3D
});
Verifier.Verify($"AccountRelationship_ValidateRelationships[{runCount}]_RelationshipsCentronAccount", result);
}
private void SearchSpecificRelationships(BLSession session)
{
var bl = session.GetBL<AccountBL>();
var result = bl.GetAccountRelationships(new AccountRelationshipFilter()
{
FilterKind = AccountRelationshipFilterKind.GetRelationshipsForAccount,
AccountI3D = StadtvTuttlAccountI3D,
IsNotifyAtCrmActivitiesActive = true
});
Verifier.Verify("SearchSpecificRelationships", result);
}
private void RemoveRelationship(BLSession session)
{
var bl = session.GetBL<AccountBL>();
bl.RemovePartnerFromAccount(CelosSoftAccountI3D, MicrosoftAccountI3D, null);
}
}
}
@@ -0,0 +1,56 @@
[
{
AccountI3D: 1,
AccountName: 'c-entron software gmbh',
IsTelekomDivePartner: false,
NotifyAtCrmActivities: false,
NotifyAtCrmActivitiesBCC: false,
NotifyAtCrmActivitiesTo: false,
NotifyAtOffers: false,
NotifyAtOrders: false,
PartnerAccountContact: null,
PartnerAccountContactDepartment: null,
PartnerAccountContactI3D: null,
PartnerAccountContactJob: null,
PartnerAccountContactMail: null,
PartnerAccountContactPhone: null,
PartnerAccountI3D: null,
PartnerAccountName: null
},
{
AccountI3D: 1034,
AccountName: 'Hewlett Packard GmbH',
IsTelekomDivePartner: false,
NotifyAtCrmActivities: false,
NotifyAtCrmActivitiesBCC: false,
NotifyAtCrmActivitiesTo: false,
NotifyAtOffers: false,
NotifyAtOrders: false,
PartnerAccountContact: null,
PartnerAccountContactDepartment: null,
PartnerAccountContactI3D: null,
PartnerAccountContactJob: null,
PartnerAccountContactMail: null,
PartnerAccountContactPhone: null,
PartnerAccountI3D: null,
PartnerAccountName: null
},
{
AccountI3D: 1036,
AccountName: 'Microsoft GmbH',
IsTelekomDivePartner: false,
NotifyAtCrmActivities: false,
NotifyAtCrmActivitiesBCC: false,
NotifyAtCrmActivitiesTo: false,
NotifyAtOffers: false,
NotifyAtOrders: false,
PartnerAccountContact: null,
PartnerAccountContactDepartment: null,
PartnerAccountContactI3D: null,
PartnerAccountContactJob: null,
PartnerAccountContactMail: null,
PartnerAccountContactPhone: null,
PartnerAccountI3D: null,
PartnerAccountName: null
}
]
@@ -0,0 +1,38 @@
[
{
AccountI3D: 16,
AccountName: 'Stadtverwaltung Tuttlingen',
IsTelekomDivePartner: false,
NotifyAtCrmActivities: false,
NotifyAtCrmActivitiesBCC: false,
NotifyAtCrmActivitiesTo: false,
NotifyAtOffers: false,
NotifyAtOrders: false,
PartnerAccountContact: 'Herr Stephan Pitan',
PartnerAccountContactDepartment: 'Schulungsverantwortlich',
PartnerAccountContactI3D: 4,
PartnerAccountContactJob: '',
PartnerAccountContactMail: 'support@c-entron.de',
PartnerAccountContactPhone: '0731 96 88 4 321',
PartnerAccountI3D: 1,
PartnerAccountName: 'c-entron software gmbh'
},
{
AccountI3D: 1,
AccountName: 'c-entron software gmbh',
IsTelekomDivePartner: false,
NotifyAtCrmActivities: false,
NotifyAtCrmActivitiesBCC: false,
NotifyAtCrmActivitiesTo: false,
NotifyAtOffers: false,
NotifyAtOrders: false,
PartnerAccountContact: '',
PartnerAccountContactDepartment: null,
PartnerAccountContactI3D: 1061,
PartnerAccountContactJob: '',
PartnerAccountContactMail: '',
PartnerAccountContactPhone: '',
PartnerAccountI3D: 1036,
PartnerAccountName: 'Microsoft GmbH'
}
]
@@ -0,0 +1,92 @@
[
{
AccountI3D: 1,
AccountName: 'c-entron software gmbh',
IsTelekomDivePartner: false,
NotifyAtCrmActivities: false,
NotifyAtCrmActivitiesBCC: false,
NotifyAtCrmActivitiesTo: false,
NotifyAtOffers: false,
NotifyAtOrders: false,
PartnerAccountContact: '',
PartnerAccountContactDepartment: null,
PartnerAccountContactI3D: 1061,
PartnerAccountContactJob: '',
PartnerAccountContactMail: '',
PartnerAccountContactPhone: '',
PartnerAccountI3D: 1036,
PartnerAccountName: 'Microsoft GmbH'
},
{
AccountI3D: 10,
AccountName: 'Müller GmbH',
IsTelekomDivePartner: false,
NotifyAtCrmActivities: false,
NotifyAtCrmActivitiesBCC: false,
NotifyAtCrmActivitiesTo: false,
NotifyAtOffers: false,
NotifyAtOrders: false,
PartnerAccountContact: '',
PartnerAccountContactDepartment: null,
PartnerAccountContactI3D: 1061,
PartnerAccountContactJob: '',
PartnerAccountContactMail: '',
PartnerAccountContactPhone: '',
PartnerAccountI3D: 1036,
PartnerAccountName: 'Microsoft GmbH'
},
{
AccountI3D: 16,
AccountName: 'Stadtverwaltung Tuttlingen',
IsTelekomDivePartner: true,
NotifyAtCrmActivities: true,
NotifyAtCrmActivitiesBCC: false,
NotifyAtCrmActivitiesTo: false,
NotifyAtOffers: false,
NotifyAtOrders: true,
PartnerAccountContact: '',
PartnerAccountContactDepartment: null,
PartnerAccountContactI3D: 1061,
PartnerAccountContactJob: '',
PartnerAccountContactMail: '',
PartnerAccountContactPhone: '',
PartnerAccountI3D: 1036,
PartnerAccountName: 'Microsoft GmbH'
},
{
AccountI3D: 1028,
AccountName: 'Celos Software GmbH.\r\n',
IsTelekomDivePartner: false,
NotifyAtCrmActivities: false,
NotifyAtCrmActivitiesBCC: false,
NotifyAtCrmActivitiesTo: false,
NotifyAtOffers: false,
NotifyAtOrders: false,
PartnerAccountContact: '',
PartnerAccountContactDepartment: null,
PartnerAccountContactI3D: 1061,
PartnerAccountContactJob: '',
PartnerAccountContactMail: '',
PartnerAccountContactPhone: '',
PartnerAccountI3D: 1036,
PartnerAccountName: 'Microsoft GmbH'
},
{
AccountI3D: 1034,
AccountName: 'Hewlett Packard GmbH',
IsTelekomDivePartner: false,
NotifyAtCrmActivities: false,
NotifyAtCrmActivitiesBCC: false,
NotifyAtCrmActivitiesTo: false,
NotifyAtOffers: false,
NotifyAtOrders: false,
PartnerAccountContact: '',
PartnerAccountContactDepartment: null,
PartnerAccountContactI3D: 1061,
PartnerAccountContactJob: '',
PartnerAccountContactMail: '',
PartnerAccountContactPhone: '',
PartnerAccountI3D: 1036,
PartnerAccountName: 'Microsoft GmbH'
}
]
@@ -0,0 +1,56 @@
[
{
AccountI3D: 1,
AccountName: 'c-entron software gmbh',
IsTelekomDivePartner: false,
NotifyAtCrmActivities: false,
NotifyAtCrmActivitiesBCC: false,
NotifyAtCrmActivitiesTo: false,
NotifyAtOffers: false,
NotifyAtOrders: false,
PartnerAccountContact: null,
PartnerAccountContactDepartment: null,
PartnerAccountContactI3D: null,
PartnerAccountContactJob: null,
PartnerAccountContactMail: null,
PartnerAccountContactPhone: null,
PartnerAccountI3D: null,
PartnerAccountName: null
},
{
AccountI3D: 1034,
AccountName: 'Hewlett Packard GmbH',
IsTelekomDivePartner: false,
NotifyAtCrmActivities: false,
NotifyAtCrmActivitiesBCC: false,
NotifyAtCrmActivitiesTo: false,
NotifyAtOffers: false,
NotifyAtOrders: false,
PartnerAccountContact: null,
PartnerAccountContactDepartment: null,
PartnerAccountContactI3D: null,
PartnerAccountContactJob: null,
PartnerAccountContactMail: null,
PartnerAccountContactPhone: null,
PartnerAccountI3D: null,
PartnerAccountName: null
},
{
AccountI3D: 1036,
AccountName: 'Microsoft GmbH',
IsTelekomDivePartner: false,
NotifyAtCrmActivities: false,
NotifyAtCrmActivitiesBCC: false,
NotifyAtCrmActivitiesTo: false,
NotifyAtOffers: false,
NotifyAtOrders: false,
PartnerAccountContact: null,
PartnerAccountContactDepartment: null,
PartnerAccountContactI3D: null,
PartnerAccountContactJob: null,
PartnerAccountContactMail: null,
PartnerAccountContactPhone: null,
PartnerAccountI3D: null,
PartnerAccountName: null
}
]
@@ -0,0 +1,38 @@
[
{
AccountI3D: 16,
AccountName: 'Stadtverwaltung Tuttlingen',
IsTelekomDivePartner: false,
NotifyAtCrmActivities: false,
NotifyAtCrmActivitiesBCC: false,
NotifyAtCrmActivitiesTo: false,
NotifyAtOffers: false,
NotifyAtOrders: false,
PartnerAccountContact: 'Herr Stephan Pitan',
PartnerAccountContactDepartment: 'Schulungsverantwortlich',
PartnerAccountContactI3D: 4,
PartnerAccountContactJob: '',
PartnerAccountContactMail: 'support@c-entron.de',
PartnerAccountContactPhone: '0731 96 88 4 321',
PartnerAccountI3D: 1,
PartnerAccountName: 'c-entron software gmbh'
},
{
AccountI3D: 1,
AccountName: 'c-entron software gmbh',
IsTelekomDivePartner: false,
NotifyAtCrmActivities: false,
NotifyAtCrmActivitiesBCC: false,
NotifyAtCrmActivitiesTo: false,
NotifyAtOffers: false,
NotifyAtOrders: false,
PartnerAccountContact: '',
PartnerAccountContactDepartment: null,
PartnerAccountContactI3D: 1061,
PartnerAccountContactJob: '',
PartnerAccountContactMail: '',
PartnerAccountContactPhone: '',
PartnerAccountI3D: 1036,
PartnerAccountName: 'Microsoft GmbH'
}
]
@@ -0,0 +1,74 @@
[
{
AccountI3D: 1,
AccountName: 'c-entron software gmbh',
IsTelekomDivePartner: false,
NotifyAtCrmActivities: false,
NotifyAtCrmActivitiesBCC: false,
NotifyAtCrmActivitiesTo: false,
NotifyAtOffers: false,
NotifyAtOrders: false,
PartnerAccountContact: '',
PartnerAccountContactDepartment: null,
PartnerAccountContactI3D: 1061,
PartnerAccountContactJob: '',
PartnerAccountContactMail: '',
PartnerAccountContactPhone: '',
PartnerAccountI3D: 1036,
PartnerAccountName: 'Microsoft GmbH'
},
{
AccountI3D: 10,
AccountName: 'Müller GmbH',
IsTelekomDivePartner: false,
NotifyAtCrmActivities: false,
NotifyAtCrmActivitiesBCC: false,
NotifyAtCrmActivitiesTo: false,
NotifyAtOffers: false,
NotifyAtOrders: false,
PartnerAccountContact: '',
PartnerAccountContactDepartment: null,
PartnerAccountContactI3D: 1061,
PartnerAccountContactJob: '',
PartnerAccountContactMail: '',
PartnerAccountContactPhone: '',
PartnerAccountI3D: 1036,
PartnerAccountName: 'Microsoft GmbH'
},
{
AccountI3D: 16,
AccountName: 'Stadtverwaltung Tuttlingen',
IsTelekomDivePartner: true,
NotifyAtCrmActivities: true,
NotifyAtCrmActivitiesBCC: false,
NotifyAtCrmActivitiesTo: false,
NotifyAtOffers: false,
NotifyAtOrders: true,
PartnerAccountContact: '',
PartnerAccountContactDepartment: null,
PartnerAccountContactI3D: 1061,
PartnerAccountContactJob: '',
PartnerAccountContactMail: '',
PartnerAccountContactPhone: '',
PartnerAccountI3D: 1036,
PartnerAccountName: 'Microsoft GmbH'
},
{
AccountI3D: 1034,
AccountName: 'Hewlett Packard GmbH',
IsTelekomDivePartner: false,
NotifyAtCrmActivities: false,
NotifyAtCrmActivitiesBCC: false,
NotifyAtCrmActivitiesTo: false,
NotifyAtOffers: false,
NotifyAtOrders: false,
PartnerAccountContact: '',
PartnerAccountContactDepartment: null,
PartnerAccountContactI3D: 1061,
PartnerAccountContactJob: '',
PartnerAccountContactMail: '',
PartnerAccountContactPhone: '',
PartnerAccountI3D: 1036,
PartnerAccountName: 'Microsoft GmbH'
}
]
@@ -0,0 +1,103 @@
using Centron.BusinessLogic;
using Centron.BusinessLogic.Administration.Rights;
using Centron.BusinessLogic.WebServices.Accounts;
using Centron.Data.Entities.Administration.Logins;
using Centron.Interfaces.Accounts;
using Centron.Tests.EndToEnd.Infrastructure;
using Xunit;
using Xunit.Abstractions;
namespace Centron.Tests.EndToEnd.Tests.Account;
public class AccountSearchTests : EndToEndTest
{
public AccountSearchTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper)
{
}
public override void Execute()
{
this.SearchWithoutPagingTest();
this.SuccessfulFirstPageTest();
this.SuccessfulLastPageTest();
this.AccountSearchOnlyOwnRightTest();
}
private void SearchWithoutPagingTest()
{
using var session = new BLSession();
var result = session.GetBL<AccountSearchWebServiceBL>().SearchAccountsThroughPaging(this.GetLoggedInUser(),
filter:new AccountSearchFilter()
{
IsActive = true
},
page:0, // because of page 0, paging is deactivated and should return all entries
entriesPerPage:6);
Verifier.Verify("AccountSearch_SearchWithoutPagingTest", result);
}
private void SuccessfulFirstPageTest()
{
using var session = new BLSession();
var result = session.GetBL<AccountSearchWebServiceBL>().SearchAccountsThroughPaging(this.GetLoggedInUser(),
filter:new AccountSearchFilter()
{
IsActive = true
},
page:1,
entriesPerPage:6);
Verifier.Verify("AccountSearch_SuccessfulFirstPageTest", result);
}
private void SuccessfulLastPageTest()
{
using var session = new BLSession();
var result = session.GetBL<AccountSearchWebServiceBL>().SearchAccountsThroughPaging(this.GetLoggedInUser(),
filter:new AccountSearchFilter()
{
IsActive = true
},
page:8,
entriesPerPage:6);
Verifier.Verify("AccountSearch_SuccessfulLastPageTest", result);
}
private void AccountSearchOnlyOwnRightTest()
{
const int UserI3DWithoutRight = 26;
var user = this.GetLoggedInUser(UserI3DWithoutRight);
var currentUserHasRightFalse = this.WithSession(f => f.GetBL<AppRightsBL>().HasUserRight(user.UserI3D.Value, UserRightsConst.Sales.Customer.CustomerCommon.SHOW_ONLY_OWN_CUSTOMER));
Assert.False(currentUserHasRightFalse);
// You should get all now
RunTest("AccountSearch_OnlyOwnRight_FALSE_Test", this.GetLoggedInUser(UserI3DWithoutRight));
// And add the "only-own" right
this.Sql($"INSERT INTO dbo.Sichtrus (Gruppe, Recht) VALUES (15, {UserRightsConst.Sales.Customer.CustomerCommon.SHOW_ONLY_OWN_CUSTOMER})");
var currentUserHasRightTrue = this.WithSession(f => f.GetBL<AppRightsBL>().HasUserRight(user.UserI3D.Value, UserRightsConst.Sales.Customer.CustomerCommon.SHOW_ONLY_OWN_CUSTOMER));
Assert.True(currentUserHasRightTrue);
// You should get only your own now
RunTest("AccountSearch_OnlyOwnRight_TRUE_Test", this.GetLoggedInUser(UserI3DWithoutRight));
}
void RunTest(string name, LoggedInUser currentUser)
{
using var session = new BLSession();
var searchResult = session.GetBL<AccountSearchWebServiceBL>().SearchAccountsThroughPaging(currentUser,
filter: new AccountSearchFilter()
{
IsActive = true
},
page: 1,
entriesPerPage: int.MaxValue);
this.Verifier.Verify(name, searchResult);
}
}
@@ -0,0 +1,124 @@
{
Data: {
Count: 1,
CurrentPage: 1,
PageCount: 1,
Result: [
{
AccountEMail: 'support@c-entron.de',
AccountFax: '0731-140399-399',
AccountMatchcode: 'CS',
AccountName: 'c-entron software gmbh',
AccountNumber: 1,
AccountOrderProcessingContractState: null,
AccountOriginI3D: 8,
AccountOriginName: 'CeBit 2008',
AccountPhone: '0731-1403990',
AccountType: 0,
AccountTypeCaptions: [
'Kunde',
'Kontakt',
'Firmenkunde'
],
AccountWebsite: 'www.lehnert.it',
AddressCity: 'Ulm',
AddressContactDepartment: 'Sekretariat',
AddressContactEMail1: 'ff@c-entron.de',
AddressContactEMail2: '',
AddressContactFax1: '0731-140399-399',
AddressContactFax2: '',
AddressContactFirstname: 'Franziska',
AddressContactI3D: 2,
AddressContactIsActive: true,
AddressContactLastname: 'Franzen',
AddressContactLetterSalutation: 'Sehr geehrte Frau',
AddressContactMailing1: true,
AddressContactMailing2: false,
AddressContactOldReferenceI3D: 23,
AddressContactPhone1: '0731-140399-0',
AddressContactPhone2: '',
AddressContactPhone3: '',
AddressContactPhone4: '',
AddressContactPhone5: '',
AddressContactTitle: 'Frau',
AddressContactTitleI3D: 1,
AddressCountryI3D: 1,
AddressCountryName: 'Deutschland',
AddressDepartment: 'sdklfnfdjskfdsöfjsadkfjödöfjdsjafsöjdkfjösdajfsjdföjfjsdjfkjsadfjskdjfkjasdköal kalsjsvkjkldsjfkldösjkl jksdljvk jklsavj kjdslk jkldsj klödsj kljasdkl jkl jsckl jklasj klasj kljsö jksj dkljsdklj klsdj öklsdj klsdj lkjkasdj klasdj klsdj kljasfkl jöl',
Addresses: null,
AddressI3D: 1,
AddressIsActive: true,
AddressKind: 1,
AddressOldReferenceI3D: 1,
AddressPostbox: '',
AddressStreet: 'Liststrasse 1',
AddressZip: '89079',
Adviser1EMail: 'hoffmann@celos.de',
Adviser1FullName: 'Hoffmann, Thomas (TH)',
Adviser1I3D: 34,
Adviser2EMail: 'walter@c-entron.de',
Adviser2FullName: 'Fischer, Markus (MAFI)',
Adviser2I3D: 31,
Adviser3EMail: 'peissig@c-entron.de',
Adviser3FullName: 'Peißig, Nadine (NP)',
Adviser3I3D: 30,
Adviser4EMail: '',
Adviser4FullName: 'User, Test (UT)',
Adviser4I3D: 37,
Adviser5EMail: null,
Adviser5FullName: '',
Adviser5I3D: null,
Adviser6EMail: null,
Adviser6FullName: '',
Adviser6I3D: null,
BookKeepingNumber: '10000',
ChangedDate: DateTime,
ClassificationCaption: 'D',
ClassificationI3D: 4,
CompanyGroupI3D: null,
CompanyGroupName: null,
ConcertoSupplierNumber: null,
CustomerChangedDate: DateTime,
CustomerCreatedDate: DateTime,
CustomerNumber: 10000,
DefaultTicket: null,
EgisSupplierNumber: null,
FreeText01: 'ACAD mit Inventor',
GeoInfo: null,
HasRemoteConnections: false,
I3D: 1,
IsAccountKind1: false,
IsAccountKind2: false,
IsAccountKind3: false,
IsAccountKind4: false,
IsAccountKind5: false,
IsActive: true,
IsAddressPostboxActive: false,
IsDefaultAddress: true,
IsDefaultAddressContact: true,
IsLocked: false,
ItScopeSupplierNumber: null,
NewAccountTypeI3Ds: [
1,
4,
3
],
OwnCustomerNumberSupplier: null,
PrintAddressContact: true,
PrintDepartment: true,
PrintDepartmentAddressContact: false,
PrintName: true,
RootDirectoryI3D: null,
SalesAreaCaption: 'Nord',
SalesAreaI3D: 2,
SalesControllingCaption: 'Vertrieb-1',
SalesControllingI3D: 1,
SupplierNumber: null
}
]
},
Error: null,
Message: null,
MessageCode: null,
Status: 0
}
@@ -0,0 +1,667 @@
{
Data: {
Count: 46,
CurrentPage: 1,
PageCount: 8,
Result: [
{
AccountEMail: '',
AccountFax: '',
AccountMatchcode: '',
AccountName: 'Acer GmbH',
AccountNumber: 38,
AccountOrderProcessingContractState: null,
AccountOriginI3D: null,
AccountOriginName: null,
AccountPhone: '',
AccountType: 0,
AccountTypeCaptions: [
'Lieferant',
'Kontakt'
],
AccountWebsite: '',
AddressCity: '',
AddressContactDepartment: null,
AddressContactEMail1: '',
AddressContactEMail2: '',
AddressContactFax1: '',
AddressContactFax2: '',
AddressContactFirstname: '',
AddressContactI3D: 1062,
AddressContactIsActive: true,
AddressContactLastname: ' ',
AddressContactLetterSalutation: null,
AddressContactMailing1: false,
AddressContactMailing2: false,
AddressContactOldReferenceI3D: 21,
AddressContactPhone1: '',
AddressContactPhone2: '',
AddressContactPhone3: '',
AddressContactPhone4: '',
AddressContactPhone5: '',
AddressContactTitle: null,
AddressContactTitleI3D: null,
AddressCountryI3D: 1,
AddressCountryName: 'Deutschland',
AddressDepartment: null,
Addresses: null,
AddressI3D: 1050,
AddressIsActive: true,
AddressKind: 0,
AddressOldReferenceI3D: 18,
AddressPostbox: '',
AddressStreet: '',
AddressZip: '',
Adviser1EMail: null,
Adviser1FullName: '',
Adviser1I3D: null,
Adviser2EMail: null,
Adviser2FullName: '',
Adviser2I3D: null,
Adviser3EMail: null,
Adviser3FullName: '',
Adviser3I3D: null,
Adviser4EMail: null,
Adviser4FullName: '',
Adviser4I3D: null,
Adviser5EMail: null,
Adviser5FullName: '',
Adviser5I3D: null,
Adviser6EMail: null,
Adviser6FullName: '',
Adviser6I3D: null,
BookKeepingNumber: null,
ChangedDate: DateTime,
ClassificationCaption: null,
ClassificationI3D: null,
CompanyGroupI3D: null,
CompanyGroupName: null,
ConcertoSupplierNumber: null,
CustomerChangedDate: DateTime,
CustomerCreatedDate: DateTime,
CustomerNumber: null,
DefaultTicket: null,
EgisSupplierNumber: '',
FreeText01: null,
GeoInfo: null,
HasRemoteConnections: false,
I3D: 1037,
IsAccountKind1: false,
IsAccountKind2: false,
IsAccountKind3: false,
IsAccountKind4: false,
IsAccountKind5: false,
IsActive: true,
IsAddressPostboxActive: false,
IsDefaultAddress: true,
IsDefaultAddressContact: true,
IsLocked: false,
ItScopeSupplierNumber: null,
NewAccountTypeI3Ds: [
2,
3
],
OwnCustomerNumberSupplier: '',
PrintAddressContact: true,
PrintDepartment: false,
PrintDepartmentAddressContact: false,
PrintName: true,
RootDirectoryI3D: null,
SalesAreaCaption: null,
SalesAreaI3D: null,
SalesControllingCaption: null,
SalesControllingI3D: null,
SupplierNumber: 70010
},
{
AccountEMail: '',
AccountFax: '',
AccountMatchcode: '',
AccountName: 'Actebis EGIS',
AccountNumber: 47,
AccountOrderProcessingContractState: null,
AccountOriginI3D: null,
AccountOriginName: null,
AccountPhone: '',
AccountType: 0,
AccountTypeCaptions: [
'Lieferant',
'Kontakt'
],
AccountWebsite: '',
AddressCity: '',
AddressContactDepartment: null,
AddressContactEMail1: '',
AddressContactEMail2: '',
AddressContactFax1: '',
AddressContactFax2: '',
AddressContactFirstname: '',
AddressContactI3D: 1071,
AddressContactIsActive: true,
AddressContactLastname: ' ',
AddressContactLetterSalutation: null,
AddressContactMailing1: false,
AddressContactMailing2: false,
AddressContactOldReferenceI3D: 67,
AddressContactPhone1: '',
AddressContactPhone2: '',
AddressContactPhone3: '',
AddressContactPhone4: '',
AddressContactPhone5: '',
AddressContactTitle: null,
AddressContactTitleI3D: null,
AddressCountryI3D: 1,
AddressCountryName: 'Deutschland',
AddressDepartment: null,
Addresses: null,
AddressI3D: 1059,
AddressIsActive: true,
AddressKind: 0,
AddressOldReferenceI3D: 53,
AddressPostbox: '',
AddressStreet: '',
AddressZip: '',
Adviser1EMail: null,
Adviser1FullName: '',
Adviser1I3D: null,
Adviser2EMail: null,
Adviser2FullName: '',
Adviser2I3D: null,
Adviser3EMail: null,
Adviser3FullName: '',
Adviser3I3D: null,
Adviser4EMail: null,
Adviser4FullName: '',
Adviser4I3D: null,
Adviser5EMail: null,
Adviser5FullName: '',
Adviser5I3D: null,
Adviser6EMail: null,
Adviser6FullName: '',
Adviser6I3D: null,
BookKeepingNumber: null,
ChangedDate: DateTime,
ClassificationCaption: null,
ClassificationI3D: null,
CompanyGroupI3D: null,
CompanyGroupName: null,
ConcertoSupplierNumber: null,
CustomerChangedDate: DateTime,
CustomerCreatedDate: DateTime,
CustomerNumber: null,
DefaultTicket: null,
EgisSupplierNumber: '',
FreeText01: null,
GeoInfo: null,
HasRemoteConnections: false,
I3D: 1046,
IsAccountKind1: false,
IsAccountKind2: false,
IsAccountKind3: false,
IsAccountKind4: false,
IsAccountKind5: false,
IsActive: true,
IsAddressPostboxActive: false,
IsDefaultAddress: true,
IsDefaultAddressContact: true,
IsLocked: false,
ItScopeSupplierNumber: '',
NewAccountTypeI3Ds: [
2,
3
],
OwnCustomerNumberSupplier: '',
PrintAddressContact: true,
PrintDepartment: false,
PrintDepartmentAddressContact: false,
PrintName: true,
RootDirectoryI3D: null,
SalesAreaCaption: null,
SalesAreaI3D: null,
SalesControllingCaption: null,
SalesControllingI3D: null,
SupplierNumber: 70020
},
{
AccountEMail: '',
AccountFax: '02921 99-3719',
AccountMatchcode: '',
AccountName: 'Actebis Peacock GmbH',
AccountNumber: 33,
AccountOrderProcessingContractState: null,
AccountOriginI3D: null,
AccountOriginName: null,
AccountPhone: '02921-99-0',
AccountType: 0,
AccountTypeCaptions: [
'Lieferant',
'Kontakt'
],
AccountWebsite: 'http://www.actebispeacock.de',
AddressCity: 'Soest',
AddressContactDepartment: 'RMA',
AddressContactEMail1: 'serviceline@actebis.com',
AddressContactEMail2: '',
AddressContactFax1: '0 29 57 / 979-73 97',
AddressContactFax2: '',
AddressContactFirstname: '',
AddressContactI3D: 1057,
AddressContactIsActive: true,
AddressContactLastname: 'Actebis Peacock Serviceline',
AddressContactLetterSalutation: null,
AddressContactMailing1: false,
AddressContactMailing2: false,
AddressContactOldReferenceI3D: 12,
AddressContactPhone1: '0 29 57 / 979-73 79',
AddressContactPhone2: '',
AddressContactPhone3: '',
AddressContactPhone4: '',
AddressContactPhone5: '',
AddressContactTitle: null,
AddressContactTitleI3D: null,
AddressCountryI3D: 1,
AddressCountryName: 'Deutschland',
AddressDepartment: null,
Addresses: null,
AddressI3D: 1045,
AddressIsActive: true,
AddressKind: 1,
AddressOldReferenceI3D: 10,
AddressPostbox: '',
AddressStreet: 'Lange Wende 43',
AddressZip: '59494',
Adviser1EMail: 'vertrieb@c-entron.de',
Adviser1FullName: 'Administrator, c-entron (ADMIN)',
Adviser1I3D: 22,
Adviser2EMail: null,
Adviser2FullName: '',
Adviser2I3D: null,
Adviser3EMail: null,
Adviser3FullName: '',
Adviser3I3D: null,
Adviser4EMail: null,
Adviser4FullName: '',
Adviser4I3D: null,
Adviser5EMail: null,
Adviser5FullName: '',
Adviser5I3D: null,
Adviser6EMail: null,
Adviser6FullName: '',
Adviser6I3D: null,
BookKeepingNumber: null,
ChangedDate: DateTime,
ClassificationCaption: null,
ClassificationI3D: null,
CompanyGroupI3D: null,
CompanyGroupName: null,
ConcertoSupplierNumber: null,
CustomerChangedDate: DateTime,
CustomerCreatedDate: DateTime,
CustomerNumber: null,
DefaultTicket: null,
EgisSupplierNumber: '70282',
FreeText01: null,
GeoInfo: null,
HasRemoteConnections: false,
I3D: 1032,
IsAccountKind1: false,
IsAccountKind2: false,
IsAccountKind3: false,
IsAccountKind4: false,
IsAccountKind5: false,
IsActive: true,
IsAddressPostboxActive: false,
IsDefaultAddress: true,
IsDefaultAddressContact: true,
IsLocked: false,
ItScopeSupplierNumber: '',
NewAccountTypeI3Ds: [
2,
3
],
OwnCustomerNumberSupplier: 'xxx',
PrintAddressContact: true,
PrintDepartment: false,
PrintDepartmentAddressContact: false,
PrintName: true,
RootDirectoryI3D: null,
SalesAreaCaption: null,
SalesAreaI3D: null,
SalesControllingCaption: null,
SalesControllingI3D: null,
SupplierNumber: 70004
},
{
AccountEMail: 'Michalea.Wanker@also.de',
AccountFax: '09421-933991',
AccountMatchcode: '',
AccountName: 'ALSO Deutschland GmbH',
AccountNumber: 32,
AccountOrderProcessingContractState: null,
AccountOriginI3D: null,
AccountOriginName: null,
AccountPhone: '09421-933000',
AccountType: 0,
AccountTypeCaptions: [
'Lieferant',
'Kontakt'
],
AccountWebsite: 'http://www.also.de',
AddressCity: 'Straubing',
AddressContactDepartment: 'Betriebsleiter',
AddressContactEMail1: '',
AddressContactEMail2: '',
AddressContactFax1: '',
AddressContactFax2: '',
AddressContactFirstname: '',
AddressContactI3D: 1056,
AddressContactIsActive: true,
AddressContactLastname: 'Online Bestellung',
AddressContactLetterSalutation: null,
AddressContactMailing1: false,
AddressContactMailing2: false,
AddressContactOldReferenceI3D: 11,
AddressContactPhone1: '',
AddressContactPhone2: '',
AddressContactPhone3: '',
AddressContactPhone4: '',
AddressContactPhone5: '',
AddressContactTitle: null,
AddressContactTitleI3D: null,
AddressCountryI3D: 1,
AddressCountryName: 'Deutschland',
AddressDepartment: null,
Addresses: null,
AddressI3D: 1044,
AddressIsActive: true,
AddressKind: 1,
AddressOldReferenceI3D: 9,
AddressPostbox: '',
AddressStreet: 'Ernst-Heinkel-Straße 4',
AddressZip: '94315',
Adviser1EMail: 'vertrieb@c-entron.de',
Adviser1FullName: 'Administrator, c-entron (ADMIN)',
Adviser1I3D: 22,
Adviser2EMail: null,
Adviser2FullName: '',
Adviser2I3D: null,
Adviser3EMail: null,
Adviser3FullName: '',
Adviser3I3D: null,
Adviser4EMail: null,
Adviser4FullName: '',
Adviser4I3D: null,
Adviser5EMail: null,
Adviser5FullName: '',
Adviser5I3D: null,
Adviser6EMail: null,
Adviser6FullName: '',
Adviser6I3D: null,
BookKeepingNumber: null,
ChangedDate: DateTime,
ClassificationCaption: null,
ClassificationI3D: null,
CompanyGroupI3D: null,
CompanyGroupName: null,
ConcertoSupplierNumber: null,
CustomerChangedDate: DateTime,
CustomerCreatedDate: DateTime,
CustomerNumber: null,
DefaultTicket: null,
EgisSupplierNumber: '70264',
FreeText01: null,
GeoInfo: null,
HasRemoteConnections: false,
I3D: 1031,
IsAccountKind1: false,
IsAccountKind2: false,
IsAccountKind3: false,
IsAccountKind4: false,
IsAccountKind5: false,
IsActive: true,
IsAddressPostboxActive: false,
IsDefaultAddress: true,
IsDefaultAddressContact: true,
IsLocked: false,
ItScopeSupplierNumber: '',
NewAccountTypeI3Ds: [
2,
3
],
OwnCustomerNumberSupplier: 'xxx',
PrintAddressContact: true,
PrintDepartment: false,
PrintDepartmentAddressContact: false,
PrintName: true,
RootDirectoryI3D: null,
SalesAreaCaption: null,
SalesAreaI3D: null,
SalesControllingCaption: null,
SalesControllingI3D: null,
SupplierNumber: 70003
},
{
AccountEMail: '',
AccountFax: '',
AccountMatchcode: '',
AccountName: 'api',
AccountNumber: 48,
AccountOrderProcessingContractState: null,
AccountOriginI3D: null,
AccountOriginName: null,
AccountPhone: '0731140399',
AccountType: 0,
AccountTypeCaptions: [
'Lieferant',
'Kontakt'
],
AccountWebsite: '',
AddressCity: '',
AddressContactDepartment: null,
AddressContactEMail1: '',
AddressContactEMail2: '',
AddressContactFax1: '',
AddressContactFax2: '',
AddressContactFirstname: '',
AddressContactI3D: 1072,
AddressContactIsActive: true,
AddressContactLastname: ' ',
AddressContactLetterSalutation: null,
AddressContactMailing1: false,
AddressContactMailing2: false,
AddressContactOldReferenceI3D: 77,
AddressContactPhone1: '',
AddressContactPhone2: '',
AddressContactPhone3: '',
AddressContactPhone4: '',
AddressContactPhone5: '',
AddressContactTitle: null,
AddressContactTitleI3D: null,
AddressCountryI3D: 1,
AddressCountryName: 'Deutschland',
AddressDepartment: null,
Addresses: null,
AddressI3D: 1060,
AddressIsActive: true,
AddressKind: 0,
AddressOldReferenceI3D: 62,
AddressPostbox: '',
AddressStreet: '',
AddressZip: '',
Adviser1EMail: null,
Adviser1FullName: '',
Adviser1I3D: null,
Adviser2EMail: null,
Adviser2FullName: '',
Adviser2I3D: null,
Adviser3EMail: null,
Adviser3FullName: '',
Adviser3I3D: null,
Adviser4EMail: null,
Adviser4FullName: '',
Adviser4I3D: null,
Adviser5EMail: null,
Adviser5FullName: '',
Adviser5I3D: null,
Adviser6EMail: null,
Adviser6FullName: '',
Adviser6I3D: null,
BookKeepingNumber: null,
ChangedDate: DateTime,
ClassificationCaption: null,
ClassificationI3D: null,
CompanyGroupI3D: null,
CompanyGroupName: null,
ConcertoSupplierNumber: null,
CustomerChangedDate: DateTime,
CustomerCreatedDate: DateTime,
CustomerNumber: null,
DefaultTicket: null,
EgisSupplierNumber: '',
FreeText01: null,
GeoInfo: null,
HasRemoteConnections: false,
I3D: 1047,
IsAccountKind1: false,
IsAccountKind2: false,
IsAccountKind3: false,
IsAccountKind4: false,
IsAccountKind5: false,
IsActive: true,
IsAddressPostboxActive: false,
IsDefaultAddress: true,
IsDefaultAddressContact: true,
IsLocked: false,
ItScopeSupplierNumber: '',
NewAccountTypeI3Ds: [
2,
3
],
OwnCustomerNumberSupplier: '',
PrintAddressContact: true,
PrintDepartment: false,
PrintDepartmentAddressContact: false,
PrintName: true,
RootDirectoryI3D: null,
SalesAreaCaption: null,
SalesAreaI3D: null,
SalesControllingCaption: null,
SalesControllingI3D: null,
SupplierNumber: 70021
},
{
AccountEMail: '',
AccountFax: '',
AccountMatchcode: '',
AccountName: 'AutoDesk',
AccountNumber: 46,
AccountOrderProcessingContractState: null,
AccountOriginI3D: null,
AccountOriginName: null,
AccountPhone: '',
AccountType: 0,
AccountTypeCaptions: [
'Lieferant',
'Kontakt'
],
AccountWebsite: '',
AddressCity: '',
AddressContactDepartment: null,
AddressContactEMail1: '',
AddressContactEMail2: '',
AddressContactFax1: '',
AddressContactFax2: '',
AddressContactFirstname: '',
AddressContactI3D: 1070,
AddressContactIsActive: true,
AddressContactLastname: ' ',
AddressContactLetterSalutation: null,
AddressContactMailing1: false,
AddressContactMailing2: false,
AddressContactOldReferenceI3D: 66,
AddressContactPhone1: '',
AddressContactPhone2: '',
AddressContactPhone3: '',
AddressContactPhone4: '',
AddressContactPhone5: '',
AddressContactTitle: null,
AddressContactTitleI3D: null,
AddressCountryI3D: 1,
AddressCountryName: 'Deutschland',
AddressDepartment: null,
Addresses: null,
AddressI3D: 1058,
AddressIsActive: true,
AddressKind: 0,
AddressOldReferenceI3D: 52,
AddressPostbox: '',
AddressStreet: '',
AddressZip: '',
Adviser1EMail: null,
Adviser1FullName: '',
Adviser1I3D: null,
Adviser2EMail: null,
Adviser2FullName: '',
Adviser2I3D: null,
Adviser3EMail: null,
Adviser3FullName: '',
Adviser3I3D: null,
Adviser4EMail: null,
Adviser4FullName: '',
Adviser4I3D: null,
Adviser5EMail: null,
Adviser5FullName: '',
Adviser5I3D: null,
Adviser6EMail: null,
Adviser6FullName: '',
Adviser6I3D: null,
BookKeepingNumber: null,
ChangedDate: DateTime,
ClassificationCaption: null,
ClassificationI3D: null,
CompanyGroupI3D: null,
CompanyGroupName: null,
ConcertoSupplierNumber: null,
CustomerChangedDate: DateTime,
CustomerCreatedDate: DateTime,
CustomerNumber: null,
DefaultTicket: null,
EgisSupplierNumber: '',
FreeText01: null,
GeoInfo: null,
HasRemoteConnections: false,
I3D: 1045,
IsAccountKind1: false,
IsAccountKind2: false,
IsAccountKind3: false,
IsAccountKind4: false,
IsAccountKind5: false,
IsActive: true,
IsAddressPostboxActive: false,
IsDefaultAddress: true,
IsDefaultAddressContact: true,
IsLocked: false,
ItScopeSupplierNumber: '',
NewAccountTypeI3Ds: [
2,
3
],
OwnCustomerNumberSupplier: '',
PrintAddressContact: true,
PrintDepartment: false,
PrintDepartmentAddressContact: false,
PrintName: true,
RootDirectoryI3D: null,
SalesAreaCaption: null,
SalesAreaI3D: null,
SalesControllingCaption: null,
SalesControllingI3D: null,
SupplierNumber: 70019
}
]
},
Error: null,
Message: null,
MessageCode: null,
Status: 0
}
@@ -0,0 +1,452 @@
{
Data: {
Count: 46,
CurrentPage: 8,
PageCount: 8,
Result: [
{
AccountEMail: '',
AccountFax: '089-7494-1000',
AccountMatchcode: '',
AccountName: 'TechData Deutschland GmbH',
AccountNumber: 34,
AccountOrderProcessingContractState: null,
AccountOriginI3D: null,
AccountOriginName: null,
AccountPhone: '089-4700-0',
AccountType: 0,
AccountTypeCaptions: [
'Lieferant',
'Kontakt'
],
AccountWebsite: '',
AddressCity: 'München',
AddressContactDepartment: null,
AddressContactEMail1: '',
AddressContactEMail2: '',
AddressContactFax1: '',
AddressContactFax2: '',
AddressContactFirstname: '',
AddressContactI3D: 1058,
AddressContactIsActive: true,
AddressContactLastname: 'Vertrieb',
AddressContactLetterSalutation: null,
AddressContactMailing1: false,
AddressContactMailing2: false,
AddressContactOldReferenceI3D: 13,
AddressContactPhone1: '',
AddressContactPhone2: '',
AddressContactPhone3: '',
AddressContactPhone4: '',
AddressContactPhone5: '',
AddressContactTitle: null,
AddressContactTitleI3D: null,
AddressCountryI3D: 1,
AddressCountryName: 'Deutschland',
AddressDepartment: null,
Addresses: null,
AddressI3D: 1046,
AddressIsActive: true,
AddressKind: 0,
AddressOldReferenceI3D: 11,
AddressPostbox: '',
AddressStreet: 'Baierbrunner Str. 31',
AddressZip: '81379',
Adviser1EMail: null,
Adviser1FullName: '',
Adviser1I3D: null,
Adviser2EMail: null,
Adviser2FullName: '',
Adviser2I3D: null,
Adviser3EMail: null,
Adviser3FullName: '',
Adviser3I3D: null,
Adviser4EMail: null,
Adviser4FullName: '',
Adviser4I3D: null,
Adviser5EMail: null,
Adviser5FullName: '',
Adviser5I3D: null,
Adviser6EMail: null,
Adviser6FullName: '',
Adviser6I3D: null,
BookKeepingNumber: null,
ChangedDate: DateTime,
ClassificationCaption: null,
ClassificationI3D: null,
CompanyGroupI3D: null,
CompanyGroupName: null,
ConcertoSupplierNumber: null,
CustomerChangedDate: DateTime,
CustomerCreatedDate: DateTime,
CustomerNumber: null,
DefaultTicket: null,
EgisSupplierNumber: '70229',
FreeText01: null,
GeoInfo: null,
HasRemoteConnections: false,
I3D: 1033,
IsAccountKind1: false,
IsAccountKind2: false,
IsAccountKind3: false,
IsAccountKind4: false,
IsAccountKind5: false,
IsActive: true,
IsAddressPostboxActive: false,
IsDefaultAddress: true,
IsDefaultAddressContact: true,
IsLocked: false,
ItScopeSupplierNumber: '',
NewAccountTypeI3Ds: [
2,
3
],
OwnCustomerNumberSupplier: '',
PrintAddressContact: true,
PrintDepartment: false,
PrintDepartmentAddressContact: false,
PrintName: true,
RootDirectoryI3D: null,
SalesAreaCaption: null,
SalesAreaI3D: null,
SalesControllingCaption: null,
SalesControllingI3D: null,
SupplierNumber: 70005
},
{
AccountEMail: '',
AccountFax: '',
AccountMatchcode: '',
AccountName: 'test',
AccountNumber: 27,
AccountOrderProcessingContractState: null,
AccountOriginI3D: 15,
AccountOriginName: 'CeBit 2011',
AccountPhone: '',
AccountType: 0,
AccountTypeCaptions: [
'Kunde'
],
AccountWebsite: '',
AddressCity: null,
AddressContactDepartment: null,
AddressContactEMail1: null,
AddressContactEMail2: null,
AddressContactFax1: null,
AddressContactFax2: null,
AddressContactFirstname: '',
AddressContactI3D: 1050,
AddressContactIsActive: true,
AddressContactLastname: 'tes',
AddressContactLetterSalutation: 'Sehr geehrte Frau',
AddressContactMailing1: false,
AddressContactMailing2: false,
AddressContactOldReferenceI3D: 1090,
AddressContactPhone1: null,
AddressContactPhone2: null,
AddressContactPhone3: null,
AddressContactPhone4: null,
AddressContactPhone5: null,
AddressContactTitle: 'Frau',
AddressContactTitleI3D: 1,
AddressCountryI3D: 1,
AddressCountryName: 'Deutschland',
AddressDepartment: null,
Addresses: null,
AddressI3D: 1039,
AddressIsActive: true,
AddressKind: 1,
AddressOldReferenceI3D: 1069,
AddressPostbox: null,
AddressStreet: null,
AddressZip: null,
Adviser1EMail: '',
Adviser1FullName: 'Lehnert2, Volker (VL_UL)',
Adviser1I3D: 45,
Adviser2EMail: '',
Adviser2FullName: 'Lehnert2, Volker (VL_UL)',
Adviser2I3D: 45,
Adviser3EMail: '',
Adviser3FullName: 'Lehnert2, Volker (VL_UL)',
Adviser3I3D: 45,
Adviser4EMail: 'lehnert@c-entron.de',
Adviser4FullName: 'Lehnert, Volker (VL)',
Adviser4I3D: 44,
Adviser5EMail: '',
Adviser5FullName: 'Lehnert2, Volker (VL_UL)',
Adviser5I3D: 45,
Adviser6EMail: 'steven.maass@celos.de',
Adviser6FullName: 'Maaß, Steven (SM)',
Adviser6I3D: 32,
BookKeepingNumber: '10027',
ChangedDate: DateTime,
ClassificationCaption: null,
ClassificationI3D: null,
CompanyGroupI3D: null,
CompanyGroupName: null,
ConcertoSupplierNumber: null,
CustomerChangedDate: DateTime,
CustomerCreatedDate: DateTime,
CustomerNumber: 10027,
DefaultTicket: null,
EgisSupplierNumber: null,
FreeText01: null,
GeoInfo: null,
HasRemoteConnections: false,
I3D: 1026,
IsAccountKind1: false,
IsAccountKind2: false,
IsAccountKind3: false,
IsAccountKind4: false,
IsAccountKind5: false,
IsActive: true,
IsAddressPostboxActive: false,
IsDefaultAddress: true,
IsDefaultAddressContact: true,
IsLocked: false,
ItScopeSupplierNumber: null,
NewAccountTypeI3Ds: [
1
],
OwnCustomerNumberSupplier: null,
PrintAddressContact: true,
PrintDepartment: true,
PrintDepartmentAddressContact: false,
PrintName: true,
RootDirectoryI3D: null,
SalesAreaCaption: null,
SalesAreaI3D: null,
SalesControllingCaption: 'Vertrieb-1',
SalesControllingI3D: 1,
SupplierNumber: null
},
{
AccountEMail: '',
AccountFax: '0511-987654321',
AccountMatchcode: '',
AccountName: 'Testkunde GmbH',
AccountNumber: 17,
AccountOrderProcessingContractState: null,
AccountOriginI3D: null,
AccountOriginName: null,
AccountPhone: '0511-123456789',
AccountType: 0,
AccountTypeCaptions: [
'Kunde',
'Händler',
'Kontakt'
],
AccountWebsite: 'http://www.testkunde.de',
AddressCity: 'Ort',
AddressContactDepartment: '',
AddressContactEMail1: 'maass@c-entron.de',
AddressContactEMail2: '',
AddressContactFax1: '',
AddressContactFax2: '',
AddressContactFirstname: 'Muster',
AddressContactI3D: 39,
AddressContactIsActive: true,
AddressContactLastname: 'Mann',
AddressContactLetterSalutation: 'Sehr geehrter Herr',
AddressContactMailing1: false,
AddressContactMailing2: false,
AddressContactOldReferenceI3D: 72,
AddressContactPhone1: '',
AddressContactPhone2: '',
AddressContactPhone3: '',
AddressContactPhone4: '',
AddressContactPhone5: '',
AddressContactTitle: 'Herr',
AddressContactTitleI3D: 2,
AddressCountryI3D: 1,
AddressCountryName: 'Deutschland',
AddressDepartment: '',
Addresses: null,
AddressI3D: 30,
AddressIsActive: true,
AddressKind: 1,
AddressOldReferenceI3D: 57,
AddressPostbox: '',
AddressStreet: 'Talstrasse 12',
AddressZip: '12345',
Adviser1EMail: 'steven.maass@celos.de',
Adviser1FullName: 'Maaß, Steven (SM)',
Adviser1I3D: 32,
Adviser2EMail: 'steven.maass@celos.de',
Adviser2FullName: 'Maaß, Steven (SM)',
Adviser2I3D: 32,
Adviser3EMail: null,
Adviser3FullName: '',
Adviser3I3D: null,
Adviser4EMail: null,
Adviser4FullName: '',
Adviser4I3D: null,
Adviser5EMail: null,
Adviser5FullName: '',
Adviser5I3D: null,
Adviser6EMail: null,
Adviser6FullName: '',
Adviser6I3D: null,
BookKeepingNumber: '10018',
ChangedDate: DateTime,
ClassificationCaption: 'A',
ClassificationI3D: 1,
CompanyGroupI3D: null,
CompanyGroupName: null,
ConcertoSupplierNumber: null,
CustomerChangedDate: DateTime,
CustomerCreatedDate: DateTime,
CustomerNumber: 10018,
DefaultTicket: null,
EgisSupplierNumber: null,
FreeText01: '',
GeoInfo: {
Latitude: 47.3682273,
Longitude: 8.5390072
},
HasRemoteConnections: false,
I3D: 17,
IsAccountKind1: false,
IsAccountKind2: false,
IsAccountKind3: false,
IsAccountKind4: false,
IsAccountKind5: false,
IsActive: true,
IsAddressPostboxActive: false,
IsDefaultAddress: true,
IsDefaultAddressContact: true,
IsLocked: false,
ItScopeSupplierNumber: null,
NewAccountTypeI3Ds: [
1,
6,
3
],
OwnCustomerNumberSupplier: null,
PrintAddressContact: true,
PrintDepartment: true,
PrintDepartmentAddressContact: false,
PrintName: true,
RootDirectoryI3D: null,
SalesAreaCaption: null,
SalesAreaI3D: null,
SalesControllingCaption: null,
SalesControllingI3D: null,
SupplierNumber: null
},
{
AccountEMail: '',
AccountFax: '',
AccountMatchcode: '',
AccountName: 'TK Micky Maus',
AccountNumber: 45,
AccountOrderProcessingContractState: null,
AccountOriginI3D: null,
AccountOriginName: null,
AccountPhone: '',
AccountType: 0,
AccountTypeCaptions: [
'Lieferant',
'Kontakt'
],
AccountWebsite: '',
AddressCity: '',
AddressContactDepartment: null,
AddressContactEMail1: '',
AddressContactEMail2: '',
AddressContactFax1: '',
AddressContactFax2: '',
AddressContactFirstname: '',
AddressContactI3D: 1069,
AddressContactIsActive: true,
AddressContactLastname: ' ',
AddressContactLetterSalutation: null,
AddressContactMailing1: false,
AddressContactMailing2: false,
AddressContactOldReferenceI3D: 58,
AddressContactPhone1: '',
AddressContactPhone2: '',
AddressContactPhone3: '',
AddressContactPhone4: '',
AddressContactPhone5: '',
AddressContactTitle: null,
AddressContactTitleI3D: null,
AddressCountryI3D: 1,
AddressCountryName: 'Deutschland',
AddressDepartment: null,
Addresses: null,
AddressI3D: 1057,
AddressIsActive: true,
AddressKind: 0,
AddressOldReferenceI3D: 46,
AddressPostbox: '',
AddressStreet: '',
AddressZip: '',
Adviser1EMail: null,
Adviser1FullName: '',
Adviser1I3D: null,
Adviser2EMail: null,
Adviser2FullName: '',
Adviser2I3D: null,
Adviser3EMail: null,
Adviser3FullName: '',
Adviser3I3D: null,
Adviser4EMail: null,
Adviser4FullName: '',
Adviser4I3D: null,
Adviser5EMail: null,
Adviser5FullName: '',
Adviser5I3D: null,
Adviser6EMail: null,
Adviser6FullName: '',
Adviser6I3D: null,
BookKeepingNumber: null,
ChangedDate: DateTime,
ClassificationCaption: null,
ClassificationI3D: null,
CompanyGroupI3D: null,
CompanyGroupName: null,
ConcertoSupplierNumber: null,
CustomerChangedDate: DateTime,
CustomerCreatedDate: DateTime,
CustomerNumber: null,
DefaultTicket: null,
EgisSupplierNumber: '',
FreeText01: null,
GeoInfo: null,
HasRemoteConnections: false,
I3D: 1044,
IsAccountKind1: false,
IsAccountKind2: false,
IsAccountKind3: false,
IsAccountKind4: false,
IsAccountKind5: false,
IsActive: true,
IsAddressPostboxActive: false,
IsDefaultAddress: true,
IsDefaultAddressContact: true,
IsLocked: false,
ItScopeSupplierNumber: '',
NewAccountTypeI3Ds: [
2,
3
],
OwnCustomerNumberSupplier: '',
PrintAddressContact: true,
PrintDepartment: false,
PrintDepartmentAddressContact: false,
PrintName: true,
RootDirectoryI3D: null,
SalesAreaCaption: null,
SalesAreaI3D: null,
SalesControllingCaption: null,
SalesControllingI3D: null,
SupplierNumber: 70017
}
]
},
Error: null,
Message: null,
MessageCode: null,
Status: 0
}
@@ -0,0 +1,621 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Centron.BusinessLogic;
using Centron.BusinessLogic.Administration.Rights;
using Centron.BusinessLogic.WebServices.Accounts;
using Centron.BusinessLogic.WebServices.Accounts.Accounting;
using Centron.BusinessLogic.WebServices.Logos;
using Centron.BusinessLogic.WebServices.Sales.Customers;
using Centron.Data.Entities.Administration.Logins;
using Centron.Data.WebServices.Sales.Customers;
using Centron.Interfaces;
using Centron.Interfaces.Accounting;
using Centron.Interfaces.Accounts;
using Centron.Interfaces.BL;
using Centron.Tests.EndToEnd.Infrastructure;
using CentronSoftware.Centron.WebServices.Entities.Accounts;
using CentronSoftware.Centron.WebServices.Entities.Accounts.Accounting;
using CentronSoftware.Centron.WebServices.Entities.Logos;
using CentronSoftware.Centron.WebServices.Extensions;
using CentronSoftware.Centron.WebServices.RestRequests;
using Xunit;
using Xunit.Abstractions;
namespace Centron.Tests.EndToEnd.Tests.Account
{
public class AccountTests : EndToEndTest
{
public AccountTests(ITestOutputHelper testOutputHelper)
: base(testOutputHelper)
{
this.Verifier.Settings.IgnoreProperty<AccountDTO>(f => f.ChangedVersion);
this.Verifier.Settings.IgnoreProperty<AccountDTO>(f => f.ChangedDate);
this.Verifier.Settings.IgnoreProperty<AccountDTO>(f => f.CreatedVersion);
this.Verifier.Settings.IgnoreProperty<AccountDTO>(f => f.CreatedDate);
this.Verifier.Settings.IgnoreProperty<AccountAddressDTO>(f => f.ChangedVersion);
this.Verifier.Settings.IgnoreProperty<AccountAddressDTO>(f => f.ChangedDate);
this.Verifier.Settings.IgnoreProperty<AccountAddressDTO>(f => f.CreatedVersion);
this.Verifier.Settings.IgnoreProperty<AccountAddressDTO>(f => f.CreatedDate);
this.Verifier.Settings.IgnoreProperty<AccountAddressContactDTO>(f => f.ChangedVersion);
this.Verifier.Settings.IgnoreProperty<AccountAddressContactDTO>(f => f.ChangedDate);
this.Verifier.Settings.IgnoreProperty<AccountAddressContactDTO>(f => f.CreatedVersion);
this.Verifier.Settings.IgnoreProperty<AccountAddressContactDTO>(f => f.CreatedDate);
}
public override void Execute()
{
this.GetAccountUISettings();
this.SearchAccounts();
this.SearchAccountsOldStructucre();
var account = this.GetAccount();
//this should find zero logs
this.CheckLogs(account.I3D, "Logs_for_existing_Account");
this.ChangeAndSaveAccount(account);
this.CheckLogs(account.I3D, "Logs_for_existing_Account_after_Change");
var newCustomerI3DContact = this.GetNewCustomer(AccountTypeKind.Contact);
var newCustomerI3D = this.GetNewCustomer(AccountTypeKind.Customer);
this.GetNewCustomer(AccountTypeKind.Supplier);
this.ChangeCustomer(newCustomerI3DContact);
this.CheckLogs(newCustomerI3DContact, "Logs_for_Contact_after_Change");
this.AccountRightTest(newCustomerI3D);
this.GetAccountExcludeContactPicturesTest();
}
private void AccountRightTest(int newCustomerI3D)
{
// UserRightsConst.Sales.Customer.CustomerCommon.SaveCustomer.CREATE_ADDRESS
this.AccountCanCreateAddressTest();
//UserRightsConst.Sales.Customer.CustomerCommon.EditCustomer.EDIT_CUSTOMER_ADDRESS_LANGUAGE
this.AccountCanChangeAddressLanguageTest();
//UserRightsConst.Sales.Customer.CustomerCommon.EditCustomer.EDIT_CUSTOMER_ADDRESS_CURRENCY
this.AccountCanChangeAddressCurrencyTest();
//UserRightsConst.Sales.Customer.CustomerCommon.EditCustomer.EDIT_CUSTOMER_INFO
this.AccountCanChangeCustomerInfoTest(newCustomerI3D);
//UserRightsConst.Sales.Customer.CustomerFinance.CREATE_NEW_Bank_Account
this.AccountCanCreateBankAccountTest(newCustomerI3D);
//UserRightsConst.Sales.Customer.CustomerFinance.EDIT_Bank_Account
this.AccountCanChangeBankAccountTest(newCustomerI3D);
}
private void AccountCanCreateAddressTest()
{
var user = this.GetLoggedInUser();
var account = this.GetAccountByFilter();
account.Addresses.Add(new AccountAddressDTO()
{
CountryI3D = 15,
Department = "Vienna",
City = "Vienna",
Zip = "1010",
Comment = "Has a better castle than france.",
Contacts = new List<AccountAddressContactDTO>()
});
var currentUserHasRightTrue = this.WithSession(f => f.GetBL<AppRightsBL>().HasUserRight(user.UserI3D.Value, UserRightsConst.Sales.Customer.CustomerCommon.SaveCustomer.CREATE_ADDRESS));
Assert.True(currentUserHasRightTrue);
RunTest("AccountCanCreateAddress_TRUE_Test", user, account);
// And add the "only-own" right
this.Sql($"DELETE FROM dbo.Sichtrus WHERE Recht = {UserRightsConst.Sales.Customer.CustomerCommon.SaveCustomer.CREATE_ADDRESS}");
var currentUserHasRightFalse = this.WithSession(f => f.GetBL<AppRightsBL>().HasUserRight(user.UserI3D.Value, UserRightsConst.Sales.Customer.CustomerCommon.SaveCustomer.CREATE_ADDRESS));
Assert.False(currentUserHasRightFalse);
RunTest("AccountCanCreateAddress_FALSE_Test", user, account);
}
private void AccountCanChangeAddressLanguageTest()
{
var user = this.GetLoggedInUser();
var account = this.GetAccountByFilter();
var address = account.Addresses.FirstOrDefault();
if (address != null)
address.LanguageI3D = 15;
var currentUserHasRightTrue = this.WithSession(f => f.GetBL<AppRightsBL>().HasUserRight(user.UserI3D.Value, UserRightsConst.Sales.Customer.CustomerCommon.EditCustomer.EDIT_CUSTOMER_ADDRESS_LANGUAGE));
Assert.True(currentUserHasRightTrue);
RunTest("AccountCanChangeAddressLanguageTest_TRUE_Test", user, account);
// And add the "only-own" right
this.Sql($"DELETE FROM dbo.Sichtrus WHERE Recht = {UserRightsConst.Sales.Customer.CustomerCommon.EditCustomer.EDIT_CUSTOMER_ADDRESS_LANGUAGE}");
var currentUserHasRightFalse = this.WithSession(f => f.GetBL<AppRightsBL>().HasUserRight(user.UserI3D.Value, UserRightsConst.Sales.Customer.CustomerCommon.EditCustomer.EDIT_CUSTOMER_ADDRESS_LANGUAGE));
Assert.False(currentUserHasRightFalse);
if (address != null)
address.LanguageI3D = 6;
RunTest("AccountCanChangeAddressLanguageTest_FALSE_Test", user, account);
}
private void AccountCanChangeAddressCurrencyTest()
{
var user = this.GetLoggedInUser();
var account = this.GetAccountByFilter();
var address = account.Addresses.FirstOrDefault();
if (address != null)
address.CurrencyI3D = 1;
var currentUserHasRightTrue = this.WithSession(f => f.GetBL<AppRightsBL>().HasUserRight(user.UserI3D.Value, UserRightsConst.Sales.Customer.CustomerCommon.EditCustomer.EDIT_CUSTOMER_ADDRESS_CURRENCY));
Assert.True(currentUserHasRightTrue);
RunTest("AccountCanChangeAddressCurrencyTest_TRUE_Test", user, account);
// And add the "only-own" right
this.Sql($"DELETE FROM dbo.Sichtrus WHERE Recht = {UserRightsConst.Sales.Customer.CustomerCommon.EditCustomer.EDIT_CUSTOMER_ADDRESS_CURRENCY}");
var currentUserHasRightFalse = this.WithSession(f => f.GetBL<AppRightsBL>().HasUserRight(user.UserI3D.Value, UserRightsConst.Sales.Customer.CustomerCommon.EditCustomer.EDIT_CUSTOMER_ADDRESS_CURRENCY));
Assert.False(currentUserHasRightFalse);
if (address != null)
address.CurrencyI3D = 2;
RunTest("AccountCanChangeAddressCurrencyTest_FALSE_Test", user, account);
}
void RunTest(string name, LoggedInUser currentUser, AccountDTO account)
{
using (var session = new BLSession())
{
var saveResult = session.GetBL<AccountWebServiceBL>().SaveAccount(currentUser, account, true, false);
Assert.Equal(ResultStatus.Success, saveResult.Status);
Assert.NotNull(saveResult.Data);
this.Verifier.Verify(name, saveResult.Data);
}
}
private void AccountCanChangeCustomerInfoTest(int newCustomerI3D)
{
var user = this.GetLoggedInUser();
var account = this.GetAccountByFilter(newCustomerI3D);
AccountCustomerDTO customerData;
account.TryGetCustomerData(out customerData);
var logos = this.GetLogos(1, CentronObjectKindNumeric.Account);
var logo = logos.FirstOrDefault();
Assert.NotNull(logo);
logo.I3D = 0;
logo.ObjectI3D = customerData.Number;
logo.ObjectKind = CentronObjectKindNumeric.CustomerClass;
RunTest("AccountCanSaveInfoLogoTest", user, logo);
var logoCustomers = this.GetLogos(customerData.Number, CentronObjectKindNumeric.CustomerClass);
var logoCustomer = logos.FirstOrDefault();
Assert.NotNull(logo);
var currentUserHasRightTrue = this.WithSession(f => f.GetBL<AppRightsBL>().HasUserRight(user.UserI3D.Value, UserRightsConst.Sales.Customer.CustomerCommon.EditCustomer.EDIT_CUSTOMER_INFO));
Assert.True(currentUserHasRightTrue);
logoCustomer.IsDefault = false;
RunTest("AccountCanChangeCustomerInfoLogoTest_TRUE_Test", user, logoCustomer);
var customer = this.WithSession(f => f.GetBL<CustomerWebServiceBL>().GetCustomerByI3D(10000, user));
customer.Comment = "Speichern Can Change Customer Info Test";
customer.OfferInfo = "Offer Test Can Change Customer Info Test ohne Recht";
RunTest("AccountCanChangeCustomerInfoTest_TRUE_Test", user, customer);
// And add the "only-own" right
this.Sql($"DELETE FROM dbo.Sichtrus WHERE Recht = {UserRightsConst.Sales.Customer.CustomerCommon.EditCustomer.EDIT_CUSTOMER_INFO}");
var currentUserHasRightFalse = this.WithSession(f => f.GetBL<AppRightsBL>().HasUserRight(user.UserI3D.Value, UserRightsConst.Sales.Customer.CustomerCommon.EditCustomer.EDIT_CUSTOMER_INFO));
Assert.False(currentUserHasRightFalse);
logo.IsDefault = false;
RunTest("AccountCanChangeCustomerInfoLogoTest_FALSE_Test", user, logoCustomer);
var customer2 = this.WithSession(f => f.GetBL<CustomerWebServiceBL>().GetCustomerByI3D(10000, user));
customer2.Comment = "Speichern Can Change Customer Info Test ohne Recht";
customer2.OfferInfo = "Offer Test Can Change Customer Info Test ohne Recht";
RunTest("AccountCanChangeCustomerInfoTest_FALSE_Test", user, customer2);
}
public IList<LogoDTO> GetLogos(int objectI3D, CentronObjectKindNumeric objectKind)
{
var filter = new GetLogosFilter
{
ObjectI3D = objectI3D,
ObjectKind = objectKind
};
using (var session = new BLSession())
{
return session.GetBL<LogosWebServiceBL>().GetLogos(filter).ToList();
}
}
void RunTest(string name, LoggedInUser currentUser, LogoDTO logo)
{
using (var session = new BLSession())
{
var saveResult = session.GetBL<LogosWebServiceBL>().SaveLogo(currentUser, logo);
if (saveResult.Status == ResultStatus.Success)
{
this.Verifier.Verify(name, saveResult.Data);
}
else
{
this.Verifier.Verify(name, saveResult);
}
}
}
void RunTest(string name, LoggedInUser currentUser, CustomerDTO customer)
{
using (var session = new BLSession())
{
var saveResult = session.GetBL<CustomerWebServiceBL>().SaveCustomer(currentUser.User, customer);
Assert.Equal(ResultStatus.Success, saveResult.Status);
this.Verifier.Verify(name, saveResult.Data);
}
}
private void AccountCanCreateBankAccountTest(int newCustomerI3D)
{
var user = this.GetLoggedInUser();
var account = this.GetAccountByFilter(newCustomerI3D);
AccountCustomerDTO customerData;
account.TryGetCustomerData(out customerData);
var newBankAccount = new BankAccountDTO()
{
IsDefault = true,
Caption = "Neu Französische Bank",
Bankname = "Neu Französische Bank",
Street = "Nouvelle-Aquitaine 9",
City = "Meyrals",
PaymentType = BankAccountPaymentType.BankAccount,
BankCodeNumber = "DE",
AccountNumber = $"{account.Number}",
CountryI3D = 6,
Iban = "DE02120300000000202051",
BankConnectionNumber = "2",
Bic = "021203000",
AuthorizationDate = new DateTime(2023, 4, 22),
ValidFrom = new DateTime(2020, 4, 22),
ValidTo = new DateTime(2030, 4, 22),
LastUsed = new DateTime(2023, 4, 22),
DirectDebitType = SepaDirectDebitType.First,
AuthorizationNumber = "123654",
Comment = "Französischer Test",
ObjectI3D = customerData.Number,
ObjectKind = 0,
Status = 1
};
var currentUserHasRightTrue = this.WithSession(f => f.GetBL<AppRightsBL>().HasUserRight(user.UserI3D.Value, UserRightsConst.Sales.Customer.CustomerFinance.CREATE_NEW_Bank_Account));
Assert.True(currentUserHasRightTrue);
RunTest("AccountCanCreateBankAccountLogoTest_TRUE_Test", user, newBankAccount);
// And add the "only-own" right
this.Sql($"DELETE FROM dbo.Sichtrus WHERE Gruppe = 6 And Recht = {UserRightsConst.Sales.Customer.CustomerFinance.CREATE_NEW_Bank_Account}");
var currentUserHasRightFalse = this.WithSession(f => f.GetBL<AppRightsBL>().HasUserRight(user.UserI3D.Value, UserRightsConst.Sales.Customer.CustomerFinance.CREATE_NEW_Bank_Account));
Assert.False(currentUserHasRightFalse);
RunTest("AccountCanCreateBankAccountLogoTest_FALSE_Test", user, newBankAccount);
}
private void AccountCanChangeBankAccountTest(int newCustomerI3D)
{
var user = this.GetLoggedInUser();
var account = this.GetAccountByFilter(newCustomerI3D);
AccountCustomerDTO customerData;
account.TryGetCustomerData(out customerData);
BankAccountDTO bankAccount;
using (var session = new BLSession())
{
var getResult = session.GetBL<BankAccountWebserviceBL>().GetBankAccountsFromCustomer(new GetBankAccountsFromCustomerRequest
{
CustomerI3D = customerData.Number,
});
bankAccount = getResult.FirstOrDefault();
}
Assert.NotNull(bankAccount);
bankAccount.City = "Vienna";
bankAccount.Comment = "Geändert für Test True";
var currentUserHasRightTrue = this.WithSession(f => f.GetBL<AppRightsBL>().HasUserRight(user.UserI3D.Value, UserRightsConst.Sales.Customer.CustomerFinance.EDIT_Bank_Account));
Assert.True(currentUserHasRightTrue);
RunTest("AccountCanChangeBankAccountTest_TRUE_Test", user, bankAccount);
// And add the "only-own" right
this.Sql($"DELETE FROM dbo.Sichtrus WHERE Gruppe = 6 And Recht = {UserRightsConst.Sales.Customer.CustomerFinance.EDIT_Bank_Account}");
var currentUserHasRightFalse = this.WithSession(f => f.GetBL<AppRightsBL>().HasUserRight(user.UserI3D.Value, UserRightsConst.Sales.Customer.CustomerFinance.EDIT_Bank_Account));
Assert.False(currentUserHasRightFalse);
bankAccount.City = "Ulm";
bankAccount.Comment = "Geändert für Test False";
RunTest("AccountCanChangeBankAccountTest_FALSE_Test", user, bankAccount);
}
void RunTest(string name, LoggedInUser currentUser, BankAccountDTO bankAccount)
{
using (var session = new BLSession())
{
var saveResult = session.GetBL<BankAccountWebserviceBL>().SaveBankAccount(bankAccount, currentUser);
if (saveResult.Status == ResultStatus.Success)
{
this.Verifier.Verify(name, saveResult.Data);
}
else
{
this.Verifier.Verify(name, saveResult);
}
}
}
private void GetAccountUISettings()
{
using (var session = new BLSession())
{
var accountUISettings = session.GetBL<AccountWebServiceBL>().GetAccountUiSettings(11);
Assert.Equal(ResultStatus.Success, accountUISettings.Status);
Assert.NotNull(accountUISettings.Data);
this.Verifier.Verify("AccountUISettings", accountUISettings.Data);
}
}
private void SearchAccounts()
{
using (var session = new BLSession())
{
var filter = new AccountSearchFilter
{
IsActive = true,
IsDefaultAddress = true,
IsDefaultAddressContact = true,
};
var searchResult = session.GetBL<AccountSearchWebServiceBL>().SearchAccountsThroughPaging(this.GetLoggedInUser(), filter, 1, int.MaxValue);
Assert.Equal(ResultStatus.Success, searchResult.Status);
Assert.NotNull(searchResult.Data);
this.Verifier.Verify("AccountSearch", searchResult.Data);
}
}
private void SearchAccountsOldStructucre()
{
using (var session = new BLSession())
{
var filter = new AccountSearchFilter
{
IsActive = true,
IsDefaultAddress = true,
IsDefaultAddressContact = true,
ForceSearchInOldStructure = true
};
// To test search without paging, set page and entriesPerPage to 0. Important test case!!
var searchResult = session.GetBL<AccountSearchWebServiceBL>().SearchAccountsThroughPaging(this.GetLoggedInUser(), filter, 0, 0);
Assert.Equal(ResultStatus.Success, searchResult.Status);
Assert.NotNull(searchResult.Data);
this.Verifier.Verify("AccountSearchOldStructure", searchResult.Data);
}
}
private AccountDTO GetAccount()
{
var account = this.GetAccountByFilter();
this.Verifier.Verify("GetAccount", account);
return account;
}
private AccountDTO GetAccountByFilter(int? accountI3D = null)
{
using (var session = new BLSession())
{
var filter = new AccountFilter
{
AccountI3D = accountI3D ?? 1037
};
var accountResult = session.GetBL<AccountWebServiceBL>().GetAccount(this.GetLoggedInUser(), filter, true);
Assert.Equal(ResultStatus.Success, accountResult.Status);
Assert.NotNull(accountResult.Data);
if (accountI3D != null)
{
this.Verifier.Verify($"GetAccount_{accountI3D}", accountResult.Data);
}
return accountResult.Data;
}
}
private void ChangeAndSaveAccount(AccountDTO account)
{
using (var session = new BLSession())
{
account.Comment = "Geändert für Test";
account.Phone = "111222333";
account.Email = "account@Test.test";
account.Name += 1;
account.Matchcode = "uwu";
var saveResult = session.GetBL<AccountWebServiceBL>().SaveAccount(this.GetLoggedInUser(), account, true, false);
Assert.Equal(ResultStatus.Success, saveResult.Status);
Assert.NotNull(saveResult.Data);
this.Verifier.Verify("SaveAccount", saveResult.Data);
}
}
private int GetNewCustomer(AccountTypeKind kind)
{
using (var bl = new BLSession())
{
var account = bl.GetBL<AccountWebServiceBL>().CreateNewAccount(this.GetLoggedInUser(), null, kind, true);
Assert.Equal(ResultStatus.Success, account.Status);
Assert.NotNull(account.Data);
this.Verifier.Verify($"GetNew{kind.ToString()}", account.Data);
account.Data.Name = "Peter Lustig";
var savedAccount = bl.GetBL<AccountWebServiceBL>().SaveAccount(this.GetLoggedInUser(), account.Data,true, false).ThrowIfError();
return savedAccount.I3D;
}
}
private void CheckLogs(int accountI3D, string nameForVerifier)
{
var filter = new AccountLogFilter()
{
AccountI3Ds = new List<int> { accountI3D }
};
var logs = this.WithSession(f => f.GetBL<AccountWebServiceBL>().GetAccountLogsByFilter(filter)).ThrowIfError().OrderBy(f => f.I3D);
this.Verifier.Verify(nameForVerifier, logs);
}
private void ChangeCustomer(int accountI3D)
{
var filter = new AccountFilter
{
AccountI3D = accountI3D
};
using (var bl = new BLSession())
{
var customer = bl.GetBL<AccountWebServiceBL>().GetAccount(this.GetLoggedInUser(), filter, true).ThrowIfError();
var france = new AccountAddressDTO()
{
CountryI3D = 6,
CurrencyI3D = 6,
LanguageI3D = 6,
Department = "Nouvelle-Aquitaine",
City = "Meyrals",
Zip = "24220",
Comment = "Has a nice castle"
};
var ludwig = new AccountAddressContactDTO()
{
Firstname = "Ludwig XVI",
Lastname = "Of France",
Comment = "acts a bit headless",
Birthday = new DateTime(1754, 08, 23),
Email1 = "lastKing@France.com",
IsMailingAtEmail1Active = true
};
france.Contacts = new List<AccountAddressContactDTO> { ludwig };
customer.Addresses = new List<AccountAddressDTO> { france };
customer.Name = "Robespierre & Co.";
customer.Comment = "Sharp blades, from razor to guillotine";
bl.GetBL<AccountWebServiceBL>().SaveAccount(this.GetLoggedInUser(), customer, true, false);
}
}
private void GetAccountExcludeContactPicturesTest()
{
var accountI3D = 4;
this.PrepareAccountAddressContacts(accountI3D);
using (var session = new BLSession())
{
var filter01 = new AccountFilter { AccountI3D = accountI3D };
var accountResult01 = session.GetBL<AccountWebServiceBL>().GetAccount(this.GetLoggedInUser(), filter01, true);
Assert.Equal(ResultStatus.Success, accountResult01.Status);
Assert.NotNull(accountResult01.Data);
Assert.NotNull(accountResult01.Data.Addresses);
var contacts01 = accountResult01.Data.Addresses?.Where(f => f.Contacts != null).SelectMany(f => f.Contacts).ToList();
foreach (var contacts in contacts01)
{
Assert.NotNull(contacts.Picture);
Assert.True(contacts.Picture.Length > 0);
}
var filter02 = new AccountFilter { AccountI3D = accountI3D, ExcludeContactPictures = true };
var accountResult02 = session.GetBL<AccountWebServiceBL>().GetAccount(this.GetLoggedInUser(), filter02, true);
Assert.Equal(ResultStatus.Success, accountResult02.Status);
Assert.NotNull(accountResult02.Data);
Assert.NotNull(accountResult02.Data.Addresses);
foreach (var contacts in accountResult02.Data.Addresses?.Where(f => f.Contacts != null).SelectMany(f => f.Contacts))
{
Assert.NotNull(contacts.Picture);
Assert.True(contacts.Picture.Length == 0);
}
}
}
private void PrepareAccountAddressContacts(int accountI3D)
{
using (var session = new BLSession())
{
var filter = new AccountFilter { AccountI3D = accountI3D };
var accountResult01 = session.GetBL<AccountWebServiceBL>().GetAccount(this.GetLoggedInUser(), filter, true);
Assert.Equal(ResultStatus.Success, accountResult01.Status);
Assert.NotNull(accountResult01.Data);
Assert.NotNull(accountResult01.Data.Addresses);
var contacts = accountResult01.Data.Addresses?.Where(f => f.Contacts != null).SelectMany(f => f.Contacts).ToList();
contacts.ForEach(f => f.Picture = new byte[] { 1, 2, 3, 4, 5 });
session.GetBL<AccountAddressContactWebServiceBL>().SaveContacts(this.GetLoggedInUser(), contacts);
}
}
}
}
@@ -0,0 +1,54 @@
{
HasAddDirectoryRight: true,
HasAddDocumentRight: true,
HasCreateContactPartnerRights: true,
HasCreateCustomerAddressRights: true,
HasCreateCustomerBankAccountRights: true,
HasCreateCustomerRights: true,
HasCreateSupplierContactPersonRight: true,
HasCreateSupplierRight: true,
HasCrmArticleRights: true,
HasCrmDetailStatisticRights: true,
HasCustomDevicesRights: true,
HasCustomerCrmRight: true,
HasCustomerInstructionAccepted: true,
HasDeleteContactRights: true,
HasDeleteCustomerRights: true,
HasDeleteDirectoryRight: true,
HasDeleteDocumentRight: true,
HasDeleteOrderProcessingContractRight: true,
HasEditAdvisor1Rights: true,
HasEditAdvisor2Rights: true,
HasEditAdvisorRights: true,
HasEditContactPartnerRights: true,
HasEditCustomerAddressCurrencyRights: true,
HasEditCustomerAddressLanguageRights: true,
HasEditCustomerAttachmentsReceiverRights: true,
HasEditCustomerBankAccountRights: true,
HasEditCustomerInfoRights: true,
HasEditCustomerKindRights: true,
HasEditCustomerKindRightsCreateOnly: false,
HasEditCustomerLimitRights: true,
HasEditCustomerRights: true,
HasEditLocationRights: true,
HasEditLocationRightsCreateOnly: false,
HasEditSupplierContactPersonRight: true,
HasEditSupplierLImitRights: true,
HasEditSupplierRight: true,
HasExportCustomerRights: true,
HasExportCustomerSearchToExcelRights: true,
HasIgnoreDunningBlockingForReceiptsRights: true,
HasLicenseManagementRights: true,
HasLockCustomerRights: true,
HasOrderProcessingContractManagementRight: true,
HasReadDocumentRight: true,
HasRenameDirectoryRight: true,
HasRenameDocumentRight: true,
HasResetExportCustomerRight: true,
HasRightToResetWasExportedFlag: true,
HasShowCalculationCustomerRights: true,
HasShowCustomerFinanceRights: true,
HasShowCustomerOposRights: true,
HasShowOnlyOwnRights: false,
HasUnlockCustomerRights: true
}
@@ -0,0 +1,6 @@
{
ArticleI3D: 50,
CustomerArticleCode: 'Malen nach Zahlen',
CustomerI3D: 10000,
I3D: 2
}
@@ -0,0 +1,42 @@
using Centron.BusinessLogic;
using Centron.BusinessLogic.WebServices.Accounts;
using Centron.Core.Extensions;
using Centron.Tests.EndToEnd.Infrastructure;
using CentronSoftware.Centron.WebServices.Entities.CustomerArea.CustomerToArticle;
using Xunit.Abstractions;
namespace Centron.Tests.EndToEnd.Tests.Account.CustomerArticles;
public class CustomerArticlesTest : EndToEndTest
{
public CustomerArticlesTest(ITestOutputHelper testOutputHelper)
: base(testOutputHelper)
{
}
public override void Execute()
{
this.SaveAndDeleteCustomerArticle();
}
private void SaveAndDeleteCustomerArticle()
{
using var session = new BLSession();
var customerArticleDTO = new CustomerArticleDTO
{
ArticleI3D = 50,
CustomerI3D = 10000,
CustomerArticleCode = "Malen nach Zahlen"
};
var save = session.GetBL<AccountWebServiceBL>().SaveCustomerArticle(customerArticleDTO);
this.Verifier.Verify("CustomerArticle_Save", save);
session.GetBL<AccountWebServiceBL>().DeleteCustomerArticle(save.I3D);
this.Verifier.VerifyTable("CustomerArticle_Delete", "dbo.KundeToArtikel", $"I3D = {save.I3D}");
}
}
@@ -0,0 +1,196 @@
{
AccountTypes: [
{
AccountType: {
I3D: 2,
IsActive: true,
IsFavorite: false,
Kind: 1,
Name: 'Lieferant'
},
CustomerData: null,
I3D: 1092,
SupplierData: {
BookKeepingCollectionAccount: null,
BookKeepingExportDate: null,
BookKeepingExportEmployeeI3D: null,
BookKeepingNumber: '',
CarrierShortSign: null,
CommentCreditVoucher: null,
CommentDeliveryList: null,
CommentInvoice: null,
CommentOffer: null,
CommentOrder: null,
ConcertoSupplierNumber: null,
Discount: 0.00,
EDIKind: 0,
EgisSupplierNumber: '',
FreightCost: 0.00,
FreightCostDirectDelivery: 0.00,
FreightCostFree: 0.00,
FreightCostFreeAtDirectDelivery: 0.00,
I3D: 10,
IsAlkaSupplier: false,
IsBookKeepingExportDeaktivated: false,
IsBookKeepingExportDone: false,
IsCarrier: false,
IsDirectDelivery: false,
IsDiscountAtPriceBase: false,
IsDistributor: false,
IsExclusiveOfVAT: false,
IsFavorite: false,
IsIsoCertified: false,
IsManufacturer: true,
ItScopeSupplierNumber: null,
Limit: 0.00,
LimitCalculationKind: null,
MinimumOrderValue: 0.00,
MinimumOrderValueAtDirectDelivery: 0.00,
Number: 70010,
OwnCustomerNumber: '',
PbsEasySupplierNumber: null,
PbsEasyX400MailAddress: null,
ReceiptConditionCreditVoucherI3D: null,
ReceiptConditionDeliveryOfferI3D: null,
ReceiptConditionDeliveryOrderI3D: null,
ReceiptConditionInvoiceI3D: null,
ReceiptConditionOfferI3D: null,
ReceiptConditionOrderI3D: null,
RMAInfo: '',
RMANeeded: false,
RootDirI3D: 247,
SmallQuantitiesExtraCharge: 0.00,
SmallQuantitiesExtraChargeAtDirectDelivery: 0.00,
SupplierClassification: -1,
TradersGuideSupplierI3D: null,
WarehouseI3D: null,
WEEE: ''
}
},
{
AccountType: {
I3D: 3,
IsActive: true,
IsFavorite: false,
Kind: 2,
Name: 'Kontakt'
},
CustomerData: null,
I3D: 1093,
SupplierData: null
}
],
Addresses: [
{
AccountI3D: 1037,
AddressKind: 0,
BookKeepingNumber: null,
ChangedByI3D: 44,
City: '',
Comment: '',
Contacts: [
{
AccountAddressI3D: 1050,
Birthday: null,
ChangedByI3D: 44,
Comment: '',
CreatedByI3D: 44,
DefaultSubstitute: false,
DefaultTicket: false,
DepartmentI3D: null,
DepartmentText: null,
Email1: '',
Email2: '',
Fax1: '',
Fax2: '',
Firstname: '',
FullName: ' , ',
I3D: 1062,
IsActive: true,
IsDefault: true,
IsInvoiceMailCCReceiver: false,
IsMailingAtEmail1Active: false,
IsMailingAtEmail2Active: false,
Job: '',
Lastname: ' ',
OldReferenceI3D: 21,
OldReferenceKind: 0,
Phone1: '',
Phone2: '',
Phone3: '',
Phone4: '',
Phone5: '',
Picture: '',
PictureExtension: null,
SalutationI3D: null,
SAMAccountName: null,
SearchTag: null,
SID: null,
VariableTextField01: null,
VariableTextField02: null
}
],
CountryI3D: 1,
CreatedByI3D: 44,
CurrencyI3D: 1,
Department: null,
GeoInfo: null,
GeoInfoUpdateFailed: false,
I3D: 1050,
IsActive: true,
IsDefault: true,
IsPostOfficeBoxActive: false,
IsRMARequired: false,
LanguageI3D: 1,
OldReferenceI3D: 18,
OldReferenceKind: 0,
PostOfficeBox: '',
PrintAddressContact: true,
PrintDepartment: false,
PrintDepartmentAddressContact: false,
PrintName: true,
StateI3D: null,
Street: '',
VariableBoolField01: false,
Zip: ''
}
],
AdvertisingNotAllowed: false,
AdvertisingNotAllowedInfo: null,
Adviser1I3D: null,
Adviser2I3D: null,
Adviser3I3D: null,
Adviser4I3D: null,
Adviser5I3D: null,
Adviser6I3D: null,
ChangedByI3D: 27,
Comment: null,
CommercialRegisterPage: null,
CompanyGroupI3D: null,
CreatedByI3D: 27,
CreatedThrough: 7,
Email: '',
Fax: '',
FaxDistributor: false,
FreeText01: null,
I3D: 1037,
InstructionI3D: null,
InvoiceMailBCCReceiver: null,
IsActive: true,
IsInstructionActive: false,
IsLocked: false,
MailDistributor: false,
MandatorI3D: null,
Matchcode: '',
Name: 'Acer GmbH',
Number: 38,
OriginI3D: null,
Phone: '',
RevenueIdentificationNumber: '',
SalesAreaI3D: null,
TaxNumber: '',
TermsAndConditionEmployeeI3D: null,
TermsAndConditionReceivedDate: null,
UseSettingsFromCompanyGroupForReceipts: false,
WebSite: ''
}
@@ -0,0 +1,239 @@
{
AccountTypes: [
{
AccountType: {
I3D: 1,
IsActive: true,
IsFavorite: false,
Kind: 0,
Name: 'Kunde'
},
CustomerData: {
AcquisionComplete: null,
AcquisionFreeDate1: null,
AcquisionFreeDate2: null,
AcquisionImportant: null,
AdditionalInformation: null,
AlternativeDeliveryAccountI3D: null,
AlternativeDeliveryAddressContactI3D: null,
AlternativeDeliveryAddressI3D: null,
AlternativeDeliveryReceiver: null,
AlternativeInvoiceAccountI3D: null,
AlternativeInvoiceAddressContactI3D: null,
AlternativeInvoiceAddressI3D: null,
AlternativeInvoiceMailRecipientI3D: null,
AlternativeInvoiceReceiver: null,
BookKeepingCollectionAccount: null,
BookKeepingExportDate: null,
BookKeepingExportEmployeeI3D: null,
BookKeepingNumber: '10028',
BoughtByThusFar: null,
CanSeeTicketsSBO: false,
ClassificationI3D: null,
CommentCreditVoucher: null,
CommentDeliveryList: null,
CommentHelpdesk: null,
CommentInvoice: null,
CommentOffer: null,
CommentOrder: null,
CommentPickupList: null,
CoreDataComplete: null,
CountPc: null,
CountServer: null,
CrmText1: null,
CrmText2: null,
CrmText3: null,
CrmText4: null,
CrmText5: null,
CrmText6: null,
CustomerApprovalEnabledSBO: false,
DeliveryOption: null,
DeliveryText: null,
Discount: 0.00,
DunningInfo: null,
DunningLetterAfterDays1: null,
DunningLetterAfterDays2: null,
DunningLetterAfterDays3: null,
DunningLetterKind: null,
DunningLetterRecipientPersonI3D: null,
DunningLetterUseAlternativeInvoiceAddress: false,
DunningStop: false,
DunningStopBegin: null,
DunningStopEnd: null,
EsCustomerGroupI3D: null,
ExportZUGFeRDDocument: null,
ExtraChargeRetailPrice: 0.00,
HasTicketApproval: null,
HelpdeskClosingDontNotifyCustomer: null,
I3D: 1026,
InvoiceDeliveryKind: null,
IsAccountKind1: false,
IsAccountKind2: false,
IsAccountKind3: false,
IsAccountKind4: false,
IsAccountKind5: false,
IsBookKeepingExportDeaktivated: false,
IsBookKeepingExportDone: false,
IsDiscountTextVisibilityDeaktivated: false,
IsExclusiveOfVAT: false,
IsProductionConfigurationMandatory: false,
IsProjectNumberRequired: false,
IsPurchaseOrderNumberRequired: false,
LeitwegID: null,
Limit: 0.00,
LimitCalculationKind: null,
LockOrderAfterDunningLevel: 0,
MailNotificationAtHelpdeskBCC: null,
MailNotificationAtHelpdeskCC: null,
MandatorBank: null,
Number: 10028,
OwnSupplierNumber: null,
PcManufacturor: null,
PriceList: 0,
PriceListFromDistributorI3D: null,
PrinterManufacturor: null,
PrintProductionConfiguration: false,
ProductRecipientNumber: null,
ProvisionSchemaI3D: null,
ReceiptConditionCreditVoucherI3D: null,
ReceiptConditionDeliveryI3D: null,
ReceiptConditionDeliveryListI3D: null,
ReceiptConditionDeliveryOfferI3D: null,
ReceiptConditionDeliveryOrderI3D: null,
ReceiptConditionInvoiceI3D: null,
ReceiptConditionOfferI3D: null,
ReceiptConditionOrderI3D: null,
ReceiptConditionPickupListI3D: null,
ReceiptReceiverDelivery: null,
ReceiptReceiverInvoice: null,
RiverbirdCustomerReference: null,
RiverbirdMsp: null,
RootDirI3D: 22398,
SalesControllingI3D: null,
ServerManufacturor: null,
ShippingCostsDeaktivated: false,
ShowTelekomDiveCustomerNote: null,
SpecialAgreementI3D: null,
TelekomDiveCustomerNote: null,
TicketsVisibleFromDateSBO: null,
Vip: null,
WarehouseI3D: null
},
I3D: 1119,
SupplierData: null
}
],
Addresses: [
{
AccountI3D: 1051,
AddressKind: 1,
BookKeepingNumber: null,
ChangedByI3D: 22,
City: null,
Comment: null,
Contacts: [
{
AccountAddressI3D: 1064,
Birthday: null,
ChangedByI3D: 22,
Comment: null,
CreatedByI3D: 22,
DefaultSubstitute: false,
DefaultTicket: false,
DepartmentI3D: null,
DepartmentText: null,
Email1: null,
Email2: null,
Fax1: null,
Fax2: null,
Firstname: '',
FullName: ', ',
I3D: 1076,
IsActive: true,
IsDefault: true,
IsInvoiceMailCCReceiver: false,
IsMailingAtEmail1Active: false,
IsMailingAtEmail2Active: false,
Job: null,
Lastname: '',
OldReferenceI3D: 1091,
OldReferenceKind: 0,
Phone1: null,
Phone2: null,
Phone3: null,
Phone4: null,
Phone5: null,
Picture: '',
PictureExtension: null,
SalutationI3D: null,
SAMAccountName: null,
SearchTag: null,
SID: null,
VariableTextField01: null,
VariableTextField02: null
}
],
CountryI3D: 1,
CreatedByI3D: 22,
CurrencyI3D: 1,
Department: null,
GeoInfo: null,
GeoInfoUpdateFailed: false,
I3D: 1064,
IsActive: true,
IsDefault: true,
IsPostOfficeBoxActive: false,
IsRMARequired: false,
LanguageI3D: 1,
OldReferenceI3D: 1070,
OldReferenceKind: 0,
PostOfficeBox: null,
PrintAddressContact: false,
PrintDepartment: false,
PrintDepartmentAddressContact: false,
PrintName: true,
StateI3D: null,
Street: null,
VariableBoolField01: null,
Zip: null
}
],
AdvertisingNotAllowed: false,
AdvertisingNotAllowedInfo: null,
Adviser1I3D: null,
Adviser2I3D: null,
Adviser3I3D: null,
Adviser4I3D: null,
Adviser5I3D: null,
Adviser6I3D: null,
ChangedByI3D: 22,
Comment: null,
CommercialRegisterPage: null,
CompanyGroupI3D: null,
CreatedByI3D: 22,
CreatedThrough: 7,
Email: null,
Fax: null,
FaxDistributor: null,
FreeText01: null,
I3D: 1051,
InstructionI3D: null,
InvoiceMailBCCReceiver: null,
IsActive: true,
IsInstructionActive: false,
IsLocked: false,
MailDistributor: null,
MandatorI3D: null,
Matchcode: null,
Name: 'Peter Lustig',
Number: 52,
OriginI3D: null,
Phone: null,
RevenueIdentificationNumber: null,
SalesAreaI3D: null,
TaxNumber: null,
TermsAndConditionEmployeeI3D: null,
TermsAndConditionReceivedDate: null,
UseSettingsFromCompanyGroupForReceipts: false,
WebSite: null
}
@@ -0,0 +1,129 @@
{
AccountTypes: [
{
AccountType: {
I3D: 3,
IsActive: true,
IsFavorite: false,
Kind: 2,
Name: 'Kontakt'
},
CustomerData: null,
I3D: 0,
SupplierData: null
}
],
Addresses: [
{
AccountI3D: 0,
AddressKind: 1,
BookKeepingNumber: null,
ChangedByI3D: 22,
City: null,
Comment: null,
Contacts: [
{
AccountAddressI3D: 0,
Birthday: null,
ChangedByI3D: 22,
Comment: null,
CreatedByI3D: 22,
DefaultSubstitute: false,
DefaultTicket: false,
DepartmentI3D: null,
DepartmentText: null,
Email1: null,
Email2: null,
Fax1: null,
Fax2: null,
Firstname: null,
FullName: ', ',
I3D: 0,
IsActive: true,
IsDefault: true,
IsInvoiceMailCCReceiver: false,
IsMailingAtEmail1Active: false,
IsMailingAtEmail2Active: false,
Job: null,
Lastname: null,
OldReferenceI3D: null,
OldReferenceKind: null,
Phone1: null,
Phone2: null,
Phone3: null,
Phone4: null,
Phone5: null,
Picture: '',
PictureExtension: null,
SalutationI3D: null,
SAMAccountName: null,
SearchTag: null,
SID: null,
VariableTextField01: null,
VariableTextField02: null
}
],
CountryI3D: 1,
CreatedByI3D: 22,
CurrencyI3D: 1,
Department: null,
GeoInfo: null,
GeoInfoUpdateFailed: false,
I3D: 0,
IsActive: true,
IsDefault: true,
IsPostOfficeBoxActive: false,
IsRMARequired: false,
LanguageI3D: 1,
OldReferenceI3D: null,
OldReferenceKind: null,
PostOfficeBox: null,
PrintAddressContact: false,
PrintDepartment: false,
PrintDepartmentAddressContact: false,
PrintName: true,
StateI3D: null,
Street: null,
VariableBoolField01: null,
Zip: null
}
],
AdvertisingNotAllowed: false,
AdvertisingNotAllowedInfo: null,
Adviser1I3D: null,
Adviser2I3D: null,
Adviser3I3D: null,
Adviser4I3D: null,
Adviser5I3D: null,
Adviser6I3D: null,
ChangedByI3D: 22,
Comment: null,
CommercialRegisterPage: null,
CompanyGroupI3D: null,
CreatedByI3D: 22,
CreatedThrough: 7,
Email: null,
Fax: null,
FaxDistributor: null,
FreeText01: null,
I3D: 0,
InstructionI3D: null,
InvoiceMailBCCReceiver: null,
IsActive: true,
IsInstructionActive: false,
IsLocked: false,
MailDistributor: null,
MandatorI3D: null,
Matchcode: null,
Name: null,
Number: 51,
OriginI3D: null,
Phone: null,
RevenueIdentificationNumber: null,
SalesAreaI3D: null,
TaxNumber: null,
TermsAndConditionEmployeeI3D: null,
TermsAndConditionReceivedDate: null,
UseSettingsFromCompanyGroupForReceipts: false,
WebSite: null
}
@@ -0,0 +1,239 @@
{
AccountTypes: [
{
AccountType: {
I3D: 1,
IsActive: true,
IsFavorite: false,
Kind: 0,
Name: 'Kunde'
},
CustomerData: {
AcquisionComplete: null,
AcquisionFreeDate1: null,
AcquisionFreeDate2: null,
AcquisionImportant: null,
AdditionalInformation: null,
AlternativeDeliveryAccountI3D: null,
AlternativeDeliveryAddressContactI3D: null,
AlternativeDeliveryAddressI3D: null,
AlternativeDeliveryReceiver: null,
AlternativeInvoiceAccountI3D: null,
AlternativeInvoiceAddressContactI3D: null,
AlternativeInvoiceAddressI3D: null,
AlternativeInvoiceMailRecipientI3D: null,
AlternativeInvoiceReceiver: null,
BookKeepingCollectionAccount: null,
BookKeepingExportDate: null,
BookKeepingExportEmployeeI3D: null,
BookKeepingNumber: '10028',
BoughtByThusFar: null,
CanSeeTicketsSBO: false,
ClassificationI3D: null,
CommentCreditVoucher: null,
CommentDeliveryList: null,
CommentHelpdesk: null,
CommentInvoice: null,
CommentOffer: null,
CommentOrder: null,
CommentPickupList: null,
CoreDataComplete: null,
CountPc: null,
CountServer: null,
CrmText1: null,
CrmText2: null,
CrmText3: null,
CrmText4: null,
CrmText5: null,
CrmText6: null,
CustomerApprovalEnabledSBO: false,
DeliveryOption: null,
DeliveryText: null,
Discount: 0.0,
DunningInfo: null,
DunningLetterAfterDays1: null,
DunningLetterAfterDays2: null,
DunningLetterAfterDays3: null,
DunningLetterKind: null,
DunningLetterRecipientPersonI3D: null,
DunningLetterUseAlternativeInvoiceAddress: false,
DunningStop: false,
DunningStopBegin: null,
DunningStopEnd: null,
EsCustomerGroupI3D: null,
ExportZUGFeRDDocument: null,
ExtraChargeRetailPrice: 0.0,
HasTicketApproval: null,
HelpdeskClosingDontNotifyCustomer: null,
I3D: 0,
InvoiceDeliveryKind: null,
IsAccountKind1: false,
IsAccountKind2: false,
IsAccountKind3: false,
IsAccountKind4: false,
IsAccountKind5: false,
IsBookKeepingExportDeaktivated: false,
IsBookKeepingExportDone: false,
IsDiscountTextVisibilityDeaktivated: false,
IsExclusiveOfVAT: false,
IsProductionConfigurationMandatory: false,
IsProjectNumberRequired: false,
IsPurchaseOrderNumberRequired: false,
LeitwegID: null,
Limit: 0.0,
LimitCalculationKind: null,
LockOrderAfterDunningLevel: 0,
MailNotificationAtHelpdeskBCC: null,
MailNotificationAtHelpdeskCC: null,
MandatorBank: null,
Number: 10028,
OwnSupplierNumber: null,
PcManufacturor: null,
PriceList: 0,
PriceListFromDistributorI3D: null,
PrinterManufacturor: null,
PrintProductionConfiguration: false,
ProductRecipientNumber: null,
ProvisionSchemaI3D: null,
ReceiptConditionCreditVoucherI3D: null,
ReceiptConditionDeliveryI3D: null,
ReceiptConditionDeliveryListI3D: null,
ReceiptConditionDeliveryOfferI3D: null,
ReceiptConditionDeliveryOrderI3D: null,
ReceiptConditionInvoiceI3D: null,
ReceiptConditionOfferI3D: null,
ReceiptConditionOrderI3D: null,
ReceiptConditionPickupListI3D: null,
ReceiptReceiverDelivery: null,
ReceiptReceiverInvoice: null,
RiverbirdCustomerReference: null,
RiverbirdMsp: null,
RootDirI3D: null,
SalesControllingI3D: null,
ServerManufacturor: null,
ShippingCostsDeaktivated: false,
ShowTelekomDiveCustomerNote: null,
SpecialAgreementI3D: null,
TelekomDiveCustomerNote: null,
TicketsVisibleFromDateSBO: null,
Vip: null,
WarehouseI3D: null
},
I3D: 0,
SupplierData: null
}
],
Addresses: [
{
AccountI3D: 0,
AddressKind: 1,
BookKeepingNumber: null,
ChangedByI3D: 22,
City: null,
Comment: null,
Contacts: [
{
AccountAddressI3D: 0,
Birthday: null,
ChangedByI3D: 22,
Comment: null,
CreatedByI3D: 22,
DefaultSubstitute: false,
DefaultTicket: false,
DepartmentI3D: null,
DepartmentText: null,
Email1: null,
Email2: null,
Fax1: null,
Fax2: null,
Firstname: null,
FullName: ', ',
I3D: 0,
IsActive: true,
IsDefault: true,
IsInvoiceMailCCReceiver: false,
IsMailingAtEmail1Active: false,
IsMailingAtEmail2Active: false,
Job: null,
Lastname: null,
OldReferenceI3D: null,
OldReferenceKind: null,
Phone1: null,
Phone2: null,
Phone3: null,
Phone4: null,
Phone5: null,
Picture: '',
PictureExtension: null,
SalutationI3D: null,
SAMAccountName: null,
SearchTag: null,
SID: null,
VariableTextField01: null,
VariableTextField02: null
}
],
CountryI3D: 1,
CreatedByI3D: 22,
CurrencyI3D: 1,
Department: null,
GeoInfo: null,
GeoInfoUpdateFailed: false,
I3D: 0,
IsActive: true,
IsDefault: true,
IsPostOfficeBoxActive: false,
IsRMARequired: false,
LanguageI3D: 1,
OldReferenceI3D: null,
OldReferenceKind: null,
PostOfficeBox: null,
PrintAddressContact: false,
PrintDepartment: false,
PrintDepartmentAddressContact: false,
PrintName: true,
StateI3D: null,
Street: null,
VariableBoolField01: null,
Zip: null
}
],
AdvertisingNotAllowed: false,
AdvertisingNotAllowedInfo: null,
Adviser1I3D: null,
Adviser2I3D: null,
Adviser3I3D: null,
Adviser4I3D: null,
Adviser5I3D: null,
Adviser6I3D: null,
ChangedByI3D: 22,
Comment: null,
CommercialRegisterPage: null,
CompanyGroupI3D: null,
CreatedByI3D: 22,
CreatedThrough: 7,
Email: null,
Fax: null,
FaxDistributor: null,
FreeText01: null,
I3D: 0,
InstructionI3D: null,
InvoiceMailBCCReceiver: null,
IsActive: true,
IsInstructionActive: false,
IsLocked: false,
MailDistributor: null,
MandatorI3D: null,
Matchcode: null,
Name: null,
Number: 52,
OriginI3D: null,
Phone: null,
RevenueIdentificationNumber: null,
SalesAreaI3D: null,
TaxNumber: null,
TermsAndConditionEmployeeI3D: null,
TermsAndConditionReceivedDate: null,
UseSettingsFromCompanyGroupForReceipts: false,
WebSite: null
}
@@ -0,0 +1,184 @@
{
AccountTypes: [
{
AccountType: {
I3D: 2,
IsActive: true,
IsFavorite: false,
Kind: 1,
Name: 'Lieferant'
},
CustomerData: null,
I3D: 0,
SupplierData: {
BookKeepingCollectionAccount: null,
BookKeepingExportDate: null,
BookKeepingExportEmployeeI3D: null,
BookKeepingNumber: '',
CarrierShortSign: null,
CommentCreditVoucher: null,
CommentDeliveryList: null,
CommentInvoice: null,
CommentOffer: null,
CommentOrder: null,
ConcertoSupplierNumber: null,
Discount: 0.0,
EDIKind: null,
EgisSupplierNumber: null,
FreightCost: 0.0,
FreightCostDirectDelivery: 0.0,
FreightCostFree: 0.0,
FreightCostFreeAtDirectDelivery: 0.0,
I3D: 0,
IsAlkaSupplier: false,
IsBookKeepingExportDeaktivated: false,
IsBookKeepingExportDone: false,
IsCarrier: false,
IsDirectDelivery: false,
IsDiscountAtPriceBase: false,
IsDistributor: false,
IsExclusiveOfVAT: false,
IsFavorite: false,
IsIsoCertified: false,
IsManufacturer: false,
ItScopeSupplierNumber: null,
Limit: 0.0,
LimitCalculationKind: null,
MinimumOrderValue: 0.0,
MinimumOrderValueAtDirectDelivery: 0.0,
Number: 70024,
OwnCustomerNumber: null,
PbsEasySupplierNumber: null,
PbsEasyX400MailAddress: null,
ReceiptConditionCreditVoucherI3D: null,
ReceiptConditionDeliveryOfferI3D: null,
ReceiptConditionDeliveryOrderI3D: null,
ReceiptConditionInvoiceI3D: null,
ReceiptConditionOfferI3D: null,
ReceiptConditionOrderI3D: null,
RMAInfo: null,
RMANeeded: null,
RootDirI3D: null,
SmallQuantitiesExtraCharge: 0.0,
SmallQuantitiesExtraChargeAtDirectDelivery: 0.0,
SupplierClassification: null,
TradersGuideSupplierI3D: null,
WarehouseI3D: null,
WEEE: null
}
}
],
Addresses: [
{
AccountI3D: 0,
AddressKind: 1,
BookKeepingNumber: null,
ChangedByI3D: 22,
City: null,
Comment: null,
Contacts: [
{
AccountAddressI3D: 0,
Birthday: null,
ChangedByI3D: 22,
Comment: null,
CreatedByI3D: 22,
DefaultSubstitute: false,
DefaultTicket: false,
DepartmentI3D: null,
DepartmentText: null,
Email1: null,
Email2: null,
Fax1: null,
Fax2: null,
Firstname: null,
FullName: ', ',
I3D: 0,
IsActive: true,
IsDefault: true,
IsInvoiceMailCCReceiver: false,
IsMailingAtEmail1Active: false,
IsMailingAtEmail2Active: false,
Job: null,
Lastname: null,
OldReferenceI3D: null,
OldReferenceKind: null,
Phone1: null,
Phone2: null,
Phone3: null,
Phone4: null,
Phone5: null,
Picture: '',
PictureExtension: null,
SalutationI3D: null,
SAMAccountName: null,
SearchTag: null,
SID: null,
VariableTextField01: null,
VariableTextField02: null
}
],
CountryI3D: 1,
CreatedByI3D: 22,
CurrencyI3D: 1,
Department: null,
GeoInfo: null,
GeoInfoUpdateFailed: false,
I3D: 0,
IsActive: true,
IsDefault: true,
IsPostOfficeBoxActive: false,
IsRMARequired: false,
LanguageI3D: 1,
OldReferenceI3D: null,
OldReferenceKind: null,
PostOfficeBox: null,
PrintAddressContact: false,
PrintDepartment: false,
PrintDepartmentAddressContact: false,
PrintName: true,
StateI3D: null,
Street: null,
VariableBoolField01: null,
Zip: null
}
],
AdvertisingNotAllowed: false,
AdvertisingNotAllowedInfo: null,
Adviser1I3D: null,
Adviser2I3D: null,
Adviser3I3D: null,
Adviser4I3D: null,
Adviser5I3D: null,
Adviser6I3D: null,
ChangedByI3D: 22,
Comment: null,
CommercialRegisterPage: null,
CompanyGroupI3D: null,
CreatedByI3D: 22,
CreatedThrough: 7,
Email: null,
Fax: null,
FaxDistributor: null,
FreeText01: null,
I3D: 0,
InstructionI3D: null,
InvoiceMailBCCReceiver: null,
IsActive: true,
IsInstructionActive: false,
IsLocked: false,
MailDistributor: null,
MandatorI3D: null,
Matchcode: null,
Name: null,
Number: 53,
OriginI3D: null,
Phone: null,
RevenueIdentificationNumber: null,
SalesAreaI3D: null,
TaxNumber: null,
TermsAndConditionEmployeeI3D: null,
TermsAndConditionReceivedDate: null,
UseSettingsFromCompanyGroupForReceipts: false,
WebSite: null
}
@@ -0,0 +1,194 @@
[
{
AccountI3D: 1050,
CreatedDate: DateTime,
EmployeeI3D: 22,
EmployeeShortSign: 'ADMIN',
I3D: 5,
Message: 'Firmenname',
NewValue: 'Robespierre & Co.',
OldValue: 'Peter Lustig',
ReferenceObjectI3D: null,
ReferenceObjectKind: null
},
{
AccountI3D: 1050,
CreatedDate: DateTime,
EmployeeI3D: 22,
EmployeeShortSign: 'ADMIN',
I3D: 6,
Message: 'Stadt',
NewValue: 'Meyrals',
OldValue: '',
ReferenceObjectI3D: null,
ReferenceObjectKind: null
},
{
AccountI3D: 1050,
CreatedDate: DateTime,
EmployeeI3D: 22,
EmployeeShortSign: 'ADMIN',
I3D: 7,
Message: 'Abteilung (Anschrift)',
NewValue: 'Nouvelle-Aquitaine',
OldValue: '',
ReferenceObjectI3D: null,
ReferenceObjectKind: null
},
{
AccountI3D: 1050,
CreatedDate: DateTime,
EmployeeI3D: 22,
EmployeeShortSign: 'ADMIN',
I3D: 8,
Message: 'Kommentar',
NewValue: 'Has a nice castle',
OldValue: '',
ReferenceObjectI3D: null,
ReferenceObjectKind: null
},
{
AccountI3D: 1050,
CreatedDate: DateTime,
EmployeeI3D: 22,
EmployeeShortSign: 'ADMIN',
I3D: 9,
Message: 'PLZ',
NewValue: '24220',
OldValue: '',
ReferenceObjectI3D: null,
ReferenceObjectKind: null
},
{
AccountI3D: 1050,
CreatedDate: DateTime,
EmployeeI3D: 22,
EmployeeShortSign: 'ADMIN',
I3D: 10,
Message: 'Ist Name',
NewValue: 'Falsch',
OldValue: 'Falsch',
ReferenceObjectI3D: null,
ReferenceObjectKind: null
},
{
AccountI3D: 1050,
CreatedDate: DateTime,
EmployeeI3D: 22,
EmployeeShortSign: 'ADMIN',
I3D: 11,
Message: 'Land',
NewValue: 'Frankreich',
OldValue: 'Deutschland',
ReferenceObjectI3D: null,
ReferenceObjectKind: null
},
{
AccountI3D: 1050,
CreatedDate: DateTime,
EmployeeI3D: 22,
EmployeeShortSign: 'ADMIN',
I3D: 12,
Message: 'Währung',
NewValue: 'Euro',
OldValue: 'Euro',
ReferenceObjectI3D: null,
ReferenceObjectKind: null
},
{
AccountI3D: 1050,
CreatedDate: DateTime,
EmployeeI3D: 22,
EmployeeShortSign: 'ADMIN',
I3D: 13,
Message: 'Sprache',
NewValue: 'Frankreich',
OldValue: 'Deutschland',
ReferenceObjectI3D: null,
ReferenceObjectKind: null
},
{
AccountI3D: 1050,
CreatedDate: DateTime,
EmployeeI3D: 22,
EmployeeShortSign: 'ADMIN',
I3D: 14,
Message: 'Email',
NewValue: 'lastKing@France.com',
OldValue: '',
ReferenceObjectI3D: null,
ReferenceObjectKind: null
},
{
AccountI3D: 1050,
CreatedDate: DateTime,
EmployeeI3D: 22,
EmployeeShortSign: 'ADMIN',
I3D: 15,
Message: 'Kommentar',
NewValue: 'acts a bit headless',
OldValue: '',
ReferenceObjectI3D: null,
ReferenceObjectKind: null
},
{
AccountI3D: 1050,
CreatedDate: DateTime,
EmployeeI3D: 22,
EmployeeShortSign: 'ADMIN',
I3D: 16,
Message: 'Vorname',
NewValue: 'Ludwig XVI',
OldValue: '',
ReferenceObjectI3D: null,
ReferenceObjectKind: null
},
{
AccountI3D: 1050,
CreatedDate: DateTime,
EmployeeI3D: 22,
EmployeeShortSign: 'ADMIN',
I3D: 17,
Message: 'Nachname',
NewValue: 'Of France',
OldValue: '',
ReferenceObjectI3D: null,
ReferenceObjectKind: null
},
{
AccountI3D: 1050,
CreatedDate: DateTime,
EmployeeI3D: 22,
EmployeeShortSign: 'ADMIN',
I3D: 18,
Message: 'Ist Mailing an Email 1 aktiv',
NewValue: 'Wahr',
OldValue: 'Falsch',
ReferenceObjectI3D: null,
ReferenceObjectKind: null
},
{
AccountI3D: 1050,
CreatedDate: DateTime,
EmployeeI3D: 22,
EmployeeShortSign: 'ADMIN',
I3D: 19,
Message: 'Ist Aktiv',
NewValue: 'Falsch',
OldValue: 'Wahr',
ReferenceObjectI3D: null,
ReferenceObjectKind: null
},
{
AccountI3D: 1050,
CreatedDate: DateTime,
EmployeeI3D: 22,
EmployeeShortSign: 'ADMIN',
I3D: 20,
Message: 'Geburtstag',
NewValue: 'EinDatum 00:00:00',
OldValue: '',
ReferenceObjectI3D: null,
ReferenceObjectKind: null
}
]
@@ -0,0 +1,50 @@
[
{
AccountI3D: 1037,
CreatedDate: DateTime,
EmployeeI3D: 22,
EmployeeShortSign: 'ADMIN',
I3D: 1,
Message: 'Firmenname',
NewValue: 'Acer GmbH1',
OldValue: 'Acer GmbH',
ReferenceObjectI3D: null,
ReferenceObjectKind: null
},
{
AccountI3D: 1037,
CreatedDate: DateTime,
EmployeeI3D: 22,
EmployeeShortSign: 'ADMIN',
I3D: 2,
Message: 'Matchcode',
NewValue: 'uwu',
OldValue: '',
ReferenceObjectI3D: null,
ReferenceObjectKind: null
},
{
AccountI3D: 1037,
CreatedDate: DateTime,
EmployeeI3D: 22,
EmployeeShortSign: 'ADMIN',
I3D: 3,
Message: 'Telefon',
NewValue: '111222333',
OldValue: '',
ReferenceObjectI3D: null,
ReferenceObjectKind: null
},
{
AccountI3D: 1037,
CreatedDate: DateTime,
EmployeeI3D: 22,
EmployeeShortSign: 'ADMIN',
I3D: 4,
Message: 'Email',
NewValue: 'account@Test.test',
OldValue: '',
ReferenceObjectI3D: null,
ReferenceObjectKind: null
}
]
@@ -0,0 +1,196 @@
{
AccountTypes: [
{
AccountType: {
I3D: 2,
IsActive: true,
IsFavorite: false,
Kind: 1,
Name: 'Lieferant'
},
CustomerData: null,
I3D: 1092,
SupplierData: {
BookKeepingCollectionAccount: null,
BookKeepingExportDate: null,
BookKeepingExportEmployeeI3D: null,
BookKeepingNumber: '',
CarrierShortSign: null,
CommentCreditVoucher: null,
CommentDeliveryList: null,
CommentInvoice: null,
CommentOffer: null,
CommentOrder: null,
ConcertoSupplierNumber: null,
Discount: 0.00,
EDIKind: 0,
EgisSupplierNumber: '',
FreightCost: 0.00,
FreightCostDirectDelivery: 0.00,
FreightCostFree: 0.00,
FreightCostFreeAtDirectDelivery: 0.00,
I3D: 10,
IsAlkaSupplier: false,
IsBookKeepingExportDeaktivated: false,
IsBookKeepingExportDone: false,
IsCarrier: false,
IsDirectDelivery: false,
IsDiscountAtPriceBase: false,
IsDistributor: false,
IsExclusiveOfVAT: false,
IsFavorite: false,
IsIsoCertified: false,
IsManufacturer: true,
ItScopeSupplierNumber: null,
Limit: 0.00,
LimitCalculationKind: null,
MinimumOrderValue: 0.00,
MinimumOrderValueAtDirectDelivery: 0.00,
Number: 70010,
OwnCustomerNumber: '',
PbsEasySupplierNumber: null,
PbsEasyX400MailAddress: null,
ReceiptConditionCreditVoucherI3D: null,
ReceiptConditionDeliveryOfferI3D: null,
ReceiptConditionDeliveryOrderI3D: null,
ReceiptConditionInvoiceI3D: null,
ReceiptConditionOfferI3D: null,
ReceiptConditionOrderI3D: null,
RMAInfo: '',
RMANeeded: false,
RootDirI3D: 247,
SmallQuantitiesExtraCharge: 0.00,
SmallQuantitiesExtraChargeAtDirectDelivery: 0.00,
SupplierClassification: -1,
TradersGuideSupplierI3D: null,
WarehouseI3D: null,
WEEE: ''
}
},
{
AccountType: {
I3D: 3,
IsActive: true,
IsFavorite: false,
Kind: 2,
Name: 'Kontakt'
},
CustomerData: null,
I3D: 1093,
SupplierData: null
}
],
Addresses: [
{
AccountI3D: 1037,
AddressKind: 0,
BookKeepingNumber: null,
ChangedByI3D: 22,
City: '',
Comment: '',
Contacts: [
{
AccountAddressI3D: 1050,
Birthday: null,
ChangedByI3D: 22,
Comment: '',
CreatedByI3D: 44,
DefaultSubstitute: false,
DefaultTicket: false,
DepartmentI3D: null,
DepartmentText: null,
Email1: '',
Email2: '',
Fax1: '',
Fax2: '',
Firstname: '',
FullName: ' , ',
I3D: 1062,
IsActive: true,
IsDefault: true,
IsInvoiceMailCCReceiver: false,
IsMailingAtEmail1Active: false,
IsMailingAtEmail2Active: false,
Job: '',
Lastname: ' ',
OldReferenceI3D: 21,
OldReferenceKind: 0,
Phone1: '',
Phone2: '',
Phone3: '',
Phone4: '',
Phone5: '',
Picture: '',
PictureExtension: null,
SalutationI3D: null,
SAMAccountName: null,
SearchTag: null,
SID: null,
VariableTextField01: null,
VariableTextField02: null
}
],
CountryI3D: 1,
CreatedByI3D: 44,
CurrencyI3D: 1,
Department: null,
GeoInfo: null,
GeoInfoUpdateFailed: false,
I3D: 1050,
IsActive: true,
IsDefault: true,
IsPostOfficeBoxActive: false,
IsRMARequired: false,
LanguageI3D: 1,
OldReferenceI3D: 18,
OldReferenceKind: 0,
PostOfficeBox: '',
PrintAddressContact: true,
PrintDepartment: false,
PrintDepartmentAddressContact: false,
PrintName: true,
StateI3D: null,
Street: '',
VariableBoolField01: false,
Zip: ''
}
],
AdvertisingNotAllowed: false,
AdvertisingNotAllowedInfo: null,
Adviser1I3D: null,
Adviser2I3D: null,
Adviser3I3D: null,
Adviser4I3D: null,
Adviser5I3D: null,
Adviser6I3D: null,
ChangedByI3D: 22,
Comment: 'Geändert für Test',
CommercialRegisterPage: null,
CompanyGroupI3D: null,
CreatedByI3D: 27,
CreatedThrough: 7,
Email: 'account@Test.test',
Fax: '',
FaxDistributor: false,
FreeText01: null,
I3D: 1037,
InstructionI3D: null,
InvoiceMailBCCReceiver: null,
IsActive: true,
IsInstructionActive: false,
IsLocked: false,
MailDistributor: false,
MandatorI3D: null,
Matchcode: 'uwu',
Name: 'Acer GmbH1',
Number: 38,
OriginI3D: null,
Phone: '111222333',
RevenueIdentificationNumber: '',
SalesAreaI3D: null,
TaxNumber: '',
TermsAndConditionEmployeeI3D: null,
TermsAndConditionReceivedDate: null,
UseSettingsFromCompanyGroupForReceipts: false,
WebSite: ''
}
@@ -0,0 +1,20 @@
[
{
AccountI3D: 16,
AccountName: 'Stadtverwaltung Tuttlingen',
IsTelekomDivePartner: true,
NotifyAtCrmActivities: true,
NotifyAtCrmActivitiesBCC: false,
NotifyAtCrmActivitiesTo: false,
NotifyAtOffers: false,
NotifyAtOrders: true,
PartnerAccountContact: '',
PartnerAccountContactDepartment: null,
PartnerAccountContactI3D: 1061,
PartnerAccountContactJob: '',
PartnerAccountContactMail: '',
PartnerAccountContactPhone: '',
PartnerAccountI3D: 1036,
PartnerAccountName: 'Microsoft GmbH'
}
]
@@ -0,0 +1,7 @@
{
Data: null,
Error: null,
Message: 'Account muss ausgewählt sein.',
MessageCode: null,
Status: 2
}
@@ -0,0 +1,35 @@
{
Data: {
AccountAddressContactI3D: 8,
AccountI3D: 1,
ActivityKind: 3,
CampaignI3D: null,
Caption: 'Why are murders in Kentucky so hard to solve?',
ChangedByI3D: 22,
ChangedDate: DateTime,
CreatedByI3D: 22,
CreatedDate: DateTime,
DateFrom: null,
DateTo: null,
DirectoryI3D: null,
DueDate: null,
EditorI3D: 22,
HasDocuments: false,
I3D: 8066,
IsDone: false,
ProcessActivityI3D: null,
ProjectNumber: '',
Rating: 0,
RecurrenceDate: null,
ReferenceObjectI3D: null,
ReferenceObjectKind: null,
SyncWithOutlook: false,
Text: 'Because there are no dental records and all the DNA matches.',
TextRtf: '',
TodoI3D: 20744
},
Error: null,
Message: null,
MessageCode: null,
Status: 0
}
@@ -0,0 +1,35 @@
{
Data: {
AccountAddressContactI3D: 9,
AccountI3D: 1028,
ActivityKind: 1,
CampaignI3D: null,
Caption: 'What did the teddy bear eat for lunch?',
ChangedByI3D: 22,
ChangedDate: DateTime,
CreatedByI3D: 22,
CreatedDate: DateTime,
DateFrom: DateTime,
DateTo: DateTime,
DirectoryI3D: null,
DueDate: null,
EditorI3D: 27,
HasDocuments: false,
I3D: 8067,
IsDone: false,
ProcessActivityI3D: null,
ProjectNumber: '',
Rating: 4,
RecurrenceDate: null,
ReferenceObjectI3D: null,
ReferenceObjectKind: null,
SyncWithOutlook: true,
Text: 'Nothing, he was stuffed.',
TextRtf: '',
TodoI3D: 20746
},
Error: null,
Message: null,
MessageCode: null,
Status: 0
}
@@ -0,0 +1,9 @@
{
Data: {
I3D: 8067
},
Error: null,
Message: null,
MessageCode: null,
Status: 0
}
@@ -0,0 +1,12 @@
{
Data: {
Count: 0,
CurrentPage: 0,
PageCount: 0,
Result: []
},
Error: null,
Message: null,
MessageCode: null,
Status: 0
}
@@ -0,0 +1,47 @@
{
Data: {
Count: 1,
CurrentPage: 0,
PageCount: 0,
Result: [
{
Account: 'Celos Software GmbH.\r\n',
AccountI3D: 1028,
ActivityKind: 1,
Adviser1I3D: 22,
Adviser2I3D: null,
Adviser3I3D: null,
Adviser4I3D: null,
Adviser5I3D: null,
Adviser6I3D: null,
CampaignI3D: null,
Caption: 'What did the teddy bear eat for lunch?',
ContactEMail1: 'bauer@c-entron.de',
ContactI3D: 9,
ContactName: 'Frau Elisabeth Bauer',
ContactPhone1: '',
CreatedBy: 'ADMIN',
CreatedByI3D: 22,
CreatedDate: DateTime,
DateFrom: DateTime,
DateTo: DateTime,
DueDate: null,
Editor: 'ABO',
EditorI3D: 27,
HasDocuments: false,
I3D: 8067,
IsDone: true,
ProcessActivityI3D: null,
ProjectNumber: '',
Rating: 2,
RecurrenceDate: null,
SalesAreaI3D: null,
Text: 'Nothing, he was stuffed.'
}
]
},
Error: null,
Message: null,
MessageCode: null,
Status: 0
}
@@ -0,0 +1,41 @@
{
Data: {
AccountActivity: {
AccountAddressContactI3D: 9,
AccountI3D: 1028,
ActivityKind: 1,
CampaignI3D: null,
Caption: 'What did the teddy bear eat for lunch?',
ChangedByI3D: 22,
ChangedDate: DateTime,
CreatedByI3D: 22,
CreatedDate: DateTime,
DateFrom: DateTime,
DateTo: DateTime,
DirectoryI3D: null,
DueDate: null,
EditorI3D: 27,
HasDocuments: false,
I3D: 8067,
IsDone: true,
ProcessActivityI3D: null,
ProjectNumber: '',
Rating: 2,
RecurrenceDate: null,
ReferenceObjectI3D: null,
ReferenceObjectKind: null,
SyncWithOutlook: true,
Text: 'Nothing, he was stuffed.',
TextRtf: '',
TodoI3D: null
},
I3D: 1,
ReceiptI3D: 1311,
ReceiptKind: 2,
ReceiptNumber: 20312
},
Error: null,
Message: null,
MessageCode: null,
Status: 0
}
@@ -0,0 +1,41 @@
{
Data: {
AccountActivity: {
AccountAddressContactI3D: 2,
AccountI3D: 1,
ActivityKind: 0,
CampaignI3D: null,
Caption: 'Angebot für einen Drucker',
ChangedByI3D: 44,
ChangedDate: DateTime,
CreatedByI3D: 44,
CreatedDate: DateTime,
DateFrom: null,
DateTo: null,
DirectoryI3D: null,
DueDate: DateTime,
EditorI3D: 44,
HasDocuments: false,
I3D: 1117,
IsDone: false,
ProcessActivityI3D: null,
ProjectNumber: '',
Rating: 0,
RecurrenceDate: DateTime,
ReferenceObjectI3D: null,
ReferenceObjectKind: null,
SyncWithOutlook: false,
Text: '',
TextRtf: '{\rtf1\deff0{\fonttbl{\f0 Calibri;}}{\colortbl ;\red0\green0\blue255 ;}{\*\defchp \fs22}{\stylesheet {\ql\fs22 Normal;}{\*\cs1\fs22 Default Paragraph Font;}{\*\cs2\sbasedon1\fs22 Line Number;}{\*\cs3\ul\fs22\cf1 Hyperlink;}{\*\ts4\tsrowd\fs22\ql\tscellpaddfl3\tscellpaddl108\tscellpaddfb3\tscellpaddfr3\tscellpaddr108\tscellpaddft3\tsvertalt\cltxlrtb Normal Table;}{\*\ts5\tsrowd\sbasedon4\fs22\ql\trbrdrt\brdrs\brdrw10\trbrdrl\brdrs\brdrw10\trbrdrb\brdrs\brdrw10\trbrdrr\brdrs\brdrw10\trbrdrh\brdrs\brdrw10\trbrdrv\brdrs\brdrw10\tscellpaddfl3\tscellpaddl108\tscellpaddfr3\tscellpaddr108\tsvertalt\cltxlrtb Table Simple 1;}}{\*\listoverridetable}{\info{\version1}}\nouicompat\splytwnine\htmautsp\sectd\pard\plain\ql\fs22\par}',
TodoI3D: 19209
},
I3D: 2,
ReceiptI3D: 1311,
ReceiptKind: 2,
ReceiptNumber: 20312
},
Error: null,
Message: null,
MessageCode: null,
Status: 0
}
@@ -0,0 +1,78 @@
{
Data: [
{
AccountActivity: {
AccountAddressContactI3D: 2,
AccountI3D: 1,
ActivityKind: 0,
CampaignI3D: null,
Caption: 'Angebot für einen Drucker',
ChangedByI3D: 44,
ChangedDate: DateTime,
CreatedByI3D: 44,
CreatedDate: DateTime,
DateFrom: null,
DateTo: null,
DirectoryI3D: null,
DueDate: DateTime,
EditorI3D: 44,
HasDocuments: false,
I3D: 1117,
IsDone: false,
ProcessActivityI3D: null,
ProjectNumber: '',
Rating: 0,
RecurrenceDate: DateTime,
ReferenceObjectI3D: null,
ReferenceObjectKind: null,
SyncWithOutlook: false,
Text: '',
TextRtf: '{\rtf1\deff0{\fonttbl{\f0 Calibri;}}{\colortbl ;\red0\green0\blue255 ;}{\*\defchp \fs22}{\stylesheet {\ql\fs22 Normal;}{\*\cs1\fs22 Default Paragraph Font;}{\*\cs2\sbasedon1\fs22 Line Number;}{\*\cs3\ul\fs22\cf1 Hyperlink;}{\*\ts4\tsrowd\fs22\ql\tscellpaddfl3\tscellpaddl108\tscellpaddfb3\tscellpaddfr3\tscellpaddr108\tscellpaddft3\tsvertalt\cltxlrtb Normal Table;}{\*\ts5\tsrowd\sbasedon4\fs22\ql\trbrdrt\brdrs\brdrw10\trbrdrl\brdrs\brdrw10\trbrdrb\brdrs\brdrw10\trbrdrr\brdrs\brdrw10\trbrdrh\brdrs\brdrw10\trbrdrv\brdrs\brdrw10\tscellpaddfl3\tscellpaddl108\tscellpaddfr3\tscellpaddr108\tsvertalt\cltxlrtb Table Simple 1;}}{\*\listoverridetable}{\info{\version1}}\nouicompat\splytwnine\htmautsp\sectd\pard\plain\ql\fs22\par}',
TodoI3D: 19209
},
I3D: 2,
ReceiptI3D: 1311,
ReceiptKind: 2,
ReceiptNumber: 20312
},
{
AccountActivity: {
AccountAddressContactI3D: 9,
AccountI3D: 1028,
ActivityKind: 1,
CampaignI3D: null,
Caption: 'What did the teddy bear eat for lunch?',
ChangedByI3D: 22,
ChangedDate: DateTime,
CreatedByI3D: 22,
CreatedDate: DateTime,
DateFrom: DateTime,
DateTo: DateTime,
DirectoryI3D: null,
DueDate: null,
EditorI3D: 27,
HasDocuments: false,
I3D: 8067,
IsDone: true,
ProcessActivityI3D: null,
ProjectNumber: '',
Rating: 2,
RecurrenceDate: null,
ReferenceObjectI3D: null,
ReferenceObjectKind: null,
SyncWithOutlook: true,
Text: 'Nothing, he was stuffed.',
TextRtf: '',
TodoI3D: null
},
I3D: 1,
ReceiptI3D: 1311,
ReceiptKind: 2,
ReceiptNumber: 20312
}
],
Error: null,
Message: null,
MessageCode: null,
Status: 0
}
@@ -0,0 +1,6 @@
{
Error: null,
Message: null,
MessageCode: null,
Status: 0
}
@@ -0,0 +1,43 @@
{
Data: [
{
AccountActivity: {
AccountAddressContactI3D: 9,
AccountI3D: 1028,
ActivityKind: 1,
CampaignI3D: null,
Caption: 'What did the teddy bear eat for lunch?',
ChangedByI3D: 22,
ChangedDate: DateTime,
CreatedByI3D: 22,
CreatedDate: DateTime,
DateFrom: DateTime,
DateTo: DateTime,
DirectoryI3D: null,
DueDate: null,
EditorI3D: 27,
HasDocuments: false,
I3D: 8067,
IsDone: true,
ProcessActivityI3D: null,
ProjectNumber: '',
Rating: 2,
RecurrenceDate: null,
ReferenceObjectI3D: null,
ReferenceObjectKind: null,
SyncWithOutlook: true,
Text: 'Nothing, he was stuffed.',
TextRtf: '',
TodoI3D: null
},
I3D: 1,
ReceiptI3D: 1311,
ReceiptKind: 2,
ReceiptNumber: 20312
}
],
Error: null,
Message: null,
MessageCode: null,
Status: 0
}
@@ -0,0 +1,43 @@
{
Data: [
{
AccountActivity: {
AccountAddressContactI3D: 9,
AccountI3D: 1028,
ActivityKind: 1,
CampaignI3D: null,
Caption: 'What did the teddy bear eat for lunch?',
ChangedByI3D: 22,
ChangedDate: DateTime,
CreatedByI3D: 22,
CreatedDate: DateTime,
DateFrom: DateTime,
DateTo: DateTime,
DirectoryI3D: null,
DueDate: null,
EditorI3D: 27,
HasDocuments: false,
I3D: 8067,
IsDone: true,
ProcessActivityI3D: null,
ProjectNumber: '',
Rating: 2,
RecurrenceDate: null,
ReferenceObjectI3D: null,
ReferenceObjectKind: null,
SyncWithOutlook: true,
Text: 'Nothing, he was stuffed.',
TextRtf: '',
TodoI3D: null
},
I3D: 1,
ReceiptI3D: 1311,
ReceiptKind: 2,
ReceiptNumber: 20312
}
],
Error: null,
Message: null,
MessageCode: null,
Status: 0
}
@@ -0,0 +1,194 @@
using System;
using System.Linq;
using Centron.BusinessLogic;
using Centron.BusinessLogic.WebServices.Accounts.Activities;
using Centron.BusinessLogic.WebServices.Mail.Templates;
using Centron.BusinessLogic.WebServices.Sales.Receipts;
using Centron.Controls.Shared;
using Centron.Data.Entities.Accounts.Activities;
using Centron.Data.WebServices.Mail.Templates;
using Centron.Interfaces;
using Centron.Interfaces.Accounts.Activities;
using Centron.Interfaces.BL;
using Centron.Tests.EndToEnd.Infrastructure;
using CentronSoftware.Centron.WebServices.Entities.Accounts.Activities;
using DevExpress.XtraRichEdit;
using Xunit;
using Xunit.Abstractions;
namespace Centron.Tests.EndToEnd.Tests.AccountActivities;
public class AccountActivityTest : EndToEndTest
{
private int _centronAccountI3D = 1;
private int _celosAccountI3D = 1028;
private int _adminPersonalI3D = 22;
private int _thPersonalI3D = 27;
private int _dukeMartinAccountAddressContactI3D = 8;
private int _farmerElisabethAccountAddressContactI3D = 9;
private int _accountActivitiyI3D = 1117;
public AccountActivityTest(ITestOutputHelper testOutputHelper) : base(testOutputHelper)
{
this.Verifier.Settings.IgnoreProperty<AccountActivityDTO>(f => f.CreatedVersion);
this.Verifier.Settings.IgnoreProperty<AccountActivityDTO>(f => f.ChangedVersion);
this.Verifier.Settings.IgnoreColumn("Datum");
this.Verifier.Settings.IgnoreColumn("WiedervorlageDatum");
this.Verifier.Settings.IgnoreColumn("GeaendertDatum");
this.Verifier.Settings.IgnoreColumn("GeaendertDatumVersion");
this.Verifier.Settings.IgnoreColumn("ErstelltVersion");
this.Verifier.Settings.IgnoreColumn("GeaendertVersion");
}
[Fact(Skip = "This test is weirdly flaky, not sure why, but it's very annoying that PRs fail because of it")]
public override void Execute()
{
var accountActivityI3D = this.CreateAccountActivities();
this.UpdateAccountActivities(accountActivityI3D);
this.LoadAccountActivities();
this.LinkActivityWithReceipt(accountActivityI3D);
this.LoadMailForNote("FallbackMailBody");
this.CreateMailTemplatesForNote();
this.LoadMailForNote("NewMailTemplateMailBody");
}
private void CreateMailTemplatesForNote()
{
using (var session = new BLSession())
{
var mailTemplate = new MailTemplateDTO
{
Subject = "Was hat jemand der im Dreieck läuft?",
Body = TextHelper.PlainToRtf("Kreislaufprobleme."),
ObjectKind = (int) CentronObjectKindNumeric.AccountActivity,
SubObjectKind = (int) AccountActivityKind.Note,
IsActive = true
};
var saved = session.GetBL<MailTemplateWebServiceBL>().SaveOrUpdateMailTemplate(this.GetLoggedInUser(), mailTemplate);
Assert.NotNull(saved);
Assert.Equal(ResultStatus.Success, saved.Status);
}
}
private void LoadMailForNote(string name)
{
using (var session = new BLSession())
{
//random exisiting i3D
var mailTemplate = session.GetBL<AccountActivitiesWebServiceBL>().GetCrmMailTemplate(1166, "test@c-entron.de", this.GetLoggedInUser());
Assert.NotNull(mailTemplate);
Assert.Equal(ResultStatus.Success, mailTemplate.Status);
this.Verifier.Verify(name, TextHelper.RtfToPlain(mailTemplate.Data.FirstOrDefault().Body.Text));
}
}
private int CreateAccountActivities()
{
var zeroDTO = new AccountActivityDTO
{
Caption = "What did the Cannibal get when he was late to the feast?",
Text = "The cold shoulder"
};
//this should return an error
var zeroResult = this.WithSession(f => f.GetBL<AccountActivitiesWebServiceBL>().SaveAccountActivity(zeroDTO, this.GetLoggedInUser()));
this.Verifier.Verify("00_FailedSaving", zeroResult);
var oneDTO = new AccountActivityDTO
{
Caption = "Why are murders in Kentucky so hard to solve?",
Text = "Because there are no dental records and all the DNA matches.",
AccountI3D = _centronAccountI3D,
EditorI3D = _adminPersonalI3D,
AccountAddressContactI3D = _dukeMartinAccountAddressContactI3D,
ActivityKind = AccountActivityKind.Note
};
var oneResult = this.WithSession(f => f.GetBL<AccountActivitiesWebServiceBL>().SaveAccountActivity(oneDTO, this.GetLoggedInUser()));
this.Verifier.Verify("01_SuccessfulSaving1", oneResult);
var twoDTO = new AccountActivityDTO
{
Caption = "What did the teddy bear eat for lunch?",
Text = "Nothing, he was stuffed.",
AccountI3D = _celosAccountI3D,
EditorI3D = _thPersonalI3D,
AccountAddressContactI3D = _farmerElisabethAccountAddressContactI3D,
ActivityKind = AccountActivityKind.Appointment,
DateFrom = new DateTime(2222, 2, 2),
DateTo = new DateTime(1111, 1, 1),
Rating = 4,
SyncWithOutlook = true,
};
var twoResult = this.WithSession(f => f.GetBL<AccountActivitiesWebServiceBL>().SaveAccountActivity(twoDTO, this.GetLoggedInUser()));
this.Verifier.Verify("02_SuccessfulSaving2", twoResult);
this.Verifier.VerifyTable("XX_TaetigkeitenTable", "Taetigkeiten");
return twoResult.Data.I3D;
}
private void UpdateAccountActivities(int i3DToUpdate)
{
var threeUpdateResult = this.WithSession(f => f.GetBL<AccountActivitiesWebServiceBL>().UpdateAccountActivity(i3DToUpdate, true, 2, this.GetLoggedInUser()));
this.Verifier.Verify("03_UpdateResult", threeUpdateResult);
}
private void LoadAccountActivities()
{
var oneFilter = new AccountActivitySearchFilter()
{
Caption = "bear",
IsDone = false,
};
var fourList = this.WithSession(f => f.GetBL<AccountActivitiesWebServiceBL>().SearchActivitiesThroughPaging(oneFilter, 1, Int32.MaxValue, this.GetLoggedInUser()));
this.Verifier.Verify("04_bearSearchResult", fourList);
var twoFilter = new AccountActivitySearchFilter
{
Caption = "teddy",
IsDone = true
};
var fiveList = this.WithSession(f => f.GetBL<AccountActivitiesWebServiceBL>().SearchActivitiesThroughPaging(twoFilter, 1, Int32.MaxValue, this.GetLoggedInUser()));
this.Verifier.Verify("05_closedSearchResult", fiveList);
}
private void LinkActivityWithReceipt(int inactiveAccountActivity)
{
var offerKind = CentronObjectKindNumeric.OrderClass;
var offerI3D = 1311;
var sixResult = this.WithSession(f => f.GetBL<ReceiptWebServiceBL>().SaveAccountActivityForReceipt(offerKind,offerI3D, inactiveAccountActivity));
this.Verifier.Verify("06_linkActivityWithReceipt1", sixResult);
var sevenResult = this.WithSession(f => f.GetBL<ReceiptWebServiceBL>().SaveAccountActivityForReceipt(offerKind, offerI3D, _accountActivitiyI3D));
this.Verifier.Verify("07_linkActivityWithReceipt2", sevenResult);
var eightList = this.WithSession(f => f.GetBL<ReceiptWebServiceBL>().GetAccountActivitiesForReceipt(offerKind, offerI3D, false));
this.Verifier.Verify("08_linkedAccountActivities", eightList);
var nineResult = this.WithSession(f => f.GetBL<ReceiptWebServiceBL>().DeleteAccountActivityForReceipt(eightList.Data.First()));
this.Verifier.Verify("09_deleteLinkedAccountActivityResult", nineResult);
var tenList = this.WithSession(f => f.GetBL<ReceiptWebServiceBL>().GetAccountActivitiesForReceipt(offerKind, offerI3D, false));
this.Verifier.Verify("10_linkedAccountActivitiesAfterDelete", tenList);
var elevenList = this.WithSession(f => f.GetBL<ReceiptWebServiceBL>().GetReceiptsForAccountActivity(inactiveAccountActivity));
this.Verifier.Verify("11_linkedAccountActivitiesReceipts", elevenList);
}
}
@@ -0,0 +1 @@
'c-entron software gmbh\r\nListstrasse 1\r\n89079 Ulm\r\n\r\nSehr geehrter Herr Markus Fischer\r\n0731.140399.331\r\nfischer@c-entron.de\r\n__________________________________________________________________\r\n\r\nWill Angebot über MS Service im Bereich Security\r\n\r\n__________________________________________________________________\r\n\r\nErstellt am: 14.02.2017 10:39\r\nFällig bis: 24.02.2017 10:20\r\nWiedervorlage: 22.02.2017 10:20\r\n__________________________________________________________________\r\n'
@@ -0,0 +1,33 @@
[
{
I3D: '49',
KundenI3D: '10026',
ArtikelI3D: null,
Artikelcode: null,
Artikelbeschreibung: null,
WarengruppeI3D: '310',
Warengruppebezeichnung: 'Drucker',
GiltVon: null,
GiltBis: null,
Aufschlag: '3,5',
Basis: '0',
ErstellerI3D: '22',
Kommentar: null,
UnterwarengruppeI3D: null,
ProjektpreisI3D: null,
ProjektpreisText: null,
AnlageDialogNichtZeigen: null,
VKMenge1: null,
VKPreis1: null,
VKMenge2: null,
VKPreis2: null,
VKMenge3: null,
VKPreis3: null,
VKMenge4: null,
VKPreis4: null,
VKMenge5: null,
VKPreis5: null,
ObjektArt: '5000012',
ObjektI3D: '10026'
}
]
@@ -0,0 +1,8 @@
[
{
CustomerName: 'sembusoft',
CustomerNumber: 10026,
Message: 'Die Sonderpreise wurden erfolgreich zu diesem Kunden kopiert.',
Success: true
}
]

Some files were not shown because too many files have changed in this diff Show More