Add project files.
This commit is contained in:
parent
616c50c0b9
commit
796a98dd89
46
AdamGais.Module.AnmeldeTool.sln
Normal file
46
AdamGais.Module.AnmeldeTool.sln
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio Version 17
|
||||||
|
VisualStudioVersion = 17.12.35527.113 d17.12
|
||||||
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Oqtane.Server", "..\oqtane.framework-dev\Oqtane.Server\Oqtane.Server.csproj", "{3AB6FCC9-EFEB-4C0E-A2CF-8103914C5196}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AdamGais.Module.AnmeldeTool.Client", "Client\AdamGais.Module.AnmeldeTool.Client.csproj", "{AA8E58A1-CD09-4208-BF66-A8BB341FD669}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AdamGais.Module.AnmeldeTool.Server", "Server\AdamGais.Module.AnmeldeTool.Server.csproj", "{04B05448-788F-433D-92C0-FED35122D45A}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AdamGais.Module.AnmeldeTool.Shared", "Shared\AdamGais.Module.AnmeldeTool.Shared.csproj", "{18D73F73-D7BE-4388-85BA-FBD9AC96FCA2}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AdamGais.Module.AnmeldeTool.Package", "Package\AdamGais.Module.AnmeldeTool.Package.csproj", "{C5CE512D-CBB7-4545-AF0F-9B6591A0C3A7}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
Release|Any CPU = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{3AB6FCC9-EFEB-4C0E-A2CF-8103914C5196}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{3AB6FCC9-EFEB-4C0E-A2CF-8103914C5196}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{AA8E58A1-CD09-4208-BF66-A8BB341FD669}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{AA8E58A1-CD09-4208-BF66-A8BB341FD669}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{AA8E58A1-CD09-4208-BF66-A8BB341FD669}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{AA8E58A1-CD09-4208-BF66-A8BB341FD669}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{04B05448-788F-433D-92C0-FED35122D45A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{04B05448-788F-433D-92C0-FED35122D45A}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{04B05448-788F-433D-92C0-FED35122D45A}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{04B05448-788F-433D-92C0-FED35122D45A}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{18D73F73-D7BE-4388-85BA-FBD9AC96FCA2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{18D73F73-D7BE-4388-85BA-FBD9AC96FCA2}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{18D73F73-D7BE-4388-85BA-FBD9AC96FCA2}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{18D73F73-D7BE-4388-85BA-FBD9AC96FCA2}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{C5CE512D-CBB7-4545-AF0F-9B6591A0C3A7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{C5CE512D-CBB7-4545-AF0F-9B6591A0C3A7}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{C5CE512D-CBB7-4545-AF0F-9B6591A0C3A7}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{C5CE512D-CBB7-4545-AF0F-9B6591A0C3A7}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
|
SolutionGuid = {1D016F15-46FE-4726-8DFD-2E4FD4DC7668}
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
53
Client/AdamGais.Module.AnmeldeTool.Client.csproj
Normal file
53
Client/AdamGais.Module.AnmeldeTool.Client.csproj
Normal file
|
@ -0,0 +1,53 @@
|
||||||
|
<Project Sdk="Microsoft.NET.Sdk.Razor">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net9.0</TargetFramework>
|
||||||
|
<Version>1.0.0</Version>
|
||||||
|
<Authors>AdamGais</Authors>
|
||||||
|
<Company>AdamGais</Company>
|
||||||
|
<Description>AnmeldeTool</Description>
|
||||||
|
<Product>AdamGais.Module.AnmeldeTool</Product>
|
||||||
|
<Copyright>AdamGais</Copyright>
|
||||||
|
<AssemblyName>AdamGais.Module.AnmeldeTool.Client.Oqtane</AssemblyName>
|
||||||
|
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="9.0.0" />
|
||||||
|
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Authentication" Version="9.0.0" />
|
||||||
|
<PackageReference Include="Microsoft.Extensions.Localization" Version="9.0.0" />
|
||||||
|
<PackageReference Include="Microsoft.Extensions.Http" Version="9.0.0" />
|
||||||
|
<PackageReference Include="System.Net.Http.Json" Version="9.0.0" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\Shared\AdamGais.Module.AnmeldeTool.Shared.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="Oqtane.Client"><HintPath>..\..\oqtane.framework-dev\Oqtane.Server\bin\Debug\net9.0\Oqtane.Client.dll</HintPath></Reference>
|
||||||
|
<Reference Include="Oqtane.Shared"><HintPath>..\..\oqtane.framework-dev\Oqtane.Server\bin\Debug\net9.0\Oqtane.Shared.dll</HintPath></Reference>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Update="Properties\Resources.Designer.cs">
|
||||||
|
<DesignTime>True</DesignTime>
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DependentUpon>Resources.resx</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<EmbeddedResource Update="Properties\Resources.resx">
|
||||||
|
<Generator>ResXFileCodeGenerator</Generator>
|
||||||
|
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||||
|
</EmbeddedResource>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<!-- there may be other elements here -->
|
||||||
|
<BlazorWebAssemblyEnableLinking>false</BlazorWebAssemblyEnableLinking>
|
||||||
|
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
</Project>
|
4
Client/AssemblyInfo.cs
Normal file
4
Client/AssemblyInfo.cs
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
using System.Resources;
|
||||||
|
using Microsoft.Extensions.Localization;
|
||||||
|
|
||||||
|
[assembly: RootNamespace("AdamGais.Module.AnmeldeTool.Client")]
|
15
Client/Interop.cs
Normal file
15
Client/Interop.cs
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
using Microsoft.JSInterop;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace AdamGais.Module.AnmeldeTool
|
||||||
|
{
|
||||||
|
public class Interop
|
||||||
|
{
|
||||||
|
private readonly IJSRuntime _jsRuntime;
|
||||||
|
|
||||||
|
public Interop(IJSRuntime jsRuntime)
|
||||||
|
{
|
||||||
|
_jsRuntime = jsRuntime;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
10
Client/Modules/AdamGais.Module.AnmeldeTool/Anmeldetool.razor
Normal file
10
Client/Modules/AdamGais.Module.AnmeldeTool/Anmeldetool.razor
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
@namespace AdamGais.Module.AnmeldeTool
|
||||||
|
@inherits ModuleBase
|
||||||
|
@inject NavigationManager NavigationManager
|
||||||
|
@inject IStringLocalizer<Anmeldetool> Localizer
|
||||||
|
|
||||||
|
<h1>ANMELDETOOL.razor!!!</h1>
|
||||||
|
|
||||||
|
@code {
|
||||||
|
|
||||||
|
}
|
112
Client/Modules/AdamGais.Module.AnmeldeTool/Edit.razor
Normal file
112
Client/Modules/AdamGais.Module.AnmeldeTool/Edit.razor
Normal file
|
@ -0,0 +1,112 @@
|
||||||
|
@using Oqtane.Modules.Controls
|
||||||
|
@using AdamGais.Module.AnmeldeTool.Services
|
||||||
|
@using AdamGais.Module.AnmeldeTool.Models
|
||||||
|
|
||||||
|
@namespace AdamGais.Module.AnmeldeTool
|
||||||
|
@inherits ModuleBase
|
||||||
|
@inject IAnmeldeToolService AnmeldeToolService
|
||||||
|
@inject NavigationManager NavigationManager
|
||||||
|
@inject IStringLocalizer<Edit> Localizer
|
||||||
|
|
||||||
|
<form @ref="form" class="@(validated ? " was-validated" : "needs-validation" )" novalidate>
|
||||||
|
<div class="container">
|
||||||
|
<div class="row mb-1 align-items-center">
|
||||||
|
<Label Class="col-sm-3" For="name" HelpText="Enter a name" ResourceKey="Name">Name: </Label>
|
||||||
|
<div class="col-sm-9">
|
||||||
|
<input id="name" class="form-control" @bind="@_name" required />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<button type="button" class="btn btn-success" @onclick="Save">@Localizer["Save"]</button>
|
||||||
|
<NavLink class="btn btn-secondary" href="@NavigateUrl()">@Localizer["Cancel"]</NavLink>
|
||||||
|
<br /><br />
|
||||||
|
@if (PageState.Action == "Edit")
|
||||||
|
{
|
||||||
|
<AuditInfo CreatedBy="@_createdby" CreatedOn="@_createdon" ModifiedBy="@_modifiedby" ModifiedOn="@_modifiedon"></AuditInfo>
|
||||||
|
}
|
||||||
|
</form>
|
||||||
|
|
||||||
|
@code {
|
||||||
|
public override SecurityAccessLevel SecurityAccessLevel => SecurityAccessLevel.Edit;
|
||||||
|
|
||||||
|
public override string Actions => "Add,Edit";
|
||||||
|
|
||||||
|
public override string Title => "Manage AnmeldeTool";
|
||||||
|
|
||||||
|
public override List<Resource> Resources => new List<Resource>()
|
||||||
|
{
|
||||||
|
new Resource { ResourceType = ResourceType.Stylesheet, Url = ModulePath() + "Module.css" }
|
||||||
|
};
|
||||||
|
|
||||||
|
private ElementReference form;
|
||||||
|
private bool validated = false;
|
||||||
|
|
||||||
|
private int _id;
|
||||||
|
private string _name;
|
||||||
|
private string _createdby;
|
||||||
|
private DateTime _createdon;
|
||||||
|
private string _modifiedby;
|
||||||
|
private DateTime _modifiedon;
|
||||||
|
|
||||||
|
protected override async Task OnInitializedAsync()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (PageState.Action == "Edit")
|
||||||
|
{
|
||||||
|
_id = Int32.Parse(PageState.QueryString["id"]);
|
||||||
|
AnmeldeTool AnmeldeTool = await AnmeldeToolService.GetAnmeldeToolAsync(_id, ModuleState.ModuleId);
|
||||||
|
if (AnmeldeTool != null)
|
||||||
|
{
|
||||||
|
_name = AnmeldeTool.Name;
|
||||||
|
_createdby = AnmeldeTool.CreatedBy;
|
||||||
|
_createdon = AnmeldeTool.CreatedOn;
|
||||||
|
_modifiedby = AnmeldeTool.ModifiedBy;
|
||||||
|
_modifiedon = AnmeldeTool.ModifiedOn;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
await logger.LogError(ex, "Error Loading AnmeldeTool {AnmeldeToolId} {Error}", _id, ex.Message);
|
||||||
|
AddModuleMessage(Localizer["Message.LoadError"], MessageType.Error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task Save()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
validated = true;
|
||||||
|
var interop = new Oqtane.UI.Interop(JSRuntime);
|
||||||
|
if (await interop.FormValid(form))
|
||||||
|
{
|
||||||
|
if (PageState.Action == "Add")
|
||||||
|
{
|
||||||
|
AnmeldeTool AnmeldeTool = new AnmeldeTool();
|
||||||
|
AnmeldeTool.ModuleId = ModuleState.ModuleId;
|
||||||
|
AnmeldeTool.Name = _name;
|
||||||
|
AnmeldeTool = await AnmeldeToolService.AddAnmeldeToolAsync(AnmeldeTool);
|
||||||
|
await logger.LogInformation("AnmeldeTool Added {AnmeldeTool}", AnmeldeTool);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
AnmeldeTool AnmeldeTool = await AnmeldeToolService.GetAnmeldeToolAsync(_id, ModuleState.ModuleId);
|
||||||
|
AnmeldeTool.Name = _name;
|
||||||
|
await AnmeldeToolService.UpdateAnmeldeToolAsync(AnmeldeTool);
|
||||||
|
await logger.LogInformation("AnmeldeTool Updated {AnmeldeTool}", AnmeldeTool);
|
||||||
|
}
|
||||||
|
NavigationManager.NavigateTo(NavigateUrl());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
AddModuleMessage(Localizer["Message.SaveValidation"], MessageType.Warning);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
await logger.LogError(ex, "Error Saving AnmeldeTool {Error}", ex.Message);
|
||||||
|
AddModuleMessage(Localizer["Message.SaveError"], MessageType.Error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
48
Client/Modules/AdamGais.Module.AnmeldeTool/Index.razor
Normal file
48
Client/Modules/AdamGais.Module.AnmeldeTool/Index.razor
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
@using AdamGais.Module.AnmeldeTool.Services
|
||||||
|
@using AdamGais.Module.AnmeldeTool.Models
|
||||||
|
|
||||||
|
@namespace AdamGais.Module.AnmeldeTool
|
||||||
|
@inherits ModuleBase
|
||||||
|
@inject IAnmeldeToolService AnmeldeToolService
|
||||||
|
@inject NavigationManager NavigationManager
|
||||||
|
@inject IStringLocalizer<Index> Localizer
|
||||||
|
|
||||||
|
<!--<h1>Anmeldetool!!!</h1>-->
|
||||||
|
|
||||||
|
<!--<Anmeldetool />-->
|
||||||
|
|
||||||
|
<!--<ActionLink Action="Anmeldetool" Text="View Anmeldetool"/>
|
||||||
|
|
||||||
|
<!-- This is a comment -->
|
||||||
|
|
||||||
|
<h3>Anmeldung zum Event</h3>
|
||||||
|
|
||||||
|
<p>Willst du am Event teilnehmen?</p>
|
||||||
|
|
||||||
|
<div class="buttons">
|
||||||
|
<button class="btn btn-success" @onclick="Zusage">Zusagen</button>
|
||||||
|
<button class="btn btn-danger" @onclick="Absage">Absagen</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@if (!string.IsNullOrEmpty(Status))
|
||||||
|
{
|
||||||
|
<p class="mt-3"><strong>Status:</strong> @Status</p>
|
||||||
|
}
|
||||||
|
|
||||||
|
@code {
|
||||||
|
private string Status;
|
||||||
|
|
||||||
|
private void Zusage()
|
||||||
|
{
|
||||||
|
Status = "Du hast zugesagt. Wir freuen uns auf dich!";
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Absage()
|
||||||
|
{
|
||||||
|
Status = "Du hast abgesagt. Schade, vielleicht nächstes Mal!";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
<NavLink class="nav-link" href="/anmeldung">
|
||||||
|
<span class="oi oi-check" aria-hidden="true"></span> Anmeldung
|
||||||
|
</NavLink>
|
19
Client/Modules/AdamGais.Module.AnmeldeTool/ModuleInfo.cs
Normal file
19
Client/Modules/AdamGais.Module.AnmeldeTool/ModuleInfo.cs
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
using Oqtane.Models;
|
||||||
|
using Oqtane.Modules;
|
||||||
|
|
||||||
|
namespace AdamGais.Module.AnmeldeTool
|
||||||
|
{
|
||||||
|
public class ModuleInfo : IModule
|
||||||
|
{
|
||||||
|
public ModuleDefinition ModuleDefinition => new ModuleDefinition
|
||||||
|
{
|
||||||
|
Name = "AnmeldeTool",
|
||||||
|
Description = "AnmeldeTool",
|
||||||
|
Version = "1.0.0",
|
||||||
|
ServerManagerType = "AdamGais.Module.AnmeldeTool.Manager.AnmeldeToolManager, AdamGais.Module.AnmeldeTool.Server.Oqtane",
|
||||||
|
ReleaseVersions = "1.0.0",
|
||||||
|
Dependencies = "AdamGais.Module.AnmeldeTool.Shared.Oqtane",
|
||||||
|
PackageName = "AdamGais.Module.AnmeldeTool"
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
47
Client/Modules/AdamGais.Module.AnmeldeTool/Settings.razor
Normal file
47
Client/Modules/AdamGais.Module.AnmeldeTool/Settings.razor
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
@namespace AdamGais.Module.AnmeldeTool
|
||||||
|
@inherits ModuleBase
|
||||||
|
@inject ISettingService SettingService
|
||||||
|
@inject IStringLocalizer<Settings> Localizer
|
||||||
|
|
||||||
|
<div class="container">
|
||||||
|
<div class="row mb-1 align-items-center">
|
||||||
|
<Label Class="col-sm-3" For="value" HelpText="Enter a value" ResourceKey="SettingName" ResourceType="@resourceType">Name: </Label>
|
||||||
|
<div class="col-sm-9">
|
||||||
|
<input id="value" type="text" class="form-control" @bind="@_value" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@code {
|
||||||
|
private string resourceType = "AdamGais.Module.AnmeldeTool.Settings, AdamGais.Module.AnmeldeTool.Client.Oqtane"; // for localization
|
||||||
|
public override string Title => "AnmeldeTool Settings";
|
||||||
|
|
||||||
|
string _value;
|
||||||
|
|
||||||
|
protected override async Task OnInitializedAsync()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Dictionary<string, string> settings = await SettingService.GetModuleSettingsAsync(ModuleState.ModuleId);
|
||||||
|
_value = SettingService.GetSetting(settings, "SettingName", "");
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
AddModuleMessage(ex.Message, MessageType.Error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task UpdateSettings()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Dictionary<string, string> settings = await SettingService.GetModuleSettingsAsync(ModuleState.ModuleId);
|
||||||
|
SettingService.SetSetting(settings, "SettingName", _value);
|
||||||
|
await SettingService.UpdateModuleSettingsAsync(settings, ModuleState.ModuleId);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
AddModuleMessage(ex.Message, MessageType.Error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
63
Client/Properties/Resources.Designer.cs
generated
Normal file
63
Client/Properties/Resources.Designer.cs
generated
Normal file
|
@ -0,0 +1,63 @@
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// This code was generated by a tool.
|
||||||
|
// Runtime Version:4.0.30319.42000
|
||||||
|
//
|
||||||
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
|
// the code is regenerated.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace AdamGais.Module.AnmeldeTool.Client.Properties {
|
||||||
|
using System;
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||||
|
/// </summary>
|
||||||
|
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||||
|
// class via a tool like ResGen or Visual Studio.
|
||||||
|
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||||
|
// with the /str option, or rebuild your VS project.
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
|
internal class Resources {
|
||||||
|
|
||||||
|
private static global::System.Resources.ResourceManager resourceMan;
|
||||||
|
|
||||||
|
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||||
|
|
||||||
|
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||||
|
internal Resources() {
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the cached ResourceManager instance used by this class.
|
||||||
|
/// </summary>
|
||||||
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||||
|
get {
|
||||||
|
if (object.ReferenceEquals(resourceMan, null)) {
|
||||||
|
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("AdamGais.Module.AnmeldeTool.Client.Properties.Resources", typeof(Resources).Assembly);
|
||||||
|
resourceMan = temp;
|
||||||
|
}
|
||||||
|
return resourceMan;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Overrides the current thread's CurrentUICulture property for all
|
||||||
|
/// resource lookups using this strongly typed resource class.
|
||||||
|
/// </summary>
|
||||||
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
internal static global::System.Globalization.CultureInfo Culture {
|
||||||
|
get {
|
||||||
|
return resourceCulture;
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
resourceCulture = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
101
Client/Properties/Resources.resx
Normal file
101
Client/Properties/Resources.resx
Normal file
|
@ -0,0 +1,101 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 1.3
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">1.3</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1">this is my long string</data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
[base64 mime encoded serialized .NET Framework object]
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
[base64 mime encoded string representing a byte array form of the .NET Framework object]
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>1.3</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
141
Client/Resources/AdamGais.Module.AnmeldeTool/Edit - Copy.resx
Normal file
141
Client/Resources/AdamGais.Module.AnmeldeTool/Edit - Copy.resx
Normal file
|
@ -0,0 +1,141 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" id="root">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<data name="Name.Text" xml:space="preserve">
|
||||||
|
<value>Name: </value>
|
||||||
|
</data>
|
||||||
|
<data name="Name.HelpText" xml:space="preserve">
|
||||||
|
<value>Enter the name</value>
|
||||||
|
</data>
|
||||||
|
<data name="Save" xml:space="preserve">
|
||||||
|
<value>Save</value>
|
||||||
|
</data>
|
||||||
|
<data name="Cancel" xml:space="preserve">
|
||||||
|
<value>Cancel</value>
|
||||||
|
</data>
|
||||||
|
<data name="Message.LoadError" xml:space="preserve">
|
||||||
|
<value>Error Loading AnmeldeTool</value>
|
||||||
|
</data>
|
||||||
|
<data name="Message.SaveValidation" xml:space="preserve">
|
||||||
|
<value>Please Provide All Required Information</value>
|
||||||
|
</data>
|
||||||
|
<data name="Message.SaveError" xml:space="preserve">
|
||||||
|
<value>Error Saving AnmeldeTool</value>
|
||||||
|
</data>
|
||||||
|
</root>
|
141
Client/Resources/AdamGais.Module.AnmeldeTool/Edit.resx
Normal file
141
Client/Resources/AdamGais.Module.AnmeldeTool/Edit.resx
Normal file
|
@ -0,0 +1,141 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" id="root">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<data name="Name.Text" xml:space="preserve">
|
||||||
|
<value>Name: </value>
|
||||||
|
</data>
|
||||||
|
<data name="Name.HelpText" xml:space="preserve">
|
||||||
|
<value>Enter the name</value>
|
||||||
|
</data>
|
||||||
|
<data name="Save" xml:space="preserve">
|
||||||
|
<value>Save</value>
|
||||||
|
</data>
|
||||||
|
<data name="Cancel" xml:space="preserve">
|
||||||
|
<value>Cancel</value>
|
||||||
|
</data>
|
||||||
|
<data name="Message.LoadError" xml:space="preserve">
|
||||||
|
<value>Error Loading AnmeldeTool</value>
|
||||||
|
</data>
|
||||||
|
<data name="Message.SaveValidation" xml:space="preserve">
|
||||||
|
<value>Please Provide All Required Information</value>
|
||||||
|
</data>
|
||||||
|
<data name="Message.SaveError" xml:space="preserve">
|
||||||
|
<value>Error Saving AnmeldeTool</value>
|
||||||
|
</data>
|
||||||
|
</root>
|
147
Client/Resources/AdamGais.Module.AnmeldeTool/Index.resx
Normal file
147
Client/Resources/AdamGais.Module.AnmeldeTool/Index.resx
Normal file
|
@ -0,0 +1,147 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" id="root">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<data name="Name" xml:space="preserve">
|
||||||
|
<value>Name</value>
|
||||||
|
</data>
|
||||||
|
<data name="Add.Text" xml:space="preserve">
|
||||||
|
<value>Add AnmeldeTool</value>
|
||||||
|
</data>
|
||||||
|
<data name="Edit.Text" xml:space="preserve">
|
||||||
|
<value>Edit</value>
|
||||||
|
</data>
|
||||||
|
<data name="Delete.Text" xml:space="preserve">
|
||||||
|
<value>Delete</value>
|
||||||
|
</data>
|
||||||
|
<data name="Delete.Header" xml:space="preserve">
|
||||||
|
<value>Delete AnmeldeTool</value>
|
||||||
|
</data>
|
||||||
|
<data name="Delete.Message" xml:space="preserve">
|
||||||
|
<value>Are You Sure You Wish To Delete This AnmeldeTool?</value>
|
||||||
|
</data>
|
||||||
|
<data name="Message.DisplayNone" xml:space="preserve">
|
||||||
|
<value>No AnmeldeTools To Display</value>
|
||||||
|
</data>
|
||||||
|
<data name="Message.LoadError" xml:space="preserve">
|
||||||
|
<value>Error Loading AnmeldeTool</value>
|
||||||
|
</data>
|
||||||
|
<data name="Message.DeleteError" xml:space="preserve">
|
||||||
|
<value>Error Deleting AnmeldeTool</value>
|
||||||
|
</data>
|
||||||
|
</root>
|
126
Client/Resources/AdamGais.Module.AnmeldeTool/Settings.resx
Normal file
126
Client/Resources/AdamGais.Module.AnmeldeTool/Settings.resx
Normal file
|
@ -0,0 +1,126 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" id="root">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<data name="SettingName.Text" xml:space="preserve">
|
||||||
|
<value>Name: </value>
|
||||||
|
</data>
|
||||||
|
<data name="SettingName.HelpText" xml:space="preserve">
|
||||||
|
<value>Enter a value</value>
|
||||||
|
</data>
|
||||||
|
</root>
|
42
Client/Services/AnmeldeToolService.cs
Normal file
42
Client/Services/AnmeldeToolService.cs
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Net.Http;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Oqtane.Services;
|
||||||
|
using Oqtane.Shared;
|
||||||
|
|
||||||
|
namespace AdamGais.Module.AnmeldeTool.Services
|
||||||
|
{
|
||||||
|
public class AnmeldeToolService : ServiceBase, IAnmeldeToolService
|
||||||
|
{
|
||||||
|
public AnmeldeToolService(HttpClient http, SiteState siteState) : base(http, siteState) { }
|
||||||
|
|
||||||
|
private string Apiurl => CreateApiUrl("AnmeldeTool");
|
||||||
|
|
||||||
|
public async Task<List<Models.AnmeldeTool>> GetAnmeldeToolsAsync(int ModuleId)
|
||||||
|
{
|
||||||
|
List<Models.AnmeldeTool> AnmeldeTools = await GetJsonAsync<List<Models.AnmeldeTool>>(CreateAuthorizationPolicyUrl($"{Apiurl}?moduleid={ModuleId}", EntityNames.Module, ModuleId), Enumerable.Empty<Models.AnmeldeTool>().ToList());
|
||||||
|
return AnmeldeTools.OrderBy(item => item.Name).ToList();
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<Models.AnmeldeTool> GetAnmeldeToolAsync(int AnmeldeToolId, int ModuleId)
|
||||||
|
{
|
||||||
|
return await GetJsonAsync<Models.AnmeldeTool>(CreateAuthorizationPolicyUrl($"{Apiurl}/{AnmeldeToolId}/{ModuleId}", EntityNames.Module, ModuleId));
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<Models.AnmeldeTool> AddAnmeldeToolAsync(Models.AnmeldeTool AnmeldeTool)
|
||||||
|
{
|
||||||
|
return await PostJsonAsync<Models.AnmeldeTool>(CreateAuthorizationPolicyUrl($"{Apiurl}", EntityNames.Module, AnmeldeTool.ModuleId), AnmeldeTool);
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<Models.AnmeldeTool> UpdateAnmeldeToolAsync(Models.AnmeldeTool AnmeldeTool)
|
||||||
|
{
|
||||||
|
return await PutJsonAsync<Models.AnmeldeTool>(CreateAuthorizationPolicyUrl($"{Apiurl}/{AnmeldeTool.AnmeldeToolId}", EntityNames.Module, AnmeldeTool.ModuleId), AnmeldeTool);
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task DeleteAnmeldeToolAsync(int AnmeldeToolId, int ModuleId)
|
||||||
|
{
|
||||||
|
await DeleteAsync(CreateAuthorizationPolicyUrl($"{Apiurl}/{AnmeldeToolId}/{ModuleId}", EntityNames.Module, ModuleId));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
14
Client/Startup/ClientStartup.cs
Normal file
14
Client/Startup/ClientStartup.cs
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
using Oqtane.Services;
|
||||||
|
using AdamGais.Module.AnmeldeTool.Services;
|
||||||
|
|
||||||
|
namespace AdamGais.Module.AnmeldeTool.Startup
|
||||||
|
{
|
||||||
|
public class ClientStartup : IClientStartup
|
||||||
|
{
|
||||||
|
public void ConfigureServices(IServiceCollection services)
|
||||||
|
{
|
||||||
|
services.AddScoped<IAnmeldeToolService, AnmeldeToolService>();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
24
Client/_Imports.razor
Normal file
24
Client/_Imports.razor
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
@using System
|
||||||
|
@using System.Linq
|
||||||
|
@using System.Collections.Generic
|
||||||
|
@using System.Net.Http
|
||||||
|
@using System.Net.Http.Json
|
||||||
|
|
||||||
|
@using Microsoft.AspNetCore.Components.Authorization
|
||||||
|
@using Microsoft.AspNetCore.Components.Routing
|
||||||
|
@using Microsoft.AspNetCore.Components.Web
|
||||||
|
@using Microsoft.Extensions.Localization
|
||||||
|
@using Microsoft.JSInterop
|
||||||
|
|
||||||
|
@using Oqtane.Models
|
||||||
|
@using Oqtane.Modules
|
||||||
|
@using Oqtane.Modules.Controls
|
||||||
|
@using Oqtane.Providers
|
||||||
|
@using Oqtane.Security
|
||||||
|
@using Oqtane.Services
|
||||||
|
@using Oqtane.Shared
|
||||||
|
@using Oqtane.Themes
|
||||||
|
@using Oqtane.Themes.Controls
|
||||||
|
@using Oqtane.UI
|
||||||
|
@using Oqtane.Enums
|
||||||
|
@using Oqtane.Interfaces
|
29
Package/AdamGais.Module.AnmeldeTool.Package.csproj
Normal file
29
Package/AdamGais.Module.AnmeldeTool.Package.csproj
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net9.0</TargetFramework>
|
||||||
|
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
|
||||||
|
<AccelerateBuildsInVisualStudio>false</AccelerateBuildsInVisualStudio>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="icon.png">
|
||||||
|
<Pack>True</Pack>
|
||||||
|
<PackagePath></PackagePath>
|
||||||
|
</None>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\Client\AdamGais.Module.AnmeldeTool.Client.csproj" />
|
||||||
|
<ProjectReference Include="..\Server\AdamGais.Module.AnmeldeTool.Server.csproj" />
|
||||||
|
<ProjectReference Include="..\Shared\AdamGais.Module.AnmeldeTool.Shared.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
|
||||||
|
<Exec Condition="'$(OS)' == 'Windows_NT' And '$(Configuration)' == 'Debug'" Command="debug.cmd $(TargetFramework) $([System.String]::Copy('$(MSBuildProjectName)').Replace('.Package',''))" />
|
||||||
|
<Exec Condition="'$(OS)' != 'Windows_NT' And '$(Configuration)' == 'Debug'" Command="bash $(ProjectDir)debug.sh $(TargetFramework) $([System.String]::Copy('$(MSBuildProjectName)').Replace('.Package',''))" />
|
||||||
|
<Exec Condition="'$(OS)' == 'Windows_NT' And '$(Configuration)' == 'Release'" Command="release.cmd $(TargetFramework) $([System.String]::Copy('$(MSBuildProjectName)').Replace('.Package',''))" />
|
||||||
|
<Exec Condition="'$(OS)' != 'Windows_NT' And '$(Configuration)' == 'Release'" Command="bash $(ProjectDir)release.sh $(TargetFramework) $([System.String]::Copy('$(MSBuildProjectName)').Replace('.Package',''))" />
|
||||||
|
</Target>
|
||||||
|
|
||||||
|
</Project>
|
32
Package/AdamGais.Module.AnmeldeTool.nuspec
Normal file
32
Package/AdamGais.Module.AnmeldeTool.nuspec
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
||||||
|
<metadata>
|
||||||
|
<id>$projectname$</id>
|
||||||
|
<version>1.0.0</version>
|
||||||
|
<authors>AdamGais</authors>
|
||||||
|
<owners>AdamGais</owners>
|
||||||
|
<title>AnmeldeTool</title>
|
||||||
|
<description>AnmeldeTool</description>
|
||||||
|
<copyright>AdamGais</copyright>
|
||||||
|
<requireLicenseAcceptance>false</requireLicenseAcceptance>
|
||||||
|
<license type="expression">MIT</license>
|
||||||
|
<projectUrl>https://github.com/oqtane/oqtane.framework</projectUrl>
|
||||||
|
<icon>icon.png</icon>
|
||||||
|
<tags>oqtane module</tags>
|
||||||
|
<releaseNotes></releaseNotes>
|
||||||
|
<summary></summary>
|
||||||
|
<dependencies>
|
||||||
|
<dependency id="Oqtane.Framework" version="6.0.2" />
|
||||||
|
</dependencies>
|
||||||
|
</metadata>
|
||||||
|
<files>
|
||||||
|
<file src="..\Client\bin\Release\$targetframework$\$ProjectName$.Client.Oqtane.dll" target="lib\$targetframework$" />
|
||||||
|
<file src="..\Client\bin\Release\$targetframework$\$ProjectName$.Client.Oqtane.pdb" target="lib\$targetframework$" />
|
||||||
|
<file src="..\Server\bin\Release\$targetframework$\$ProjectName$.Server.Oqtane.dll" target="lib\$targetframework$" />
|
||||||
|
<file src="..\Server\bin\Release\$targetframework$\$ProjectName$.Server.Oqtane.pdb" target="lib\$targetframework$" />
|
||||||
|
<file src="..\Shared\bin\Release\$targetframework$\$ProjectName$.Shared.Oqtane.dll" target="lib\$targetframework$" />
|
||||||
|
<file src="..\Shared\bin\Release\$targetframework$\$ProjectName$.Shared.Oqtane.pdb" target="lib\$targetframework$" />
|
||||||
|
<file src="..\Server\wwwroot\**\*.*" target="wwwroot" />
|
||||||
|
<file src="icon.png" target="" />
|
||||||
|
</files>
|
||||||
|
</package>
|
11
Package/debug.cmd
Normal file
11
Package/debug.cmd
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
@echo off
|
||||||
|
set TargetFramework=%1
|
||||||
|
set ProjectName=%2
|
||||||
|
|
||||||
|
XCOPY "..\Client\bin\Debug\%TargetFramework%\%ProjectName%.Client.Oqtane.dll" "..\..\oqtane.framework-dev\Oqtane.Server\bin\Debug\%TargetFramework%\" /Y
|
||||||
|
XCOPY "..\Client\bin\Debug\%TargetFramework%\%ProjectName%.Client.Oqtane.pdb" "..\..\oqtane.framework-dev\Oqtane.Server\bin\Debug\%TargetFramework%\" /Y
|
||||||
|
XCOPY "..\Server\bin\Debug\%TargetFramework%\%ProjectName%.Server.Oqtane.dll" "..\..\oqtane.framework-dev\Oqtane.Server\bin\Debug\%TargetFramework%\" /Y
|
||||||
|
XCOPY "..\Server\bin\Debug\%TargetFramework%\%ProjectName%.Server.Oqtane.pdb" "..\..\oqtane.framework-dev\Oqtane.Server\bin\Debug\%TargetFramework%\" /Y
|
||||||
|
XCOPY "..\Shared\bin\Debug\%TargetFramework%\%ProjectName%.Shared.Oqtane.dll" "..\..\oqtane.framework-dev\Oqtane.Server\bin\Debug\%TargetFramework%\" /Y
|
||||||
|
XCOPY "..\Shared\bin\Debug\%TargetFramework%\%ProjectName%.Shared.Oqtane.pdb" "..\..\oqtane.framework-dev\Oqtane.Server\bin\Debug\%TargetFramework%\" /Y
|
||||||
|
XCOPY "..\Server\wwwroot\*" "..\..\oqtane.framework-dev\Oqtane.Server\wwwroot\" /Y /S /I
|
12
Package/debug.sh
Normal file
12
Package/debug.sh
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
TargetFramework=$1
|
||||||
|
ProjectName=$2
|
||||||
|
|
||||||
|
cp -f "../Client/bin/Debug/$TargetFramework/$ProjectName$.Client.Oqtane.dll" "../../oqtane.framework-dev/Oqtane.Server/bin/Debug/$TargetFramework/"
|
||||||
|
cp -f "../Client/bin/Debug/$TargetFramework/$ProjectName$.Client.Oqtane.pdb" "../../oqtane.framework-dev/Oqtane.Server/bin/Debug/$TargetFramework/"
|
||||||
|
cp -f "../Server/bin/Debug/$TargetFramework/$ProjectName$.Server.Oqtane.dll" "../../oqtane.framework-dev/Oqtane.Server/bin/Debug/$TargetFramework/"
|
||||||
|
cp -f "../Server/bin/Debug/$TargetFramework/$ProjectName$.Server.Oqtane.pdb" "../../oqtane.framework-dev/Oqtane.Server/bin/Debug/$TargetFramework/"
|
||||||
|
cp -f "../Shared/bin/Debug/$TargetFramework/$ProjectName$.Shared.Oqtane.dll" "../../oqtane.framework-dev/Oqtane.Server/bin/Debug/$TargetFramework/"
|
||||||
|
cp -f "../Shared/bin/Debug/$TargetFramework/$ProjectName$.Shared.Oqtane.pdb" "../../oqtane.framework-dev/Oqtane.Server/bin/Debug/$TargetFramework/"
|
||||||
|
cp -rf "../Server/wwwroot/"* "../../oqtane.framework-dev/Oqtane.Server/wwwroot/"
|
BIN
Package/icon.png
Normal file
BIN
Package/icon.png
Normal file
Binary file not shown.
7
Package/release.cmd
Normal file
7
Package/release.cmd
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
@echo off
|
||||||
|
set TargetFramework=%1
|
||||||
|
set ProjectName=%2
|
||||||
|
|
||||||
|
del "*.nupkg"
|
||||||
|
"..\..\oqtane.framework-dev\oqtane.package\nuget.exe" pack %ProjectName%.nuspec -Properties targetframework=%TargetFramework%;projectname=%ProjectName%
|
||||||
|
XCOPY "*.nupkg" "..\..\oqtane.framework-dev\Oqtane.Server\Packages\" /Y
|
5
Package/release.sh
Normal file
5
Package/release.sh
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
TargetFramework=$1
|
||||||
|
ProjectName=$2
|
||||||
|
|
||||||
|
"..\..\oqtane.framework-dev\oqtane.package\nuget.exe" pack %ProjectName%.nuspec -Properties targetframework=%TargetFramework%;projectname=%ProjectName%
|
||||||
|
cp -f "*.nupkg" "..\..\oqtane.framework-dev\Oqtane.Server\Packages\"
|
36
Server/AdamGais.Module.AnmeldeTool.Server.csproj
Normal file
36
Server/AdamGais.Module.AnmeldeTool.Server.csproj
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
<Project Sdk="Microsoft.NET.Sdk.Razor">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net9.0</TargetFramework>
|
||||||
|
<AddRazorSupportForMvc>true</AddRazorSupportForMvc>
|
||||||
|
<Version>1.0.0</Version>
|
||||||
|
<Product>AdamGais.Module.AnmeldeTool</Product>
|
||||||
|
<Authors>AdamGais</Authors>
|
||||||
|
<Company>AdamGais</Company>
|
||||||
|
<Description>AnmeldeTool</Description>
|
||||||
|
<Copyright>AdamGais</Copyright>
|
||||||
|
<AssemblyName>AdamGais.Module.AnmeldeTool.Server.Oqtane</AssemblyName>
|
||||||
|
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Content Remove="wwwroot\_content\**\*.*" />
|
||||||
|
<None Include="wwwroot\_content\**\*.*" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="9.0.0" />
|
||||||
|
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="9.0.0" />
|
||||||
|
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="9.0.0" />
|
||||||
|
<PackageReference Include="Microsoft.Extensions.Localization" Version="9.0.0" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\Shared\AdamGais.Module.AnmeldeTool.Shared.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="Oqtane.Server"><HintPath>..\..\oqtane.framework-dev\Oqtane.Server\bin\Debug\net9.0\Oqtane.Server.dll</HintPath></Reference>
|
||||||
|
<Reference Include="Oqtane.Shared"><HintPath>..\..\oqtane.framework-dev\Oqtane.Server\bin\Debug\net9.0\Oqtane.Shared.dll</HintPath></Reference>
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
114
Server/Controllers/AnmeldeToolController.cs
Normal file
114
Server/Controllers/AnmeldeToolController.cs
Normal file
|
@ -0,0 +1,114 @@
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using Microsoft.AspNetCore.Authorization;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using Microsoft.AspNetCore.Http;
|
||||||
|
using Oqtane.Shared;
|
||||||
|
using Oqtane.Enums;
|
||||||
|
using Oqtane.Infrastructure;
|
||||||
|
using AdamGais.Module.AnmeldeTool.Services;
|
||||||
|
using Oqtane.Controllers;
|
||||||
|
using System.Net;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace AdamGais.Module.AnmeldeTool.Controllers
|
||||||
|
{
|
||||||
|
[Route(ControllerRoutes.ApiRoute)]
|
||||||
|
public class AnmeldeToolController : ModuleControllerBase
|
||||||
|
{
|
||||||
|
private readonly IAnmeldeToolService _AnmeldeToolService;
|
||||||
|
|
||||||
|
public AnmeldeToolController(IAnmeldeToolService AnmeldeToolService, ILogManager logger, IHttpContextAccessor accessor) : base(logger, accessor)
|
||||||
|
{
|
||||||
|
_AnmeldeToolService = AnmeldeToolService;
|
||||||
|
}
|
||||||
|
|
||||||
|
// GET: api/<controller>?moduleid=x
|
||||||
|
[HttpGet]
|
||||||
|
[Authorize(Policy = PolicyNames.ViewModule)]
|
||||||
|
public async Task<IEnumerable<Models.AnmeldeTool>> Get(string moduleid)
|
||||||
|
{
|
||||||
|
int ModuleId;
|
||||||
|
if (int.TryParse(moduleid, out ModuleId) && IsAuthorizedEntityId(EntityNames.Module, ModuleId))
|
||||||
|
{
|
||||||
|
return await _AnmeldeToolService.GetAnmeldeToolsAsync(ModuleId);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_logger.Log(LogLevel.Error, this, LogFunction.Security, "Unauthorized AnmeldeTool Get Attempt {ModuleId}", moduleid);
|
||||||
|
HttpContext.Response.StatusCode = (int)HttpStatusCode.Forbidden;
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// GET api/<controller>/5
|
||||||
|
[HttpGet("{id}/{moduleid}")]
|
||||||
|
[Authorize(Policy = PolicyNames.ViewModule)]
|
||||||
|
public async Task<Models.AnmeldeTool> Get(int id, int moduleid)
|
||||||
|
{
|
||||||
|
Models.AnmeldeTool AnmeldeTool = await _AnmeldeToolService.GetAnmeldeToolAsync(id, moduleid);
|
||||||
|
if (AnmeldeTool != null && IsAuthorizedEntityId(EntityNames.Module, AnmeldeTool.ModuleId))
|
||||||
|
{
|
||||||
|
return AnmeldeTool;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_logger.Log(LogLevel.Error, this, LogFunction.Security, "Unauthorized AnmeldeTool Get Attempt {AnmeldeToolId} {ModuleId}", id, moduleid);
|
||||||
|
HttpContext.Response.StatusCode = (int)HttpStatusCode.Forbidden;
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// POST api/<controller>
|
||||||
|
[HttpPost]
|
||||||
|
[Authorize(Policy = PolicyNames.EditModule)]
|
||||||
|
public async Task<Models.AnmeldeTool> Post([FromBody] Models.AnmeldeTool AnmeldeTool)
|
||||||
|
{
|
||||||
|
if (ModelState.IsValid && IsAuthorizedEntityId(EntityNames.Module, AnmeldeTool.ModuleId))
|
||||||
|
{
|
||||||
|
AnmeldeTool = await _AnmeldeToolService.AddAnmeldeToolAsync(AnmeldeTool);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_logger.Log(LogLevel.Error, this, LogFunction.Security, "Unauthorized AnmeldeTool Post Attempt {AnmeldeTool}", AnmeldeTool);
|
||||||
|
HttpContext.Response.StatusCode = (int)HttpStatusCode.Forbidden;
|
||||||
|
AnmeldeTool = null;
|
||||||
|
}
|
||||||
|
return AnmeldeTool;
|
||||||
|
}
|
||||||
|
|
||||||
|
// PUT api/<controller>/5
|
||||||
|
[HttpPut("{id}")]
|
||||||
|
[Authorize(Policy = PolicyNames.EditModule)]
|
||||||
|
public async Task<Models.AnmeldeTool> Put(int id, [FromBody] Models.AnmeldeTool AnmeldeTool)
|
||||||
|
{
|
||||||
|
if (ModelState.IsValid && AnmeldeTool.AnmeldeToolId == id && IsAuthorizedEntityId(EntityNames.Module, AnmeldeTool.ModuleId))
|
||||||
|
{
|
||||||
|
AnmeldeTool = await _AnmeldeToolService.UpdateAnmeldeToolAsync(AnmeldeTool);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_logger.Log(LogLevel.Error, this, LogFunction.Security, "Unauthorized AnmeldeTool Put Attempt {AnmeldeTool}", AnmeldeTool);
|
||||||
|
HttpContext.Response.StatusCode = (int)HttpStatusCode.Forbidden;
|
||||||
|
AnmeldeTool = null;
|
||||||
|
}
|
||||||
|
return AnmeldeTool;
|
||||||
|
}
|
||||||
|
|
||||||
|
// DELETE api/<controller>/5
|
||||||
|
[HttpDelete("{id}/{moduleid}")]
|
||||||
|
[Authorize(Policy = PolicyNames.EditModule)]
|
||||||
|
public async Task Delete(int id, int moduleid)
|
||||||
|
{
|
||||||
|
Models.AnmeldeTool AnmeldeTool = await _AnmeldeToolService.GetAnmeldeToolAsync(id, moduleid);
|
||||||
|
if (AnmeldeTool != null && IsAuthorizedEntityId(EntityNames.Module, AnmeldeTool.ModuleId))
|
||||||
|
{
|
||||||
|
await _AnmeldeToolService.DeleteAnmeldeToolAsync(id, AnmeldeTool.ModuleId);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_logger.Log(LogLevel.Error, this, LogFunction.Security, "Unauthorized AnmeldeTool Delete Attempt {AnmeldeToolId} {ModuleId}", id, moduleid);
|
||||||
|
HttpContext.Response.StatusCode = (int)HttpStatusCode.Forbidden;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
87
Server/Manager/AnmeldeToolManager.cs
Normal file
87
Server/Manager/AnmeldeToolManager.cs
Normal file
|
@ -0,0 +1,87 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text.Json;
|
||||||
|
using Oqtane.Modules;
|
||||||
|
using Oqtane.Models;
|
||||||
|
using Oqtane.Infrastructure;
|
||||||
|
using Oqtane.Interfaces;
|
||||||
|
using Oqtane.Enums;
|
||||||
|
using Oqtane.Repository;
|
||||||
|
using AdamGais.Module.AnmeldeTool.Repository;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace AdamGais.Module.AnmeldeTool.Manager
|
||||||
|
{
|
||||||
|
public class AnmeldeToolManager : MigratableModuleBase, IInstallable, IPortable, ISearchable
|
||||||
|
{
|
||||||
|
private readonly IAnmeldeToolRepository _AnmeldeToolRepository;
|
||||||
|
private readonly IDBContextDependencies _DBContextDependencies;
|
||||||
|
|
||||||
|
public AnmeldeToolManager(IAnmeldeToolRepository AnmeldeToolRepository, IDBContextDependencies DBContextDependencies)
|
||||||
|
{
|
||||||
|
_AnmeldeToolRepository = AnmeldeToolRepository;
|
||||||
|
_DBContextDependencies = DBContextDependencies;
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool Install(Tenant tenant, string version)
|
||||||
|
{
|
||||||
|
return Migrate(new AnmeldeToolContext(_DBContextDependencies), tenant, MigrationType.Up);
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool Uninstall(Tenant tenant)
|
||||||
|
{
|
||||||
|
return Migrate(new AnmeldeToolContext(_DBContextDependencies), tenant, MigrationType.Down);
|
||||||
|
}
|
||||||
|
|
||||||
|
public string ExportModule(Oqtane.Models.Module module)
|
||||||
|
{
|
||||||
|
string content = "";
|
||||||
|
List<Models.AnmeldeTool> AnmeldeTools = _AnmeldeToolRepository.GetAnmeldeTools(module.ModuleId).ToList();
|
||||||
|
if (AnmeldeTools != null)
|
||||||
|
{
|
||||||
|
content = JsonSerializer.Serialize(AnmeldeTools);
|
||||||
|
}
|
||||||
|
return content;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ImportModule(Oqtane.Models.Module module, string content, string version)
|
||||||
|
{
|
||||||
|
List<Models.AnmeldeTool> AnmeldeTools = null;
|
||||||
|
if (!string.IsNullOrEmpty(content))
|
||||||
|
{
|
||||||
|
AnmeldeTools = JsonSerializer.Deserialize<List<Models.AnmeldeTool>>(content);
|
||||||
|
}
|
||||||
|
if (AnmeldeTools != null)
|
||||||
|
{
|
||||||
|
foreach(var AnmeldeTool in AnmeldeTools)
|
||||||
|
{
|
||||||
|
_AnmeldeToolRepository.AddAnmeldeTool(new Models.AnmeldeTool { ModuleId = module.ModuleId, Name = AnmeldeTool.Name });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public Task<List<SearchContent>> GetSearchContentsAsync(PageModule pageModule, DateTime lastIndexedOn)
|
||||||
|
{
|
||||||
|
var searchContentList = new List<SearchContent>();
|
||||||
|
|
||||||
|
foreach (var AnmeldeTool in _AnmeldeToolRepository.GetAnmeldeTools(pageModule.ModuleId))
|
||||||
|
{
|
||||||
|
if (AnmeldeTool.ModifiedOn >= lastIndexedOn)
|
||||||
|
{
|
||||||
|
searchContentList.Add(new SearchContent
|
||||||
|
{
|
||||||
|
EntityName = "AdamGaisAnmeldeTool",
|
||||||
|
EntityId = AnmeldeTool.AnmeldeToolId.ToString(),
|
||||||
|
Title = AnmeldeTool.Name,
|
||||||
|
Body = AnmeldeTool.Name,
|
||||||
|
ContentModifiedBy = AnmeldeTool.ModifiedBy,
|
||||||
|
ContentModifiedOn = AnmeldeTool.ModifiedOn
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return Task.FromResult(searchContentList);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
30
Server/Migrations/01000000_InitializeModule.cs
Normal file
30
Server/Migrations/01000000_InitializeModule.cs
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
using Oqtane.Databases.Interfaces;
|
||||||
|
using Oqtane.Migrations;
|
||||||
|
using AdamGais.Module.AnmeldeTool.Migrations.EntityBuilders;
|
||||||
|
using AdamGais.Module.AnmeldeTool.Repository;
|
||||||
|
|
||||||
|
namespace AdamGais.Module.AnmeldeTool.Migrations
|
||||||
|
{
|
||||||
|
[DbContext(typeof(AnmeldeToolContext))]
|
||||||
|
[Migration("AdamGais.Module.AnmeldeTool.01.00.00.00")]
|
||||||
|
public class InitializeModule : MultiDatabaseMigration
|
||||||
|
{
|
||||||
|
public InitializeModule(IDatabase database) : base(database)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
var entityBuilder = new AnmeldeToolEntityBuilder(migrationBuilder, ActiveDatabase);
|
||||||
|
entityBuilder.Create();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
var entityBuilder = new AnmeldeToolEntityBuilder(migrationBuilder, ActiveDatabase);
|
||||||
|
entityBuilder.Drop();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
36
Server/Migrations/EntityBuilders/AnmeldeToolEntityBuilder.cs
Normal file
36
Server/Migrations/EntityBuilders/AnmeldeToolEntityBuilder.cs
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations.Operations;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations.Operations.Builders;
|
||||||
|
using Oqtane.Databases.Interfaces;
|
||||||
|
using Oqtane.Migrations;
|
||||||
|
using Oqtane.Migrations.EntityBuilders;
|
||||||
|
|
||||||
|
namespace AdamGais.Module.AnmeldeTool.Migrations.EntityBuilders
|
||||||
|
{
|
||||||
|
public class AnmeldeToolEntityBuilder : AuditableBaseEntityBuilder<AnmeldeToolEntityBuilder>
|
||||||
|
{
|
||||||
|
private const string _entityTableName = "AdamGaisAnmeldeTool";
|
||||||
|
private readonly PrimaryKey<AnmeldeToolEntityBuilder> _primaryKey = new("PK_AdamGaisAnmeldeTool", x => x.AnmeldeToolId);
|
||||||
|
private readonly ForeignKey<AnmeldeToolEntityBuilder> _moduleForeignKey = new("FK_AdamGaisAnmeldeTool_Module", x => x.ModuleId, "Module", "ModuleId", ReferentialAction.Cascade);
|
||||||
|
|
||||||
|
public AnmeldeToolEntityBuilder(MigrationBuilder migrationBuilder, IDatabase database) : base(migrationBuilder, database)
|
||||||
|
{
|
||||||
|
EntityTableName = _entityTableName;
|
||||||
|
PrimaryKey = _primaryKey;
|
||||||
|
ForeignKeys.Add(_moduleForeignKey);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override AnmeldeToolEntityBuilder BuildTable(ColumnsBuilder table)
|
||||||
|
{
|
||||||
|
AnmeldeToolId = AddAutoIncrementColumn(table,"AnmeldeToolId");
|
||||||
|
ModuleId = AddIntegerColumn(table,"ModuleId");
|
||||||
|
Name = AddMaxStringColumn(table,"Name");
|
||||||
|
AddAuditableColumns(table);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public OperationBuilder<AddColumnOperation> AnmeldeToolId { get; set; }
|
||||||
|
public OperationBuilder<AddColumnOperation> ModuleId { get; set; }
|
||||||
|
public OperationBuilder<AddColumnOperation> Name { get; set; }
|
||||||
|
}
|
||||||
|
}
|
26
Server/Repository/AnmeldeToolContext.cs
Normal file
26
Server/Repository/AnmeldeToolContext.cs
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using Microsoft.AspNetCore.Http;
|
||||||
|
using Oqtane.Modules;
|
||||||
|
using Oqtane.Repository;
|
||||||
|
using Oqtane.Infrastructure;
|
||||||
|
using Oqtane.Repository.Databases.Interfaces;
|
||||||
|
|
||||||
|
namespace AdamGais.Module.AnmeldeTool.Repository
|
||||||
|
{
|
||||||
|
public class AnmeldeToolContext : DBContextBase, ITransientService, IMultiDatabase
|
||||||
|
{
|
||||||
|
public virtual DbSet<Models.AnmeldeTool> AnmeldeTool { get; set; }
|
||||||
|
|
||||||
|
public AnmeldeToolContext(IDBContextDependencies DBContextDependencies) : base(DBContextDependencies)
|
||||||
|
{
|
||||||
|
// ContextBase handles multi-tenant database connections
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnModelCreating(ModelBuilder builder)
|
||||||
|
{
|
||||||
|
base.OnModelCreating(builder);
|
||||||
|
|
||||||
|
builder.Entity<Models.AnmeldeTool>().ToTable(ActiveDatabase.RewriteName("AdamGaisAnmeldeTool"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
65
Server/Repository/AnmeldeToolRepository.cs
Normal file
65
Server/Repository/AnmeldeToolRepository.cs
Normal file
|
@ -0,0 +1,65 @@
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using Oqtane.Modules;
|
||||||
|
|
||||||
|
namespace AdamGais.Module.AnmeldeTool.Repository
|
||||||
|
{
|
||||||
|
public class AnmeldeToolRepository : IAnmeldeToolRepository, ITransientService
|
||||||
|
{
|
||||||
|
private readonly IDbContextFactory<AnmeldeToolContext> _factory;
|
||||||
|
|
||||||
|
public AnmeldeToolRepository(IDbContextFactory<AnmeldeToolContext> factory)
|
||||||
|
{
|
||||||
|
_factory = factory;
|
||||||
|
}
|
||||||
|
|
||||||
|
public IEnumerable<Models.AnmeldeTool> GetAnmeldeTools(int ModuleId)
|
||||||
|
{
|
||||||
|
using var db = _factory.CreateDbContext();
|
||||||
|
return db.AnmeldeTool.Where(item => item.ModuleId == ModuleId).ToList();
|
||||||
|
}
|
||||||
|
|
||||||
|
public Models.AnmeldeTool GetAnmeldeTool(int AnmeldeToolId)
|
||||||
|
{
|
||||||
|
return GetAnmeldeTool(AnmeldeToolId, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Models.AnmeldeTool GetAnmeldeTool(int AnmeldeToolId, bool tracking)
|
||||||
|
{
|
||||||
|
using var db = _factory.CreateDbContext();
|
||||||
|
if (tracking)
|
||||||
|
{
|
||||||
|
return db.AnmeldeTool.Find(AnmeldeToolId);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return db.AnmeldeTool.AsNoTracking().FirstOrDefault(item => item.AnmeldeToolId == AnmeldeToolId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public Models.AnmeldeTool AddAnmeldeTool(Models.AnmeldeTool AnmeldeTool)
|
||||||
|
{
|
||||||
|
using var db = _factory.CreateDbContext();
|
||||||
|
db.AnmeldeTool.Add(AnmeldeTool);
|
||||||
|
db.SaveChanges();
|
||||||
|
return AnmeldeTool;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Models.AnmeldeTool UpdateAnmeldeTool(Models.AnmeldeTool AnmeldeTool)
|
||||||
|
{
|
||||||
|
using var db = _factory.CreateDbContext();
|
||||||
|
db.Entry(AnmeldeTool).State = EntityState.Modified;
|
||||||
|
db.SaveChanges();
|
||||||
|
return AnmeldeTool;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void DeleteAnmeldeTool(int AnmeldeToolId)
|
||||||
|
{
|
||||||
|
using var db = _factory.CreateDbContext();
|
||||||
|
Models.AnmeldeTool AnmeldeTool = db.AnmeldeTool.Find(AnmeldeToolId);
|
||||||
|
db.AnmeldeTool.Remove(AnmeldeTool);
|
||||||
|
db.SaveChanges();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
15
Server/Repository/IAnmeldeToolRepository.cs
Normal file
15
Server/Repository/IAnmeldeToolRepository.cs
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace AdamGais.Module.AnmeldeTool.Repository
|
||||||
|
{
|
||||||
|
public interface IAnmeldeToolRepository
|
||||||
|
{
|
||||||
|
IEnumerable<Models.AnmeldeTool> GetAnmeldeTools(int ModuleId);
|
||||||
|
Models.AnmeldeTool GetAnmeldeTool(int AnmeldeToolId);
|
||||||
|
Models.AnmeldeTool GetAnmeldeTool(int AnmeldeToolId, bool tracking);
|
||||||
|
Models.AnmeldeTool AddAnmeldeTool(Models.AnmeldeTool AnmeldeTool);
|
||||||
|
Models.AnmeldeTool UpdateAnmeldeTool(Models.AnmeldeTool AnmeldeTool);
|
||||||
|
void DeleteAnmeldeTool(int AnmeldeToolId);
|
||||||
|
}
|
||||||
|
}
|
101
Server/Services/AnmeldeToolService.cs
Normal file
101
Server/Services/AnmeldeToolService.cs
Normal file
|
@ -0,0 +1,101 @@
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Microsoft.AspNetCore.Http;
|
||||||
|
using Oqtane.Enums;
|
||||||
|
using Oqtane.Infrastructure;
|
||||||
|
using Oqtane.Models;
|
||||||
|
using Oqtane.Security;
|
||||||
|
using Oqtane.Shared;
|
||||||
|
using AdamGais.Module.AnmeldeTool.Repository;
|
||||||
|
|
||||||
|
namespace AdamGais.Module.AnmeldeTool.Services
|
||||||
|
{
|
||||||
|
public class ServerAnmeldeToolService : IAnmeldeToolService
|
||||||
|
{
|
||||||
|
private readonly IAnmeldeToolRepository _AnmeldeToolRepository;
|
||||||
|
private readonly IUserPermissions _userPermissions;
|
||||||
|
private readonly ILogManager _logger;
|
||||||
|
private readonly IHttpContextAccessor _accessor;
|
||||||
|
private readonly Alias _alias;
|
||||||
|
|
||||||
|
public ServerAnmeldeToolService(IAnmeldeToolRepository AnmeldeToolRepository, IUserPermissions userPermissions, ITenantManager tenantManager, ILogManager logger, IHttpContextAccessor accessor)
|
||||||
|
{
|
||||||
|
_AnmeldeToolRepository = AnmeldeToolRepository;
|
||||||
|
_userPermissions = userPermissions;
|
||||||
|
_logger = logger;
|
||||||
|
_accessor = accessor;
|
||||||
|
_alias = tenantManager.GetAlias();
|
||||||
|
}
|
||||||
|
|
||||||
|
public Task<List<Models.AnmeldeTool>> GetAnmeldeToolsAsync(int ModuleId)
|
||||||
|
{
|
||||||
|
if (_userPermissions.IsAuthorized(_accessor.HttpContext.User, _alias.SiteId, EntityNames.Module, ModuleId, PermissionNames.View))
|
||||||
|
{
|
||||||
|
return Task.FromResult(_AnmeldeToolRepository.GetAnmeldeTools(ModuleId).ToList());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_logger.Log(LogLevel.Error, this, LogFunction.Security, "Unauthorized AnmeldeTool Get Attempt {ModuleId}", ModuleId);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public Task<Models.AnmeldeTool> GetAnmeldeToolAsync(int AnmeldeToolId, int ModuleId)
|
||||||
|
{
|
||||||
|
if (_userPermissions.IsAuthorized(_accessor.HttpContext.User, _alias.SiteId, EntityNames.Module, ModuleId, PermissionNames.View))
|
||||||
|
{
|
||||||
|
return Task.FromResult(_AnmeldeToolRepository.GetAnmeldeTool(AnmeldeToolId));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_logger.Log(LogLevel.Error, this, LogFunction.Security, "Unauthorized AnmeldeTool Get Attempt {AnmeldeToolId} {ModuleId}", AnmeldeToolId, ModuleId);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public Task<Models.AnmeldeTool> AddAnmeldeToolAsync(Models.AnmeldeTool AnmeldeTool)
|
||||||
|
{
|
||||||
|
if (_userPermissions.IsAuthorized(_accessor.HttpContext.User, _alias.SiteId, EntityNames.Module, AnmeldeTool.ModuleId, PermissionNames.Edit))
|
||||||
|
{
|
||||||
|
AnmeldeTool = _AnmeldeToolRepository.AddAnmeldeTool(AnmeldeTool);
|
||||||
|
_logger.Log(LogLevel.Information, this, LogFunction.Create, "AnmeldeTool Added {AnmeldeTool}", AnmeldeTool);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_logger.Log(LogLevel.Error, this, LogFunction.Security, "Unauthorized AnmeldeTool Add Attempt {AnmeldeTool}", AnmeldeTool);
|
||||||
|
AnmeldeTool = null;
|
||||||
|
}
|
||||||
|
return Task.FromResult(AnmeldeTool);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Task<Models.AnmeldeTool> UpdateAnmeldeToolAsync(Models.AnmeldeTool AnmeldeTool)
|
||||||
|
{
|
||||||
|
if (_userPermissions.IsAuthorized(_accessor.HttpContext.User, _alias.SiteId, EntityNames.Module, AnmeldeTool.ModuleId, PermissionNames.Edit))
|
||||||
|
{
|
||||||
|
AnmeldeTool = _AnmeldeToolRepository.UpdateAnmeldeTool(AnmeldeTool);
|
||||||
|
_logger.Log(LogLevel.Information, this, LogFunction.Update, "AnmeldeTool Updated {AnmeldeTool}", AnmeldeTool);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_logger.Log(LogLevel.Error, this, LogFunction.Security, "Unauthorized AnmeldeTool Update Attempt {AnmeldeTool}", AnmeldeTool);
|
||||||
|
AnmeldeTool = null;
|
||||||
|
}
|
||||||
|
return Task.FromResult(AnmeldeTool);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Task DeleteAnmeldeToolAsync(int AnmeldeToolId, int ModuleId)
|
||||||
|
{
|
||||||
|
if (_userPermissions.IsAuthorized(_accessor.HttpContext.User, _alias.SiteId, EntityNames.Module, ModuleId, PermissionNames.Edit))
|
||||||
|
{
|
||||||
|
_AnmeldeToolRepository.DeleteAnmeldeTool(AnmeldeToolId);
|
||||||
|
_logger.Log(LogLevel.Information, this, LogFunction.Delete, "AnmeldeTool Deleted {AnmeldeToolId}", AnmeldeToolId);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_logger.Log(LogLevel.Error, this, LogFunction.Security, "Unauthorized AnmeldeTool Delete Attempt {AnmeldeToolId} {ModuleId}", AnmeldeToolId, ModuleId);
|
||||||
|
}
|
||||||
|
return Task.CompletedTask;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
28
Server/Startup/ServerStartup.cs
Normal file
28
Server/Startup/ServerStartup.cs
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
using Microsoft.AspNetCore.Builder;
|
||||||
|
using Microsoft.AspNetCore.Hosting;
|
||||||
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
using Oqtane.Infrastructure;
|
||||||
|
using AdamGais.Module.AnmeldeTool.Repository;
|
||||||
|
using AdamGais.Module.AnmeldeTool.Services;
|
||||||
|
|
||||||
|
namespace AdamGais.Module.AnmeldeTool.Startup
|
||||||
|
{
|
||||||
|
public class ServerStartup : IServerStartup
|
||||||
|
{
|
||||||
|
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
|
||||||
|
{
|
||||||
|
// not implemented
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ConfigureMvc(IMvcBuilder mvcBuilder)
|
||||||
|
{
|
||||||
|
// not implemented
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ConfigureServices(IServiceCollection services)
|
||||||
|
{
|
||||||
|
services.AddTransient<IAnmeldeToolService, ServerAnmeldeToolService>();
|
||||||
|
services.AddDbContextFactory<AnmeldeToolContext>(opt => { }, ServiceLifetime.Transient);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1 @@
|
||||||
|
/* Module Custom Styles */
|
|
@ -0,0 +1,5 @@
|
||||||
|
/* Module Script */
|
||||||
|
var AdamGais = AdamGais || {};
|
||||||
|
|
||||||
|
AdamGais.AnmeldeTool = {
|
||||||
|
};
|
11
Server/wwwroot/_content/Placeholder.txt
Normal file
11
Server/wwwroot/_content/Placeholder.txt
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
The _content folder should only contain static resources from shared razor component libraries (RCLs). Static resources can be extracted from shared RCL Nuget packages by executing a Publish task on the module's Server project to a local folder and copying the files from the _content folder which is created. Each shared RCL would have its own appropriately named subfolder within the module's _content folder.
|
||||||
|
|
||||||
|
ie.
|
||||||
|
|
||||||
|
/_content
|
||||||
|
/Radzen.Blazor
|
||||||
|
/css
|
||||||
|
/fonts
|
||||||
|
/syncfusion.blazor
|
||||||
|
/scripts
|
||||||
|
/styles
|
22
Shared/AdamGais.Module.AnmeldeTool.Shared.csproj
Normal file
22
Shared/AdamGais.Module.AnmeldeTool.Shared.csproj
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net9.0</TargetFramework>
|
||||||
|
<Version>1.0.0</Version>
|
||||||
|
<Product>AdamGais.Module.AnmeldeTool</Product>
|
||||||
|
<Authors>AdamGais</Authors>
|
||||||
|
<Company>AdamGais</Company>
|
||||||
|
<Description>AnmeldeTool</Description>
|
||||||
|
<Copyright>AdamGais</Copyright>
|
||||||
|
<AssemblyName>AdamGais.Module.AnmeldeTool.Shared.Oqtane</AssemblyName>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="Oqtane.Shared"><HintPath>..\..\oqtane.framework-dev\Oqtane.Server\bin\Debug\net9.0\Oqtane.Shared.dll</HintPath></Reference>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
18
Shared/Interfaces/IAnmeldeToolService.cs
Normal file
18
Shared/Interfaces/IAnmeldeToolService.cs
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace AdamGais.Module.AnmeldeTool.Services
|
||||||
|
{
|
||||||
|
public interface IAnmeldeToolService
|
||||||
|
{
|
||||||
|
Task<List<Models.AnmeldeTool>> GetAnmeldeToolsAsync(int ModuleId);
|
||||||
|
|
||||||
|
Task<Models.AnmeldeTool> GetAnmeldeToolAsync(int AnmeldeToolId, int ModuleId);
|
||||||
|
|
||||||
|
Task<Models.AnmeldeTool> AddAnmeldeToolAsync(Models.AnmeldeTool AnmeldeTool);
|
||||||
|
|
||||||
|
Task<Models.AnmeldeTool> UpdateAnmeldeToolAsync(Models.AnmeldeTool AnmeldeTool);
|
||||||
|
|
||||||
|
Task DeleteAnmeldeToolAsync(int AnmeldeToolId, int ModuleId);
|
||||||
|
}
|
||||||
|
}
|
21
Shared/Models/AnmeldeTool.cs
Normal file
21
Shared/Models/AnmeldeTool.cs
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
using System;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
using Oqtane.Models;
|
||||||
|
|
||||||
|
namespace AdamGais.Module.AnmeldeTool.Models
|
||||||
|
{
|
||||||
|
[Table("AdamGaisAnmeldeTool")]
|
||||||
|
public class AnmeldeTool : IAuditable
|
||||||
|
{
|
||||||
|
[Key]
|
||||||
|
public int AnmeldeToolId { get; set; }
|
||||||
|
public int ModuleId { get; set; }
|
||||||
|
public string Name { get; set; }
|
||||||
|
|
||||||
|
public string CreatedBy { get; set; }
|
||||||
|
public DateTime CreatedOn { get; set; }
|
||||||
|
public string ModifiedBy { get; set; }
|
||||||
|
public DateTime ModifiedOn { get; set; }
|
||||||
|
}
|
||||||
|
}
|
6
template.json
Normal file
6
template.json
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"Title": "Default Module Template",
|
||||||
|
"Type": "External",
|
||||||
|
"Version": "5.2.0",
|
||||||
|
"Namespace": "AdamGais.Module.AnmeldeTool"
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user