fix the hausbesitzer project
This commit is contained in:
parent
e65facbd14
commit
5795ad8f86
|
@ -1,19 +1,16 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{CBD648B3-DFA3-4321-9CC4-53855587FC30}</ProjectGuid>
|
||||
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
|
||||
<ProjectGuid>{0C59157F-0137-4494-81F4-72504AE1F3A9}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>_2018_03_02_hausbesitzer</RootNamespace>
|
||||
<AssemblyName>2018-03-02_hausbesitzer</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
|
||||
<NoStandardLibraries>false</NoStandardLibraries>
|
||||
<AssemblyName>ConsoleApplication</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
|
@ -21,37 +18,46 @@
|
|||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<RootNamespace>_2018_03_02_hausbesitzer</RootNamespace>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Db4objects.Db4o">
|
||||
<HintPath>..\..\..\..\..\..\Program Files (x86)\db4o\db4o-8.0\bin\net-4.0\Db4objects.Db4o.dll</HintPath>
|
||||
<Reference Include="Db4objects.Db4o, Version=8.0.249.16098, Culture=neutral, PublicKeyToken=6199cd4f203aa8eb, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\..\..\Program Files (x86)\db4o\db4o-8.0\bin\net-4.0\Db4objects.Db4o.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include=".vs\F1\v15\.suo" />
|
||||
<None Include="Properties\app.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Class1.cs" />
|
||||
<Compile Include="HouseOwner.cs" />
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Request.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSHARP.Targets" />
|
||||
<ProjectExtensions>
|
||||
<VisualStudio AllowExistingFolder="true" />
|
||||
</ProjectExtensions>
|
||||
</Project>
|
|
@ -3,18 +3,18 @@ Microsoft Visual Studio Solution File, Format Version 12.00
|
|||
# Visual Studio 15
|
||||
VisualStudioVersion = 15.0.26430.12
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "2018-03-02_hausbesitzer", "2018-03-02_hausbesitzer\2018-03-02_hausbesitzer.csproj", "{CBD648B3-DFA3-4321-9CC4-53855587FC30}"
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "2018-03-02_hausbesitzer", "2018-03-02_hausbesitzer.csproj", "{0C59157F-0137-4494-81F4-72504AE1F3A9}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
Debug|x86 = Debug|x86
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{CBD648B3-DFA3-4321-9CC4-53855587FC30}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{CBD648B3-DFA3-4321-9CC4-53855587FC30}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{CBD648B3-DFA3-4321-9CC4-53855587FC30}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{CBD648B3-DFA3-4321-9CC4-53855587FC30}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{0C59157F-0137-4494-81F4-72504AE1F3A9}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{0C59157F-0137-4494-81F4-72504AE1F3A9}.Debug|x86.Build.0 = Debug|x86
|
||||
{0C59157F-0137-4494-81F4-72504AE1F3A9}.Release|x86.ActiveCfg = Release|x86
|
||||
{0C59157F-0137-4494-81F4-72504AE1F3A9}.Release|x86.Build.0 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
|
||||
</startup>
|
||||
</configuration>
|
|
@ -1,22 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace _2018_03_02_hausbesitzer
|
||||
{
|
||||
class HouseOwner
|
||||
{
|
||||
public string name { get; set; }
|
||||
public string address { get; set; }
|
||||
public List<Request> requests { get; set; }
|
||||
|
||||
public HouseOwner(string _name, string _address)
|
||||
{
|
||||
this.name = _name;
|
||||
this.address = _address;
|
||||
this.requests = new List<Request>();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace _2018_03_02_hausbesitzer
|
||||
{
|
||||
class Class1
|
||||
{
|
||||
}
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace _2018_03_02_hausbesitzer
|
||||
{
|
||||
class HouseOwner
|
||||
{
|
||||
private string _name;
|
||||
|
||||
public string name
|
||||
{
|
||||
get { return _name; }
|
||||
set { _name = value; }
|
||||
}
|
||||
|
||||
private string _address;
|
||||
|
||||
public string address
|
||||
{
|
||||
get { return _address; }
|
||||
set { _address = value; }
|
||||
}
|
||||
|
||||
public List<Request> requests { get; set; }
|
||||
|
||||
public HouseOwner(string name, string address)
|
||||
{
|
||||
this.name = name;
|
||||
this.address = address;
|
||||
this.requests = new List<Request>();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,30 +1,25 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Db4objects.Db4o;
|
||||
using Db4objects.Db4o;
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
namespace _2018_03_02_hausbesitzer
|
||||
{
|
||||
class Program
|
||||
{
|
||||
static string tempPath = System.IO.Path.GetTempPath();
|
||||
readonly static string DbPath = System.IO.Path.Combine(
|
||||
tempPath,
|
||||
"hausbesitzer.db");
|
||||
readonly static string YapFileName = Path.Combine(
|
||||
Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
|
||||
"formula1.yap");
|
||||
|
||||
static void Main(string[] args)
|
||||
{
|
||||
System.IO.File.Delete(DbPath);
|
||||
IObjectContainer db = Db4oEmbedded.OpenFile(Db4oEmbedded.NewConfiguration(), DbPath);
|
||||
HouseOwner owner = new HouseOwner("Max Muster", "Unterstrasse 14");
|
||||
File.Delete(YapFileName);
|
||||
IObjectContainer db = Db4oEmbedded.OpenFile(Db4oEmbedded.NewConfiguration(), YapFileName);
|
||||
HouseOwner owner = new HouseOwner("max muster", "test");
|
||||
Request request = new Request(1);
|
||||
owner.requests.Add(request);
|
||||
db.Store(owner);
|
||||
db.Store(request);
|
||||
|
||||
if (request.status != Request.Status.final_data_delivered)
|
||||
while (request.status != Request.Status.final_data_delivered)
|
||||
{
|
||||
IObjectSet result = db.QueryByExample(request);
|
||||
request = (Request)result.Next();
|
||||
|
@ -36,7 +31,8 @@ namespace _2018_03_02_hausbesitzer
|
|||
request.AllocateSubsidies();
|
||||
db.Store(request);
|
||||
db.Close();
|
||||
Console.ReadLine();
|
||||
Console.ReadKey();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -2,20 +2,20 @@
|
|||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("2018-03-02_hausbesitzer")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("2018-03-02_hausbesitzer")]
|
||||
[assembly: AssemblyProduct("F1")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2018")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
|
@ -25,11 +25,11 @@ using System.Runtime.InteropServices;
|
|||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/>
|
||||
</startup>
|
||||
</configuration>
|
|
@ -8,17 +8,23 @@ namespace _2018_03_02_hausbesitzer
|
|||
{
|
||||
class Request
|
||||
{
|
||||
private Status _status = Status.undefined;
|
||||
public enum Status {
|
||||
undefined,
|
||||
first_data_delivered,
|
||||
first_data_checked,
|
||||
detail_data_delivered,
|
||||
subsidies_delivered,
|
||||
final_data_delivered
|
||||
}
|
||||
|
||||
private Status _status = Status.undefined;
|
||||
public Status status
|
||||
{
|
||||
get { return _status; }
|
||||
}
|
||||
|
||||
|
||||
// propfull
|
||||
private int _id;
|
||||
|
||||
public int id
|
||||
{
|
||||
get { return _id; }
|
||||
|
@ -34,19 +40,9 @@ namespace _2018_03_02_hausbesitzer
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
public enum Status {
|
||||
undefined,
|
||||
first_data_delivered,
|
||||
first_data_checked,
|
||||
detail_data_delivered,
|
||||
subsidies_delivered,
|
||||
final_data_delivered
|
||||
}
|
||||
|
||||
public Request(int _id)
|
||||
public Request(int id)
|
||||
{
|
||||
this.id = _id;
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public void Check()
|
Reference in New Issue