This commit is contained in:
135
source/Plugins/AyaNova.Plugin.V8/AyaNova.Plugin.V8.csproj
Normal file
135
source/Plugins/AyaNova.Plugin.V8/AyaNova.Plugin.V8.csproj
Normal file
@@ -0,0 +1,135 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{A2A29280-0267-4B9B-A122-C3ECDFC3CFC7}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>AyaNova.PlugIn.V8</RootNamespace>
|
||||
<AssemblyName>AyaNova.PlugIn.V8</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>..\..\WinFormApp\bin\debug\plugins\V8\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>..\..\..\release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<SignAssembly>true</SignAssembly>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<AssemblyOriginatorKeyFile>AyaNova.snk</AssemblyOriginatorKeyFile>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Newtonsoft.Json">
|
||||
<HintPath>..\..\..\3rdprtylibs\json.net.40\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="V8.cs" />
|
||||
<Compile Include="ProgressForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="ProgressForm.Designer.cs">
|
||||
<DependentUpon>ProgressForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Resource1.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Resource1.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Timestamp.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\AyaNova.PlugIn\AyaNova.PlugIn.csproj">
|
||||
<Project>{674bc3c9-4f74-4304-91ed-2eafffeb09a7}</Project>
|
||||
<Name>AyaNova.PlugIn</Name>
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\bizobjects\AyaLib\GZTW.AyaNova.BLL.csproj">
|
||||
<Project>{50b807b6-fc35-4cc3-b54d-91c78426a943}</Project>
|
||||
<Name>GZTW.AyaNova.BLL</Name>
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\csla10\CSLA.Core.Bindablebase\CSLA.Core.Bindablebase.csproj">
|
||||
<Project>{c2392355-12a9-4197-a1d3-603c390b1e62}</Project>
|
||||
<Name>CSLA.Core.Bindablebase</Name>
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\csla10\CSLA.Server.DataPortal\CSLA.Server.DataPortal.vbproj">
|
||||
<Project>{80828e2c-e9fb-4e73-a27c-7f9cdb96fcde}</Project>
|
||||
<Name>CSLA.Server.DataPortal</Name>
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\csla10\CSLA\CSLA.vbproj">
|
||||
<Project>{1b9a38bb-461a-47a4-ad72-099c694138a0}</Project>
|
||||
<Name>CSLA</Name>
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Data\Data\GZTW.Data.csproj">
|
||||
<Project>{701893aa-c042-4fb2-8643-e139372c1117}</Project>
|
||||
<Name>GZTW.Data</Name>
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Profile\GZTW.Profile\GZTW.Profile.csproj">
|
||||
<Project>{ede897e2-e2e6-441d-9f83-0b973ae09670}</Project>
|
||||
<Name>GZTW.Profile</Name>
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
<None Include="AyaNova.snk" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="ProgressForm.resx">
|
||||
<DependentUpon>ProgressForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Resource1.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resource1.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\Dump16.bmp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\Dump32.png" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<PropertyGroup>
|
||||
<PreBuildEvent>"C:\data\AyaNova\utils\TimeStamp\bin\Release\TimeStamp.exe" "$(ProjectDir)Timestamp.cs" "/N:AyaNova.PlugIn.V8"</PreBuildEvent>
|
||||
</PropertyGroup>
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
BIN
source/Plugins/AyaNova.Plugin.V8/AyaNova.snk
Normal file
BIN
source/Plugins/AyaNova.Plugin.V8/AyaNova.snk
Normal file
Binary file not shown.
86
source/Plugins/AyaNova.Plugin.V8/ProgressForm.Designer.cs
generated
Normal file
86
source/Plugins/AyaNova.Plugin.V8/ProgressForm.Designer.cs
generated
Normal file
@@ -0,0 +1,86 @@
|
||||
namespace AyaNova.PlugIn.V8
|
||||
{
|
||||
partial class ProgressForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.edOut = new System.Windows.Forms.TextBox();
|
||||
this.btnClose = new System.Windows.Forms.Button();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// edOut
|
||||
//
|
||||
this.edOut.Cursor = System.Windows.Forms.Cursors.Default;
|
||||
this.edOut.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.edOut.Location = new System.Drawing.Point(0, 0);
|
||||
this.edOut.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.edOut.Multiline = true;
|
||||
this.edOut.Name = "edOut";
|
||||
this.edOut.ReadOnly = true;
|
||||
this.edOut.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
|
||||
this.edOut.Size = new System.Drawing.Size(870, 546);
|
||||
this.edOut.TabIndex = 0;
|
||||
//
|
||||
// btnClose
|
||||
//
|
||||
this.btnClose.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnClose.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.btnClose.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.btnClose.Location = new System.Drawing.Point(777, 577);
|
||||
this.btnClose.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.btnClose.Name = "btnClose";
|
||||
this.btnClose.Size = new System.Drawing.Size(82, 32);
|
||||
this.btnClose.TabIndex = 1;
|
||||
this.btnClose.Text = "Close";
|
||||
this.btnClose.UseVisualStyleBackColor = true;
|
||||
this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
|
||||
//
|
||||
// ProgressForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.CancelButton = this.btnClose;
|
||||
this.ClientSize = new System.Drawing.Size(870, 620);
|
||||
this.ControlBox = false;
|
||||
this.Controls.Add(this.btnClose);
|
||||
this.Controls.Add(this.edOut);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
|
||||
this.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.Name = "ProgressForm";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "Dumping...";
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TextBox edOut;
|
||||
private System.Windows.Forms.Button btnClose;
|
||||
}
|
||||
}
|
||||
42
source/Plugins/AyaNova.Plugin.V8/ProgressForm.cs
Normal file
42
source/Plugins/AyaNova.Plugin.V8/ProgressForm.cs
Normal file
@@ -0,0 +1,42 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace AyaNova.PlugIn.V8
|
||||
{
|
||||
public partial class ProgressForm : Form
|
||||
{
|
||||
public ProgressForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
|
||||
public void StartedImport()
|
||||
{
|
||||
Cursor.Current = Cursors.WaitCursor;
|
||||
btnClose.Enabled = false;
|
||||
}
|
||||
|
||||
public void FinishedImport()
|
||||
{
|
||||
Cursor.Current = Cursors.Default;
|
||||
btnClose.Enabled = true;
|
||||
}
|
||||
|
||||
public void Append(string txt)
|
||||
{
|
||||
edOut.AppendText(txt + "\r\n");
|
||||
}
|
||||
|
||||
private void btnClose_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
120
source/Plugins/AyaNova.Plugin.V8/ProgressForm.resx
Normal file
120
source/Plugins/AyaNova.Plugin.V8/ProgressForm.resx
Normal file
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
36
source/Plugins/AyaNova.Plugin.V8/Properties/AssemblyInfo.cs
Normal file
36
source/Plugins/AyaNova.Plugin.V8/Properties/AssemblyInfo.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("AyaNova.PlugIn.V8")]
|
||||
[assembly: AssemblyDescription("V8 export plugin for AyaNova")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("Ground Zero Tech-Works Inc.")]
|
||||
[assembly: AssemblyProduct("AyaNova.PlugIn.V8")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2017-2020 Ground Zero Tech-Works Inc.")]
|
||||
[assembly: AssemblyTrademark("AyaNova is a registered trademark of Ground Zero Tech-Works Inc.")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("36b5b94a-7afc-4c1b-9e31-1b8db30b8a07")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("7.6.0.0")]
|
||||
[assembly: AssemblyFileVersion("7.6.3.0")]
|
||||
83
source/Plugins/AyaNova.Plugin.V8/Resource1.Designer.cs
generated
Normal file
83
source/Plugins/AyaNova.Plugin.V8/Resource1.Designer.cs
generated
Normal file
@@ -0,0 +1,83 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace AyaNova.PlugIn.V8 {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resource1 {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resource1() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("AyaNova.PlugIn.V8.Resource1", typeof(Resource1).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap Dump16 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Dump16", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap Dump32 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Dump32", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
127
source/Plugins/AyaNova.Plugin.V8/Resource1.resx
Normal file
127
source/Plugins/AyaNova.Plugin.V8/Resource1.resx
Normal file
@@ -0,0 +1,127 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="Dump16" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>Resources\Dump16.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Dump32" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>Resources\Dump32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
||||
BIN
source/Plugins/AyaNova.Plugin.V8/Resources/Dump16.bmp
Normal file
BIN
source/Plugins/AyaNova.Plugin.V8/Resources/Dump16.bmp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.3 KiB |
BIN
source/Plugins/AyaNova.Plugin.V8/Resources/Dump32.png
Normal file
BIN
source/Plugins/AyaNova.Plugin.V8/Resources/Dump32.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 701 B |
34
source/Plugins/AyaNova.Plugin.V8/Timestamp.cs
Normal file
34
source/Plugins/AyaNova.Plugin.V8/Timestamp.cs
Normal file
@@ -0,0 +1,34 @@
|
||||
using System;
|
||||
// The namespace can be overidden by the /N option:
|
||||
// GenerateTimeStampFile file.cs /N:MyNameSpace
|
||||
// Such settings will override your value here.
|
||||
namespace AyaNova.PlugIn.V8
|
||||
{
|
||||
/// <summary>
|
||||
/// Static Timestamp related data.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// THIS FILE IS CHANGED BY EXTERNAL PROGRAMS.
|
||||
/// Do not modify the namespace, as it may be overwritten. You can
|
||||
/// set the namespace with the /N option.
|
||||
/// Do not modify the definition of BuildAt as your changes will be discarded.
|
||||
/// Do not modify the definition of TimeStampedBy as your changes will be discarded.
|
||||
/// </remarks>
|
||||
public static class Timestamp
|
||||
{
|
||||
/// <summary>
|
||||
/// The time stamp
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Do not modify the definition of BuildAt as your changes will be discarded.
|
||||
/// </remarks>
|
||||
public static DateTime BuildAt { get { return new DateTime(637235775737131241); } } //--**
|
||||
/// <summary>
|
||||
/// The program that time stamped it.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Do not modify the definition of TimeStampedBy as your changes will be discarded.
|
||||
/// </remarks>
|
||||
public static string TimeStampedBy { get { return @"GZTW.AyaNova.BLL.TS"; } } //--**
|
||||
}
|
||||
}
|
||||
769
source/Plugins/AyaNova.Plugin.V8/V8.cs
Normal file
769
source/Plugins/AyaNova.Plugin.V8/V8.cs
Normal file
@@ -0,0 +1,769 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.ComponentModel;
|
||||
using System.Windows.Forms;
|
||||
using System.Reflection;
|
||||
using AyaNova.PlugIn;
|
||||
using GZTW.AyaNova.BLL;
|
||||
using System.IO;
|
||||
using System.IO.Compression;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Serialization;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
namespace AyaNova.PlugIn.V8
|
||||
{
|
||||
class V8 : IAyaNovaPlugin
|
||||
{
|
||||
|
||||
#region Plugin interface
|
||||
System.Resources.ResourceManager resman = null;
|
||||
private static List<RootObjectTypes> ObjectsWeCanDealWith = null;
|
||||
|
||||
|
||||
public string PluginName
|
||||
{
|
||||
get { return "Export to V8"; }
|
||||
}
|
||||
|
||||
public string PluginVersion
|
||||
{
|
||||
get { return "7.6 (patch 3)"; }
|
||||
}
|
||||
|
||||
public string About
|
||||
{
|
||||
get
|
||||
{
|
||||
return "AyaNova V8 export plugin\r\n" +
|
||||
"Built " + AyaNova.PlugIn.V8.Timestamp.BuildAt.ToString() + "\r\n" +
|
||||
"Copyright 2020 Ground Zero Tech-Works Inc.";
|
||||
}
|
||||
}
|
||||
|
||||
public Guid PluginID
|
||||
{
|
||||
get { return new Guid("{73D7B77F-C96A-4198-9449-6529AFB6AA5B}"); }
|
||||
}
|
||||
|
||||
public System.Drawing.Image PluginSmallIcon
|
||||
{
|
||||
get { return Resource1.Dump16; }
|
||||
}
|
||||
|
||||
public System.Drawing.Image PluginLargeIcon
|
||||
{
|
||||
get { return Resource1.Dump32; }
|
||||
}
|
||||
|
||||
public System.Resources.ResourceManager AyaNovaResourceManager
|
||||
{
|
||||
set { resman = value; }
|
||||
get { return resman; }
|
||||
}
|
||||
|
||||
public bool Initialize(Version AyaNovaVersion, LocalizedTextTable localizedText)
|
||||
{
|
||||
if (AyaNovaVersion.Major < 7)
|
||||
{
|
||||
MessageBox.Show("The V8 export plugin requires AyaNova version 7.6 or newer");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (AyaNovaVersion.Minor < 6)
|
||||
{
|
||||
MessageBox.Show("The V8 export plugin requires AyaNova version 7.6 or newer");
|
||||
return false;
|
||||
}
|
||||
|
||||
ObjectsWeCanDealWith = new List<RootObjectTypes>();
|
||||
ObjectsWeCanDealWith.Add(RootObjectTypes.Nothing);
|
||||
return true;
|
||||
}
|
||||
|
||||
public void Close()
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
public bool SingleObjectMenuShow(RootObjectTypes objectType)
|
||||
{
|
||||
return (ObjectsWeCanDealWith.Contains(objectType));
|
||||
}
|
||||
|
||||
public bool MultipleObjectsMenuShow(RootObjectTypes objectType)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public List<AyaNovaPluginMenuItem> SingleObjectMenuOptions(RootObjectTypes objectType, object ayaNovaObject)
|
||||
{
|
||||
if (!ObjectsWeCanDealWith.Contains(objectType)) return null;
|
||||
List<AyaNovaPluginMenuItem> list = new List<AyaNovaPluginMenuItem>();
|
||||
list.Add(new AyaNovaPluginMenuItem("V8 Export", "Export to AyaNova 8 server", null, null));
|
||||
return list;
|
||||
}
|
||||
|
||||
public List<AyaNovaPluginMenuItem> MultipleObjectsMenuOptions(RootObjectTypes objectType)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public bool CommandSelectedForList(string commandKey, RootObjectTypes objectType, List<Guid> objectIDList, object listObject)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public void CommandSelectedForSingleObject(string commandKey, RootObjectTypes objectType, object ayaNovaObject)
|
||||
{
|
||||
|
||||
if (!User.CurrentUserIsAnAdministrator)
|
||||
{
|
||||
MessageBox.Show("This action can only be done by the AyaNova Administrator account");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!AyaBizUtils.AyaNovaConnectionSetting.SingleUserConnection)
|
||||
{
|
||||
MessageBox.Show("** WARNING: before proceeding ensure no other users are logged into AyaNova to ensure the integrity of your exported data. Failing to do so *will* result in damaged data. ***");
|
||||
MessageBox.Show("** WARNING: before proceeding make sure your AyaNova Generator service is STOPPED to ensure the integrity of your exported data. Failing to do so *will* result in damaged data. ***");
|
||||
}
|
||||
|
||||
//Only one command
|
||||
DumpIt();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// Dump the objects into a temporary directory as a series of JSON files
|
||||
/// then zip it all up into a single archive file and then erase the temporary folder
|
||||
/// </summary>
|
||||
private void DumpIt()
|
||||
{
|
||||
|
||||
string dumpname = "ayanova.data.dump." + DateTime.Now.ToString("yyyy-MM-d--HH-mm-ss");
|
||||
string dumpfolder = string.Empty;
|
||||
#if(DEBUG)
|
||||
dumpfolder = @"c:\temp";
|
||||
#else
|
||||
MessageBox.Show("Select a location to dump AyaNova data");
|
||||
using (var folderDialog = new FolderBrowserDialog())
|
||||
{
|
||||
if (folderDialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
dumpfolder = folderDialog.SelectedPath;
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
//create a temporary folder to generate JSON in
|
||||
string tempArchiveFolder = dumpfolder + Path.DirectorySeparatorChar + dumpname;
|
||||
string zipName = dumpfolder + Path.DirectorySeparatorChar + dumpname + ".zip";
|
||||
makeFolderIfNotExist(tempArchiveFolder, true);
|
||||
|
||||
//Show progress form
|
||||
|
||||
ProgressForm progress = new ProgressForm();
|
||||
progress.Show();
|
||||
progress.StartedImport();
|
||||
progress.Append("Dumping data to " + tempArchiveFolder);
|
||||
|
||||
|
||||
//DUMP IT!
|
||||
|
||||
dumpUsers(tempArchiveFolder, progress);
|
||||
dumpGlobalSettings(tempArchiveFolder, progress);
|
||||
dumpLocales(tempArchiveFolder, progress);
|
||||
dumpRegions(tempArchiveFolder, progress);
|
||||
dumpSeedNumbers(tempArchiveFolder, progress);
|
||||
dumpClients(tempArchiveFolder, progress);
|
||||
dumpHeadOffices(tempArchiveFolder, progress);
|
||||
dumpUnitModelCategories(tempArchiveFolder, progress);
|
||||
dumpUnitServiceTypes(tempArchiveFolder, progress);
|
||||
dumpWorkorderItemTypes(tempArchiveFolder, progress);
|
||||
dumpClientGroups(tempArchiveFolder, progress);
|
||||
dumpWorkorderCategories(tempArchiveFolder, progress);
|
||||
dumpPartCategories(tempArchiveFolder, progress);
|
||||
dumpScheduleableUserGroups(tempArchiveFolder, progress);
|
||||
dumpDispatchZones(tempArchiveFolder, progress);
|
||||
|
||||
//NOTE: when get to PRIORITY, or WORKORDER STATUS be sure to add color code as per already done in USER export
|
||||
|
||||
|
||||
|
||||
//progress.Append("Zipping up archive");
|
||||
//FastZip fastZip = new FastZip();
|
||||
//fastZip.CreateZip(zipName, tempArchiveFolder, true, null);
|
||||
|
||||
//progress.Append("Cleaning up temporary folder");
|
||||
//Directory.Delete(tempArchiveFolder, true);
|
||||
|
||||
progress.Append("Export completed");
|
||||
progress.FinishedImport();
|
||||
|
||||
//-----------------------------------
|
||||
//endof method
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#region Object dump methods
|
||||
|
||||
#region Global settings
|
||||
private void dumpGlobalSettings(string tempArchiveFolder, ProgressForm progress)
|
||||
{
|
||||
List<string> objectExcludeProperties = new List<string>(standardExcludePropertiesList);
|
||||
progress.Append("Dumping Global Settings");
|
||||
DumpObjectToFolder(tempArchiveFolder, AyaBizUtils.GlobalSettings, "globalsettings", objectExcludeProperties, new TypeAndID(RootObjectTypes.Global, Address.GlobalAddressID));
|
||||
}
|
||||
#endregion globalsettings
|
||||
|
||||
#region locales
|
||||
private void dumpLocales(string tempArchiveFolder, ProgressForm progress)
|
||||
{
|
||||
List<string> objectExcludeProperties = new List<string>(standardExcludePropertiesList);
|
||||
|
||||
//Skip stock locales already handled in Raven
|
||||
List<string> SkipLocales = new List<string>();
|
||||
SkipLocales.Add("Deutsch");
|
||||
SkipLocales.Add("English");
|
||||
SkipLocales.Add("Español");
|
||||
SkipLocales.Add("Français");
|
||||
|
||||
LocaleList l = LocaleList.GetList();
|
||||
progress.Append("Dumping " + l.Count.ToString() + " Locales");
|
||||
foreach (LocaleList.LocaleListInfo i in l)
|
||||
{
|
||||
if (!SkipLocales.Contains(i.Locale))
|
||||
{
|
||||
LocalizedTextTable lt = LocalizedTextTable.Load(i.Locale);
|
||||
DumpObjectToFolder(tempArchiveFolder, lt.LT, "translation." + EnsureValidFileName(i.Locale), objectExcludeProperties, TypeAndID.Empty, "GZTW.AyaNova.BLL.Translation");
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion locales
|
||||
|
||||
#region REGIONS
|
||||
private void dumpRegions(string tempArchiveFolder, ProgressForm progress)
|
||||
{
|
||||
List<string> objectExcludeProperties = new List<string>(standardExcludePropertiesList);
|
||||
objectExcludeProperties.Add("ContractName");
|
||||
objectExcludeProperties.Add("uiHasTechNotes");
|
||||
RegionList l = RegionList.GetList(string.Empty);
|
||||
progress.Append("Dumping " + l.Count.ToString() + " Regions");
|
||||
foreach (RegionList.RegionListInfo i in l)
|
||||
{
|
||||
|
||||
Region o = Region.GetItem(i.LT_Region_Label_Name.Value);
|
||||
DumpObjectToFolder(tempArchiveFolder, o, "region." + o.ID.ToString(), objectExcludeProperties, new TypeAndID(RootObjectTypes.Region,o.ID));
|
||||
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Seeds
|
||||
private class GZSeeds
|
||||
{
|
||||
public int InventoryAdjustmentStartSeed = 1;
|
||||
public int PurchaseOrderStartSeed = 1;
|
||||
public int QuoteNumberStartSeed = 1;
|
||||
public int WorkorderNumberStartSeed = 1;
|
||||
public int PreventiveMaintenanceNumberStartSeed = 1;
|
||||
}
|
||||
private void dumpSeedNumbers(string tempArchiveFolder, ProgressForm progress)
|
||||
{
|
||||
List<string> objectExcludeProperties = new List<string>(standardExcludePropertiesList);
|
||||
progress.Append("Dumping seeds");
|
||||
//create a new object with the id numbers in it and then dump it
|
||||
WorkorderPMList pml = WorkorderPMList.GetList("<?xml version=\"1.0\" encoding=\"utf-16\" standalone=\"yes\"?> \r\n" +
|
||||
"<GRIDCRITERIA> \r\n" +
|
||||
" <COLUMNITEM CM=\"aWorkorderPreventiveMaintenance.aPreventiveMaintenanceNumber\" UI=\"LT_O_WorkorderPreventiveMaintenance\" PIN=\"0\" WIDTH=\"150\" SORT=\"DESC\" /> \r\n" +
|
||||
"</GRIDCRITERIA> ");
|
||||
|
||||
int PMStartSeed = 0;
|
||||
if (pml.Count > 0)
|
||||
{
|
||||
PMStartSeed = int.Parse(pml[0].LT_O_WorkorderPreventiveMaintenance.Display);
|
||||
}
|
||||
|
||||
var seeds = new GZSeeds();
|
||||
seeds.InventoryAdjustmentStartSeed = AyaBizUtils.GlobalSettings.InventoryAdjustmentStartSeed + 1;
|
||||
seeds.PurchaseOrderStartSeed = AyaBizUtils.GlobalSettings.PurchaseOrderStartSeed + 1;
|
||||
seeds.QuoteNumberStartSeed = AyaBizUtils.GlobalSettings.QuoteNumberStartSeed + 1;
|
||||
seeds.WorkorderNumberStartSeed = AyaBizUtils.GlobalSettings.WorkorderNumberStartSeed + 1;
|
||||
seeds.PreventiveMaintenanceNumberStartSeed = PMStartSeed + 1;
|
||||
|
||||
DumpObjectToFolder(tempArchiveFolder, seeds, "seeds", objectExcludeProperties, TypeAndID.Empty, "GZTW.AyaNova.BLL.Seed");
|
||||
}
|
||||
#endregion globalsettings
|
||||
|
||||
#region clients
|
||||
private void dumpClients(string tempArchiveFolder, ProgressForm progress)
|
||||
{
|
||||
List<string> objectExcludeProperties = new List<string>(standardExcludePropertiesList);
|
||||
objectExcludeProperties.Add("ContractName");
|
||||
objectExcludeProperties.Add("uiHasTechNotes");
|
||||
ClientPickList pl = ClientPickList.GetList();
|
||||
progress.Append("Dumping " + pl.Count.ToString() + " Clients");
|
||||
foreach (ClientPickList.ClientPickListInfo i in pl)
|
||||
{
|
||||
Client c = Client.GetItem(i.ID);
|
||||
DumpObjectToFolder(tempArchiveFolder, c, "client." + c.ID.ToString(), objectExcludeProperties, new TypeAndID(RootObjectTypes.Client,c.ID));
|
||||
|
||||
}
|
||||
}
|
||||
#endregion clients
|
||||
|
||||
#region headoffices
|
||||
private void dumpHeadOffices(string tempArchiveFolder, ProgressForm progress)
|
||||
{
|
||||
List<string> excludes = new List<string>(standardExcludePropertiesList);
|
||||
//excludes.Add("ContractInEffect");
|
||||
//excludes.Add("uiHasTechNotes");
|
||||
PickListAutoComplete pl = PickListAutoComplete.GetList("**", "headoffice");
|
||||
|
||||
progress.Append("Dumping " + pl.Count.ToString() + " Head offices");
|
||||
foreach (PickListAutoComplete.PickListAutoCompleteInfo i in pl)
|
||||
{
|
||||
HeadOffice c = HeadOffice.GetItem(i.ID);
|
||||
DumpObjectToFolder(tempArchiveFolder, c, "headoffice." + c.ID.ToString(), excludes, new TypeAndID(RootObjectTypes.HeadOffice,c.ID));
|
||||
}
|
||||
}
|
||||
#endregion clients
|
||||
|
||||
#region users
|
||||
private void dumpUsers(string tempArchiveFolder, ProgressForm progress)
|
||||
{
|
||||
|
||||
List<string> objectExcludeProperties = new List<string>(standardExcludePropertiesList);
|
||||
objectExcludeProperties.Add("LastView");
|
||||
objectExcludeProperties.Add("LastSchedGroupID");
|
||||
objectExcludeProperties.Add("LastSchedStartDate");
|
||||
objectExcludeProperties.Add("LastSchedStopDate");
|
||||
objectExcludeProperties.Add("LastSchedView");
|
||||
objectExcludeProperties.Add("ScheduleLastGraphicalPrintSettings");
|
||||
objectExcludeProperties.Add("MainGridLastRowCount");
|
||||
objectExcludeProperties.Add("ScheduleLastViewOpenOnly");
|
||||
objectExcludeProperties.Add("IsAdministrator");
|
||||
objectExcludeProperties.Add("IsGenerator");
|
||||
objectExcludeProperties.Add("IsScheduleable");
|
||||
objectExcludeProperties.Add("IsClientOrHeadOfficeAccount");
|
||||
objectExcludeProperties.Add("IsClientAccount");
|
||||
objectExcludeProperties.Add("IsHeadOfficeAccount");
|
||||
objectExcludeProperties.Add("OrganizationTypeAndID");
|
||||
|
||||
UserPickList pl = UserPickList.GetList(false);
|
||||
progress.Append("Dumping " + pl.Count.ToString() + " Users");
|
||||
foreach (UserPickList.UserPickListInfo i in pl)
|
||||
{
|
||||
User c = User.GetItem(i.ID);
|
||||
JObject xtra = new JObject();
|
||||
xtra.Add("hexaScheduleBackColor", System.Drawing.ColorTranslator.ToHtml(System.Drawing.Color.FromArgb(c.ScheduleBackColor)));
|
||||
|
||||
DumpObjectToFolder(tempArchiveFolder, c, "user." + c.ID.ToString(), objectExcludeProperties, new TypeAndID(RootObjectTypes.User,c.ID), null, xtra);
|
||||
|
||||
}
|
||||
}
|
||||
#endregion clients
|
||||
|
||||
#region Unitmodelcategories
|
||||
private void dumpUnitModelCategories(string tempArchiveFolder, ProgressForm progress)
|
||||
{
|
||||
List<string> objectExcludeProperties = new List<string>(standardExcludePropertiesList);
|
||||
//objectExcludeProperties.Add("ContractName");
|
||||
//objectExcludeProperties.Add("uiHasTechNotes");
|
||||
UnitModelCategories l = UnitModelCategories.GetItems();
|
||||
progress.Append("Dumping " + l.Count.ToString() + " Unit model categories");
|
||||
|
||||
foreach (UnitModelCategory i in l)
|
||||
{
|
||||
|
||||
DumpObjectToFolder(tempArchiveFolder, i, "unitmodelcategory." + i.ID.ToString(), objectExcludeProperties, TypeAndID.Empty);
|
||||
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Unitservicetypes
|
||||
private void dumpUnitServiceTypes(string tempArchiveFolder, ProgressForm progress)
|
||||
{
|
||||
List<string> objectExcludeProperties = new List<string>(standardExcludePropertiesList);
|
||||
//objectExcludeProperties.Add("ContractName");
|
||||
//objectExcludeProperties.Add("uiHasTechNotes");
|
||||
UnitServiceTypes l = UnitServiceTypes.GetItems();
|
||||
progress.Append("Dumping " + l.Count.ToString() + " Unit service types");
|
||||
|
||||
foreach (UnitServiceType i in l)
|
||||
{
|
||||
|
||||
DumpObjectToFolder(tempArchiveFolder, i, "unitservicetype." + i.ID.ToString(), objectExcludeProperties, TypeAndID.Empty);
|
||||
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region WorkorderItemTypes
|
||||
private void dumpWorkorderItemTypes(string tempArchiveFolder, ProgressForm progress)
|
||||
{
|
||||
List<string> objectExcludeProperties = new List<string>(standardExcludePropertiesList);
|
||||
//objectExcludeProperties.Add("ContractName");
|
||||
//objectExcludeProperties.Add("uiHasTechNotes");
|
||||
WorkorderItemTypes l = WorkorderItemTypes.GetItems();
|
||||
progress.Append("Dumping " + l.Count.ToString() + " Workorder item types");
|
||||
|
||||
foreach (WorkorderItemType i in l)
|
||||
{
|
||||
|
||||
DumpObjectToFolder(tempArchiveFolder, i, "workorderitemtype." + i.ID.ToString(), objectExcludeProperties, TypeAndID.Empty);
|
||||
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Client groups
|
||||
private void dumpClientGroups(string tempArchiveFolder, ProgressForm progress)
|
||||
{
|
||||
List<string> objectExcludeProperties = new List<string>(standardExcludePropertiesList);
|
||||
//objectExcludeProperties.Add("ContractName");
|
||||
//objectExcludeProperties.Add("uiHasTechNotes");
|
||||
ClientGroups l = ClientGroups.GetItems();
|
||||
progress.Append("Dumping " + l.Count.ToString() + " Client groups");
|
||||
|
||||
foreach (ClientGroup i in l)
|
||||
{
|
||||
|
||||
DumpObjectToFolder(tempArchiveFolder, i, "clientgroup." + i.ID.ToString(), objectExcludeProperties, TypeAndID.Empty);
|
||||
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Workorder categories
|
||||
private void dumpWorkorderCategories(string tempArchiveFolder, ProgressForm progress)
|
||||
{
|
||||
List<string> objectExcludeProperties = new List<string>(standardExcludePropertiesList);
|
||||
//objectExcludeProperties.Add("ContractName");
|
||||
//objectExcludeProperties.Add("uiHasTechNotes");
|
||||
WorkorderCategories l = WorkorderCategories.GetItems();
|
||||
progress.Append("Dumping " + l.Count.ToString() + " Workorder categories");
|
||||
|
||||
foreach (WorkorderCategory i in l)
|
||||
{
|
||||
|
||||
DumpObjectToFolder(tempArchiveFolder, i, "workordercategory." + i.ID.ToString(), objectExcludeProperties, TypeAndID.Empty);
|
||||
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Part categories
|
||||
private void dumpPartCategories(string tempArchiveFolder, ProgressForm progress)
|
||||
{
|
||||
List<string> objectExcludeProperties = new List<string>(standardExcludePropertiesList);
|
||||
//objectExcludeProperties.Add("ContractName");
|
||||
//objectExcludeProperties.Add("uiHasTechNotes");
|
||||
PartCategories l = PartCategories.GetItems();
|
||||
progress.Append("Dumping " + l.Count.ToString() + " Part categories");
|
||||
|
||||
foreach (PartCategory i in l)
|
||||
{
|
||||
|
||||
DumpObjectToFolder(tempArchiveFolder, i, "partcategory." + i.ID.ToString(), objectExcludeProperties, TypeAndID.Empty);
|
||||
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ScheduleableUserGroups
|
||||
private void dumpScheduleableUserGroups(string tempArchiveFolder, ProgressForm progress)
|
||||
{
|
||||
List<string> objectExcludeProperties = new List<string>(standardExcludePropertiesList);
|
||||
objectExcludeProperties.Add("ContractName");
|
||||
objectExcludeProperties.Add("uiHasTechNotes");
|
||||
ScheduleableUserGroupPickList pl = ScheduleableUserGroupPickList.GetList();
|
||||
progress.Append("Dumping " + pl.Count.ToString() + " Scheduleable user groups");
|
||||
foreach (ScheduleableUserGroupPickList.ScheduleableUserGroupPickListInfo i in pl)
|
||||
{
|
||||
ScheduleableUserGroup c = ScheduleableUserGroup.GetItem(i.ID);
|
||||
DumpObjectToFolder(tempArchiveFolder, c, "scheduleableusergroup." + c.ID.ToString(), objectExcludeProperties, TypeAndID.Empty);
|
||||
|
||||
}
|
||||
}
|
||||
#endregion clients
|
||||
|
||||
#region Dispatch zones
|
||||
private void dumpDispatchZones(string tempArchiveFolder, ProgressForm progress)
|
||||
{
|
||||
List<string> objectExcludeProperties = new List<string>(standardExcludePropertiesList);
|
||||
//objectExcludeProperties.Add("ContractName");
|
||||
//objectExcludeProperties.Add("uiHasTechNotes");
|
||||
DispatchZones l = DispatchZones.GetItems(false);
|
||||
progress.Append("Dumping " + l.Count.ToString() + " Dispatch zones");
|
||||
|
||||
foreach (DispatchZone i in l)
|
||||
{
|
||||
|
||||
DumpObjectToFolder(tempArchiveFolder, i, "dispatchzone." + i.ID.ToString(), objectExcludeProperties, TypeAndID.Empty);
|
||||
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
//--------------------------------------------
|
||||
#endregion object dump methods
|
||||
|
||||
|
||||
#region Dump
|
||||
|
||||
/// <summary>
|
||||
/// Write out the object properties as JSON
|
||||
/// </summary>
|
||||
/// <param name="tempArchiveFolder"></param>
|
||||
/// <param name="o"></param>
|
||||
private void DumpObjectToFolder(string tempArchiveFolder, object o, string objectFileName, List<string> excludeProperties,
|
||||
TypeAndID tid, string forceTypeString = "", JObject jExtra = null)
|
||||
{
|
||||
|
||||
var typestring = o.GetType().ToString();
|
||||
if (!string.IsNullOrWhiteSpace(forceTypeString))
|
||||
{
|
||||
typestring = forceTypeString;
|
||||
}
|
||||
|
||||
var dumpFolder = tempArchiveFolder + Path.DirectorySeparatorChar + typestring;
|
||||
makeFolderIfNotExist(dumpFolder);
|
||||
|
||||
var outputFileName = dumpFolder + Path.DirectorySeparatorChar + objectFileName + ".json";
|
||||
var wikiOutputPath = dumpFolder + Path.DirectorySeparatorChar + objectFileName + Path.DirectorySeparatorChar + "files";
|
||||
|
||||
JsonSerializer serializer = new JsonSerializer();
|
||||
serializer.NullValueHandling = NullValueHandling.Include;
|
||||
serializer.ContractResolver = new ExcludeNamedPropertiesContractResolver(excludeProperties);
|
||||
serializer.ReferenceLoopHandling = ReferenceLoopHandling.Serialize;
|
||||
|
||||
|
||||
#if(DEBUG)
|
||||
serializer.Formatting = Formatting.Indented;
|
||||
#endif
|
||||
// serializer.Converters.Add(new JavaScriptDateTimeConverter());
|
||||
// serializer.NullValueHandling = NullValueHandling.Ignore;
|
||||
|
||||
//generate file name, should be ID of object plus .json
|
||||
|
||||
JObject jo = JObject.FromObject(o, serializer);
|
||||
if (jExtra != null)
|
||||
{
|
||||
jo.Add("jextra", jExtra);
|
||||
}
|
||||
|
||||
|
||||
using (StreamWriter sw = new StreamWriter(outputFileName))
|
||||
using (JsonWriter writer = new JsonTextWriter(sw))
|
||||
{
|
||||
|
||||
// serializer.Serialize(writer, o);
|
||||
serializer.Serialize(writer, jo);
|
||||
}
|
||||
|
||||
//WIKI / ATTACHMENTS
|
||||
DumpWikiPageAndAttachments(tid, wikiOutputPath);
|
||||
}
|
||||
|
||||
|
||||
//WIKI
|
||||
#region Wikiable objects reference
|
||||
/*
|
||||
Find all "Util.OpenWikiPage", Whole word, Subfolders, Keep modified files open, Find Results 1, Entire Solution, ""
|
||||
C:\data\ayanova\source\WinFormApp\ClientInfoForm.cs(1579): Util.OpenWikiPage(RootObjectTypes.Client, mClient.ID,false);
|
||||
C:\data\ayanova\source\WinFormApp\ContractInfoForm.cs(687): Util.OpenWikiPage(RootObjectTypes.Contract, mContract.ID, false);
|
||||
C:\data\ayanova\source\WinFormApp\Form1.cs(3713): Util.OpenWikiPage(RootObjectTypes.Global, Address.GlobalAddressID, false);
|
||||
C:\data\ayanova\source\WinFormApp\Form1.cs(3856): Util.OpenWikiPage(RootObjectTypes.User, User.CurrentThreadUserID, false);
|
||||
C:\data\ayanova\source\WinFormApp\Form1.cs(3867): // Util.OpenWikiPage(RootObjectTypes.User,User.CurrentThreadUserID,false);
|
||||
C:\data\ayanova\source\WinFormApp\HeadOfficeInfoForm.cs(1402): Util.OpenWikiPage(RootObjectTypes.HeadOffice, mHeadOffice.ID,false);
|
||||
C:\data\ayanova\source\WinFormApp\LoanItemInfoForm.cs(860): Util.OpenWikiPage(RootObjectTypes.LoanItem, mLoanItem.ID, false);
|
||||
C:\data\ayanova\source\WinFormApp\PartInfoForm.cs(1111): Util.OpenWikiPage(RootObjectTypes.Part, mPart.ID, false);
|
||||
C:\data\ayanova\source\WinFormApp\ProjectInfoForm.cs(712): Util.OpenWikiPage(RootObjectTypes.Project, mProject.ID, false);
|
||||
C:\data\ayanova\source\WinFormApp\PurchaseOrderInfoForm.cs(1010): Util.OpenWikiPage(RootObjectTypes.PurchaseOrder, mPurchaseOrder.ID, false);
|
||||
C:\data\ayanova\source\WinFormApp\RegionInfoForm.cs(1186): Util.OpenWikiPage(RootObjectTypes.Region, mRegion.ID, false);
|
||||
C:\data\ayanova\source\WinFormApp\UnitInfoForm.cs(1280): Util.OpenWikiPage(RootObjectTypes.Unit, mUnit.ID, false);
|
||||
C:\data\ayanova\source\WinFormApp\UnitModelInfoForm.cs(926): Util.OpenWikiPage(RootObjectTypes.UnitModel, mUnitModel.ID, false);
|
||||
C:\data\ayanova\source\WinFormApp\UserInfoForm.cs(1395): Util.OpenWikiPage(RootObjectTypes.User, mUser.ID, false);
|
||||
C:\data\ayanova\source\WinFormApp\VendorInfoForm.cs(1193): Util.OpenWikiPage(RootObjectTypes.Vendor, mVendor.ID, false);
|
||||
C:\data\ayanova\source\WinFormApp\WorkorderForm.cs(10332): Util.OpenWikiPage(mWorkorder.RootObjectType, mWorkorder.ID, false);//case 1584 was RootObjectTypes.Workorder
|
||||
C:\data\ayanova\source\WBI\maingrid.aspx.cs(1277): Util.OpenWikiPage(this.Page, new TypeAndID(RootObjectTypes.Global, Address.GlobalAddressID));
|
||||
C:\data\ayanova\source\WBI\schedule.aspx.cs(187): Util.OpenWikiPage(this.Page, new TypeAndID(RootObjectTypes.Global, Address.GlobalAddressID));
|
||||
Matching lines: 18 Matching files: 16 Total files searched: 1769
|
||||
*/
|
||||
#endregion
|
||||
|
||||
private void DumpWikiPageAndAttachments(TypeAndID tid, string wikiOutputPath)
|
||||
{
|
||||
|
||||
//may not exist
|
||||
if (!WikiPage.HasWiki(tid.ID)) return;
|
||||
|
||||
WikiPage w= WikiPage.GetItem(tid);
|
||||
var content= w.GetContentAsString;
|
||||
AyaFileList fl = AyaFileList.GetList(w.ID);
|
||||
|
||||
if (string.IsNullOrWhiteSpace(content) && fl.Count < 1) return;
|
||||
|
||||
makeFolderIfNotExist(wikiOutputPath);
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(content))
|
||||
{
|
||||
//write out the html wiki page
|
||||
File.WriteAllText(wikiOutputPath + Path.DirectorySeparatorChar + "w.html", content);
|
||||
}
|
||||
|
||||
//files
|
||||
foreach (AyaFileList.AyaFileListInfo i in fl)
|
||||
{
|
||||
//WikiFileInfo fi = new WikiFileInfo();
|
||||
// fi.Id = i.LT_O_AyaFile.Value.ToString();
|
||||
// fi.Name = i.LT_O_AyaFile.Display;
|
||||
// fi.Size = i.LT_AyaFile_Label_FileSize;
|
||||
// fi.Creator = i.LT_Common_Label_Creator.Display;
|
||||
// fi.Created = i.LT_Common_Label_Created.ToString();
|
||||
// ret.Add(fi);
|
||||
|
||||
|
||||
|
||||
//save each file plus file info into their own folder by ayafile id this is because ayafiles can be dupe names and we need the wiki info to fixup the last created date etc
|
||||
var filePath = wikiOutputPath + Path.DirectorySeparatorChar + i.LT_O_AyaFile.Value.ToString();
|
||||
makeFolderIfNotExist(filePath);//output/objectype/client.f861ec01-8bde-46e1-9849-fcee9b42f05e/files/d5461ec01-8bde-46e1-9849-fcee9b42f0ff34/
|
||||
|
||||
var af = AyaFile.GetItem(i.LT_O_AyaFile.Value);
|
||||
if (af == null) continue;
|
||||
af.WriteToDisk(filePath, af.Name);
|
||||
|
||||
var fileInfo = new { name = i.LT_O_AyaFile.Display, created = i.LT_Common_Label_Created, creator = i.LT_Common_Label_Creator.Value,
|
||||
mimetype = af.mimeType, id = af.ID, size = af.FileSize, ayafiletype = af.FileType, rootobjectid = af.RootObjectID, rootobjecttype = af.RootObjectType };
|
||||
|
||||
JsonSerializer serializer = new JsonSerializer();
|
||||
serializer.NullValueHandling = NullValueHandling.Include;
|
||||
|
||||
#if(DEBUG)
|
||||
serializer.Formatting = Formatting.Indented;
|
||||
#endif
|
||||
JObject jo = JObject.FromObject(fileInfo, serializer);
|
||||
|
||||
|
||||
|
||||
using (StreamWriter sw = new StreamWriter(filePath+Path.DirectorySeparatorChar+"meta.json"))
|
||||
using (JsonWriter writer = new JsonTextWriter(sw))
|
||||
{
|
||||
|
||||
// serializer.Serialize(writer, o);
|
||||
serializer.Serialize(writer, jo);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endregion dump
|
||||
|
||||
#region Utility methods
|
||||
|
||||
private static string EnsureValidFileName(string fileName)
|
||||
{
|
||||
//make lower and replace spaces with dashes
|
||||
fileName = fileName.ToLowerInvariant().Replace(" ", "-");
|
||||
|
||||
//ensure each character is a valid path character
|
||||
foreach (char c in System.IO.Path.GetInvalidFileNameChars())
|
||||
{
|
||||
fileName = fileName.Replace(c, '_');
|
||||
}
|
||||
return fileName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
private static void makeFolderIfNotExist(string fldr, bool shouldNotExist = false)
|
||||
{
|
||||
if (Directory.Exists(fldr))
|
||||
{
|
||||
if (shouldNotExist)
|
||||
throw new System.Exception("Error: path already exists and shouldn't:\r\n" + fldr);
|
||||
return;
|
||||
}
|
||||
Directory.CreateDirectory(fldr);
|
||||
}
|
||||
|
||||
private List<string> standardExcludePropertiesList
|
||||
{
|
||||
get
|
||||
{
|
||||
return new List<string>()
|
||||
{
|
||||
"CanWiki",
|
||||
"CanDuplicate",
|
||||
"IsValid",
|
||||
"IsDirty",
|
||||
"CurrentUserID",
|
||||
"IsEditing",
|
||||
"IsNew",
|
||||
"IsDeleted",
|
||||
"IsSavable",
|
||||
"Notify",
|
||||
"BrokenRulesText",
|
||||
"Docs",
|
||||
"MapQuestURL",
|
||||
"FullAddress"
|
||||
//"XXX",
|
||||
//"XXX",
|
||||
//"XXX",
|
||||
//"XXX",
|
||||
//"XXX",
|
||||
//"XXX",
|
||||
//"XXX",
|
||||
//"XXX",
|
||||
//"XXX",
|
||||
//"XXX",
|
||||
//"XXX"
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region contract resolver
|
||||
public class ExcludeNamedPropertiesContractResolver : DefaultContractResolver
|
||||
{
|
||||
private readonly List<string> _excludeProperties;
|
||||
|
||||
public ExcludeNamedPropertiesContractResolver(List<string> excludeProperties)
|
||||
{
|
||||
_excludeProperties = excludeProperties;
|
||||
}
|
||||
|
||||
protected override IList<JsonProperty> CreateProperties(Type type, MemberSerialization memberSerialization)
|
||||
{
|
||||
IList<JsonProperty> properties = base.CreateProperties(type, memberSerialization);
|
||||
|
||||
// only serializer properties that start with the specified character
|
||||
//properties = properties.Where(p => p.PropertyName.StartsWith(_startingWithChar.ToString())).ToList();
|
||||
properties = properties.Where(p => !_excludeProperties.Contains(p.PropertyName)).ToList();
|
||||
|
||||
return properties;
|
||||
}
|
||||
}
|
||||
#endregion contract resolver
|
||||
|
||||
|
||||
//eoc
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
//eons
|
||||
}
|
||||
19
source/Plugins/AyaNova.Plugin.V8/app.config
Normal file
19
source/Plugins/AyaNova.Plugin.V8/app.config
Normal file
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Antlr3.Runtime" publicKeyToken="eb42632606e9261f" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-3.5.0.2" newVersion="3.5.0.2" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
||||
Reference in New Issue
Block a user