Add project files.

This commit is contained in:
Thomas Savine
2020-03-06 16:07:06 +00:00
parent e7b186c7e3
commit 70de9715ce
300 changed files with 43679 additions and 0 deletions
@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("SaOpnMgrWinDbas")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("SaOpnMgrWinDbas")]
[assembly: AssemblyCopyright("Copyright © 2020")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("69618253-2fbf-4e3d-9e33-a4ff262b8989")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
+78
View File
@@ -0,0 +1,78 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{69618253-2FBF-4E3D-9E33-A4FF262B8989}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Sarand.OperationsMgr</RootNamespace>
<AssemblyName>SaOpnMgrWinDbas</AssemblyName>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Win\Dbas\App\OpnSystem_WinDbas.cs" />
<Compile Include="Win\Dbas\Base\OpnDatabaseConsole.cs" />
<Compile Include="Win\Dbas\Consoles\OpnUpdateLogConsole_Dbas.cs" />
<Compile Include="Win\Dbas\Consoles\OpnSecurityConsole_Dbas.cs" />
<Compile Include="Win\Dbas\Consoles\OpnReferenceDataConsole_Dbas.cs" />
<Compile Include="Win\Dbas\Consoles\OpnItemOptionConsole_Dbas.cs" />
<Compile Include="Win\Dbas\Consoles\OpnInterfaceConsole_Dbas.cs" />
<Compile Include="Win\Dbas\Consoles\OpnCodeTypeConsole_Dbas.cs" />
<Compile Include="Win\Dbas\Data\OpnDbDataItem.cs" />
<Compile Include="Win\Dbas\Utils\OpnDbDfnGenerator.cs" />
<Compile Include="Win\Dbas\Utils\OpnFileUtil.cs" />
</ItemGroup>
<ItemGroup>
<Folder Include="Win\Dbas\Bus\" />
<Folder Include="Win\Dbas\Internal\" />
<Folder Include="Win\Dbas\Mgr\" />
<Folder Include="Win\Dbas\UpdateLog\" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Common-C#\Workspace\SacsCoreBase\SacsCoreBase.csproj">
<Project>{3311b502-54f1-457a-9108-6f33c83b9eb1}</Project>
<Name>SacsCoreBase</Name>
</ProjectReference>
<ProjectReference Include="..\..\..\Common-C#\Workspace\SacsWinDbas\SacsWinDbas.csproj">
<Project>{86e11448-66df-4eb6-922f-c84e220608ad}</Project>
<Name>SacsWinDbas</Name>
</ProjectReference>
<ProjectReference Include="..\SaOpnMgrCore\SaOpnMgrCore.csproj">
<Project>{9eac4dd6-d3c8-4966-b1be-b0d2ce17f012}</Project>
<Name>SaOpnMgrCore</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
@@ -0,0 +1,33 @@
using Sarand.Core.Base;
using Sarand.OperationsMgr.Core.App;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Sarand.OperationsMgr.Win.Dbas.App
{
//=======================================================================
public class OpnSystem_WinDbas : OpnSystem
{
//-------------------------------------------------------------------
// Static initialisation.
public static void InitStatics ()
{
}
//-------------------------------------------------------------------
// Construction.
public OpnSystem_WinDbas (PropertySet properties) : base(properties)
{
}
//-------------------------------------------------------------------
// D a t a M a n a g e r s
//-------------------------------------------------------------------
//-------------------------------------------------------------------
}
//=======================================================================
}
@@ -0,0 +1,39 @@
using Sarand.OperationsMgr.Core.App;
using Sarand.Win.Dbas.Base;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Sarand.OperationsMgr.Win.Dbas.Base
{
//=======================================================================
public class OpnDatabaseConsole : SacsDatabaseConsole
{
//-------------------------------------------------------------------
// Data members.
private readonly OpnSessionContext sessionContext;
//-------------------------------------------------------------------
// Construction.
public OpnDatabaseConsole(OpnSessionContext sessionContext)
{
this.sessionContext = sessionContext;
}
//-------------------------------------------------------------------
// Properties.
//-------------------------------------------------------------------
// D a t a b a s e I n d i c e s
//-------------------------------------------------------------------
public bool CreateDbIndices (IndexStats indexStats)
{
return false;
}
//-------------------------------------------------------------------
}
//=======================================================================
}
@@ -0,0 +1,28 @@
using Sarand.OperationsMgr.Core.App;
using Sarand.Win.Dbas.Base;
using Sarand.Win.Dbas.CodeTypes;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Sarand.OperationsMgr.App.Consoles
{
//=======================================================================
public abstract class OpnCodeTypeConsole_Dbas : SaCodeTypeConsole_Dbas
{
//-------------------------------------------------------------------
// Construction.
protected OpnCodeTypeConsole_Dbas(SacsDatabase database) : base(database)
{
}
//-------------------------------------------------------------------
// Properties.
public OpnUserContext UserContext { get; set; }
//-------------------------------------------------------------------
}
//=======================================================================
}
@@ -0,0 +1,115 @@
using Sarand.Core.Base;
using Sarand.Core.Bus;
using Sarand.Core.Interfaces;
using Sarand.Core.ItemOptions;
using Sarand.Core.UpdateLog;
using Sarand.OperationsMgr.Core.App;
using Sarand.Win.Dbas.Interfaces;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Sarand.OperationsMgr.App.Consoles
{
//=======================================================================
public abstract class OpnInterfaceConsole_Dbas : SaInterfaceConsole_Dbas
{
//-------------------------------------------------------------------
// Data members.
//-------------------------------------------------------------------
// Construction.
protected OpnInterfaceConsole_Dbas (OpnUserContext userContext) : base(null)
{
UserContext = userContext;
}
//-------------------------------------------------------------------
// Properties.
public OpnUserContext UserContext { get; }
public OpnSessionContext SessionContext { get; }
public override short InterfaceDataType => throw new NotImplementedException();
public override SaItemOptionConsole ItemOptionConsole => throw new NotImplementedException();
public override SaUpdateLogConsole UpdateLogConsole => throw new NotImplementedException();
//---------------------------------------------------------------
// Utilities.
public override String GetItemTypeDesc (short itemType)
{
throw new NotImplementedException();
}
public override string GetItemCaption (ItemId itemId)
{
throw new NotImplementedException();
}
//-------------------------------------------------------------------
// R e g i s t e r I n t e r f a c e s
//-------------------------------------------------------------------
//-------------------------------------------------------------------
// I n t e r f a c e A c c e s s C o n t r o l
//-------------------------------------------------------------------
public override bool CanCreateInterfaces ()
{
throw new NotImplementedException();
}
public override bool CanCreateInterfaces (string context, SaInterfaceCategory interfaceCategory)
{
throw new NotImplementedException();
}
public override bool CanCreateInterface (string context, SaInterfaceCategory interfaceCategory, short interfaceType)
{
throw new NotImplementedException();
}
public override bool CanUpdateInterface (SaInterface interfaceObj)
{
throw new NotImplementedException();
}
public override bool CanCopyInterfaces ()
{
throw new NotImplementedException();
}
public override bool CanCopyInterfaces (string context, SaInterfaceCategory interfaceCategory)
{
throw new NotImplementedException();
}
public override bool CanCopyInterface (string context, SaInterfaceCategory interfaceCategory, short interfaceType)
{
throw new NotImplementedException();
}
public override bool CanCopyInterface (SaInterface interfaceObj)
{
throw new NotImplementedException();
}
public override bool IsCompatibleForInterfaceCopy (string context, SaInterfaceCategory interfaceCategory, int typeFrom, int typeTo)
{
throw new NotImplementedException();
}
public override bool CanRemoveInterface (SaInterface interfaceObj)
{
throw new NotImplementedException();
}
//---------------------------------------------------------------
// I n t e r f a c e E v e n t s
//---------------------------------------------------------------
public override void OnInterfaceCreated (SysId interfaceId)
{
throw new NotImplementedException();
}
public override void OnInterfaceUpdated (SysId interfaceId)
{
throw new NotImplementedException();
}
public override void OnInterfaceRemoved (SysId interfaceId)
{
throw new NotImplementedException();
}
//-------------------------------------------------------------------
}
//=======================================================================
}
@@ -0,0 +1,44 @@
using Sarand.Core.Bus;
using Sarand.Core.ItemOptions;
using Sarand.Core.UpdateLog;
using Sarand.OperationsMgr.Core.App;
using Sarand.Win.Dbas.Base;
using Sarand.Win.Dbas.ItemOptions;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Sarand.OperationsMgr.App.Consoles
{
//=======================================================================
public abstract class OpnItemOptionConsole_Dbas : SaItemOptionConsole_Dbas
{
//-------------------------------------------------------------------
// Data members.
//-------------------------------------------------------------------
// Construction.
protected OpnItemOptionConsole_Dbas (SacsDatabase database) : base(database)
{
}
//-------------------------------------------------------------------
// Properties.
public OpnUserContext UserContext {get;set;}
public override short ItemOptionDataType => throw new NotImplementedException();
public override SaUpdateLogConsole UpdateLogConsole => throw new NotImplementedException();
//-------------------------------------------------------------------
// I t e m O p t i o n D e f i n i t i o n s
//-------------------------------------------------------------------
public override List<SaItemOptionDfn> GetItemOptionDfnsForItem (ItemId itemId)
{
throw new NotImplementedException();
}
//-------------------------------------------------------------------
}
//=======================================================================
}
@@ -0,0 +1,38 @@
using Sarand.Core.UpdateLog;
using Sarand.OperationsMgr.Core.App;
using Sarand.Win.Dbas.Base;
using Sarand.Win.Dbas.ReferenceData;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Sarand.OperationsMgr.App.Consoles
{
//=======================================================================
public abstract class OpnReferenceDataConsole_Dbas : SaReferenceDataConsole_Dbas
{
//-------------------------------------------------------------------
// Construction.
protected OpnReferenceDataConsole_Dbas (OpnUserContext userContext ,SacsDatabase database) :
base(database)
{
UserContext = userContext;
}
//-------------------------------------------------------------------
// Properties.
public OpnUserContext UserContext { get; }
public override SaUpdateLogConsole UpdateLogConsole => throw new NotImplementedException();
// Item types.
public override short LanguageItemType => throw new NotImplementedException();
public override short RegionItemType => throw new NotImplementedException();
public override short CurrencyItemType => throw new NotImplementedException();
public override short TaxCodeItemType => throw new NotImplementedException();
public override short UnitMeasureItemType => throw new NotImplementedException();
//-------------------------------------------------------------------
}
//=======================================================================
}
@@ -0,0 +1,52 @@
using Sarand.Core.UpdateLog;
using Sarand.Win.Dbas.Base;
using Sarand.Win.Dbas.Security;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Sarand.OperationsMgr.App.Consoles
{
//=======================================================================
public abstract class OpnSecurityConsole_Dbas : SaSecurityConsole_Dbas
{
//-------------------------------------------------------------------
// Data members.
//-------------------------------------------------------------------
// Construction.
protected OpnSecurityConsole_Dbas (SacsDatabase database) : base(database)
{
}
//-------------------------------------------------------------------
// Properties.
public override short SecurityItemDataType => throw new NotImplementedException();
public override short SecurityLinkDataType => throw new NotImplementedException();
public override SaUpdateLogConsole UpdateLogConsole => throw new NotImplementedException();
//-------------------------------------------------------------------
// Utilities.
//-------------------------------------------------------------------
// S e c u r i t y R i g h t s
//-------------------------------------------------------------------
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// R e g i t e r S e c u r i t y R i g h t s
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Register Security Rights.
public override void RegisterSecurityRights ()
{
throw new NotImplementedException();
}
//---------------------------------------------------------------
// Register the security data item types.
//-------------------------------------------------------------------
}
//=======================================================================
}
@@ -0,0 +1,39 @@
using Sarand.Core.Bus;
using Sarand.Core.Security;
using Sarand.OperationsMgr.Core.App;
using Sarand.Win.Dbas.Base;
using Sarand.Win.Dbas.UpdateLog;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Sarand.OperationsMgr.App.Consoles
{
//=======================================================================
public abstract class OpnUpdateLogConsole_Dbas : SaUpdateLogConsole_Dbas
{
//-------------------------------------------------------------------
// Data members.
//-------------------------------------------------------------------
// Construction.
protected OpnUpdateLogConsole_Dbas (SacsDatabase database) : base(database)
{
}
//-------------------------------------------------------------------
// Properties.
//-------------------------------------------------------------------
// Get name for User Id.
public override Dictionary<SysId, String> GetNameForUserIds(List<SysId> userIds)
{
return null;
}
//-------------------------------------------------------------------
}
//=======================================================================
}
@@ -0,0 +1,71 @@
using Sarand.Core.Base;
using Sarand.Core.Dbas.Base;
using Sarand.Win.Dbas.Data;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Sarand.OperationsMgr.Win.Dbas.Data
{
//=======================================================================
public abstract class OpnDbDataItem : DbDataItem
{
//-------------------------------------------------------------------
// Definitions.
/// <summary>
/// Database information - object supplied by main application.
/// <para>NB Application may have multiple databases with schema differences.</para>
/// <para>Each instance of a DbDataItem must be database specific.</para>
/// </summary>
public class OpnDatabaseInfo : IDatabaseInfo
{
// Data members.
private readonly List<DbDfnTable> tables;
private static readonly String defaultSchemaName = "dbo";
// Construction.
public OpnDatabaseInfo(String databaseName, List<DbDfnTable> tables)
{
}
// Properties.
public String DatabaseName { get; }
public String Context { get { return StringUtil.OnEmpty(DatabaseName, "UnknownDb"); } }
// Database schema.
public DbDfnTable GetTableDefinition (String schemaName, String tableName)
{
foreach (DbDfnTable table in tables.FindAll(item => item.Name.EqualsCI(tableName)))
{
if (StringUtil.OnEmpty(table.Schema, defaultSchemaName).EqualsCI(StringUtil.OnEmpty(schemaName, defaultSchemaName)))
return table;
}
return null;
}
public bool TableExists (String schemaName, String tableName)
{
return GetTableDefinition(schemaName, tableName) != null;
}
public bool ColumnExists (String schemaName, String tableName, String columnName)
{
DbDfnTable table = GetTableDefinition(schemaName, tableName);
if (table == null) return false;
return table.HasColumnByName(columnName);
}
public List<DbDfnColumn> GetColumnsForTable (String schemaName, String tableName)
{
DbDfnTable table = GetTableDefinition(schemaName, tableName);
if (table != null) return table.Columns;
return new List<DbDfnColumn>();
}
}
//-------------------------------------------------------------------
// Construction.
protected OpnDbDataItem (IDatabaseInfo dbInfo) : base(dbInfo)
{
}
//-------------------------------------------------------------------
}
//=======================================================================
}
@@ -0,0 +1,41 @@
using Sarand.Win.Dbas.Base;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Sarand.OperationsMgr.Win.Dbas.Utils
{
//=======================================================================
public static class OpnDbDfnGenerator
{
//-------------------------------------------------------------------
// Data members.
private static string messageBoxTitle = "OperationsMgr database definition generator";
//-------------------------------------------------------------------
/// <summary>
/// Generate database definitions.
/// </summary>
public static bool Generate(String connectionString)
{
return false;
}
//-------------------------------------------------------------------
private static bool GenerateDatabaseDefinition(SacsDatabase database, String directory)
{
return false;
}
//-------------------------------------------------------------------
public static String GetOutputFolder ()
{
return null;
}
//-------------------------------------------------------------------
}
//=======================================================================
}
@@ -0,0 +1,87 @@
using Sarand.Core.Base;
using Sarand.Core.IO;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Sarand.OperationsMgr.Win.Dbas.Utils
{
//=======================================================================
/// <summary>
/// Static implementations of fucntions required by FileUtil.
/// </summary>
public class OpnFileUtil
{
//-------------------------------------------------------------------
// Initialise statics.
public static void InitStatics ()
{
FileUtil.DirectoryExists = IsDirectory;
FileUtil.DirectoryGetParent = GetParentDirectory;
FileUtil.DirectoryCreateDirectory = CreateDirectory;
FileUtil.FileExists = IsFile;
FileUtil.FileReadAllLines = FileReadAllLines;
}
//-------------------------------------------------------------------
// D i r e c t o r y
//-------------------------------------------------------------------
public static bool IsDirectory (String directoryPath)
{
try
{
return Directory.Exists(directoryPath);
}
catch (Exception exc) { Logger.Debug("SbmFileUtil.IsDirectory " + exc.GetType().Name + ": " + exc.Message); }
return false;
}
public static String GetParentDirectory (String filepath)
{
try
{
DirectoryInfo parentDirectoryInfo = Directory.GetParent(filepath);
if (parentDirectoryInfo != null)
return parentDirectoryInfo.FullName;
}
catch (Exception exc) { Logger.Debug("SbmFileUtil.GetParentDirectory " + exc.GetType().Name + ": " + exc.Message); }
return String.Empty;
}
public static bool CreateDirectory (String directoryPath)
{
try
{
DirectoryInfo info = Directory.CreateDirectory(directoryPath);
return info.Exists;
}
catch (Exception exc) { Logger.Debug("SbmFileUtil.CreateDirectory " + exc.GetType().Name + ": " + exc.Message); }
return false;
}
//-------------------------------------------------------------------
// F i l e
//-------------------------------------------------------------------
public static bool IsFile (String filePath)
{
try
{
return File.Exists(filePath);
}
catch (Exception exc) { Logger.Debug("SbmFileUtil.IsFile " + exc.GetType().Name + ": " + exc.Message); }
return false;
}
public static String[] FileReadAllLines (String filePath)
{
try
{
return File.ReadAllLines(filePath);
}
catch (Exception exc) { Logger.Debug("SbmFileUtil.FileReadAllLines " + exc.GetType().Name + ": " + exc.Message); }
return new String[0];
}
//-------------------------------------------------------------------
}
//=======================================================================
}