Work-In_progress
parent
26a8982b2c
commit
b8ec9517eb
11
Parts.cs
11
Parts.cs
|
@ -14,11 +14,18 @@ namespace sharpwawi
|
|||
WaWi = waWi;
|
||||
}
|
||||
|
||||
public Part this[string key]{
|
||||
public Part this[string key]
|
||||
{
|
||||
get => throw new KeyNotFoundException();
|
||||
}
|
||||
|
||||
[PublishedMember]
|
||||
public Part Create()
|
||||
{
|
||||
return new Part();
|
||||
}
|
||||
|
||||
|
||||
[PublishedMember]
|
||||
public Part TestPart { get; } = new Part("P001-456-8765", "Der universelle Testartikel");
|
||||
}
|
||||
}
|
||||
|
|
13
WaWi.cs
13
WaWi.cs
|
@ -29,7 +29,7 @@ namespace sharpwawi
|
|||
|
||||
private void PrepareMapper()
|
||||
{
|
||||
mapperConfiguration = new Configuration()
|
||||
/* mapperConfiguration = new Configuration()
|
||||
.AddClass(typeof(Entity))
|
||||
.AddClass(typeof(Part))
|
||||
.AddClass(typeof(Assembly))
|
||||
|
@ -37,12 +37,15 @@ namespace sharpwawi
|
|||
.SetConnectionProvider(new PGSQLConnectionProvider("feuerbach.lupus","demo","demo","demo"));
|
||||
|
||||
Mapper = new Mapper(mapperConfiguration);
|
||||
*/
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void TestMapper()
|
||||
{
|
||||
Console.WriteLine("TestMapper():");
|
||||
/* Console.WriteLine("TestMapper():");
|
||||
Console.WriteLine("UpdateScheme():");
|
||||
Mapper.UpdateScheme();
|
||||
|
||||
|
@ -60,15 +63,15 @@ namespace sharpwawi
|
|||
Mapper.MappingInterface.SaveOrUpdate(parts[2]);
|
||||
|
||||
Entity[] entities = Mapper.MappingInterface.Load<Entity>();
|
||||
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
|
||||
[WebCallable]
|
||||
[PublishedMember]
|
||||
public static String Version { get; } = "V0.0.1";
|
||||
|
||||
[WebCallable]
|
||||
[PublishedMember]
|
||||
public static String CurrentTime => DateTime.Now.ToString();
|
||||
|
||||
|
||||
|
|
7
WaWi.xml
7
WaWi.xml
|
@ -5,10 +5,9 @@
|
|||
<Resource Default="/index.hfrm">
|
||||
<Provider Name="StaticDirectory">www</Provider>
|
||||
<Resource>
|
||||
<Provider Name="ClassInstance">sharpwawi.WaWi</Provider>
|
||||
</Resource>
|
||||
<Resource>
|
||||
<Provider Name="StaticClass">sharpwawi.Parts</Provider>
|
||||
<Provider Name="ReflectiveResource">sharpwawi.WaWi</Provider>
|
||||
<Parameter Name="templates">templates</Parameter>
|
||||
<Parameter Name="instantiate">true</Parameter>
|
||||
</Resource>
|
||||
</Resource>
|
||||
</SharpWebApplication>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using mapper.attributes;
|
||||
using appsrv.attributes;
|
||||
|
||||
namespace sharpwawi.models
|
||||
{
|
||||
|
@ -34,11 +35,22 @@ namespace sharpwawi.models
|
|||
}
|
||||
}
|
||||
|
||||
[PublishedMember]
|
||||
public int Priority => 1;
|
||||
|
||||
[PublishedMember]
|
||||
public double Rank => 2.345;
|
||||
|
||||
|
||||
public Assembly CreateAssembly(){
|
||||
Assembly assembly = new Assembly(this);
|
||||
Assemblies.Add(assembly);
|
||||
return assembly;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return String.Format("[{0}] {1}",Key,Name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -49,6 +49,7 @@
|
|||
<Folder Include="models\" />
|
||||
<Folder Include="www\articles\" />
|
||||
<Folder Include="models\stock\" />
|
||||
<Folder Include="templates\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="www\index.hfrm">
|
||||
|
@ -72,6 +73,15 @@
|
|||
<None Include="www\articles.hfrm">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="templates\sharpwawi.models.Part.hfrm">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="templates\sharpwawi.Parts.hfrm">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="www\editor.css">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\sharp-application-server\sharp-application-server.csproj">
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
<?frame /layout.hfrm ?>
|
||||
<div class="left box navigation">
|
||||
<div class="group">
|
||||
<div>Recherche</div>
|
||||
<input type="text" id="qpart" class="narrow" alt="schlüssel / bezeichnung"/>
|
||||
</div>
|
||||
<div class="group">
|
||||
<div><a href="/WaWi/Parts/Create">anlegen</a></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="block">
|
||||
<?framed?>
|
||||
</div>
|
|
@ -0,0 +1,61 @@
|
|||
<?frame /layout.hfrm ?>
|
||||
<?set pagetitle "Artikel Details"?>
|
||||
|
||||
<h1>[ <?=this.Key?> ] <?=this.Name?></h1>
|
||||
|
||||
<form action="<?=REDIT_PATH?>" method="POST" ENCTYPE="multipart/form-data"/>
|
||||
|
||||
<div class="block">
|
||||
<div class="group">
|
||||
<div class="title">Allgemeine Angaben</div>
|
||||
|
||||
<div class="block">
|
||||
<label>Schlüssel</label>
|
||||
<?editor this.Key?>
|
||||
</div>
|
||||
|
||||
<div class="block">
|
||||
<label>Bezeichnung</label>
|
||||
<?editor this.Name?>
|
||||
</div>
|
||||
|
||||
<div class="block">
|
||||
<label>TEST: Rank</label>
|
||||
<?editor this.Rank?>
|
||||
</div>
|
||||
<div class="block">
|
||||
<label>TEST: Priority</label>
|
||||
<?editor this.Priority?>
|
||||
</div>
|
||||
<!--
|
||||
<div class="group">
|
||||
<div class="title">Freie Felder</div>
|
||||
<div class="block">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Feldname</th>
|
||||
<th>Wert</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
<?iterate uf o.userFields?>
|
||||
<tr>
|
||||
<td><?=uf.Key?></td>
|
||||
<td><?=uf.Value?></td>
|
||||
</tr>
|
||||
<?end?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
-->
|
||||
|
||||
</div>
|
||||
|
||||
<input type="submit" value="Absenden"/>
|
||||
</div>
|
||||
|
||||
</form>
|
|
@ -0,0 +1,31 @@
|
|||
.block > label {
|
||||
display: inline-block;
|
||||
width: 140px;
|
||||
}
|
||||
|
||||
.editor {
|
||||
border-radius: 4px;
|
||||
border: 1px solid #6fb9df;
|
||||
width: 220px;
|
||||
height: 14px;
|
||||
padding: 3px;
|
||||
|
||||
font-size: 12px;
|
||||
font-family: Courier New, Courier, monospace;
|
||||
|
||||
margin: 2px;
|
||||
}
|
||||
|
||||
.editor:invalid {
|
||||
border-radius: 4px;
|
||||
border: 1px solid #ff897f;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
|
||||
background-color: #FF8080;
|
||||
}
|
||||
|
||||
.editor.number {
|
||||
text-align: right;
|
||||
width: 120px;
|
||||
}
|
|
@ -1,6 +1,7 @@
|
|||
<?head?>
|
||||
<title>WaWi Version [<?=/WaWi/Version ?>] / <?=pagetitle?></title>
|
||||
<link rel="stylesheet" href="/style.css">
|
||||
<link rel="stylesheet" href="/editor.css">
|
||||
<?end?>
|
||||
|
||||
<section id="headbar">
|
||||
|
@ -12,7 +13,7 @@
|
|||
<div>
|
||||
<div>Harald Wolff</div>
|
||||
<div>[ AEVL ]</div>
|
||||
<div>+49 7051 9291 - 410</div>
|
||||
<div>+49 7051 9291 - 412</div>
|
||||
<div>hwolff@dr-bender.de</div>
|
||||
<div>Keine Nachrichten</div>
|
||||
<div></div>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0"?>
|
||||
<SharpForm>
|
||||
<div class="navigation">
|
||||
<a href="/articles.hfrm">Artikel</a>
|
||||
<a href="/WaWi/Parts">Artikel</a>
|
||||
</div>
|
||||
<div class="navigation">
|
||||
<a href="">Stücklisten</a>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
body,p,div,a,a:visited {
|
||||
font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
|
||||
font-size: 18px;
|
||||
font-size: 12px;
|
||||
text-decoration: none;
|
||||
font-style: normal;
|
||||
padding: 0px;
|
||||
|
@ -89,10 +89,6 @@ div {
|
|||
overflow:auto;
|
||||
}
|
||||
|
||||
#pagearea * {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
#headbar .title {
|
||||
position: absolute;
|
||||
top: 8px;
|
||||
|
@ -167,20 +163,6 @@ div {
|
|||
font-weight: bold;
|
||||
}
|
||||
|
||||
input, select, button {
|
||||
border-radius: 4px;
|
||||
border: 1px solid #6fb9df;
|
||||
width: 280px;
|
||||
height: 18px;
|
||||
padding: 3px;
|
||||
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
input.narrow {
|
||||
width: 140px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#navigation * {
|
||||
|
|
Loading…
Reference in New Issue