diff --git a/.github/workflows/dotnetcore.yml b/.github/workflows/dotnetcore.yml
index 597c3781..3c2ff071 100644
--- a/.github/workflows/dotnetcore.yml
+++ b/.github/workflows/dotnetcore.yml
@@ -38,6 +38,20 @@ jobs:
- name: Restore packages
run: dotnet restore --configfile nuget.config --verbosity normal
+ - name: Check generated model is up to date
+ # The generation is skipped in CI builds, so it is enforced here.
+ # The file is removed first, because all files have the same timestamp after checkout.
+ run: |
+ $generatedFile = "src\SimpleAccounting\Model\AccountingData.designer.cs"
+ Remove-Item $generatedFile
+ dotnet msbuild src\SimpleAccounting -t:GenerateModel -p:CI=false
+ if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
+ git diff --exit-code -- $generatedFile
+ if ($LASTEXITCODE -ne 0) {
+ Write-Host "::error file=$generatedFile::The generated model is outdated. Build locally and commit the file."
+ exit 1
+ }
+ shell: pwsh
- name: Publish Small Release
run: dotnet publish --configuration Release
working-directory: src\SimpleAccounting
diff --git a/dotnet-tools.json b/dotnet-tools.json
new file mode 100644
index 00000000..5da862db
--- /dev/null
+++ b/dotnet-tools.json
@@ -0,0 +1,13 @@
+{
+ "version": 1,
+ "isRoot": true,
+ "tools": {
+ "dotnet-xscgen": {
+ "version": "3.0.1405",
+ "commands": [
+ "xscgen"
+ ],
+ "rollForward": false
+ }
+ }
+}
\ No newline at end of file
diff --git a/samples/sample.acml b/samples/sample.acml
index 1339c2f7..e9c704a1 100644
--- a/samples/sample.acml
+++ b/samples/sample.acml
@@ -17,7 +17,6 @@
-
@@ -42,5 +41,4 @@
-
\ No newline at end of file
diff --git a/src/SimpleAccounting/Infrastructure/ImportFileLoader.cs b/src/SimpleAccounting/Infrastructure/ImportFileLoader.cs
index 58c83718..6261ac7a 100644
--- a/src/SimpleAccounting/Infrastructure/ImportFileLoader.cs
+++ b/src/SimpleAccounting/Infrastructure/ImportFileLoader.cs
@@ -59,18 +59,18 @@ private IEnumerable ImportBookings(TextReader reader, IRea
{
var dateField =
this.importMapping.Columns
- .Find(x => x.Target == AccountDefinitionImportMappingColumnTarget.Date)?.Source
+ .Find(x => x.Target == AccountDefinitionImportMappingColumnsColumnTarget.Date)?.Source
?? "date";
var nameField =
this.importMapping.Columns
- .Find(x => x.Target == AccountDefinitionImportMappingColumnTarget.Name)?.Source
+ .Find(x => x.Target == AccountDefinitionImportMappingColumnsColumnTarget.Name)?.Source
?? "name";
var textField =
this.importMapping.Columns
- .Find(x => x.Target == AccountDefinitionImportMappingColumnTarget.Text);
+ .Find(x => x.Target == AccountDefinitionImportMappingColumnsColumnTarget.Text);
var valueField =
this.importMapping.Columns
- .Find(x => x.Target == AccountDefinitionImportMappingColumnTarget.Value)?.Source
+ .Find(x => x.Target == AccountDefinitionImportMappingColumnsColumnTarget.Value)?.Source
?? "value";
using var csv = new CsvReader(reader, configuration);
@@ -95,7 +95,7 @@ private ImportEntryViewModel ImportBooking(
CsvReader csv,
string dateField,
string nameField,
- AccountDefinitionImportMappingColumn? textField,
+ AccountDefinitionImportMappingColumnsColumn? textField,
string valueField)
{
// date and value are required
@@ -119,16 +119,19 @@ private ImportEntryViewModel ImportBooking(
text = this.duplicateSpaceExpression.Replace(text, " ");
}
- var item = new ImportEntryViewModel(this.accounts) { Date = date, Name = name ?? string.Empty, Text = text, Value = value };
+ var item = new ImportEntryViewModel(this.accounts)
+ {
+ Date = date, Name = name ?? string.Empty, Text = text, Value = value
+ };
var modelValue = value.ToModelValue();
- var patterns = this.importMapping.Patterns ?? Enumerable.Empty();
+ var patterns = this.importMapping.Patterns ?? Enumerable.Empty();
var matchedPattern = patterns.FirstOrDefault(PatternPredicate);
item.RemoteAccount = this.accounts.SingleOrDefault(a => a.ID == matchedPattern?.AccountID);
return item;
- bool PatternPredicate(AccountDefinitionImportMappingPattern pattern)
+ bool PatternPredicate(AccountDefinitionImportMappingPatternsPattern pattern)
{
if (!pattern.Regex.IsMatch(text))
{
diff --git a/src/SimpleAccounting/Model/AccountingData.Extensions.cs b/src/SimpleAccounting/Model/AccountingData.Extensions.cs
index b1bfdf07..4443bbfd 100644
--- a/src/SimpleAccounting/Model/AccountingData.Extensions.cs
+++ b/src/SimpleAccounting/Model/AccountingData.Extensions.cs
@@ -8,8 +8,10 @@ namespace lg2de.SimpleAccounting.Model;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
+using System.IO;
using System.Linq;
using System.Text.RegularExpressions;
+using System.Xml;
using System.Xml.Serialization;
using lg2de.SimpleAccounting.Extensions;
using lg2de.SimpleAccounting.Infrastructure;
@@ -25,6 +27,8 @@ public partial class AccountingData
private const string DefaultSchemaNamespace = "https://lg2.de/SimpleAccounting/AccountingSchema";
private const string DefaultSchemaLocation = "https://lg2de.github.io/SimpleAccounting/AccountingData.xsd";
+ private static readonly XmlSerializer Serializer = new(typeof(AccountingData));
+
private string schema = DefaultXsiSchemaLocation;
public AccountingData()
@@ -56,6 +60,28 @@ public string xsiSchemaLocation
internal IEnumerable AllAccounts =>
this.Accounts?.SelectMany(g => g.Account) ?? Enumerable.Empty();
+ ///
+ /// Deserializes the project from the specified XML.
+ ///
+ public static AccountingData Deserialize(string xml)
+ {
+ using var stringReader = new StringReader(xml);
+ using var xmlReader = XmlReader.Create(stringReader);
+ return (AccountingData)Serializer.Deserialize(xmlReader)!;
+ }
+
+ ///
+ /// Serializes the project into XML.
+ ///
+ public string Serialize()
+ {
+ using var memoryStream = new MemoryStream();
+ Serializer.Serialize(memoryStream, this);
+ memoryStream.Seek(0, SeekOrigin.Begin);
+ using var streamReader = new StreamReader(memoryStream);
+ return streamReader.ReadToEnd();
+ }
+
///
/// Creates new project with some template data.
///
@@ -79,7 +105,7 @@ internal static AccountingData GetTemplateProject(int currentYear)
return new AccountingData
{
Setup = new AccountingDataSetup(),
- Accounts = [new AccountingDataAccountGroup { Name = "Default", Account = defaultAccounts }],
+ Accounts = [new AccountingDataAccountsAccountGroup { Name = "Default", Account = defaultAccounts }],
Journal = [accountJournal]
};
}
@@ -262,9 +288,9 @@ public partial class AccountingDataSetup
{
public AccountingDataSetup()
{
- this.behaviorField = new AccountingDataSetupBehavior();
- this.reportsField = new AccountingDataSetupReports();
- this.currencyField = new AccountingDataSetupCurrency { Value = AccountingDataSetupCurrency.DefaultValue };
+ this.Behavior = new AccountingDataSetupBehavior();
+ this.Reports = new AccountingDataSetupReports();
+ this.Currency = new AccountingDataSetupCurrency { Value = AccountingDataSetupCurrency.DefaultValue };
}
}
@@ -305,8 +331,8 @@ public bool IsValid()
}
return
- this.Columns.Exists(x => x.Target == AccountDefinitionImportMappingColumnTarget.Date)
- && this.Columns.Exists(x => x.Target == AccountDefinitionImportMappingColumnTarget.Value);
+ this.Columns.Exists(x => x.Target == AccountDefinitionImportMappingColumnsColumnTarget.Date)
+ && this.Columns.Exists(x => x.Target == AccountDefinitionImportMappingColumnsColumnTarget.Value);
}
}
@@ -362,7 +388,7 @@ internal string FormatName()
///
/// Implements a single pattern of an account definition for semi-automatic import.
///
-public partial class AccountDefinitionImportMappingPattern
+public partial class AccountDefinitionImportMappingPatternsPattern
{
private Regex? regex;
internal Regex Regex => this.regex ??= new Regex(this.Expression, RegexOptions.Compiled, TimeSpan.FromSeconds(1));
diff --git a/src/SimpleAccounting/Model/AccountingData.designer.cs b/src/SimpleAccounting/Model/AccountingData.designer.cs
index ec184193..f05c4528 100644
--- a/src/SimpleAccounting/Model/AccountingData.designer.cs
+++ b/src/SimpleAccounting/Model/AccountingData.designer.cs
@@ -1,3825 +1,800 @@
-// ------------------------------------------------------------------------------
-//
-// Generated by Open Xsd2Code. Version 3.4.2.33629 MIT License (MIT)
-// lg2de.SimpleAccounting.ModelListCSharpFalseAccountingData.designer.csFalseFalseFalseFalseFalseFalseFalseTrueFalseUTF8FalseEntityBaseFalseFalseFalseNet40SerializeDeserializeSaveToFileLoadFromFileTrueFalseFalseFalseFalseDefaultFalseFalse
-//
-// ------------------------------------------------------------------------------
-namespace lg2de.SimpleAccounting.Model {
- using System;
- using System.Diagnostics;
- using System.Xml.Serialization;
- using System.Collections;
- using System.Xml.Schema;
- using System.ComponentModel;
- using System.IO;
- using System.Text;
- using System.Collections.Generic;
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+// This code was generated by XmlSchemaClassGenerator version 3.0.1405.0 using the following command:
+// xscgen -n lg2de.SimpleAccounting.Model -o obj\xscgen --ct System.Collections.Generic.List`1 --csm PublicWithoutConstructorInitialization --cc- --namingScheme=Direct Model\AccountingData.xsd
+namespace lg2de.SimpleAccounting.Model
+{
- [System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.4.1+6249aec1f88eb051eadc7d928205edd1c2d96aad")]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "3.0.1405.0")]
[System.SerializableAttribute()]
+ [System.Xml.Serialization.XmlTypeAttribute("AccountDefinition", Namespace="")]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
- [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
- [System.Xml.Serialization.XmlRootAttribute(Namespace="", IsNullable=false)]
- public partial class AccountingData {
+ public partial class AccountDefinition
+ {
- private AccountingDataSetup setupField;
+ [System.Xml.Serialization.XmlElementAttribute("ImportMapping")]
+ public AccountDefinitionImportMapping ImportMapping { get; set; }
- private List accountsField;
+ [System.ComponentModel.DataAnnotations.RequiredAttribute(AllowEmptyStrings=true)]
+ [System.Xml.Serialization.XmlAttributeAttribute("ID")]
+ public ulong ID { get; set; }
- private List yearsField;
+ [System.ComponentModel.DataAnnotations.RequiredAttribute(AllowEmptyStrings=true)]
+ [System.Xml.Serialization.XmlAttributeAttribute("Name")]
+ public string Name { get; set; }
- private List journalField;
+ [System.ComponentModel.DataAnnotations.RequiredAttribute(AllowEmptyStrings=true)]
+ [System.Xml.Serialization.XmlAttributeAttribute("Type")]
+ public AccountDefinitionType Type { get; set; }
- private List openIssuesField;
-
- private string programVersionField;
-
- private static System.Xml.Serialization.XmlSerializer serializer;
-
- public AccountingDataSetup Setup {
- get {
- return this.setupField;
- }
- set {
- this.setupField = value;
- }
- }
+ [System.Xml.Serialization.XmlIgnoreAttribute()]
+ private bool _active = true;
- [System.Xml.Serialization.XmlArrayItemAttribute("AccountGroup", IsNullable=false)]
- public List Accounts {
- get {
- return this.accountsField;
+ [System.ComponentModel.DefaultValueAttribute(true)]
+ [System.Xml.Serialization.XmlAttributeAttribute("Active")]
+ public bool Active
+ {
+ get
+ {
+ return _active;
}
- set {
- this.accountsField = value;
+ set
+ {
+ _active = value;
}
}
+ }
+
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "3.0.1405.0")]
+ [System.SerializableAttribute()]
+ [System.Xml.Serialization.XmlTypeAttribute("AccountDefinitionImportMapping", Namespace="", AnonymousType=true)]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ public partial class AccountDefinitionImportMapping
+ {
- [System.Xml.Serialization.XmlArrayItemAttribute("Year", IsNullable=false)]
- public List Years {
- get {
- return this.yearsField;
- }
- set {
- this.yearsField = value;
- }
- }
+ [System.Xml.Serialization.XmlIgnoreAttribute()]
+ private System.Collections.Generic.List _columns;
- [System.Xml.Serialization.XmlElementAttribute("Journal")]
- public List Journal {
- get {
- return this.journalField;
+ [System.ComponentModel.DataAnnotations.RequiredAttribute(AllowEmptyStrings=true)]
+ [System.Xml.Serialization.XmlArrayAttribute("Columns")]
+ [System.Xml.Serialization.XmlArrayItemAttribute("Column")]
+ public System.Collections.Generic.List Columns
+ {
+ get
+ {
+ return _columns;
}
- set {
- this.journalField = value;
+ set
+ {
+ _columns = value;
}
}
- [System.Xml.Serialization.XmlArrayItemAttribute("Entry", IsNullable=false)]
- public List OpenIssues {
- get {
- return this.openIssuesField;
- }
- set {
- this.openIssuesField = value;
- }
- }
+ [System.Xml.Serialization.XmlIgnoreAttribute()]
+ private System.Collections.Generic.List _patterns;
- [System.Xml.Serialization.XmlAttributeAttribute()]
- public string ProgramVersion {
- get {
- return this.programVersionField;
- }
- set {
- this.programVersionField = value;
+ [System.Xml.Serialization.XmlArrayAttribute("Patterns")]
+ [System.Xml.Serialization.XmlArrayItemAttribute("Pattern")]
+ public System.Collections.Generic.List Patterns
+ {
+ get
+ {
+ return _patterns;
}
- }
-
- private static System.Xml.Serialization.XmlSerializer Serializer {
- get {
- if ((serializer == null)) {
- serializer = new System.Xml.Serialization.XmlSerializer(typeof(AccountingData));
- }
- return serializer;
+ set
+ {
+ _patterns = value;
}
}
- #region Serialize/Deserialize
///
- /// Serializes current AccountingData object into an XML document
+ /// Gets a value indicating whether the Patterns collection is empty.
///
- /// string XML value
- public virtual string Serialize() {
- System.IO.StreamReader streamReader = null;
- System.IO.MemoryStream memoryStream = null;
- try {
- memoryStream = new System.IO.MemoryStream();
- Serializer.Serialize(memoryStream, this);
- memoryStream.Seek(0, System.IO.SeekOrigin.Begin);
- streamReader = new System.IO.StreamReader(memoryStream);
- return streamReader.ReadToEnd();
- }
- finally {
- if ((streamReader != null)) {
- streamReader.Dispose();
- }
- if ((memoryStream != null)) {
- memoryStream.Dispose();
- }
+ [System.Xml.Serialization.XmlIgnoreAttribute()]
+ public bool PatternsSpecified
+ {
+ get
+ {
+ return ((this.Patterns != null)
+ && (this.Patterns.Count != 0));
}
}
+ }
+
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "3.0.1405.0")]
+ [System.SerializableAttribute()]
+ [System.Xml.Serialization.XmlTypeAttribute("AccountDefinitionType", Namespace="", AnonymousType=true)]
+ public enum AccountDefinitionType
+ {
- ///
- /// Deserializes workflow markup into an AccountingData object
- ///
- /// string workflow markup to deserialize
- /// Output AccountingData object
- /// output Exception value if deserialize failed
- /// true if this XmlSerializer can deserialize the object; otherwise, false
- public static bool Deserialize(string xml, out AccountingData obj, out System.Exception exception) {
- exception = null;
- obj = default(AccountingData);
- try {
- obj = Deserialize(xml);
- return true;
- }
- catch (System.Exception ex) {
- exception = ex;
- return false;
- }
- }
+ Asset,
- public static bool Deserialize(string xml, out AccountingData obj) {
- System.Exception exception = null;
- return Deserialize(xml, out obj, out exception);
- }
+ Income,
- public static AccountingData Deserialize(string xml) {
- System.IO.StringReader stringReader = null;
- try {
- stringReader = new System.IO.StringReader(xml);
- return ((AccountingData)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
- }
- finally {
- if ((stringReader != null)) {
- stringReader.Dispose();
- }
- }
- }
+ Expense,
- ///
- /// Serializes current AccountingData object into file
- ///
- /// full path of output XML file
- /// output Exception value if failed
- /// true if can serialize and save into file; otherwise, false
- public virtual bool SaveToFile(string fileName, out System.Exception exception) {
- exception = null;
- try {
- SaveToFile(fileName);
- return true;
- }
- catch (System.Exception e) {
- exception = e;
- return false;
- }
- }
+ Credit,
- public virtual void SaveToFile(string fileName) {
- System.IO.StreamWriter streamWriter = null;
- try {
- string xmlString = Serialize();
- System.IO.FileInfo xmlFile = new System.IO.FileInfo(fileName);
- streamWriter = xmlFile.CreateText();
- streamWriter.WriteLine(xmlString);
- streamWriter.Close();
- }
- finally {
- if ((streamWriter != null)) {
- streamWriter.Dispose();
- }
- }
- }
+ Debit,
- ///
- /// Deserializes XML markup from file into an AccountingData object
- ///
- /// string xml file to load and deserialize
- /// Output AccountingData object
- /// output Exception value if deserialize failed
- /// true if this XmlSerializer can deserialize the object; otherwise, false
- public static bool LoadFromFile(string fileName, out AccountingData obj, out System.Exception exception) {
- exception = null;
- obj = default(AccountingData);
- try {
- obj = LoadFromFile(fileName);
- return true;
- }
- catch (System.Exception ex) {
- exception = ex;
- return false;
- }
- }
+ Carryforward,
+ }
+
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "3.0.1405.0")]
+ [System.SerializableAttribute()]
+ [System.Xml.Serialization.XmlTypeAttribute("AccountDefinitionImportMappingColumnsColumn", Namespace="", AnonymousType=true)]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ public partial class AccountDefinitionImportMappingColumnsColumn
+ {
- public static bool LoadFromFile(string fileName, out AccountingData obj) {
- System.Exception exception = null;
- return LoadFromFile(fileName, out obj, out exception);
- }
+ [System.ComponentModel.DataAnnotations.RequiredAttribute(AllowEmptyStrings=true)]
+ [System.Xml.Serialization.XmlAttributeAttribute("Target")]
+ public AccountDefinitionImportMappingColumnsColumnTarget Target { get; set; }
- public static AccountingData LoadFromFile(string fileName) {
- System.IO.FileStream file = null;
- System.IO.StreamReader sr = null;
- try {
- file = new System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read);
- sr = new System.IO.StreamReader(file);
- string xmlString = sr.ReadToEnd();
- sr.Close();
- file.Close();
- return Deserialize(xmlString);
- }
- finally {
- if ((file != null)) {
- file.Dispose();
- }
- if ((sr != null)) {
- sr.Dispose();
- }
- }
- }
- #endregion
+ [System.ComponentModel.DataAnnotations.RequiredAttribute(AllowEmptyStrings=true)]
+ [System.Xml.Serialization.XmlAttributeAttribute("Source")]
+ public string Source { get; set; }
+
+ [System.Xml.Serialization.XmlAttributeAttribute("IgnorePattern")]
+ public string IgnorePattern { get; set; }
}
- [System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.4.1+6249aec1f88eb051eadc7d928205edd1c2d96aad")]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "3.0.1405.0")]
[System.SerializableAttribute()]
- [System.ComponentModel.DesignerCategoryAttribute("code")]
- [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
- public partial class AccountingDataSetup {
+ [System.Xml.Serialization.XmlTypeAttribute("AccountDefinitionImportMappingColumnsColumnTarget", Namespace="", AnonymousType=true)]
+ public enum AccountDefinitionImportMappingColumnsColumnTarget
+ {
- private string nameField;
+ Date,
- private string locationField;
+ Name,
- private AccountingDataSetupCurrency currencyField;
+ Text,
- private AccountingDataSetupBookingTemplates bookingTemplatesField;
+ Value,
+ }
+
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "3.0.1405.0")]
+ [System.SerializableAttribute()]
+ [System.Xml.Serialization.XmlTypeAttribute("AccountDefinitionImportMappingPatternsPattern", Namespace="", AnonymousType=true)]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ public partial class AccountDefinitionImportMappingPatternsPattern
+ {
- private AccountingDataSetupReports reportsField;
+ [System.ComponentModel.DataAnnotations.RequiredAttribute(AllowEmptyStrings=true)]
+ [System.Xml.Serialization.XmlAttributeAttribute("Expression")]
+ public string Expression { get; set; }
- private AccountingDataSetupBehavior behaviorField;
+ [System.Xml.Serialization.XmlAttributeAttribute("Value")]
+ public long Value { get; set; }
- private static System.Xml.Serialization.XmlSerializer serializer;
+ ///
+ /// Gets or sets a value indicating whether the Value property is specified.
+ ///
+ [System.Xml.Serialization.XmlIgnoreAttribute()]
+ public bool ValueSpecified { get; set; }
- public string Name {
- get {
- return this.nameField;
- }
- set {
- this.nameField = value;
- }
- }
+ [System.ComponentModel.DataAnnotations.RequiredAttribute(AllowEmptyStrings=true)]
+ [System.Xml.Serialization.XmlAttributeAttribute("AccountID")]
+ public ulong AccountID { get; set; }
+ }
+
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "3.0.1405.0")]
+ [System.SerializableAttribute()]
+ [System.Xml.Serialization.XmlTypeAttribute("BookingValue", Namespace="")]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ public partial class BookingValue
+ {
- public string Location {
- get {
- return this.locationField;
- }
- set {
- this.locationField = value;
- }
- }
+ [System.ComponentModel.DataAnnotations.RequiredAttribute(AllowEmptyStrings=true)]
+ [System.Xml.Serialization.XmlAttributeAttribute("Value")]
+ public long Value { get; set; }
- public AccountingDataSetupCurrency Currency {
- get {
- return this.currencyField;
- }
- set {
- this.currencyField = value;
- }
- }
+ [System.ComponentModel.DataAnnotations.RequiredAttribute(AllowEmptyStrings=true)]
+ [System.Xml.Serialization.XmlAttributeAttribute("Account")]
+ public ulong Account { get; set; }
- public AccountingDataSetupBookingTemplates BookingTemplates {
- get {
- return this.bookingTemplatesField;
- }
- set {
- this.bookingTemplatesField = value;
- }
- }
+ [System.ComponentModel.DataAnnotations.RequiredAttribute(AllowEmptyStrings=true)]
+ [System.Xml.Serialization.XmlAttributeAttribute("Text")]
+ public string Text { get; set; }
+ }
+
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "3.0.1405.0")]
+ [System.SerializableAttribute()]
+ [System.Xml.Serialization.XmlTypeAttribute("AccountingData", Namespace="", AnonymousType=true)]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.Xml.Serialization.XmlRootAttribute("AccountingData", Namespace="")]
+ public partial class AccountingData
+ {
- public AccountingDataSetupReports Reports {
- get {
- return this.reportsField;
- }
- set {
- this.reportsField = value;
- }
- }
+ [System.ComponentModel.DataAnnotations.RequiredAttribute(AllowEmptyStrings=true)]
+ [System.Xml.Serialization.XmlElementAttribute("Setup")]
+ public AccountingDataSetup Setup { get; set; }
+
+ [System.Xml.Serialization.XmlIgnoreAttribute()]
+ private System.Collections.Generic.List _accounts;
- public AccountingDataSetupBehavior Behavior {
- get {
- return this.behaviorField;
+ [System.ComponentModel.DataAnnotations.RequiredAttribute(AllowEmptyStrings=true)]
+ [System.Xml.Serialization.XmlArrayAttribute("Accounts")]
+ [System.Xml.Serialization.XmlArrayItemAttribute("AccountGroup")]
+ public System.Collections.Generic.List Accounts
+ {
+ get
+ {
+ return _accounts;
}
- set {
- this.behaviorField = value;
+ set
+ {
+ _accounts = value;
}
}
- private static System.Xml.Serialization.XmlSerializer Serializer {
- get {
- if ((serializer == null)) {
- serializer = new System.Xml.Serialization.XmlSerializer(typeof(AccountingDataSetup));
- }
- return serializer;
+ [System.Xml.Serialization.XmlIgnoreAttribute()]
+ private System.Collections.Generic.List _years;
+
+ [System.Xml.Serialization.XmlArrayAttribute("Years")]
+ [System.Xml.Serialization.XmlArrayItemAttribute("Year")]
+ public System.Collections.Generic.List Years
+ {
+ get
+ {
+ return _years;
+ }
+ set
+ {
+ _years = value;
}
}
- #region Serialize/Deserialize
///
- /// Serializes current AccountingDataSetup object into an XML document
+ /// Gets a value indicating whether the Years collection is empty.
///
- /// string XML value
- public virtual string Serialize() {
- System.IO.StreamReader streamReader = null;
- System.IO.MemoryStream memoryStream = null;
- try {
- memoryStream = new System.IO.MemoryStream();
- Serializer.Serialize(memoryStream, this);
- memoryStream.Seek(0, System.IO.SeekOrigin.Begin);
- streamReader = new System.IO.StreamReader(memoryStream);
- return streamReader.ReadToEnd();
- }
- finally {
- if ((streamReader != null)) {
- streamReader.Dispose();
- }
- if ((memoryStream != null)) {
- memoryStream.Dispose();
- }
+ [System.Xml.Serialization.XmlIgnoreAttribute()]
+ public bool YearsSpecified
+ {
+ get
+ {
+ return ((this.Years != null)
+ && (this.Years.Count != 0));
}
}
- ///
- /// Deserializes workflow markup into an AccountingDataSetup object
- ///
- /// string workflow markup to deserialize
- /// Output AccountingDataSetup object
- /// output Exception value if deserialize failed
- /// true if this XmlSerializer can deserialize the object; otherwise, false
- public static bool Deserialize(string xml, out AccountingDataSetup obj, out System.Exception exception) {
- exception = null;
- obj = default(AccountingDataSetup);
- try {
- obj = Deserialize(xml);
- return true;
+ [System.Xml.Serialization.XmlIgnoreAttribute()]
+ private System.Collections.Generic.List _journal;
+
+ [System.ComponentModel.DataAnnotations.RequiredAttribute(AllowEmptyStrings=true)]
+ [System.Xml.Serialization.XmlElementAttribute("Journal")]
+ public System.Collections.Generic.List Journal
+ {
+ get
+ {
+ return _journal;
}
- catch (System.Exception ex) {
- exception = ex;
- return false;
+ set
+ {
+ _journal = value;
}
}
- public static bool Deserialize(string xml, out AccountingDataSetup obj) {
- System.Exception exception = null;
- return Deserialize(xml, out obj, out exception);
- }
+ [System.Xml.Serialization.XmlIgnoreAttribute()]
+ private System.Collections.Generic.List _openIssues;
- public static AccountingDataSetup Deserialize(string xml) {
- System.IO.StringReader stringReader = null;
- try {
- stringReader = new System.IO.StringReader(xml);
- return ((AccountingDataSetup)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
+ [System.Xml.Serialization.XmlArrayAttribute("OpenIssues")]
+ [System.Xml.Serialization.XmlArrayItemAttribute("Entry")]
+ public System.Collections.Generic.List OpenIssues
+ {
+ get
+ {
+ return _openIssues;
}
- finally {
- if ((stringReader != null)) {
- stringReader.Dispose();
- }
+ set
+ {
+ _openIssues = value;
}
}
///
- /// Serializes current AccountingDataSetup object into file
+ /// Gets a value indicating whether the OpenIssues collection is empty.
///
- /// full path of output XML file
- /// output Exception value if failed
- /// true if can serialize and save into file; otherwise, false
- public virtual bool SaveToFile(string fileName, out System.Exception exception) {
- exception = null;
- try {
- SaveToFile(fileName);
- return true;
- }
- catch (System.Exception e) {
- exception = e;
- return false;
+ [System.Xml.Serialization.XmlIgnoreAttribute()]
+ public bool OpenIssuesSpecified
+ {
+ get
+ {
+ return ((this.OpenIssues != null)
+ && (this.OpenIssues.Count != 0));
}
}
- public virtual void SaveToFile(string fileName) {
- System.IO.StreamWriter streamWriter = null;
- try {
- string xmlString = Serialize();
- System.IO.FileInfo xmlFile = new System.IO.FileInfo(fileName);
- streamWriter = xmlFile.CreateText();
- streamWriter.WriteLine(xmlString);
- streamWriter.Close();
+ [System.Xml.Serialization.XmlAttributeAttribute("ProgramVersion")]
+ public string ProgramVersion { get; set; }
+ }
+
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "3.0.1405.0")]
+ [System.SerializableAttribute()]
+ [System.Xml.Serialization.XmlTypeAttribute("AccountingDataSetup", Namespace="", AnonymousType=true)]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ public partial class AccountingDataSetup
+ {
+
+ [System.ComponentModel.DataAnnotations.RequiredAttribute(AllowEmptyStrings=true)]
+ [System.Xml.Serialization.XmlElementAttribute("Name")]
+ public string Name { get; set; }
+
+ [System.ComponentModel.DataAnnotations.RequiredAttribute(AllowEmptyStrings=true)]
+ [System.Xml.Serialization.XmlElementAttribute("Location")]
+ public string Location { get; set; }
+
+ [System.ComponentModel.DataAnnotations.RequiredAttribute(AllowEmptyStrings=true)]
+ [System.Xml.Serialization.XmlElementAttribute("Currency")]
+ public AccountingDataSetupCurrency Currency { get; set; }
+
+ [System.Xml.Serialization.XmlIgnoreAttribute()]
+ private System.Collections.Generic.List _bookingTemplates;
+
+ [System.Xml.Serialization.XmlArrayAttribute("BookingTemplates")]
+ [System.Xml.Serialization.XmlArrayItemAttribute("Template")]
+ public System.Collections.Generic.List BookingTemplates
+ {
+ get
+ {
+ return _bookingTemplates;
}
- finally {
- if ((streamWriter != null)) {
- streamWriter.Dispose();
- }
+ set
+ {
+ _bookingTemplates = value;
}
}
///
- /// Deserializes XML markup from file into an AccountingDataSetup object
+ /// Gets a value indicating whether the BookingTemplates collection is empty.
///
- /// string xml file to load and deserialize
- /// Output AccountingDataSetup object
- /// output Exception value if deserialize failed
- /// true if this XmlSerializer can deserialize the object; otherwise, false
- public static bool LoadFromFile(string fileName, out AccountingDataSetup obj, out System.Exception exception) {
- exception = null;
- obj = default(AccountingDataSetup);
- try {
- obj = LoadFromFile(fileName);
- return true;
- }
- catch (System.Exception ex) {
- exception = ex;
- return false;
+ [System.Xml.Serialization.XmlIgnoreAttribute()]
+ public bool BookingTemplatesSpecified
+ {
+ get
+ {
+ return ((this.BookingTemplates != null)
+ && (this.BookingTemplates.Count != 0));
}
}
- public static bool LoadFromFile(string fileName, out AccountingDataSetup obj) {
- System.Exception exception = null;
- return LoadFromFile(fileName, out obj, out exception);
- }
+ [System.Xml.Serialization.XmlElementAttribute("Reports")]
+ public AccountingDataSetupReports Reports { get; set; }
- public static AccountingDataSetup LoadFromFile(string fileName) {
- System.IO.FileStream file = null;
- System.IO.StreamReader sr = null;
- try {
- file = new System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read);
- sr = new System.IO.StreamReader(file);
- string xmlString = sr.ReadToEnd();
- sr.Close();
- file.Close();
- return Deserialize(xmlString);
- }
- finally {
- if ((file != null)) {
- file.Dispose();
- }
- if ((sr != null)) {
- sr.Dispose();
- }
- }
- }
- #endregion
+ [System.Xml.Serialization.XmlElementAttribute("Behavior")]
+ public AccountingDataSetupBehavior Behavior { get; set; }
}
- [System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.4.1+6249aec1f88eb051eadc7d928205edd1c2d96aad")]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "3.0.1405.0")]
[System.SerializableAttribute()]
+ [System.Xml.Serialization.XmlTypeAttribute("AccountingDataSetupCurrency", Namespace="")]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
- [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
- public partial class AccountingDataSetupCurrency {
-
- private bool showField;
+ public partial class AccountingDataSetupCurrency
+ {
- private string valueField;
-
- private static System.Xml.Serialization.XmlSerializer serializer;
+ ///
+ /// Gets or sets the text value.
+ ///
+ [System.Xml.Serialization.XmlTextAttribute()]
+ public string Value { get; set; }
- public AccountingDataSetupCurrency() {
- this.showField = false;
- }
+ [System.Xml.Serialization.XmlIgnoreAttribute()]
+ private bool _show = false;
- [System.Xml.Serialization.XmlAttributeAttribute()]
[System.ComponentModel.DefaultValueAttribute(false)]
- public bool Show {
- get {
- return this.showField;
+ [System.Xml.Serialization.XmlAttributeAttribute("Show")]
+ public bool Show
+ {
+ get
+ {
+ return _show;
}
- set {
- this.showField = value;
+ set
+ {
+ _show = value;
}
}
+ }
+
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "3.0.1405.0")]
+ [System.SerializableAttribute()]
+ [System.Xml.Serialization.XmlTypeAttribute("AccountingDataSetupReports", Namespace="", AnonymousType=true)]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ public partial class AccountingDataSetupReports
+ {
- [System.Xml.Serialization.XmlTextAttribute()]
- public string Value {
- get {
- return this.valueField;
- }
- set {
- this.valueField = value;
- }
- }
+ [System.Xml.Serialization.XmlElementAttribute("AccountJournalReport")]
+ public AccountingDataSetupReportsAccountJournalReport AccountJournalReport { get; set; }
- private static System.Xml.Serialization.XmlSerializer Serializer {
- get {
- if ((serializer == null)) {
- serializer = new System.Xml.Serialization.XmlSerializer(typeof(AccountingDataSetupCurrency));
- }
- return serializer;
- }
- }
+ [System.Xml.Serialization.XmlIgnoreAttribute()]
+ private System.Collections.Generic.List _totalsAndBalancesReport;
- #region Serialize/Deserialize
- ///
- /// Serializes current AccountingDataSetupCurrency object into an XML document
- ///
- /// string XML value
- public virtual string Serialize() {
- System.IO.StreamReader streamReader = null;
- System.IO.MemoryStream memoryStream = null;
- try {
- memoryStream = new System.IO.MemoryStream();
- Serializer.Serialize(memoryStream, this);
- memoryStream.Seek(0, System.IO.SeekOrigin.Begin);
- streamReader = new System.IO.StreamReader(memoryStream);
- return streamReader.ReadToEnd();
+ [System.Xml.Serialization.XmlArrayAttribute("TotalsAndBalancesReport")]
+ [System.Xml.Serialization.XmlArrayItemAttribute("Signature")]
+ public System.Collections.Generic.List TotalsAndBalancesReport
+ {
+ get
+ {
+ return _totalsAndBalancesReport;
}
- finally {
- if ((streamReader != null)) {
- streamReader.Dispose();
- }
- if ((memoryStream != null)) {
- memoryStream.Dispose();
- }
+ set
+ {
+ _totalsAndBalancesReport = value;
}
}
///
- /// Deserializes workflow markup into an AccountingDataSetupCurrency object
+ /// Gets a value indicating whether the TotalsAndBalancesReport collection is empty.
///
- /// string workflow markup to deserialize
- /// Output AccountingDataSetupCurrency object
- /// output Exception value if deserialize failed
- /// true if this XmlSerializer can deserialize the object; otherwise, false
- public static bool Deserialize(string xml, out AccountingDataSetupCurrency obj, out System.Exception exception) {
- exception = null;
- obj = default(AccountingDataSetupCurrency);
- try {
- obj = Deserialize(xml);
- return true;
- }
- catch (System.Exception ex) {
- exception = ex;
- return false;
+ [System.Xml.Serialization.XmlIgnoreAttribute()]
+ public bool TotalsAndBalancesReportSpecified
+ {
+ get
+ {
+ return ((this.TotalsAndBalancesReport != null)
+ && (this.TotalsAndBalancesReport.Count != 0));
}
}
+ }
+
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "3.0.1405.0")]
+ [System.SerializableAttribute()]
+ [System.Xml.Serialization.XmlTypeAttribute("AccountingDataSetupBookingTemplatesTemplate", Namespace="", AnonymousType=true)]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ public partial class AccountingDataSetupBookingTemplatesTemplate
+ {
- public static bool Deserialize(string xml, out AccountingDataSetupCurrency obj) {
- System.Exception exception = null;
- return Deserialize(xml, out obj, out exception);
- }
+ [System.ComponentModel.DataAnnotations.RequiredAttribute(AllowEmptyStrings=true)]
+ [System.Xml.Serialization.XmlAttributeAttribute("Text")]
+ public string Text { get; set; }
- public static AccountingDataSetupCurrency Deserialize(string xml) {
- System.IO.StringReader stringReader = null;
- try {
- stringReader = new System.IO.StringReader(xml);
- return ((AccountingDataSetupCurrency)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
- }
- finally {
- if ((stringReader != null)) {
- stringReader.Dispose();
- }
- }
- }
+ [System.Xml.Serialization.XmlAttributeAttribute("Value")]
+ public long Value { get; set; }
///
- /// Serializes current AccountingDataSetupCurrency object into file
+ /// Gets or sets a value indicating whether the Value property is specified.
///
- /// full path of output XML file
- /// output Exception value if failed
- /// true if can serialize and save into file; otherwise, false
- public virtual bool SaveToFile(string fileName, out System.Exception exception) {
- exception = null;
- try {
- SaveToFile(fileName);
- return true;
- }
- catch (System.Exception e) {
- exception = e;
- return false;
- }
- }
+ [System.Xml.Serialization.XmlIgnoreAttribute()]
+ public bool ValueSpecified { get; set; }
- public virtual void SaveToFile(string fileName) {
- System.IO.StreamWriter streamWriter = null;
- try {
- string xmlString = Serialize();
- System.IO.FileInfo xmlFile = new System.IO.FileInfo(fileName);
- streamWriter = xmlFile.CreateText();
- streamWriter.WriteLine(xmlString);
- streamWriter.Close();
- }
- finally {
- if ((streamWriter != null)) {
- streamWriter.Dispose();
- }
- }
- }
+ [System.Xml.Serialization.XmlAttributeAttribute("Credit")]
+ public ulong Credit { get; set; }
///
- /// Deserializes XML markup from file into an AccountingDataSetupCurrency object
+ /// Gets or sets a value indicating whether the Credit property is specified.
///
- /// string xml file to load and deserialize
- /// Output AccountingDataSetupCurrency object
- /// output Exception value if deserialize failed
- /// true if this XmlSerializer can deserialize the object; otherwise, false
- public static bool LoadFromFile(string fileName, out AccountingDataSetupCurrency obj, out System.Exception exception) {
- exception = null;
- obj = default(AccountingDataSetupCurrency);
- try {
- obj = LoadFromFile(fileName);
- return true;
- }
- catch (System.Exception ex) {
- exception = ex;
- return false;
- }
- }
+ [System.Xml.Serialization.XmlIgnoreAttribute()]
+ public bool CreditSpecified { get; set; }
- public static bool LoadFromFile(string fileName, out AccountingDataSetupCurrency obj) {
- System.Exception exception = null;
- return LoadFromFile(fileName, out obj, out exception);
- }
+ [System.Xml.Serialization.XmlAttributeAttribute("Debit")]
+ public ulong Debit { get; set; }
- public static AccountingDataSetupCurrency LoadFromFile(string fileName) {
- System.IO.FileStream file = null;
- System.IO.StreamReader sr = null;
- try {
- file = new System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read);
- sr = new System.IO.StreamReader(file);
- string xmlString = sr.ReadToEnd();
- sr.Close();
- file.Close();
- return Deserialize(xmlString);
- }
- finally {
- if ((file != null)) {
- file.Dispose();
- }
- if ((sr != null)) {
- sr.Dispose();
- }
- }
- }
- #endregion
+ ///
+ /// Gets or sets a value indicating whether the Debit property is specified.
+ ///
+ [System.Xml.Serialization.XmlIgnoreAttribute()]
+ public bool DebitSpecified { get; set; }
}
- [System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.4.1+6249aec1f88eb051eadc7d928205edd1c2d96aad")]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "3.0.1405.0")]
[System.SerializableAttribute()]
+ [System.Xml.Serialization.XmlTypeAttribute("AccountingDataSetupReportsAccountJournalReport", Namespace="", AnonymousType=true)]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
- [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
- public partial class AccountingDataSetupBookingTemplates {
-
- private List templateField;
+ public partial class AccountingDataSetupReportsAccountJournalReport
+ {
- private static System.Xml.Serialization.XmlSerializer serializer;
+ [System.Xml.Serialization.XmlIgnoreAttribute()]
+ private bool _pageBreakBetweenAccounts = false;
- [System.Xml.Serialization.XmlElementAttribute("Template")]
- public List Template {
- get {
- return this.templateField;
+ [System.ComponentModel.DefaultValueAttribute(false)]
+ [System.Xml.Serialization.XmlAttributeAttribute("PageBreakBetweenAccounts")]
+ public bool PageBreakBetweenAccounts
+ {
+ get
+ {
+ return _pageBreakBetweenAccounts;
}
- set {
- this.templateField = value;
+ set
+ {
+ _pageBreakBetweenAccounts = value;
}
}
+ }
+
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "3.0.1405.0")]
+ [System.SerializableAttribute()]
+ [System.Xml.Serialization.XmlTypeAttribute("AccountingDataSetupBehavior", Namespace="", AnonymousType=true)]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ public partial class AccountingDataSetupBehavior
+ {
- private static System.Xml.Serialization.XmlSerializer Serializer {
- get {
- if ((serializer == null)) {
- serializer = new System.Xml.Serialization.XmlSerializer(typeof(AccountingDataSetupBookingTemplates));
- }
- return serializer;
- }
- }
+ [System.Xml.Serialization.XmlElementAttribute("LastBookingImportFolder")]
+ public string LastBookingImportFolder { get; set; }
- #region Serialize/Deserialize
- ///
- /// Serializes current AccountingDataSetupBookingTemplates object into an XML document
- ///
- /// string XML value
- public virtual string Serialize() {
- System.IO.StreamReader streamReader = null;
- System.IO.MemoryStream memoryStream = null;
- try {
- memoryStream = new System.IO.MemoryStream();
- Serializer.Serialize(memoryStream, this);
- memoryStream.Seek(0, System.IO.SeekOrigin.Begin);
- streamReader = new System.IO.StreamReader(memoryStream);
- return streamReader.ReadToEnd();
- }
- finally {
- if ((streamReader != null)) {
- streamReader.Dispose();
- }
- if ((memoryStream != null)) {
- memoryStream.Dispose();
- }
- }
- }
+ [System.Xml.Serialization.XmlElementAttribute("OpeningTextPattern")]
+ public string OpeningTextPattern { get; set; }
+
+ [System.Xml.Serialization.XmlElementAttribute("LastCarryForward")]
+ public ulong LastCarryForward { get; set; }
///
- /// Deserializes workflow markup into an AccountingDataSetupBookingTemplates object
+ /// Gets or sets a value indicating whether the LastCarryForward property is specified.
///
- /// string workflow markup to deserialize
- /// Output AccountingDataSetupBookingTemplates object
- /// output Exception value if deserialize failed
- /// true if this XmlSerializer can deserialize the object; otherwise, false
- public static bool Deserialize(string xml, out AccountingDataSetupBookingTemplates obj, out System.Exception exception) {
- exception = null;
- obj = default(AccountingDataSetupBookingTemplates);
- try {
- obj = Deserialize(xml);
- return true;
- }
- catch (System.Exception ex) {
- exception = ex;
- return false;
- }
- }
+ [System.Xml.Serialization.XmlIgnoreAttribute()]
+ public bool LastCarryForwardSpecified { get; set; }
+ }
+
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "3.0.1405.0")]
+ [System.SerializableAttribute()]
+ [System.Xml.Serialization.XmlTypeAttribute("AccountingDataJournal", Namespace="", AnonymousType=true)]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ public partial class AccountingDataJournal
+ {
- public static bool Deserialize(string xml, out AccountingDataSetupBookingTemplates obj) {
- System.Exception exception = null;
- return Deserialize(xml, out obj, out exception);
- }
+ [System.Xml.Serialization.XmlIgnoreAttribute()]
+ private System.Collections.Generic.List _booking;
- public static AccountingDataSetupBookingTemplates Deserialize(string xml) {
- System.IO.StringReader stringReader = null;
- try {
- stringReader = new System.IO.StringReader(xml);
- return ((AccountingDataSetupBookingTemplates)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
+ [System.ComponentModel.DataAnnotations.RequiredAttribute(AllowEmptyStrings=true)]
+ [System.Xml.Serialization.XmlElementAttribute("Booking")]
+ public System.Collections.Generic.List Booking
+ {
+ get
+ {
+ return _booking;
}
- finally {
- if ((stringReader != null)) {
- stringReader.Dispose();
- }
+ set
+ {
+ _booking = value;
}
}
- ///
- /// Serializes current AccountingDataSetupBookingTemplates object into file
- ///
- /// full path of output XML file
- /// output Exception value if failed
- /// true if can serialize and save into file; otherwise, false
- public virtual bool SaveToFile(string fileName, out System.Exception exception) {
- exception = null;
- try {
- SaveToFile(fileName);
- return true;
+ [System.ComponentModel.DataAnnotations.RequiredAttribute(AllowEmptyStrings=true)]
+ [System.Xml.Serialization.XmlAttributeAttribute("Year")]
+ public string Year { get; set; }
+
+ [System.ComponentModel.DataAnnotations.RequiredAttribute(AllowEmptyStrings=true)]
+ [System.Xml.Serialization.XmlAttributeAttribute("DateStart")]
+ public uint DateStart { get; set; }
+
+ [System.ComponentModel.DataAnnotations.RequiredAttribute(AllowEmptyStrings=true)]
+ [System.Xml.Serialization.XmlAttributeAttribute("DateEnd")]
+ public uint DateEnd { get; set; }
+
+ [System.Xml.Serialization.XmlIgnoreAttribute()]
+ private bool _closed = false;
+
+ [System.ComponentModel.DefaultValueAttribute(false)]
+ [System.Xml.Serialization.XmlAttributeAttribute("Closed")]
+ public bool Closed
+ {
+ get
+ {
+ return _closed;
}
- catch (System.Exception e) {
- exception = e;
- return false;
+ set
+ {
+ _closed = value;
}
}
+ }
+
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "3.0.1405.0")]
+ [System.SerializableAttribute()]
+ [System.Xml.Serialization.XmlTypeAttribute("AccountingDataAccountsAccountGroup", Namespace="", AnonymousType=true)]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ public partial class AccountingDataAccountsAccountGroup
+ {
+
+ [System.Xml.Serialization.XmlIgnoreAttribute()]
+ private System.Collections.Generic.List _account;
- public virtual void SaveToFile(string fileName) {
- System.IO.StreamWriter streamWriter = null;
- try {
- string xmlString = Serialize();
- System.IO.FileInfo xmlFile = new System.IO.FileInfo(fileName);
- streamWriter = xmlFile.CreateText();
- streamWriter.WriteLine(xmlString);
- streamWriter.Close();
+ [System.Xml.Serialization.XmlElementAttribute("Account")]
+ public System.Collections.Generic.List Account
+ {
+ get
+ {
+ return _account;
}
- finally {
- if ((streamWriter != null)) {
- streamWriter.Dispose();
- }
+ set
+ {
+ _account = value;
}
}
///
- /// Deserializes XML markup from file into an AccountingDataSetupBookingTemplates object
+ /// Gets a value indicating whether the Account collection is empty.
///
- /// string xml file to load and deserialize
- /// Output AccountingDataSetupBookingTemplates object
- /// output Exception value if deserialize failed
- /// true if this XmlSerializer can deserialize the object; otherwise, false
- public static bool LoadFromFile(string fileName, out AccountingDataSetupBookingTemplates obj, out System.Exception exception) {
- exception = null;
- obj = default(AccountingDataSetupBookingTemplates);
- try {
- obj = LoadFromFile(fileName);
- return true;
- }
- catch (System.Exception ex) {
- exception = ex;
- return false;
+ [System.Xml.Serialization.XmlIgnoreAttribute()]
+ public bool AccountSpecified
+ {
+ get
+ {
+ return ((this.Account != null)
+ && (this.Account.Count != 0));
}
}
- public static bool LoadFromFile(string fileName, out AccountingDataSetupBookingTemplates obj) {
- System.Exception exception = null;
- return LoadFromFile(fileName, out obj, out exception);
- }
-
- public static AccountingDataSetupBookingTemplates LoadFromFile(string fileName) {
- System.IO.FileStream file = null;
- System.IO.StreamReader sr = null;
- try {
- file = new System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read);
- sr = new System.IO.StreamReader(file);
- string xmlString = sr.ReadToEnd();
- sr.Close();
- file.Close();
- return Deserialize(xmlString);
- }
- finally {
- if ((file != null)) {
- file.Dispose();
- }
- if ((sr != null)) {
- sr.Dispose();
- }
- }
- }
- #endregion
+ [System.ComponentModel.DataAnnotations.RequiredAttribute(AllowEmptyStrings=true)]
+ [System.Xml.Serialization.XmlAttributeAttribute("Name")]
+ public string Name { get; set; }
}
- [System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.4.1+6249aec1f88eb051eadc7d928205edd1c2d96aad")]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "3.0.1405.0")]
[System.SerializableAttribute()]
+ [System.Xml.Serialization.XmlTypeAttribute("AccountingDataYearsYear", Namespace="", AnonymousType=true)]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
- [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
- public partial class AccountingDataSetupBookingTemplatesTemplate {
-
- private string textField;
-
- private long valueField;
-
- private bool valueFieldSpecified;
+ public partial class AccountingDataYearsYear
+ {
- private ulong creditField;
+ [System.ComponentModel.DataAnnotations.RequiredAttribute(AllowEmptyStrings=true)]
+ [System.Xml.Serialization.XmlAttributeAttribute("Name")]
+ public ushort Name { get; set; }
- private bool creditFieldSpecified;
+ [System.ComponentModel.DataAnnotations.RequiredAttribute(AllowEmptyStrings=true)]
+ [System.Xml.Serialization.XmlAttributeAttribute("DateStart")]
+ public uint DateStart { get; set; }
- private ulong debitField;
+ [System.ComponentModel.DataAnnotations.RequiredAttribute(AllowEmptyStrings=true)]
+ [System.Xml.Serialization.XmlAttributeAttribute("DateEnd")]
+ public uint DateEnd { get; set; }
- private bool debitFieldSpecified;
-
- private static System.Xml.Serialization.XmlSerializer serializer;
+ [System.Xml.Serialization.XmlIgnoreAttribute()]
+ private bool _closed = false;
- [System.Xml.Serialization.XmlAttributeAttribute()]
- public string Text {
- get {
- return this.textField;
+ [System.ComponentModel.DefaultValueAttribute(false)]
+ [System.Xml.Serialization.XmlAttributeAttribute("Closed")]
+ public bool Closed
+ {
+ get
+ {
+ return _closed;
}
- set {
- this.textField = value;
+ set
+ {
+ _closed = value;
}
}
+ }
+
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "3.0.1405.0")]
+ [System.SerializableAttribute()]
+ [System.Xml.Serialization.XmlTypeAttribute("AccountingDataJournalBooking", Namespace="", AnonymousType=true)]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ public partial class AccountingDataJournalBooking
+ {
+
+ [System.Xml.Serialization.XmlIgnoreAttribute()]
+ private System.Collections.Generic.List _debit;
- [System.Xml.Serialization.XmlAttributeAttribute()]
- public long Value {
- get {
- return this.valueField;
+ [System.ComponentModel.DataAnnotations.RequiredAttribute(AllowEmptyStrings=true)]
+ [System.Xml.Serialization.XmlElementAttribute("Debit")]
+ public System.Collections.Generic.List Debit
+ {
+ get
+ {
+ return _debit;
}
- set {
- this.valueField = value;
+ set
+ {
+ _debit = value;
}
}
[System.Xml.Serialization.XmlIgnoreAttribute()]
- public bool ValueSpecified {
- get {
- return this.valueFieldSpecified;
- }
- set {
- this.valueFieldSpecified = value;
- }
- }
+ private System.Collections.Generic.List _credit;
- [System.Xml.Serialization.XmlAttributeAttribute()]
- public ulong Credit {
- get {
- return this.creditField;
+ [System.ComponentModel.DataAnnotations.RequiredAttribute(AllowEmptyStrings=true)]
+ [System.Xml.Serialization.XmlElementAttribute("Credit")]
+ public System.Collections.Generic.List Credit
+ {
+ get
+ {
+ return _credit;
}
- set {
- this.creditField = value;
+ set
+ {
+ _credit = value;
}
}
+ [System.ComponentModel.DataAnnotations.RequiredAttribute(AllowEmptyStrings=true)]
+ [System.Xml.Serialization.XmlAttributeAttribute("Date")]
+ public uint Date { get; set; }
+
+ [System.ComponentModel.DataAnnotations.RequiredAttribute(AllowEmptyStrings=true)]
+ [System.Xml.Serialization.XmlAttributeAttribute("ID")]
+ public ulong ID { get; set; }
+
[System.Xml.Serialization.XmlIgnoreAttribute()]
- public bool CreditSpecified {
- get {
- return this.creditFieldSpecified;
- }
- set {
- this.creditFieldSpecified = value;
- }
- }
+ private bool _followup = false;
- [System.Xml.Serialization.XmlAttributeAttribute()]
- public ulong Debit {
- get {
- return this.debitField;
+ [System.ComponentModel.DefaultValueAttribute(false)]
+ [System.Xml.Serialization.XmlAttributeAttribute("Followup")]
+ public bool Followup
+ {
+ get
+ {
+ return _followup;
}
- set {
- this.debitField = value;
+ set
+ {
+ _followup = value;
}
}
[System.Xml.Serialization.XmlIgnoreAttribute()]
- public bool DebitSpecified {
- get {
- return this.debitFieldSpecified;
+ private bool _opening = false;
+
+ [System.ComponentModel.DefaultValueAttribute(false)]
+ [System.Xml.Serialization.XmlAttributeAttribute("Opening")]
+ public bool Opening
+ {
+ get
+ {
+ return _opening;
}
- set {
- this.debitFieldSpecified = value;
+ set
+ {
+ _opening = value;
}
}
-
- private static System.Xml.Serialization.XmlSerializer Serializer {
- get {
- if ((serializer == null)) {
- serializer = new System.Xml.Serialization.XmlSerializer(typeof(AccountingDataSetupBookingTemplatesTemplate));
- }
- return serializer;
- }
- }
-
- #region Serialize/Deserialize
- ///
- /// Serializes current AccountingDataSetupBookingTemplatesTemplate object into an XML document
- ///
- /// string XML value
- public virtual string Serialize() {
- System.IO.StreamReader streamReader = null;
- System.IO.MemoryStream memoryStream = null;
- try {
- memoryStream = new System.IO.MemoryStream();
- Serializer.Serialize(memoryStream, this);
- memoryStream.Seek(0, System.IO.SeekOrigin.Begin);
- streamReader = new System.IO.StreamReader(memoryStream);
- return streamReader.ReadToEnd();
- }
- finally {
- if ((streamReader != null)) {
- streamReader.Dispose();
- }
- if ((memoryStream != null)) {
- memoryStream.Dispose();
- }
- }
- }
-
- ///
- /// Deserializes workflow markup into an AccountingDataSetupBookingTemplatesTemplate object
- ///
- /// string workflow markup to deserialize
- /// Output AccountingDataSetupBookingTemplatesTemplate object
- /// output Exception value if deserialize failed
- /// true if this XmlSerializer can deserialize the object; otherwise, false
- public static bool Deserialize(string xml, out AccountingDataSetupBookingTemplatesTemplate obj, out System.Exception exception) {
- exception = null;
- obj = default(AccountingDataSetupBookingTemplatesTemplate);
- try {
- obj = Deserialize(xml);
- return true;
- }
- catch (System.Exception ex) {
- exception = ex;
- return false;
- }
- }
-
- public static bool Deserialize(string xml, out AccountingDataSetupBookingTemplatesTemplate obj) {
- System.Exception exception = null;
- return Deserialize(xml, out obj, out exception);
- }
-
- public static AccountingDataSetupBookingTemplatesTemplate Deserialize(string xml) {
- System.IO.StringReader stringReader = null;
- try {
- stringReader = new System.IO.StringReader(xml);
- return ((AccountingDataSetupBookingTemplatesTemplate)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
- }
- finally {
- if ((stringReader != null)) {
- stringReader.Dispose();
- }
- }
- }
-
- ///
- /// Serializes current AccountingDataSetupBookingTemplatesTemplate object into file
- ///
- /// full path of output XML file
- /// output Exception value if failed
- /// true if can serialize and save into file; otherwise, false
- public virtual bool SaveToFile(string fileName, out System.Exception exception) {
- exception = null;
- try {
- SaveToFile(fileName);
- return true;
- }
- catch (System.Exception e) {
- exception = e;
- return false;
- }
- }
-
- public virtual void SaveToFile(string fileName) {
- System.IO.StreamWriter streamWriter = null;
- try {
- string xmlString = Serialize();
- System.IO.FileInfo xmlFile = new System.IO.FileInfo(fileName);
- streamWriter = xmlFile.CreateText();
- streamWriter.WriteLine(xmlString);
- streamWriter.Close();
- }
- finally {
- if ((streamWriter != null)) {
- streamWriter.Dispose();
- }
- }
- }
-
- ///
- /// Deserializes XML markup from file into an AccountingDataSetupBookingTemplatesTemplate object
- ///
- /// string xml file to load and deserialize
- /// Output AccountingDataSetupBookingTemplatesTemplate object
- /// output Exception value if deserialize failed
- /// true if this XmlSerializer can deserialize the object; otherwise, false
- public static bool LoadFromFile(string fileName, out AccountingDataSetupBookingTemplatesTemplate obj, out System.Exception exception) {
- exception = null;
- obj = default(AccountingDataSetupBookingTemplatesTemplate);
- try {
- obj = LoadFromFile(fileName);
- return true;
- }
- catch (System.Exception ex) {
- exception = ex;
- return false;
- }
- }
-
- public static bool LoadFromFile(string fileName, out AccountingDataSetupBookingTemplatesTemplate obj) {
- System.Exception exception = null;
- return LoadFromFile(fileName, out obj, out exception);
- }
-
- public static AccountingDataSetupBookingTemplatesTemplate LoadFromFile(string fileName) {
- System.IO.FileStream file = null;
- System.IO.StreamReader sr = null;
- try {
- file = new System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read);
- sr = new System.IO.StreamReader(file);
- string xmlString = sr.ReadToEnd();
- sr.Close();
- file.Close();
- return Deserialize(xmlString);
- }
- finally {
- if ((file != null)) {
- file.Dispose();
- }
- if ((sr != null)) {
- sr.Dispose();
- }
- }
- }
- #endregion
- }
-
- [System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.4.1+6249aec1f88eb051eadc7d928205edd1c2d96aad")]
- [System.SerializableAttribute()]
- [System.ComponentModel.DesignerCategoryAttribute("code")]
- [System.Xml.Serialization.XmlRootAttribute(Namespace="", IsNullable=true)]
- public partial class BookingValue {
-
- private long valueField;
-
- private ulong accountField;
-
- private string textField;
-
- private static System.Xml.Serialization.XmlSerializer serializer;
-
- [System.Xml.Serialization.XmlAttributeAttribute()]
- public long Value {
- get {
- return this.valueField;
- }
- set {
- this.valueField = value;
- }
- }
-
- [System.Xml.Serialization.XmlAttributeAttribute()]
- public ulong Account {
- get {
- return this.accountField;
- }
- set {
- this.accountField = value;
- }
- }
-
- [System.Xml.Serialization.XmlAttributeAttribute()]
- public string Text {
- get {
- return this.textField;
- }
- set {
- this.textField = value;
- }
- }
-
- private static System.Xml.Serialization.XmlSerializer Serializer {
- get {
- if ((serializer == null)) {
- serializer = new System.Xml.Serialization.XmlSerializer(typeof(BookingValue));
- }
- return serializer;
- }
- }
-
- #region Serialize/Deserialize
- ///
- /// Serializes current BookingValue object into an XML document
- ///
- /// string XML value
- public virtual string Serialize() {
- System.IO.StreamReader streamReader = null;
- System.IO.MemoryStream memoryStream = null;
- try {
- memoryStream = new System.IO.MemoryStream();
- Serializer.Serialize(memoryStream, this);
- memoryStream.Seek(0, System.IO.SeekOrigin.Begin);
- streamReader = new System.IO.StreamReader(memoryStream);
- return streamReader.ReadToEnd();
- }
- finally {
- if ((streamReader != null)) {
- streamReader.Dispose();
- }
- if ((memoryStream != null)) {
- memoryStream.Dispose();
- }
- }
- }
-
- ///
- /// Deserializes workflow markup into an BookingValue object
- ///
- /// string workflow markup to deserialize
- /// Output BookingValue object
- /// output Exception value if deserialize failed
- /// true if this XmlSerializer can deserialize the object; otherwise, false
- public static bool Deserialize(string xml, out BookingValue obj, out System.Exception exception) {
- exception = null;
- obj = default(BookingValue);
- try {
- obj = Deserialize(xml);
- return true;
- }
- catch (System.Exception ex) {
- exception = ex;
- return false;
- }
- }
-
- public static bool Deserialize(string xml, out BookingValue obj) {
- System.Exception exception = null;
- return Deserialize(xml, out obj, out exception);
- }
-
- public static BookingValue Deserialize(string xml) {
- System.IO.StringReader stringReader = null;
- try {
- stringReader = new System.IO.StringReader(xml);
- return ((BookingValue)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
- }
- finally {
- if ((stringReader != null)) {
- stringReader.Dispose();
- }
- }
- }
-
- ///
- /// Serializes current BookingValue object into file
- ///
- /// full path of output XML file
- /// output Exception value if failed
- /// true if can serialize and save into file; otherwise, false
- public virtual bool SaveToFile(string fileName, out System.Exception exception) {
- exception = null;
- try {
- SaveToFile(fileName);
- return true;
- }
- catch (System.Exception e) {
- exception = e;
- return false;
- }
- }
-
- public virtual void SaveToFile(string fileName) {
- System.IO.StreamWriter streamWriter = null;
- try {
- string xmlString = Serialize();
- System.IO.FileInfo xmlFile = new System.IO.FileInfo(fileName);
- streamWriter = xmlFile.CreateText();
- streamWriter.WriteLine(xmlString);
- streamWriter.Close();
- }
- finally {
- if ((streamWriter != null)) {
- streamWriter.Dispose();
- }
- }
- }
-
- ///
- /// Deserializes XML markup from file into an BookingValue object
- ///
- /// string xml file to load and deserialize
- /// Output BookingValue object
- /// output Exception value if deserialize failed
- /// true if this XmlSerializer can deserialize the object; otherwise, false
- public static bool LoadFromFile(string fileName, out BookingValue obj, out System.Exception exception) {
- exception = null;
- obj = default(BookingValue);
- try {
- obj = LoadFromFile(fileName);
- return true;
- }
- catch (System.Exception ex) {
- exception = ex;
- return false;
- }
- }
-
- public static bool LoadFromFile(string fileName, out BookingValue obj) {
- System.Exception exception = null;
- return LoadFromFile(fileName, out obj, out exception);
- }
-
- public static BookingValue LoadFromFile(string fileName) {
- System.IO.FileStream file = null;
- System.IO.StreamReader sr = null;
- try {
- file = new System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read);
- sr = new System.IO.StreamReader(file);
- string xmlString = sr.ReadToEnd();
- sr.Close();
- file.Close();
- return Deserialize(xmlString);
- }
- finally {
- if ((file != null)) {
- file.Dispose();
- }
- if ((sr != null)) {
- sr.Dispose();
- }
- }
- }
- #endregion
- }
-
- [System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.4.1+6249aec1f88eb051eadc7d928205edd1c2d96aad")]
- [System.SerializableAttribute()]
- [System.ComponentModel.DesignerCategoryAttribute("code")]
- [System.Xml.Serialization.XmlRootAttribute(Namespace="", IsNullable=true)]
- public partial class AccountDefinition {
-
- private AccountDefinitionImportMapping importMappingField;
-
- private ulong idField;
-
- private string nameField;
-
- private AccountDefinitionType typeField;
-
- private bool activeField;
-
- private static System.Xml.Serialization.XmlSerializer serializer;
-
- public AccountDefinition() {
- this.activeField = true;
- }
-
- public AccountDefinitionImportMapping ImportMapping {
- get {
- return this.importMappingField;
- }
- set {
- this.importMappingField = value;
- }
- }
-
- [System.Xml.Serialization.XmlAttributeAttribute()]
- public ulong ID {
- get {
- return this.idField;
- }
- set {
- this.idField = value;
- }
- }
-
- [System.Xml.Serialization.XmlAttributeAttribute()]
- public string Name {
- get {
- return this.nameField;
- }
- set {
- this.nameField = value;
- }
- }
-
- [System.Xml.Serialization.XmlAttributeAttribute()]
- public AccountDefinitionType Type {
- get {
- return this.typeField;
- }
- set {
- this.typeField = value;
- }
- }
-
- [System.Xml.Serialization.XmlAttributeAttribute()]
- [System.ComponentModel.DefaultValueAttribute(true)]
- public bool Active {
- get {
- return this.activeField;
- }
- set {
- this.activeField = value;
- }
- }
-
- private static System.Xml.Serialization.XmlSerializer Serializer {
- get {
- if ((serializer == null)) {
- serializer = new System.Xml.Serialization.XmlSerializer(typeof(AccountDefinition));
- }
- return serializer;
- }
- }
-
- #region Serialize/Deserialize
- ///
- /// Serializes current AccountDefinition object into an XML document
- ///
- /// string XML value
- public virtual string Serialize() {
- System.IO.StreamReader streamReader = null;
- System.IO.MemoryStream memoryStream = null;
- try {
- memoryStream = new System.IO.MemoryStream();
- Serializer.Serialize(memoryStream, this);
- memoryStream.Seek(0, System.IO.SeekOrigin.Begin);
- streamReader = new System.IO.StreamReader(memoryStream);
- return streamReader.ReadToEnd();
- }
- finally {
- if ((streamReader != null)) {
- streamReader.Dispose();
- }
- if ((memoryStream != null)) {
- memoryStream.Dispose();
- }
- }
- }
-
- ///
- /// Deserializes workflow markup into an AccountDefinition object
- ///
- /// string workflow markup to deserialize
- /// Output AccountDefinition object
- /// output Exception value if deserialize failed
- /// true if this XmlSerializer can deserialize the object; otherwise, false
- public static bool Deserialize(string xml, out AccountDefinition obj, out System.Exception exception) {
- exception = null;
- obj = default(AccountDefinition);
- try {
- obj = Deserialize(xml);
- return true;
- }
- catch (System.Exception ex) {
- exception = ex;
- return false;
- }
- }
-
- public static bool Deserialize(string xml, out AccountDefinition obj) {
- System.Exception exception = null;
- return Deserialize(xml, out obj, out exception);
- }
-
- public static AccountDefinition Deserialize(string xml) {
- System.IO.StringReader stringReader = null;
- try {
- stringReader = new System.IO.StringReader(xml);
- return ((AccountDefinition)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
- }
- finally {
- if ((stringReader != null)) {
- stringReader.Dispose();
- }
- }
- }
-
- ///
- /// Serializes current AccountDefinition object into file
- ///
- /// full path of output XML file
- /// output Exception value if failed
- /// true if can serialize and save into file; otherwise, false
- public virtual bool SaveToFile(string fileName, out System.Exception exception) {
- exception = null;
- try {
- SaveToFile(fileName);
- return true;
- }
- catch (System.Exception e) {
- exception = e;
- return false;
- }
- }
-
- public virtual void SaveToFile(string fileName) {
- System.IO.StreamWriter streamWriter = null;
- try {
- string xmlString = Serialize();
- System.IO.FileInfo xmlFile = new System.IO.FileInfo(fileName);
- streamWriter = xmlFile.CreateText();
- streamWriter.WriteLine(xmlString);
- streamWriter.Close();
- }
- finally {
- if ((streamWriter != null)) {
- streamWriter.Dispose();
- }
- }
- }
-
- ///
- /// Deserializes XML markup from file into an AccountDefinition object
- ///
- /// string xml file to load and deserialize
- /// Output AccountDefinition object
- /// output Exception value if deserialize failed
- /// true if this XmlSerializer can deserialize the object; otherwise, false
- public static bool LoadFromFile(string fileName, out AccountDefinition obj, out System.Exception exception) {
- exception = null;
- obj = default(AccountDefinition);
- try {
- obj = LoadFromFile(fileName);
- return true;
- }
- catch (System.Exception ex) {
- exception = ex;
- return false;
- }
- }
-
- public static bool LoadFromFile(string fileName, out AccountDefinition obj) {
- System.Exception exception = null;
- return LoadFromFile(fileName, out obj, out exception);
- }
-
- public static AccountDefinition LoadFromFile(string fileName) {
- System.IO.FileStream file = null;
- System.IO.StreamReader sr = null;
- try {
- file = new System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read);
- sr = new System.IO.StreamReader(file);
- string xmlString = sr.ReadToEnd();
- sr.Close();
- file.Close();
- return Deserialize(xmlString);
- }
- finally {
- if ((file != null)) {
- file.Dispose();
- }
- if ((sr != null)) {
- sr.Dispose();
- }
- }
- }
- #endregion
- }
-
- [System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.4.1+6249aec1f88eb051eadc7d928205edd1c2d96aad")]
- [System.SerializableAttribute()]
- [System.ComponentModel.DesignerCategoryAttribute("code")]
- [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
- public partial class AccountDefinitionImportMapping {
-
- private List columnsField;
-
- private List patternsField;
-
- private static System.Xml.Serialization.XmlSerializer serializer;
-
- [System.Xml.Serialization.XmlArrayItemAttribute("Column", IsNullable=false)]
- public List Columns {
- get {
- return this.columnsField;
- }
- set {
- this.columnsField = value;
- }
- }
-
- [System.Xml.Serialization.XmlArrayItemAttribute("Pattern", IsNullable=false)]
- public List Patterns {
- get {
- return this.patternsField;
- }
- set {
- this.patternsField = value;
- }
- }
-
- private static System.Xml.Serialization.XmlSerializer Serializer {
- get {
- if ((serializer == null)) {
- serializer = new System.Xml.Serialization.XmlSerializer(typeof(AccountDefinitionImportMapping));
- }
- return serializer;
- }
- }
-
- #region Serialize/Deserialize
- ///
- /// Serializes current AccountDefinitionImportMapping object into an XML document
- ///
- /// string XML value
- public virtual string Serialize() {
- System.IO.StreamReader streamReader = null;
- System.IO.MemoryStream memoryStream = null;
- try {
- memoryStream = new System.IO.MemoryStream();
- Serializer.Serialize(memoryStream, this);
- memoryStream.Seek(0, System.IO.SeekOrigin.Begin);
- streamReader = new System.IO.StreamReader(memoryStream);
- return streamReader.ReadToEnd();
- }
- finally {
- if ((streamReader != null)) {
- streamReader.Dispose();
- }
- if ((memoryStream != null)) {
- memoryStream.Dispose();
- }
- }
- }
-
- ///
- /// Deserializes workflow markup into an AccountDefinitionImportMapping object
- ///
- /// string workflow markup to deserialize
- /// Output AccountDefinitionImportMapping object
- /// output Exception value if deserialize failed
- /// true if this XmlSerializer can deserialize the object; otherwise, false
- public static bool Deserialize(string xml, out AccountDefinitionImportMapping obj, out System.Exception exception) {
- exception = null;
- obj = default(AccountDefinitionImportMapping);
- try {
- obj = Deserialize(xml);
- return true;
- }
- catch (System.Exception ex) {
- exception = ex;
- return false;
- }
- }
-
- public static bool Deserialize(string xml, out AccountDefinitionImportMapping obj) {
- System.Exception exception = null;
- return Deserialize(xml, out obj, out exception);
- }
-
- public static AccountDefinitionImportMapping Deserialize(string xml) {
- System.IO.StringReader stringReader = null;
- try {
- stringReader = new System.IO.StringReader(xml);
- return ((AccountDefinitionImportMapping)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
- }
- finally {
- if ((stringReader != null)) {
- stringReader.Dispose();
- }
- }
- }
-
- ///
- /// Serializes current AccountDefinitionImportMapping object into file
- ///
- /// full path of output XML file
- /// output Exception value if failed
- /// true if can serialize and save into file; otherwise, false
- public virtual bool SaveToFile(string fileName, out System.Exception exception) {
- exception = null;
- try {
- SaveToFile(fileName);
- return true;
- }
- catch (System.Exception e) {
- exception = e;
- return false;
- }
- }
-
- public virtual void SaveToFile(string fileName) {
- System.IO.StreamWriter streamWriter = null;
- try {
- string xmlString = Serialize();
- System.IO.FileInfo xmlFile = new System.IO.FileInfo(fileName);
- streamWriter = xmlFile.CreateText();
- streamWriter.WriteLine(xmlString);
- streamWriter.Close();
- }
- finally {
- if ((streamWriter != null)) {
- streamWriter.Dispose();
- }
- }
- }
-
- ///
- /// Deserializes XML markup from file into an AccountDefinitionImportMapping object
- ///
- /// string xml file to load and deserialize
- /// Output AccountDefinitionImportMapping object
- /// output Exception value if deserialize failed
- /// true if this XmlSerializer can deserialize the object; otherwise, false
- public static bool LoadFromFile(string fileName, out AccountDefinitionImportMapping obj, out System.Exception exception) {
- exception = null;
- obj = default(AccountDefinitionImportMapping);
- try {
- obj = LoadFromFile(fileName);
- return true;
- }
- catch (System.Exception ex) {
- exception = ex;
- return false;
- }
- }
-
- public static bool LoadFromFile(string fileName, out AccountDefinitionImportMapping obj) {
- System.Exception exception = null;
- return LoadFromFile(fileName, out obj, out exception);
- }
-
- public static AccountDefinitionImportMapping LoadFromFile(string fileName) {
- System.IO.FileStream file = null;
- System.IO.StreamReader sr = null;
- try {
- file = new System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read);
- sr = new System.IO.StreamReader(file);
- string xmlString = sr.ReadToEnd();
- sr.Close();
- file.Close();
- return Deserialize(xmlString);
- }
- finally {
- if ((file != null)) {
- file.Dispose();
- }
- if ((sr != null)) {
- sr.Dispose();
- }
- }
- }
- #endregion
- }
-
- [System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.4.1+6249aec1f88eb051eadc7d928205edd1c2d96aad")]
- [System.SerializableAttribute()]
- [System.ComponentModel.DesignerCategoryAttribute("code")]
- [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
- public partial class AccountDefinitionImportMappingColumn {
-
- private AccountDefinitionImportMappingColumnTarget targetField;
-
- private string sourceField;
-
- private string ignorePatternField;
-
- private static System.Xml.Serialization.XmlSerializer serializer;
-
- [System.Xml.Serialization.XmlAttributeAttribute()]
- public AccountDefinitionImportMappingColumnTarget Target {
- get {
- return this.targetField;
- }
- set {
- this.targetField = value;
- }
- }
-
- [System.Xml.Serialization.XmlAttributeAttribute()]
- public string Source {
- get {
- return this.sourceField;
- }
- set {
- this.sourceField = value;
- }
- }
-
- [System.Xml.Serialization.XmlAttributeAttribute()]
- public string IgnorePattern {
- get {
- return this.ignorePatternField;
- }
- set {
- this.ignorePatternField = value;
- }
- }
-
- private static System.Xml.Serialization.XmlSerializer Serializer {
- get {
- if ((serializer == null)) {
- serializer = new System.Xml.Serialization.XmlSerializer(typeof(AccountDefinitionImportMappingColumn));
- }
- return serializer;
- }
- }
-
- #region Serialize/Deserialize
- ///
- /// Serializes current AccountDefinitionImportMappingColumn object into an XML document
- ///
- /// string XML value
- public virtual string Serialize() {
- System.IO.StreamReader streamReader = null;
- System.IO.MemoryStream memoryStream = null;
- try {
- memoryStream = new System.IO.MemoryStream();
- Serializer.Serialize(memoryStream, this);
- memoryStream.Seek(0, System.IO.SeekOrigin.Begin);
- streamReader = new System.IO.StreamReader(memoryStream);
- return streamReader.ReadToEnd();
- }
- finally {
- if ((streamReader != null)) {
- streamReader.Dispose();
- }
- if ((memoryStream != null)) {
- memoryStream.Dispose();
- }
- }
- }
-
- ///
- /// Deserializes workflow markup into an AccountDefinitionImportMappingColumn object
- ///
- /// string workflow markup to deserialize
- /// Output AccountDefinitionImportMappingColumn object
- /// output Exception value if deserialize failed
- /// true if this XmlSerializer can deserialize the object; otherwise, false
- public static bool Deserialize(string xml, out AccountDefinitionImportMappingColumn obj, out System.Exception exception) {
- exception = null;
- obj = default(AccountDefinitionImportMappingColumn);
- try {
- obj = Deserialize(xml);
- return true;
- }
- catch (System.Exception ex) {
- exception = ex;
- return false;
- }
- }
-
- public static bool Deserialize(string xml, out AccountDefinitionImportMappingColumn obj) {
- System.Exception exception = null;
- return Deserialize(xml, out obj, out exception);
- }
-
- public static AccountDefinitionImportMappingColumn Deserialize(string xml) {
- System.IO.StringReader stringReader = null;
- try {
- stringReader = new System.IO.StringReader(xml);
- return ((AccountDefinitionImportMappingColumn)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
- }
- finally {
- if ((stringReader != null)) {
- stringReader.Dispose();
- }
- }
- }
-
- ///
- /// Serializes current AccountDefinitionImportMappingColumn object into file
- ///
- /// full path of output XML file
- /// output Exception value if failed
- /// true if can serialize and save into file; otherwise, false
- public virtual bool SaveToFile(string fileName, out System.Exception exception) {
- exception = null;
- try {
- SaveToFile(fileName);
- return true;
- }
- catch (System.Exception e) {
- exception = e;
- return false;
- }
- }
-
- public virtual void SaveToFile(string fileName) {
- System.IO.StreamWriter streamWriter = null;
- try {
- string xmlString = Serialize();
- System.IO.FileInfo xmlFile = new System.IO.FileInfo(fileName);
- streamWriter = xmlFile.CreateText();
- streamWriter.WriteLine(xmlString);
- streamWriter.Close();
- }
- finally {
- if ((streamWriter != null)) {
- streamWriter.Dispose();
- }
- }
- }
-
- ///
- /// Deserializes XML markup from file into an AccountDefinitionImportMappingColumn object
- ///
- /// string xml file to load and deserialize
- /// Output AccountDefinitionImportMappingColumn object
- /// output Exception value if deserialize failed
- /// true if this XmlSerializer can deserialize the object; otherwise, false
- public static bool LoadFromFile(string fileName, out AccountDefinitionImportMappingColumn obj, out System.Exception exception) {
- exception = null;
- obj = default(AccountDefinitionImportMappingColumn);
- try {
- obj = LoadFromFile(fileName);
- return true;
- }
- catch (System.Exception ex) {
- exception = ex;
- return false;
- }
- }
-
- public static bool LoadFromFile(string fileName, out AccountDefinitionImportMappingColumn obj) {
- System.Exception exception = null;
- return LoadFromFile(fileName, out obj, out exception);
- }
-
- public static AccountDefinitionImportMappingColumn LoadFromFile(string fileName) {
- System.IO.FileStream file = null;
- System.IO.StreamReader sr = null;
- try {
- file = new System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read);
- sr = new System.IO.StreamReader(file);
- string xmlString = sr.ReadToEnd();
- sr.Close();
- file.Close();
- return Deserialize(xmlString);
- }
- finally {
- if ((file != null)) {
- file.Dispose();
- }
- if ((sr != null)) {
- sr.Dispose();
- }
- }
- }
- #endregion
- }
-
- [System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.4.1+6249aec1f88eb051eadc7d928205edd1c2d96aad")]
- [System.SerializableAttribute()]
- [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
- public enum AccountDefinitionImportMappingColumnTarget {
-
- ///
- Date,
-
- ///
- Name,
-
- ///
- Text,
-
- ///
- Value,
- }
-
- [System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.4.1+6249aec1f88eb051eadc7d928205edd1c2d96aad")]
- [System.SerializableAttribute()]
- [System.ComponentModel.DesignerCategoryAttribute("code")]
- [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
- public partial class AccountDefinitionImportMappingPattern {
-
- private string expressionField;
-
- private long valueField;
-
- private bool valueFieldSpecified;
-
- private ulong accountIDField;
-
- private static System.Xml.Serialization.XmlSerializer serializer;
-
- [System.Xml.Serialization.XmlAttributeAttribute()]
- public string Expression {
- get {
- return this.expressionField;
- }
- set {
- this.expressionField = value;
- }
- }
-
- [System.Xml.Serialization.XmlAttributeAttribute()]
- public long Value {
- get {
- return this.valueField;
- }
- set {
- this.valueField = value;
- }
- }
-
- [System.Xml.Serialization.XmlIgnoreAttribute()]
- public bool ValueSpecified {
- get {
- return this.valueFieldSpecified;
- }
- set {
- this.valueFieldSpecified = value;
- }
- }
-
- [System.Xml.Serialization.XmlAttributeAttribute()]
- public ulong AccountID {
- get {
- return this.accountIDField;
- }
- set {
- this.accountIDField = value;
- }
- }
-
- private static System.Xml.Serialization.XmlSerializer Serializer {
- get {
- if ((serializer == null)) {
- serializer = new System.Xml.Serialization.XmlSerializer(typeof(AccountDefinitionImportMappingPattern));
- }
- return serializer;
- }
- }
-
- #region Serialize/Deserialize
- ///
- /// Serializes current AccountDefinitionImportMappingPattern object into an XML document
- ///
- /// string XML value
- public virtual string Serialize() {
- System.IO.StreamReader streamReader = null;
- System.IO.MemoryStream memoryStream = null;
- try {
- memoryStream = new System.IO.MemoryStream();
- Serializer.Serialize(memoryStream, this);
- memoryStream.Seek(0, System.IO.SeekOrigin.Begin);
- streamReader = new System.IO.StreamReader(memoryStream);
- return streamReader.ReadToEnd();
- }
- finally {
- if ((streamReader != null)) {
- streamReader.Dispose();
- }
- if ((memoryStream != null)) {
- memoryStream.Dispose();
- }
- }
- }
-
- ///
- /// Deserializes workflow markup into an AccountDefinitionImportMappingPattern object
- ///
- /// string workflow markup to deserialize
- /// Output AccountDefinitionImportMappingPattern object
- /// output Exception value if deserialize failed
- /// true if this XmlSerializer can deserialize the object; otherwise, false
- public static bool Deserialize(string xml, out AccountDefinitionImportMappingPattern obj, out System.Exception exception) {
- exception = null;
- obj = default(AccountDefinitionImportMappingPattern);
- try {
- obj = Deserialize(xml);
- return true;
- }
- catch (System.Exception ex) {
- exception = ex;
- return false;
- }
- }
-
- public static bool Deserialize(string xml, out AccountDefinitionImportMappingPattern obj) {
- System.Exception exception = null;
- return Deserialize(xml, out obj, out exception);
- }
-
- public static AccountDefinitionImportMappingPattern Deserialize(string xml) {
- System.IO.StringReader stringReader = null;
- try {
- stringReader = new System.IO.StringReader(xml);
- return ((AccountDefinitionImportMappingPattern)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
- }
- finally {
- if ((stringReader != null)) {
- stringReader.Dispose();
- }
- }
- }
-
- ///
- /// Serializes current AccountDefinitionImportMappingPattern object into file
- ///
- /// full path of output XML file
- /// output Exception value if failed
- /// true if can serialize and save into file; otherwise, false
- public virtual bool SaveToFile(string fileName, out System.Exception exception) {
- exception = null;
- try {
- SaveToFile(fileName);
- return true;
- }
- catch (System.Exception e) {
- exception = e;
- return false;
- }
- }
-
- public virtual void SaveToFile(string fileName) {
- System.IO.StreamWriter streamWriter = null;
- try {
- string xmlString = Serialize();
- System.IO.FileInfo xmlFile = new System.IO.FileInfo(fileName);
- streamWriter = xmlFile.CreateText();
- streamWriter.WriteLine(xmlString);
- streamWriter.Close();
- }
- finally {
- if ((streamWriter != null)) {
- streamWriter.Dispose();
- }
- }
- }
-
- ///
- /// Deserializes XML markup from file into an AccountDefinitionImportMappingPattern object
- ///
- /// string xml file to load and deserialize
- /// Output AccountDefinitionImportMappingPattern object
- /// output Exception value if deserialize failed
- /// true if this XmlSerializer can deserialize the object; otherwise, false
- public static bool LoadFromFile(string fileName, out AccountDefinitionImportMappingPattern obj, out System.Exception exception) {
- exception = null;
- obj = default(AccountDefinitionImportMappingPattern);
- try {
- obj = LoadFromFile(fileName);
- return true;
- }
- catch (System.Exception ex) {
- exception = ex;
- return false;
- }
- }
-
- public static bool LoadFromFile(string fileName, out AccountDefinitionImportMappingPattern obj) {
- System.Exception exception = null;
- return LoadFromFile(fileName, out obj, out exception);
- }
-
- public static AccountDefinitionImportMappingPattern LoadFromFile(string fileName) {
- System.IO.FileStream file = null;
- System.IO.StreamReader sr = null;
- try {
- file = new System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read);
- sr = new System.IO.StreamReader(file);
- string xmlString = sr.ReadToEnd();
- sr.Close();
- file.Close();
- return Deserialize(xmlString);
- }
- finally {
- if ((file != null)) {
- file.Dispose();
- }
- if ((sr != null)) {
- sr.Dispose();
- }
- }
- }
- #endregion
- }
-
- [System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.4.1+6249aec1f88eb051eadc7d928205edd1c2d96aad")]
- [System.SerializableAttribute()]
- [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
- public enum AccountDefinitionType {
-
- ///
- Asset,
-
- ///
- Income,
-
- ///
- Expense,
-
- ///
- Credit,
-
- ///
- Debit,
-
- ///
- Carryforward,
- }
-
- [System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.4.1+6249aec1f88eb051eadc7d928205edd1c2d96aad")]
- [System.SerializableAttribute()]
- [System.ComponentModel.DesignerCategoryAttribute("code")]
- [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
- public partial class AccountingDataSetupReports {
-
- private AccountingDataSetupReportsAccountJournalReport accountJournalReportField;
-
- private List totalsAndBalancesReportField;
-
- private static System.Xml.Serialization.XmlSerializer serializer;
-
- public AccountingDataSetupReportsAccountJournalReport AccountJournalReport {
- get {
- return this.accountJournalReportField;
- }
- set {
- this.accountJournalReportField = value;
- }
- }
-
- [System.Xml.Serialization.XmlArrayItemAttribute("Signature", IsNullable=false)]
- public List TotalsAndBalancesReport {
- get {
- return this.totalsAndBalancesReportField;
- }
- set {
- this.totalsAndBalancesReportField = value;
- }
- }
-
- private static System.Xml.Serialization.XmlSerializer Serializer {
- get {
- if ((serializer == null)) {
- serializer = new System.Xml.Serialization.XmlSerializer(typeof(AccountingDataSetupReports));
- }
- return serializer;
- }
- }
-
- #region Serialize/Deserialize
- ///
- /// Serializes current AccountingDataSetupReports object into an XML document
- ///
- /// string XML value
- public virtual string Serialize() {
- System.IO.StreamReader streamReader = null;
- System.IO.MemoryStream memoryStream = null;
- try {
- memoryStream = new System.IO.MemoryStream();
- Serializer.Serialize(memoryStream, this);
- memoryStream.Seek(0, System.IO.SeekOrigin.Begin);
- streamReader = new System.IO.StreamReader(memoryStream);
- return streamReader.ReadToEnd();
- }
- finally {
- if ((streamReader != null)) {
- streamReader.Dispose();
- }
- if ((memoryStream != null)) {
- memoryStream.Dispose();
- }
- }
- }
-
- ///
- /// Deserializes workflow markup into an AccountingDataSetupReports object
- ///
- /// string workflow markup to deserialize
- /// Output AccountingDataSetupReports object
- /// output Exception value if deserialize failed
- /// true if this XmlSerializer can deserialize the object; otherwise, false
- public static bool Deserialize(string xml, out AccountingDataSetupReports obj, out System.Exception exception) {
- exception = null;
- obj = default(AccountingDataSetupReports);
- try {
- obj = Deserialize(xml);
- return true;
- }
- catch (System.Exception ex) {
- exception = ex;
- return false;
- }
- }
-
- public static bool Deserialize(string xml, out AccountingDataSetupReports obj) {
- System.Exception exception = null;
- return Deserialize(xml, out obj, out exception);
- }
-
- public static AccountingDataSetupReports Deserialize(string xml) {
- System.IO.StringReader stringReader = null;
- try {
- stringReader = new System.IO.StringReader(xml);
- return ((AccountingDataSetupReports)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
- }
- finally {
- if ((stringReader != null)) {
- stringReader.Dispose();
- }
- }
- }
-
- ///
- /// Serializes current AccountingDataSetupReports object into file
- ///
- /// full path of output XML file
- /// output Exception value if failed
- /// true if can serialize and save into file; otherwise, false
- public virtual bool SaveToFile(string fileName, out System.Exception exception) {
- exception = null;
- try {
- SaveToFile(fileName);
- return true;
- }
- catch (System.Exception e) {
- exception = e;
- return false;
- }
- }
-
- public virtual void SaveToFile(string fileName) {
- System.IO.StreamWriter streamWriter = null;
- try {
- string xmlString = Serialize();
- System.IO.FileInfo xmlFile = new System.IO.FileInfo(fileName);
- streamWriter = xmlFile.CreateText();
- streamWriter.WriteLine(xmlString);
- streamWriter.Close();
- }
- finally {
- if ((streamWriter != null)) {
- streamWriter.Dispose();
- }
- }
- }
-
- ///
- /// Deserializes XML markup from file into an AccountingDataSetupReports object
- ///
- /// string xml file to load and deserialize
- /// Output AccountingDataSetupReports object
- /// output Exception value if deserialize failed
- /// true if this XmlSerializer can deserialize the object; otherwise, false
- public static bool LoadFromFile(string fileName, out AccountingDataSetupReports obj, out System.Exception exception) {
- exception = null;
- obj = default(AccountingDataSetupReports);
- try {
- obj = LoadFromFile(fileName);
- return true;
- }
- catch (System.Exception ex) {
- exception = ex;
- return false;
- }
- }
-
- public static bool LoadFromFile(string fileName, out AccountingDataSetupReports obj) {
- System.Exception exception = null;
- return LoadFromFile(fileName, out obj, out exception);
- }
-
- public static AccountingDataSetupReports LoadFromFile(string fileName) {
- System.IO.FileStream file = null;
- System.IO.StreamReader sr = null;
- try {
- file = new System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read);
- sr = new System.IO.StreamReader(file);
- string xmlString = sr.ReadToEnd();
- sr.Close();
- file.Close();
- return Deserialize(xmlString);
- }
- finally {
- if ((file != null)) {
- file.Dispose();
- }
- if ((sr != null)) {
- sr.Dispose();
- }
- }
- }
- #endregion
- }
-
- [System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.4.1+6249aec1f88eb051eadc7d928205edd1c2d96aad")]
- [System.SerializableAttribute()]
- [System.ComponentModel.DesignerCategoryAttribute("code")]
- [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
- public partial class AccountingDataSetupReportsAccountJournalReport {
-
- private bool pageBreakBetweenAccountsField;
-
- private static System.Xml.Serialization.XmlSerializer serializer;
-
- public AccountingDataSetupReportsAccountJournalReport() {
- this.pageBreakBetweenAccountsField = false;
- }
-
- [System.Xml.Serialization.XmlAttributeAttribute()]
- [System.ComponentModel.DefaultValueAttribute(false)]
- public bool PageBreakBetweenAccounts {
- get {
- return this.pageBreakBetweenAccountsField;
- }
- set {
- this.pageBreakBetweenAccountsField = value;
- }
- }
-
- private static System.Xml.Serialization.XmlSerializer Serializer {
- get {
- if ((serializer == null)) {
- serializer = new System.Xml.Serialization.XmlSerializer(typeof(AccountingDataSetupReportsAccountJournalReport));
- }
- return serializer;
- }
- }
-
- #region Serialize/Deserialize
- ///
- /// Serializes current AccountingDataSetupReportsAccountJournalReport object into an XML document
- ///
- /// string XML value
- public virtual string Serialize() {
- System.IO.StreamReader streamReader = null;
- System.IO.MemoryStream memoryStream = null;
- try {
- memoryStream = new System.IO.MemoryStream();
- Serializer.Serialize(memoryStream, this);
- memoryStream.Seek(0, System.IO.SeekOrigin.Begin);
- streamReader = new System.IO.StreamReader(memoryStream);
- return streamReader.ReadToEnd();
- }
- finally {
- if ((streamReader != null)) {
- streamReader.Dispose();
- }
- if ((memoryStream != null)) {
- memoryStream.Dispose();
- }
- }
- }
-
- ///
- /// Deserializes workflow markup into an AccountingDataSetupReportsAccountJournalReport object
- ///
- /// string workflow markup to deserialize
- /// Output AccountingDataSetupReportsAccountJournalReport object
- /// output Exception value if deserialize failed
- /// true if this XmlSerializer can deserialize the object; otherwise, false
- public static bool Deserialize(string xml, out AccountingDataSetupReportsAccountJournalReport obj, out System.Exception exception) {
- exception = null;
- obj = default(AccountingDataSetupReportsAccountJournalReport);
- try {
- obj = Deserialize(xml);
- return true;
- }
- catch (System.Exception ex) {
- exception = ex;
- return false;
- }
- }
-
- public static bool Deserialize(string xml, out AccountingDataSetupReportsAccountJournalReport obj) {
- System.Exception exception = null;
- return Deserialize(xml, out obj, out exception);
- }
-
- public static AccountingDataSetupReportsAccountJournalReport Deserialize(string xml) {
- System.IO.StringReader stringReader = null;
- try {
- stringReader = new System.IO.StringReader(xml);
- return ((AccountingDataSetupReportsAccountJournalReport)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
- }
- finally {
- if ((stringReader != null)) {
- stringReader.Dispose();
- }
- }
- }
-
- ///
- /// Serializes current AccountingDataSetupReportsAccountJournalReport object into file
- ///
- /// full path of output XML file
- /// output Exception value if failed
- /// true if can serialize and save into file; otherwise, false
- public virtual bool SaveToFile(string fileName, out System.Exception exception) {
- exception = null;
- try {
- SaveToFile(fileName);
- return true;
- }
- catch (System.Exception e) {
- exception = e;
- return false;
- }
- }
-
- public virtual void SaveToFile(string fileName) {
- System.IO.StreamWriter streamWriter = null;
- try {
- string xmlString = Serialize();
- System.IO.FileInfo xmlFile = new System.IO.FileInfo(fileName);
- streamWriter = xmlFile.CreateText();
- streamWriter.WriteLine(xmlString);
- streamWriter.Close();
- }
- finally {
- if ((streamWriter != null)) {
- streamWriter.Dispose();
- }
- }
- }
-
- ///
- /// Deserializes XML markup from file into an AccountingDataSetupReportsAccountJournalReport object
- ///
- /// string xml file to load and deserialize
- /// Output AccountingDataSetupReportsAccountJournalReport object
- /// output Exception value if deserialize failed
- /// true if this XmlSerializer can deserialize the object; otherwise, false
- public static bool LoadFromFile(string fileName, out AccountingDataSetupReportsAccountJournalReport obj, out System.Exception exception) {
- exception = null;
- obj = default(AccountingDataSetupReportsAccountJournalReport);
- try {
- obj = LoadFromFile(fileName);
- return true;
- }
- catch (System.Exception ex) {
- exception = ex;
- return false;
- }
- }
-
- public static bool LoadFromFile(string fileName, out AccountingDataSetupReportsAccountJournalReport obj) {
- System.Exception exception = null;
- return LoadFromFile(fileName, out obj, out exception);
- }
-
- public static AccountingDataSetupReportsAccountJournalReport LoadFromFile(string fileName) {
- System.IO.FileStream file = null;
- System.IO.StreamReader sr = null;
- try {
- file = new System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read);
- sr = new System.IO.StreamReader(file);
- string xmlString = sr.ReadToEnd();
- sr.Close();
- file.Close();
- return Deserialize(xmlString);
- }
- finally {
- if ((file != null)) {
- file.Dispose();
- }
- if ((sr != null)) {
- sr.Dispose();
- }
- }
- }
- #endregion
- }
-
- [System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.4.1+6249aec1f88eb051eadc7d928205edd1c2d96aad")]
- [System.SerializableAttribute()]
- [System.ComponentModel.DesignerCategoryAttribute("code")]
- [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
- public partial class AccountingDataSetupBehavior {
-
- private string lastBookingImportFolderField;
-
- private string openingTextPatternField;
-
- private ulong lastCarryForwardField;
-
- private bool lastCarryForwardFieldSpecified;
-
- private static System.Xml.Serialization.XmlSerializer serializer;
-
- public string LastBookingImportFolder {
- get {
- return this.lastBookingImportFolderField;
- }
- set {
- this.lastBookingImportFolderField = value;
- }
- }
-
- public string OpeningTextPattern {
- get {
- return this.openingTextPatternField;
- }
- set {
- this.openingTextPatternField = value;
- }
- }
-
- public ulong LastCarryForward {
- get {
- return this.lastCarryForwardField;
- }
- set {
- this.lastCarryForwardField = value;
- }
- }
-
- [System.Xml.Serialization.XmlIgnoreAttribute()]
- public bool LastCarryForwardSpecified {
- get {
- return this.lastCarryForwardFieldSpecified;
- }
- set {
- this.lastCarryForwardFieldSpecified = value;
- }
- }
-
- private static System.Xml.Serialization.XmlSerializer Serializer {
- get {
- if ((serializer == null)) {
- serializer = new System.Xml.Serialization.XmlSerializer(typeof(AccountingDataSetupBehavior));
- }
- return serializer;
- }
- }
-
- #region Serialize/Deserialize
- ///
- /// Serializes current AccountingDataSetupBehavior object into an XML document
- ///
- /// string XML value
- public virtual string Serialize() {
- System.IO.StreamReader streamReader = null;
- System.IO.MemoryStream memoryStream = null;
- try {
- memoryStream = new System.IO.MemoryStream();
- Serializer.Serialize(memoryStream, this);
- memoryStream.Seek(0, System.IO.SeekOrigin.Begin);
- streamReader = new System.IO.StreamReader(memoryStream);
- return streamReader.ReadToEnd();
- }
- finally {
- if ((streamReader != null)) {
- streamReader.Dispose();
- }
- if ((memoryStream != null)) {
- memoryStream.Dispose();
- }
- }
- }
-
- ///
- /// Deserializes workflow markup into an AccountingDataSetupBehavior object
- ///
- /// string workflow markup to deserialize
- /// Output AccountingDataSetupBehavior object
- /// output Exception value if deserialize failed
- /// true if this XmlSerializer can deserialize the object; otherwise, false
- public static bool Deserialize(string xml, out AccountingDataSetupBehavior obj, out System.Exception exception) {
- exception = null;
- obj = default(AccountingDataSetupBehavior);
- try {
- obj = Deserialize(xml);
- return true;
- }
- catch (System.Exception ex) {
- exception = ex;
- return false;
- }
- }
-
- public static bool Deserialize(string xml, out AccountingDataSetupBehavior obj) {
- System.Exception exception = null;
- return Deserialize(xml, out obj, out exception);
- }
-
- public static AccountingDataSetupBehavior Deserialize(string xml) {
- System.IO.StringReader stringReader = null;
- try {
- stringReader = new System.IO.StringReader(xml);
- return ((AccountingDataSetupBehavior)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
- }
- finally {
- if ((stringReader != null)) {
- stringReader.Dispose();
- }
- }
- }
-
- ///
- /// Serializes current AccountingDataSetupBehavior object into file
- ///
- /// full path of output XML file
- /// output Exception value if failed
- /// true if can serialize and save into file; otherwise, false
- public virtual bool SaveToFile(string fileName, out System.Exception exception) {
- exception = null;
- try {
- SaveToFile(fileName);
- return true;
- }
- catch (System.Exception e) {
- exception = e;
- return false;
- }
- }
-
- public virtual void SaveToFile(string fileName) {
- System.IO.StreamWriter streamWriter = null;
- try {
- string xmlString = Serialize();
- System.IO.FileInfo xmlFile = new System.IO.FileInfo(fileName);
- streamWriter = xmlFile.CreateText();
- streamWriter.WriteLine(xmlString);
- streamWriter.Close();
- }
- finally {
- if ((streamWriter != null)) {
- streamWriter.Dispose();
- }
- }
- }
-
- ///
- /// Deserializes XML markup from file into an AccountingDataSetupBehavior object
- ///
- /// string xml file to load and deserialize
- /// Output AccountingDataSetupBehavior object
- /// output Exception value if deserialize failed
- /// true if this XmlSerializer can deserialize the object; otherwise, false
- public static bool LoadFromFile(string fileName, out AccountingDataSetupBehavior obj, out System.Exception exception) {
- exception = null;
- obj = default(AccountingDataSetupBehavior);
- try {
- obj = LoadFromFile(fileName);
- return true;
- }
- catch (System.Exception ex) {
- exception = ex;
- return false;
- }
- }
-
- public static bool LoadFromFile(string fileName, out AccountingDataSetupBehavior obj) {
- System.Exception exception = null;
- return LoadFromFile(fileName, out obj, out exception);
- }
-
- public static AccountingDataSetupBehavior LoadFromFile(string fileName) {
- System.IO.FileStream file = null;
- System.IO.StreamReader sr = null;
- try {
- file = new System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read);
- sr = new System.IO.StreamReader(file);
- string xmlString = sr.ReadToEnd();
- sr.Close();
- file.Close();
- return Deserialize(xmlString);
- }
- finally {
- if ((file != null)) {
- file.Dispose();
- }
- if ((sr != null)) {
- sr.Dispose();
- }
- }
- }
- #endregion
- }
-
- [System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.4.1+6249aec1f88eb051eadc7d928205edd1c2d96aad")]
- [System.SerializableAttribute()]
- [System.ComponentModel.DesignerCategoryAttribute("code")]
- [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
- public partial class AccountingDataAccountGroup {
-
- private List accountField;
-
- private string nameField;
-
- private static System.Xml.Serialization.XmlSerializer serializer;
-
- [System.Xml.Serialization.XmlElementAttribute("Account")]
- public List Account {
- get {
- return this.accountField;
- }
- set {
- this.accountField = value;
- }
- }
-
- [System.Xml.Serialization.XmlAttributeAttribute()]
- public string Name {
- get {
- return this.nameField;
- }
- set {
- this.nameField = value;
- }
- }
-
- private static System.Xml.Serialization.XmlSerializer Serializer {
- get {
- if ((serializer == null)) {
- serializer = new System.Xml.Serialization.XmlSerializer(typeof(AccountingDataAccountGroup));
- }
- return serializer;
- }
- }
-
- #region Serialize/Deserialize
- ///
- /// Serializes current AccountingDataAccountGroup object into an XML document
- ///
- /// string XML value
- public virtual string Serialize() {
- System.IO.StreamReader streamReader = null;
- System.IO.MemoryStream memoryStream = null;
- try {
- memoryStream = new System.IO.MemoryStream();
- Serializer.Serialize(memoryStream, this);
- memoryStream.Seek(0, System.IO.SeekOrigin.Begin);
- streamReader = new System.IO.StreamReader(memoryStream);
- return streamReader.ReadToEnd();
- }
- finally {
- if ((streamReader != null)) {
- streamReader.Dispose();
- }
- if ((memoryStream != null)) {
- memoryStream.Dispose();
- }
- }
- }
-
- ///
- /// Deserializes workflow markup into an AccountingDataAccountGroup object
- ///
- /// string workflow markup to deserialize
- /// Output AccountingDataAccountGroup object
- /// output Exception value if deserialize failed
- /// true if this XmlSerializer can deserialize the object; otherwise, false
- public static bool Deserialize(string xml, out AccountingDataAccountGroup obj, out System.Exception exception) {
- exception = null;
- obj = default(AccountingDataAccountGroup);
- try {
- obj = Deserialize(xml);
- return true;
- }
- catch (System.Exception ex) {
- exception = ex;
- return false;
- }
- }
-
- public static bool Deserialize(string xml, out AccountingDataAccountGroup obj) {
- System.Exception exception = null;
- return Deserialize(xml, out obj, out exception);
- }
-
- public static AccountingDataAccountGroup Deserialize(string xml) {
- System.IO.StringReader stringReader = null;
- try {
- stringReader = new System.IO.StringReader(xml);
- return ((AccountingDataAccountGroup)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
- }
- finally {
- if ((stringReader != null)) {
- stringReader.Dispose();
- }
- }
- }
-
- ///
- /// Serializes current AccountingDataAccountGroup object into file
- ///
- /// full path of output XML file
- /// output Exception value if failed
- /// true if can serialize and save into file; otherwise, false
- public virtual bool SaveToFile(string fileName, out System.Exception exception) {
- exception = null;
- try {
- SaveToFile(fileName);
- return true;
- }
- catch (System.Exception e) {
- exception = e;
- return false;
- }
- }
-
- public virtual void SaveToFile(string fileName) {
- System.IO.StreamWriter streamWriter = null;
- try {
- string xmlString = Serialize();
- System.IO.FileInfo xmlFile = new System.IO.FileInfo(fileName);
- streamWriter = xmlFile.CreateText();
- streamWriter.WriteLine(xmlString);
- streamWriter.Close();
- }
- finally {
- if ((streamWriter != null)) {
- streamWriter.Dispose();
- }
- }
- }
-
- ///
- /// Deserializes XML markup from file into an AccountingDataAccountGroup object
- ///
- /// string xml file to load and deserialize
- /// Output AccountingDataAccountGroup object
- /// output Exception value if deserialize failed
- /// true if this XmlSerializer can deserialize the object; otherwise, false
- public static bool LoadFromFile(string fileName, out AccountingDataAccountGroup obj, out System.Exception exception) {
- exception = null;
- obj = default(AccountingDataAccountGroup);
- try {
- obj = LoadFromFile(fileName);
- return true;
- }
- catch (System.Exception ex) {
- exception = ex;
- return false;
- }
- }
-
- public static bool LoadFromFile(string fileName, out AccountingDataAccountGroup obj) {
- System.Exception exception = null;
- return LoadFromFile(fileName, out obj, out exception);
- }
-
- public static AccountingDataAccountGroup LoadFromFile(string fileName) {
- System.IO.FileStream file = null;
- System.IO.StreamReader sr = null;
- try {
- file = new System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read);
- sr = new System.IO.StreamReader(file);
- string xmlString = sr.ReadToEnd();
- sr.Close();
- file.Close();
- return Deserialize(xmlString);
- }
- finally {
- if ((file != null)) {
- file.Dispose();
- }
- if ((sr != null)) {
- sr.Dispose();
- }
- }
- }
- #endregion
- }
-
- [System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.4.1+6249aec1f88eb051eadc7d928205edd1c2d96aad")]
- [System.SerializableAttribute()]
- [System.ComponentModel.DesignerCategoryAttribute("code")]
- [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
- public partial class AccountingDataYear {
-
- private ushort nameField;
-
- private uint dateStartField;
-
- private uint dateEndField;
-
- private bool closedField;
-
- private static System.Xml.Serialization.XmlSerializer serializer;
-
- public AccountingDataYear() {
- this.closedField = false;
- }
-
- [System.Xml.Serialization.XmlAttributeAttribute()]
- public ushort Name {
- get {
- return this.nameField;
- }
- set {
- this.nameField = value;
- }
- }
-
- [System.Xml.Serialization.XmlAttributeAttribute()]
- public uint DateStart {
- get {
- return this.dateStartField;
- }
- set {
- this.dateStartField = value;
- }
- }
-
- [System.Xml.Serialization.XmlAttributeAttribute()]
- public uint DateEnd {
- get {
- return this.dateEndField;
- }
- set {
- this.dateEndField = value;
- }
- }
-
- [System.Xml.Serialization.XmlAttributeAttribute()]
- [System.ComponentModel.DefaultValueAttribute(false)]
- public bool Closed {
- get {
- return this.closedField;
- }
- set {
- this.closedField = value;
- }
- }
-
- private static System.Xml.Serialization.XmlSerializer Serializer {
- get {
- if ((serializer == null)) {
- serializer = new System.Xml.Serialization.XmlSerializer(typeof(AccountingDataYear));
- }
- return serializer;
- }
- }
-
- #region Serialize/Deserialize
- ///
- /// Serializes current AccountingDataYear object into an XML document
- ///
- /// string XML value
- public virtual string Serialize() {
- System.IO.StreamReader streamReader = null;
- System.IO.MemoryStream memoryStream = null;
- try {
- memoryStream = new System.IO.MemoryStream();
- Serializer.Serialize(memoryStream, this);
- memoryStream.Seek(0, System.IO.SeekOrigin.Begin);
- streamReader = new System.IO.StreamReader(memoryStream);
- return streamReader.ReadToEnd();
- }
- finally {
- if ((streamReader != null)) {
- streamReader.Dispose();
- }
- if ((memoryStream != null)) {
- memoryStream.Dispose();
- }
- }
- }
-
- ///
- /// Deserializes workflow markup into an AccountingDataYear object
- ///
- /// string workflow markup to deserialize
- /// Output AccountingDataYear object
- /// output Exception value if deserialize failed
- /// true if this XmlSerializer can deserialize the object; otherwise, false
- public static bool Deserialize(string xml, out AccountingDataYear obj, out System.Exception exception) {
- exception = null;
- obj = default(AccountingDataYear);
- try {
- obj = Deserialize(xml);
- return true;
- }
- catch (System.Exception ex) {
- exception = ex;
- return false;
- }
- }
-
- public static bool Deserialize(string xml, out AccountingDataYear obj) {
- System.Exception exception = null;
- return Deserialize(xml, out obj, out exception);
- }
-
- public static AccountingDataYear Deserialize(string xml) {
- System.IO.StringReader stringReader = null;
- try {
- stringReader = new System.IO.StringReader(xml);
- return ((AccountingDataYear)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
- }
- finally {
- if ((stringReader != null)) {
- stringReader.Dispose();
- }
- }
- }
-
- ///
- /// Serializes current AccountingDataYear object into file
- ///
- /// full path of output XML file
- /// output Exception value if failed
- /// true if can serialize and save into file; otherwise, false
- public virtual bool SaveToFile(string fileName, out System.Exception exception) {
- exception = null;
- try {
- SaveToFile(fileName);
- return true;
- }
- catch (System.Exception e) {
- exception = e;
- return false;
- }
- }
-
- public virtual void SaveToFile(string fileName) {
- System.IO.StreamWriter streamWriter = null;
- try {
- string xmlString = Serialize();
- System.IO.FileInfo xmlFile = new System.IO.FileInfo(fileName);
- streamWriter = xmlFile.CreateText();
- streamWriter.WriteLine(xmlString);
- streamWriter.Close();
- }
- finally {
- if ((streamWriter != null)) {
- streamWriter.Dispose();
- }
- }
- }
-
- ///
- /// Deserializes XML markup from file into an AccountingDataYear object
- ///
- /// string xml file to load and deserialize
- /// Output AccountingDataYear object
- /// output Exception value if deserialize failed
- /// true if this XmlSerializer can deserialize the object; otherwise, false
- public static bool LoadFromFile(string fileName, out AccountingDataYear obj, out System.Exception exception) {
- exception = null;
- obj = default(AccountingDataYear);
- try {
- obj = LoadFromFile(fileName);
- return true;
- }
- catch (System.Exception ex) {
- exception = ex;
- return false;
- }
- }
-
- public static bool LoadFromFile(string fileName, out AccountingDataYear obj) {
- System.Exception exception = null;
- return LoadFromFile(fileName, out obj, out exception);
- }
-
- public static AccountingDataYear LoadFromFile(string fileName) {
- System.IO.FileStream file = null;
- System.IO.StreamReader sr = null;
- try {
- file = new System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read);
- sr = new System.IO.StreamReader(file);
- string xmlString = sr.ReadToEnd();
- sr.Close();
- file.Close();
- return Deserialize(xmlString);
- }
- finally {
- if ((file != null)) {
- file.Dispose();
- }
- if ((sr != null)) {
- sr.Dispose();
- }
- }
- }
- #endregion
- }
-
- [System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.4.1+6249aec1f88eb051eadc7d928205edd1c2d96aad")]
- [System.SerializableAttribute()]
- [System.ComponentModel.DesignerCategoryAttribute("code")]
- [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
- public partial class AccountingDataJournal {
-
- private List bookingField;
-
- private string yearField;
-
- private uint dateStartField;
-
- private uint dateEndField;
-
- private bool closedField;
-
- private static System.Xml.Serialization.XmlSerializer serializer;
-
- public AccountingDataJournal() {
- this.closedField = false;
- }
-
- [System.Xml.Serialization.XmlElementAttribute("Booking")]
- public List Booking {
- get {
- return this.bookingField;
- }
- set {
- this.bookingField = value;
- }
- }
-
- [System.Xml.Serialization.XmlAttributeAttribute()]
- public string Year {
- get {
- return this.yearField;
- }
- set {
- this.yearField = value;
- }
- }
-
- [System.Xml.Serialization.XmlAttributeAttribute()]
- public uint DateStart {
- get {
- return this.dateStartField;
- }
- set {
- this.dateStartField = value;
- }
- }
-
- [System.Xml.Serialization.XmlAttributeAttribute()]
- public uint DateEnd {
- get {
- return this.dateEndField;
- }
- set {
- this.dateEndField = value;
- }
- }
-
- [System.Xml.Serialization.XmlAttributeAttribute()]
- [System.ComponentModel.DefaultValueAttribute(false)]
- public bool Closed {
- get {
- return this.closedField;
- }
- set {
- this.closedField = value;
- }
- }
-
- private static System.Xml.Serialization.XmlSerializer Serializer {
- get {
- if ((serializer == null)) {
- serializer = new System.Xml.Serialization.XmlSerializer(typeof(AccountingDataJournal));
- }
- return serializer;
- }
- }
-
- #region Serialize/Deserialize
- ///
- /// Serializes current AccountingDataJournal object into an XML document
- ///
- /// string XML value
- public virtual string Serialize() {
- System.IO.StreamReader streamReader = null;
- System.IO.MemoryStream memoryStream = null;
- try {
- memoryStream = new System.IO.MemoryStream();
- Serializer.Serialize(memoryStream, this);
- memoryStream.Seek(0, System.IO.SeekOrigin.Begin);
- streamReader = new System.IO.StreamReader(memoryStream);
- return streamReader.ReadToEnd();
- }
- finally {
- if ((streamReader != null)) {
- streamReader.Dispose();
- }
- if ((memoryStream != null)) {
- memoryStream.Dispose();
- }
- }
- }
-
- ///
- /// Deserializes workflow markup into an AccountingDataJournal object
- ///
- /// string workflow markup to deserialize
- /// Output AccountingDataJournal object
- /// output Exception value if deserialize failed
- /// true if this XmlSerializer can deserialize the object; otherwise, false
- public static bool Deserialize(string xml, out AccountingDataJournal obj, out System.Exception exception) {
- exception = null;
- obj = default(AccountingDataJournal);
- try {
- obj = Deserialize(xml);
- return true;
- }
- catch (System.Exception ex) {
- exception = ex;
- return false;
- }
- }
-
- public static bool Deserialize(string xml, out AccountingDataJournal obj) {
- System.Exception exception = null;
- return Deserialize(xml, out obj, out exception);
- }
-
- public static AccountingDataJournal Deserialize(string xml) {
- System.IO.StringReader stringReader = null;
- try {
- stringReader = new System.IO.StringReader(xml);
- return ((AccountingDataJournal)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
- }
- finally {
- if ((stringReader != null)) {
- stringReader.Dispose();
- }
- }
- }
-
- ///
- /// Serializes current AccountingDataJournal object into file
- ///
- /// full path of output XML file
- /// output Exception value if failed
- /// true if can serialize and save into file; otherwise, false
- public virtual bool SaveToFile(string fileName, out System.Exception exception) {
- exception = null;
- try {
- SaveToFile(fileName);
- return true;
- }
- catch (System.Exception e) {
- exception = e;
- return false;
- }
- }
-
- public virtual void SaveToFile(string fileName) {
- System.IO.StreamWriter streamWriter = null;
- try {
- string xmlString = Serialize();
- System.IO.FileInfo xmlFile = new System.IO.FileInfo(fileName);
- streamWriter = xmlFile.CreateText();
- streamWriter.WriteLine(xmlString);
- streamWriter.Close();
- }
- finally {
- if ((streamWriter != null)) {
- streamWriter.Dispose();
- }
- }
- }
-
- ///
- /// Deserializes XML markup from file into an AccountingDataJournal object
- ///
- /// string xml file to load and deserialize
- /// Output AccountingDataJournal object
- /// output Exception value if deserialize failed
- /// true if this XmlSerializer can deserialize the object; otherwise, false
- public static bool LoadFromFile(string fileName, out AccountingDataJournal obj, out System.Exception exception) {
- exception = null;
- obj = default(AccountingDataJournal);
- try {
- obj = LoadFromFile(fileName);
- return true;
- }
- catch (System.Exception ex) {
- exception = ex;
- return false;
- }
- }
-
- public static bool LoadFromFile(string fileName, out AccountingDataJournal obj) {
- System.Exception exception = null;
- return LoadFromFile(fileName, out obj, out exception);
- }
-
- public static AccountingDataJournal LoadFromFile(string fileName) {
- System.IO.FileStream file = null;
- System.IO.StreamReader sr = null;
- try {
- file = new System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read);
- sr = new System.IO.StreamReader(file);
- string xmlString = sr.ReadToEnd();
- sr.Close();
- file.Close();
- return Deserialize(xmlString);
- }
- finally {
- if ((file != null)) {
- file.Dispose();
- }
- if ((sr != null)) {
- sr.Dispose();
- }
- }
- }
- #endregion
- }
-
- [System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.4.1+6249aec1f88eb051eadc7d928205edd1c2d96aad")]
- [System.SerializableAttribute()]
- [System.ComponentModel.DesignerCategoryAttribute("code")]
- [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
- public partial class AccountingDataJournalBooking {
-
- private List debitField;
-
- private List creditField;
-
- private uint dateField;
-
- private ulong idField;
-
- private bool followupField;
-
- private bool openingField;
-
- private static System.Xml.Serialization.XmlSerializer serializer;
-
- public AccountingDataJournalBooking() {
- this.followupField = false;
- this.openingField = false;
- }
-
- [System.Xml.Serialization.XmlElementAttribute("Debit")]
- public List Debit {
- get {
- return this.debitField;
- }
- set {
- this.debitField = value;
- }
- }
-
- [System.Xml.Serialization.XmlElementAttribute("Credit")]
- public List Credit {
- get {
- return this.creditField;
- }
- set {
- this.creditField = value;
- }
- }
-
- [System.Xml.Serialization.XmlAttributeAttribute()]
- public uint Date {
- get {
- return this.dateField;
- }
- set {
- this.dateField = value;
- }
- }
-
- [System.Xml.Serialization.XmlAttributeAttribute()]
- public ulong ID {
- get {
- return this.idField;
- }
- set {
- this.idField = value;
- }
- }
-
- [System.Xml.Serialization.XmlAttributeAttribute()]
- [System.ComponentModel.DefaultValueAttribute(false)]
- public bool Followup {
- get {
- return this.followupField;
- }
- set {
- this.followupField = value;
- }
- }
-
- [System.Xml.Serialization.XmlAttributeAttribute()]
- [System.ComponentModel.DefaultValueAttribute(false)]
- public bool Opening {
- get {
- return this.openingField;
- }
- set {
- this.openingField = value;
- }
- }
-
- private static System.Xml.Serialization.XmlSerializer Serializer {
- get {
- if ((serializer == null)) {
- serializer = new System.Xml.Serialization.XmlSerializer(typeof(AccountingDataJournalBooking));
- }
- return serializer;
- }
- }
-
- #region Serialize/Deserialize
- ///
- /// Serializes current AccountingDataJournalBooking object into an XML document
- ///
- /// string XML value
- public virtual string Serialize() {
- System.IO.StreamReader streamReader = null;
- System.IO.MemoryStream memoryStream = null;
- try {
- memoryStream = new System.IO.MemoryStream();
- Serializer.Serialize(memoryStream, this);
- memoryStream.Seek(0, System.IO.SeekOrigin.Begin);
- streamReader = new System.IO.StreamReader(memoryStream);
- return streamReader.ReadToEnd();
- }
- finally {
- if ((streamReader != null)) {
- streamReader.Dispose();
- }
- if ((memoryStream != null)) {
- memoryStream.Dispose();
- }
- }
- }
-
- ///
- /// Deserializes workflow markup into an AccountingDataJournalBooking object
- ///
- /// string workflow markup to deserialize
- /// Output AccountingDataJournalBooking object
- /// output Exception value if deserialize failed
- /// true if this XmlSerializer can deserialize the object; otherwise, false
- public static bool Deserialize(string xml, out AccountingDataJournalBooking obj, out System.Exception exception) {
- exception = null;
- obj = default(AccountingDataJournalBooking);
- try {
- obj = Deserialize(xml);
- return true;
- }
- catch (System.Exception ex) {
- exception = ex;
- return false;
- }
- }
-
- public static bool Deserialize(string xml, out AccountingDataJournalBooking obj) {
- System.Exception exception = null;
- return Deserialize(xml, out obj, out exception);
- }
-
- public static AccountingDataJournalBooking Deserialize(string xml) {
- System.IO.StringReader stringReader = null;
- try {
- stringReader = new System.IO.StringReader(xml);
- return ((AccountingDataJournalBooking)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
- }
- finally {
- if ((stringReader != null)) {
- stringReader.Dispose();
- }
- }
- }
-
- ///
- /// Serializes current AccountingDataJournalBooking object into file
- ///
- /// full path of output XML file
- /// output Exception value if failed
- /// true if can serialize and save into file; otherwise, false
- public virtual bool SaveToFile(string fileName, out System.Exception exception) {
- exception = null;
- try {
- SaveToFile(fileName);
- return true;
- }
- catch (System.Exception e) {
- exception = e;
- return false;
- }
- }
-
- public virtual void SaveToFile(string fileName) {
- System.IO.StreamWriter streamWriter = null;
- try {
- string xmlString = Serialize();
- System.IO.FileInfo xmlFile = new System.IO.FileInfo(fileName);
- streamWriter = xmlFile.CreateText();
- streamWriter.WriteLine(xmlString);
- streamWriter.Close();
- }
- finally {
- if ((streamWriter != null)) {
- streamWriter.Dispose();
- }
- }
- }
-
- ///
- /// Deserializes XML markup from file into an AccountingDataJournalBooking object
- ///
- /// string xml file to load and deserialize
- /// Output AccountingDataJournalBooking object
- /// output Exception value if deserialize failed
- /// true if this XmlSerializer can deserialize the object; otherwise, false
- public static bool LoadFromFile(string fileName, out AccountingDataJournalBooking obj, out System.Exception exception) {
- exception = null;
- obj = default(AccountingDataJournalBooking);
- try {
- obj = LoadFromFile(fileName);
- return true;
- }
- catch (System.Exception ex) {
- exception = ex;
- return false;
- }
- }
-
- public static bool LoadFromFile(string fileName, out AccountingDataJournalBooking obj) {
- System.Exception exception = null;
- return LoadFromFile(fileName, out obj, out exception);
- }
-
- public static AccountingDataJournalBooking LoadFromFile(string fileName) {
- System.IO.FileStream file = null;
- System.IO.StreamReader sr = null;
- try {
- file = new System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read);
- sr = new System.IO.StreamReader(file);
- string xmlString = sr.ReadToEnd();
- sr.Close();
- file.Close();
- return Deserialize(xmlString);
- }
- finally {
- if ((file != null)) {
- file.Dispose();
- }
- if ((sr != null)) {
- sr.Dispose();
- }
- }
- }
- #endregion
}
- [System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.4.1+6249aec1f88eb051eadc7d928205edd1c2d96aad")]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("XmlSchemaClassGenerator", "3.0.1405.0")]
[System.SerializableAttribute()]
+ [System.Xml.Serialization.XmlTypeAttribute("AccountingDataOpenIssuesEntry", Namespace="", AnonymousType=true)]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
- [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
- public partial class AccountingDataEntry {
-
- private string yearField;
-
- private uint dateField;
-
- private ulong idField;
-
- private long valueField;
+ public partial class AccountingDataOpenIssuesEntry
+ {
- private ulong accountField;
+ [System.ComponentModel.DataAnnotations.RequiredAttribute(AllowEmptyStrings=true)]
+ [System.Xml.Serialization.XmlAttributeAttribute("Year")]
+ public string Year { get; set; }
- private string textField;
+ [System.ComponentModel.DataAnnotations.RequiredAttribute(AllowEmptyStrings=true)]
+ [System.Xml.Serialization.XmlAttributeAttribute("Date")]
+ public uint Date { get; set; }
- private static System.Xml.Serialization.XmlSerializer serializer;
+ [System.ComponentModel.DataAnnotations.RequiredAttribute(AllowEmptyStrings=true)]
+ [System.Xml.Serialization.XmlAttributeAttribute("ID")]
+ public ulong ID { get; set; }
- [System.Xml.Serialization.XmlAttributeAttribute()]
- public string Year {
- get {
- return this.yearField;
- }
- set {
- this.yearField = value;
- }
- }
-
- [System.Xml.Serialization.XmlAttributeAttribute()]
- public uint Date {
- get {
- return this.dateField;
- }
- set {
- this.dateField = value;
- }
- }
-
- [System.Xml.Serialization.XmlAttributeAttribute()]
- public ulong ID {
- get {
- return this.idField;
- }
- set {
- this.idField = value;
- }
- }
-
- [System.Xml.Serialization.XmlAttributeAttribute()]
- public long Value {
- get {
- return this.valueField;
- }
- set {
- this.valueField = value;
- }
- }
-
- [System.Xml.Serialization.XmlAttributeAttribute()]
- public ulong Account {
- get {
- return this.accountField;
- }
- set {
- this.accountField = value;
- }
- }
-
- [System.Xml.Serialization.XmlAttributeAttribute()]
- public string Text {
- get {
- return this.textField;
- }
- set {
- this.textField = value;
- }
- }
-
- private static System.Xml.Serialization.XmlSerializer Serializer {
- get {
- if ((serializer == null)) {
- serializer = new System.Xml.Serialization.XmlSerializer(typeof(AccountingDataEntry));
- }
- return serializer;
- }
- }
-
- #region Serialize/Deserialize
- ///
- /// Serializes current AccountingDataEntry object into an XML document
- ///
- /// string XML value
- public virtual string Serialize() {
- System.IO.StreamReader streamReader = null;
- System.IO.MemoryStream memoryStream = null;
- try {
- memoryStream = new System.IO.MemoryStream();
- Serializer.Serialize(memoryStream, this);
- memoryStream.Seek(0, System.IO.SeekOrigin.Begin);
- streamReader = new System.IO.StreamReader(memoryStream);
- return streamReader.ReadToEnd();
- }
- finally {
- if ((streamReader != null)) {
- streamReader.Dispose();
- }
- if ((memoryStream != null)) {
- memoryStream.Dispose();
- }
- }
- }
+ [System.ComponentModel.DataAnnotations.RequiredAttribute(AllowEmptyStrings=true)]
+ [System.Xml.Serialization.XmlAttributeAttribute("Value")]
+ public long Value { get; set; }
- ///
- /// Deserializes workflow markup into an AccountingDataEntry object
- ///
- /// string workflow markup to deserialize
- /// Output AccountingDataEntry object
- /// output Exception value if deserialize failed
- /// true if this XmlSerializer can deserialize the object; otherwise, false
- public static bool Deserialize(string xml, out AccountingDataEntry obj, out System.Exception exception) {
- exception = null;
- obj = default(AccountingDataEntry);
- try {
- obj = Deserialize(xml);
- return true;
- }
- catch (System.Exception ex) {
- exception = ex;
- return false;
- }
- }
-
- public static bool Deserialize(string xml, out AccountingDataEntry obj) {
- System.Exception exception = null;
- return Deserialize(xml, out obj, out exception);
- }
-
- public static AccountingDataEntry Deserialize(string xml) {
- System.IO.StringReader stringReader = null;
- try {
- stringReader = new System.IO.StringReader(xml);
- return ((AccountingDataEntry)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
- }
- finally {
- if ((stringReader != null)) {
- stringReader.Dispose();
- }
- }
- }
-
- ///
- /// Serializes current AccountingDataEntry object into file
- ///
- /// full path of output XML file
- /// output Exception value if failed
- /// true if can serialize and save into file; otherwise, false
- public virtual bool SaveToFile(string fileName, out System.Exception exception) {
- exception = null;
- try {
- SaveToFile(fileName);
- return true;
- }
- catch (System.Exception e) {
- exception = e;
- return false;
- }
- }
-
- public virtual void SaveToFile(string fileName) {
- System.IO.StreamWriter streamWriter = null;
- try {
- string xmlString = Serialize();
- System.IO.FileInfo xmlFile = new System.IO.FileInfo(fileName);
- streamWriter = xmlFile.CreateText();
- streamWriter.WriteLine(xmlString);
- streamWriter.Close();
- }
- finally {
- if ((streamWriter != null)) {
- streamWriter.Dispose();
- }
- }
- }
-
- ///
- /// Deserializes XML markup from file into an AccountingDataEntry object
- ///
- /// string xml file to load and deserialize
- /// Output AccountingDataEntry object
- /// output Exception value if deserialize failed
- /// true if this XmlSerializer can deserialize the object; otherwise, false
- public static bool LoadFromFile(string fileName, out AccountingDataEntry obj, out System.Exception exception) {
- exception = null;
- obj = default(AccountingDataEntry);
- try {
- obj = LoadFromFile(fileName);
- return true;
- }
- catch (System.Exception ex) {
- exception = ex;
- return false;
- }
- }
-
- public static bool LoadFromFile(string fileName, out AccountingDataEntry obj) {
- System.Exception exception = null;
- return LoadFromFile(fileName, out obj, out exception);
- }
+ [System.ComponentModel.DataAnnotations.RequiredAttribute(AllowEmptyStrings=true)]
+ [System.Xml.Serialization.XmlAttributeAttribute("Account")]
+ public ulong Account { get; set; }
- public static AccountingDataEntry LoadFromFile(string fileName) {
- System.IO.FileStream file = null;
- System.IO.StreamReader sr = null;
- try {
- file = new System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read);
- sr = new System.IO.StreamReader(file);
- string xmlString = sr.ReadToEnd();
- sr.Close();
- file.Close();
- return Deserialize(xmlString);
- }
- finally {
- if ((file != null)) {
- file.Dispose();
- }
- if ((sr != null)) {
- sr.Dispose();
- }
- }
- }
- #endregion
+ [System.ComponentModel.DataAnnotations.RequiredAttribute(AllowEmptyStrings=true)]
+ [System.Xml.Serialization.XmlAttributeAttribute("Text")]
+ public string Text { get; set; }
}
}
diff --git a/src/SimpleAccounting/Presentation/AccountDesignViewModel.cs b/src/SimpleAccounting/Presentation/AccountDesignViewModel.cs
index fd8285bd..b05477f6 100644
--- a/src/SimpleAccounting/Presentation/AccountDesignViewModel.cs
+++ b/src/SimpleAccounting/Presentation/AccountDesignViewModel.cs
@@ -27,7 +27,7 @@ public AccountDesignViewModel()
this.Type = AccountDefinitionType.Credit;
this.IsActivated = true;
- this.Groups = new List { new() { Name = "MyGroup" } };
+ this.Groups = new List { new() { Name = "MyGroup" } };
this.Group = this.Groups.First();
this.IsImportActive = true;
diff --git a/src/SimpleAccounting/Presentation/AccountGroupViewModel.cs b/src/SimpleAccounting/Presentation/AccountGroupViewModel.cs
index e660ad8f..cc46446f 100644
--- a/src/SimpleAccounting/Presentation/AccountGroupViewModel.cs
+++ b/src/SimpleAccounting/Presentation/AccountGroupViewModel.cs
@@ -15,7 +15,7 @@ namespace lg2de.SimpleAccounting.Presentation;
///
public sealed class AccountGroupViewModel : PropertyChangedBase, IDataErrorInfo
{
- public AccountGroupViewModel(AccountingDataAccountGroup? model, Func isNameUnique)
+ public AccountGroupViewModel(AccountingDataAccountsAccountGroup? model, Func isNameUnique)
{
this.Model = model;
this.IsNameUnique = isNameUnique;
@@ -40,7 +40,7 @@ public string Name
///
/// Gets the existing group in the project, or null for a new group.
///
- internal AccountingDataAccountGroup? Model { get; }
+ internal AccountingDataAccountsAccountGroup? Model { get; }
private Func IsNameUnique { get; }
diff --git a/src/SimpleAccounting/Presentation/AccountViewModel.cs b/src/SimpleAccounting/Presentation/AccountViewModel.cs
index 2fb3b870..70c9d5b6 100644
--- a/src/SimpleAccounting/Presentation/AccountViewModel.cs
+++ b/src/SimpleAccounting/Presentation/AccountViewModel.cs
@@ -33,10 +33,9 @@ static AccountViewModel()
public string Name { get; set; } = string.Empty;
- public IEnumerable Groups { get; set; }
- = Enumerable.Empty();
+ public IEnumerable Groups { get; init; } = [];
- public AccountingDataAccountGroup? Group { get; set; }
+ public AccountingDataAccountsAccountGroup? Group { get; set; }
public AccountDefinitionType Type { get; set; }
diff --git a/src/SimpleAccounting/Presentation/AccountsViewModel.cs b/src/SimpleAccounting/Presentation/AccountsViewModel.cs
index 15940d9e..bfdc0a6c 100644
--- a/src/SimpleAccounting/Presentation/AccountsViewModel.cs
+++ b/src/SimpleAccounting/Presentation/AccountsViewModel.cs
@@ -79,7 +79,7 @@ public void OnDataLoaded()
this.RefreshAccountList();
AccountViewModel CreateViewModel(
- AccountDefinition account, AccountingDataAccountGroup accountGroup)
+ AccountDefinition account, AccountingDataAccountsAccountGroup accountGroup)
{
var accountModel = new AccountViewModel
{
@@ -98,19 +98,19 @@ AccountViewModel CreateViewModel(
accountModel.IsImportActive = true;
var dateColumn =
- account.ImportMapping.Columns?.Find(x => x.Target == AccountDefinitionImportMappingColumnTarget.Date);
+ account.ImportMapping.Columns?.Find(x => x.Target == AccountDefinitionImportMappingColumnsColumnTarget.Date);
accountModel.ImportDateSource = dateColumn?.Source;
accountModel.ImportDateIgnorePattern = dateColumn?.IgnorePattern;
var nameColumn =
- account.ImportMapping.Columns?.Find(x => x.Target == AccountDefinitionImportMappingColumnTarget.Name);
+ account.ImportMapping.Columns?.Find(x => x.Target == AccountDefinitionImportMappingColumnsColumnTarget.Name);
accountModel.ImportNameSource = nameColumn?.Source;
accountModel.ImportNameIgnorePattern = nameColumn?.IgnorePattern;
var textColumn =
- account.ImportMapping.Columns?.Find(x => x.Target == AccountDefinitionImportMappingColumnTarget.Text);
+ account.ImportMapping.Columns?.Find(x => x.Target == AccountDefinitionImportMappingColumnsColumnTarget.Text);
accountModel.ImportTextSource = textColumn?.Source;
accountModel.ImportTextIgnorePattern = textColumn?.IgnorePattern;
var valueColumn =
- account.ImportMapping.Columns?.Find(x => x.Target == AccountDefinitionImportMappingColumnTarget.Value);
+ account.ImportMapping.Columns?.Find(x => x.Target == AccountDefinitionImportMappingColumnsColumnTarget.Value);
accountModel.ImportValueSource = valueColumn?.Source;
accountModel.ImportValueIgnorePattern = valueColumn?.IgnorePattern;
@@ -245,7 +245,7 @@ private async Task ShowEditAccountDialogAsync(AccountViewModel selectedAccountVi
c, selectedAccountViewModel.Identifier, clonedViewModel.Identifier));
b.Debit.ForEach(d => UpdateAccount(d, selectedAccountViewModel.Identifier, clonedViewModel.Identifier));
}));
- this.projectData.Storage.Setup.BookingTemplates?.Template?.ForEach(t => UpdateTemplate(
+ this.projectData.Storage.Setup.BookingTemplates?.ForEach(t => UpdateTemplate(
t, selectedAccountViewModel.Identifier, clonedViewModel.Identifier));
this.UpdateImportPatterns(selectedAccountViewModel.Identifier, clonedViewModel.Identifier);
@@ -352,15 +352,15 @@ private void SaveImportConfiguration(AccountViewModel viewModel, AccountDefiniti
{
Columns =
[
- new AccountDefinitionImportMappingColumn
+ new AccountDefinitionImportMappingColumnsColumn
{
- Target = AccountDefinitionImportMappingColumnTarget.Date,
+ Target = AccountDefinitionImportMappingColumnsColumnTarget.Date,
Source = viewModel.ImportDateSource,
IgnorePattern = viewModel.ImportDateIgnorePattern
},
- new AccountDefinitionImportMappingColumn
+ new AccountDefinitionImportMappingColumnsColumn
{
- Target = AccountDefinitionImportMappingColumnTarget.Value,
+ Target = AccountDefinitionImportMappingColumnsColumnTarget.Value,
Source = viewModel.ImportValueSource,
IgnorePattern = viewModel.ImportValueIgnorePattern
}
@@ -371,9 +371,9 @@ private void SaveImportConfiguration(AccountViewModel viewModel, AccountDefiniti
if (!string.IsNullOrWhiteSpace(viewModel.ImportTextSource))
{
accountDefinition.ImportMapping.Columns.Add(
- new AccountDefinitionImportMappingColumn
+ new AccountDefinitionImportMappingColumnsColumn
{
- Target = AccountDefinitionImportMappingColumnTarget.Text,
+ Target = AccountDefinitionImportMappingColumnsColumnTarget.Text,
Source = viewModel.ImportTextSource,
IgnorePattern = viewModel.ImportTextIgnorePattern
});
@@ -382,9 +382,9 @@ private void SaveImportConfiguration(AccountViewModel viewModel, AccountDefiniti
if (!string.IsNullOrWhiteSpace(viewModel.ImportNameSource))
{
accountDefinition.ImportMapping.Columns.Add(
- new AccountDefinitionImportMappingColumn
+ new AccountDefinitionImportMappingColumnsColumn
{
- Target = AccountDefinitionImportMappingColumnTarget.Name,
+ Target = AccountDefinitionImportMappingColumnsColumnTarget.Name,
Source = viewModel.ImportNameSource,
IgnorePattern = viewModel.ImportNameIgnorePattern
});
@@ -396,7 +396,7 @@ private void SaveImportConfiguration(AccountViewModel viewModel, AccountDefiniti
}
accountDefinition.ImportMapping.Patterns = viewModel.ImportPatterns.Select(x =>
- new AccountDefinitionImportMappingPattern
+ new AccountDefinitionImportMappingPatternsPattern
{
Expression = x.Expression,
Value = x.Value?.ToModelValue() ?? 0,
diff --git a/src/SimpleAccounting/Presentation/EditBookingViewModel.cs b/src/SimpleAccounting/Presentation/EditBookingViewModel.cs
index c73f417e..094fd1c4 100644
--- a/src/SimpleAccounting/Presentation/EditBookingViewModel.cs
+++ b/src/SimpleAccounting/Presentation/EditBookingViewModel.cs
@@ -264,9 +264,9 @@ public AccountingDataJournalBooking CreateJournalEntry()
return newBooking;
}
- public void AddTemplates(AccountingDataSetupBookingTemplates bookingTemplates)
+ public void AddTemplates(IEnumerable bookingTemplates)
{
- bookingTemplates.Template
+ bookingTemplates
.Select(
t => new BookingTemplate
{
diff --git a/src/SimpleAccounting/Presentation/ImportBookingsDesignViewModel.cs b/src/SimpleAccounting/Presentation/ImportBookingsDesignViewModel.cs
index 6d5be6b5..7544020a 100644
--- a/src/SimpleAccounting/Presentation/ImportBookingsDesignViewModel.cs
+++ b/src/SimpleAccounting/Presentation/ImportBookingsDesignViewModel.cs
@@ -31,7 +31,7 @@ internal class ImportBookingsDesignViewModel : ImportBookingsViewModel
// define some accounts
private static readonly List SampleAccounts =
[
- new AccountDefinition
+ new()
{
ID = 100,
Name = "Cash",
@@ -39,19 +39,19 @@ internal class ImportBookingsDesignViewModel : ImportBookingsViewModel
{
Columns =
[
- new AccountDefinitionImportMappingColumn
+ new AccountDefinitionImportMappingColumnsColumn
{
- Source = "A", Target = AccountDefinitionImportMappingColumnTarget.Date
+ Source = "A", Target = AccountDefinitionImportMappingColumnsColumnTarget.Date
},
- new AccountDefinitionImportMappingColumn
+ new AccountDefinitionImportMappingColumnsColumn
{
- Source = "B", Target = AccountDefinitionImportMappingColumnTarget.Value
+ Source = "B", Target = AccountDefinitionImportMappingColumnsColumnTarget.Value
}
]
}
},
- new AccountDefinition { ID = 600, Name = "Shopping" },
- new AccountDefinition { ID = 990, Name = "Carryforward" }
+ new() { ID = 600, Name = "Shopping" },
+ new() { ID = 990, Name = "Carryforward" }
];
// build sample project with journal entries
@@ -75,7 +75,7 @@ internal class ImportBookingsDesignViewModel : ImportBookingsViewModel
]
}
],
- Accounts = [new AccountingDataAccountGroup { Account = SampleAccounts }]
+ Accounts = [new AccountingDataAccountsAccountGroup { Account = SampleAccounts }]
};
public ImportBookingsDesignViewModel()
diff --git a/src/SimpleAccounting/Presentation/MenuViewModel.cs b/src/SimpleAccounting/Presentation/MenuViewModel.cs
index 3e68648f..c1ef861b 100644
--- a/src/SimpleAccounting/Presentation/MenuViewModel.cs
+++ b/src/SimpleAccounting/Presentation/MenuViewModel.cs
@@ -275,7 +275,7 @@ private void OnTotalsAndBalancesReport()
private void OnAssetBalancesReport()
{
- var accountGroups = new List();
+ var accountGroups = new List();
foreach (var group in this.projectData.Storage.Accounts)
{
var assertAccounts = group.Account
@@ -286,7 +286,7 @@ private void OnAssetBalancesReport()
continue;
}
- accountGroups.Add(new AccountingDataAccountGroup { Name = group.Name, Account = assertAccounts });
+ accountGroups.Add(new AccountingDataAccountsAccountGroup { Name = group.Name, Account = assertAccounts });
}
var report = this.reportFactory.CreateTotalsAndBalances(this.projectData, accountGroups);
diff --git a/src/SimpleAccounting/Presentation/ProjectOptionsDesignViewModel.cs b/src/SimpleAccounting/Presentation/ProjectOptionsDesignViewModel.cs
index f491e0d1..3f396f90 100644
--- a/src/SimpleAccounting/Presentation/ProjectOptionsDesignViewModel.cs
+++ b/src/SimpleAccounting/Presentation/ProjectOptionsDesignViewModel.cs
@@ -28,34 +28,31 @@ private static AccountingData CreateDesignData()
Name = "My Club",
Location = "Hometown",
Reports = { TotalsAndBalancesReport = ["Treasurer", "Auditor 1", "Auditor 2"] },
- BookingTemplates = new AccountingDataSetupBookingTemplates
- {
- Template =
- [
- new AccountingDataSetupBookingTemplatesTemplate
- {
- Text = "Membership fee",
- Value = 5000,
- ValueSpecified = true,
- Debit = 100,
- DebitSpecified = true,
- Credit = 400,
- CreditSpecified = true
- },
- new AccountingDataSetupBookingTemplatesTemplate
- {
- Text = "Bank fee",
- Debit = 600,
- DebitSpecified = true,
- Credit = 100,
- CreditSpecified = true
- }
- ]
- }
+ BookingTemplates =
+ [
+ new AccountingDataSetupBookingTemplatesTemplate
+ {
+ Text = "Membership fee",
+ Value = 5000,
+ ValueSpecified = true,
+ Debit = 100,
+ DebitSpecified = true,
+ Credit = 400,
+ CreditSpecified = true
+ },
+ new AccountingDataSetupBookingTemplatesTemplate
+ {
+ Text = "Bank fee",
+ Debit = 600,
+ DebitSpecified = true,
+ Credit = 100,
+ CreditSpecified = true
+ }
+ ]
},
Accounts =
[
- new AccountingDataAccountGroup
+ new AccountingDataAccountsAccountGroup
{
Name = "Default",
Account =
@@ -65,7 +62,7 @@ private static AccountingData CreateDesignData()
new AccountDefinition { ID = 600, Name = "Bank fees", Type = AccountDefinitionType.Expense }
]
},
- new AccountingDataAccountGroup { Name = "Reserves", Account = [] }
+ new AccountingDataAccountsAccountGroup { Name = "Reserves", Account = [] }
]
};
return data;
diff --git a/src/SimpleAccounting/Presentation/ProjectOptionsViewModel.cs b/src/SimpleAccounting/Presentation/ProjectOptionsViewModel.cs
index 346c1af6..0c30726b 100644
--- a/src/SimpleAccounting/Presentation/ProjectOptionsViewModel.cs
+++ b/src/SimpleAccounting/Presentation/ProjectOptionsViewModel.cs
@@ -40,7 +40,7 @@ public ProjectOptionsViewModel(AccountingData data, ProjectOptionsPage page)
this.Signatures = new ObservableCollection(
(data.Setup.Reports?.TotalsAndBalancesReport ?? []).Select(x => new SignatureViewModel { Text = x }));
- var templates = data.Setup.BookingTemplates?.Template ?? [];
+ var templates = data.Setup.BookingTemplates ?? [];
var referencedAccounts = templates.SelectMany(x => new[] { GetDebit(x), GetCredit(x) }).ToHashSet();
this.TemplateAccounts =
[
@@ -211,7 +211,7 @@ private static void Move(ObservableCollection items, object? item, int off
items.Move(index, newIndex);
}
- private AccountGroupViewModel CreateAccountGroup(AccountingDataAccountGroup? model)
+ private AccountGroupViewModel CreateAccountGroup(AccountingDataAccountsAccountGroup? model)
{
var group = new AccountGroupViewModel(model, this.IsAccountGroupNameUnique);
group.PropertyChanged += (sender, args) =>
@@ -295,7 +295,7 @@ private bool SaveTotalsAndBalancesReport(AccountingDataSetupReports reports)
private bool SaveBookingTemplates(AccountingDataSetup setup)
{
- var oldTemplates = (setup.BookingTemplates?.Template ?? [])
+ var oldTemplates = (setup.BookingTemplates ?? [])
.Select(x => (x.Text, Value: GetValue(x), Debit: GetDebit(x), Credit: GetCredit(x)));
var newTemplates = this.BookingTemplates
.Select(x => (Text: x.Text.Trim(), Value: x.Value?.ToModelValue(), Debit: x.DebitAccount.ID,
@@ -306,23 +306,19 @@ private bool SaveBookingTemplates(AccountingDataSetup setup)
return false;
}
- // avoid empty XML element
setup.BookingTemplates = newTemplates.Count == 0
? null
- : new AccountingDataSetupBookingTemplates
- {
- Template = newTemplates.Select(
- x => new AccountingDataSetupBookingTemplatesTemplate
- {
- Text = x.Text,
- Value = x.Value ?? 0,
- ValueSpecified = x.Value.HasValue,
- Debit = x.Debit,
- DebitSpecified = x.Debit > 0,
- Credit = x.Credit,
- CreditSpecified = x.Credit > 0
- }).ToList()
- };
+ : newTemplates.Select(
+ x => new AccountingDataSetupBookingTemplatesTemplate
+ {
+ Text = x.Text,
+ Value = x.Value ?? 0,
+ ValueSpecified = x.Value.HasValue,
+ Debit = x.Debit,
+ DebitSpecified = x.Debit > 0,
+ Credit = x.Credit,
+ CreditSpecified = x.Credit > 0
+ }).ToList();
return true;
}
@@ -333,7 +329,7 @@ private bool SaveAccountGroups()
this.data.Accounts ??= [];
var groups = this.data.Accounts;
var newGroups = this.AccountGroups
- .Select(x => (ViewModel: x, Model: x.Model ?? new AccountingDataAccountGroup { Account = [] }))
+ .Select(x => (ViewModel: x, Model: x.Model ?? new AccountingDataAccountsAccountGroup { Account = [] }))
.ToList();
bool changed = !groups.SequenceEqual(newGroups.Select(x => x.Model));
diff --git a/src/SimpleAccounting/Presentation/ShellDesignViewModel.cs b/src/SimpleAccounting/Presentation/ShellDesignViewModel.cs
index e4ac52ad..37113563 100644
--- a/src/SimpleAccounting/Presentation/ShellDesignViewModel.cs
+++ b/src/SimpleAccounting/Presentation/ShellDesignViewModel.cs
@@ -49,7 +49,7 @@ private void LoadAccounts()
{
this.ProjectData.Storage.Accounts =
[
- new AccountingDataAccountGroup
+ new AccountingDataAccountsAccountGroup
{
Name = "Bestandskonten",
Account = [new AccountDefinition { ID = 100, Name = "Kasse", Type = AccountDefinitionType.Asset }]
diff --git a/src/SimpleAccounting/Reports/IReportFactory.cs b/src/SimpleAccounting/Reports/IReportFactory.cs
index 2c1fde42..2ed00859 100644
--- a/src/SimpleAccounting/Reports/IReportFactory.cs
+++ b/src/SimpleAccounting/Reports/IReportFactory.cs
@@ -19,5 +19,5 @@ internal interface IReportFactory
IAnnualBalanceReport CreateAnnualBalance(IProjectData projectData);
ITotalsAndBalancesReport CreateTotalsAndBalances(
- IProjectData projectData, IEnumerable accounts);
+ IProjectData projectData, IEnumerable accounts);
}
diff --git a/src/SimpleAccounting/Reports/ReportFactory.cs b/src/SimpleAccounting/Reports/ReportFactory.cs
index a5f790d9..3b6062ff 100644
--- a/src/SimpleAccounting/Reports/ReportFactory.cs
+++ b/src/SimpleAccounting/Reports/ReportFactory.cs
@@ -41,7 +41,7 @@ public IAnnualBalanceReport CreateAnnualBalance(IProjectData projectData)
public ITotalsAndBalancesReport CreateTotalsAndBalances(
IProjectData projectData,
- IEnumerable accounts)
+ IEnumerable accounts)
{
return new TotalsAndBalancesReport(new XmlPrinter(), projectData, this.clock, accounts);
}
diff --git a/src/SimpleAccounting/Reports/TotalsAndBalancesReport.cs b/src/SimpleAccounting/Reports/TotalsAndBalancesReport.cs
index 006a4ba7..5029c71b 100644
--- a/src/SimpleAccounting/Reports/TotalsAndBalancesReport.cs
+++ b/src/SimpleAccounting/Reports/TotalsAndBalancesReport.cs
@@ -17,7 +17,7 @@ internal class TotalsAndBalancesReport : ReportBase, ITotalsAndBalancesReport
{
public const string ResourceName = "TotalsAndBalances.xml";
- private readonly List accountGroups;
+ private readonly List accountGroups;
private int accountsPerGroup;
private long groupOpeningCredit;
private long groupOpeningDebit;
@@ -43,7 +43,7 @@ public TotalsAndBalancesReport(
IXmlPrinter printer,
IProjectData projectData,
IClock clock,
- IEnumerable accountGroups)
+ IEnumerable accountGroups)
: base(ResourceName, printer, projectData, clock)
{
this.accountGroups = accountGroups.ToList();
diff --git a/src/SimpleAccounting/SimpleAccounting.csproj b/src/SimpleAccounting/SimpleAccounting.csproj
index f6957c08..01768ec8 100644
--- a/src/SimpleAccounting/SimpleAccounting.csproj
+++ b/src/SimpleAccounting/SimpleAccounting.csproj
@@ -61,6 +61,27 @@
+
+
+
+
+
+
+