This commit is contained in:
2018-06-29 19:47:36 +00:00
commit be7f501333
3769 changed files with 1425961 additions and 0 deletions

View File

@@ -0,0 +1,88 @@
namespace AyaNovaOL
{
partial class About
{
/// <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.lblCopyRight = new System.Windows.Forms.Label();
this.btnOK = new System.Windows.Forms.Button();
this.pbLogo = new System.Windows.Forms.PictureBox();
((System.ComponentModel.ISupportInitialize)(this.pbLogo)).BeginInit();
this.SuspendLayout();
//
// lblCopyRight
//
this.lblCopyRight.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.lblCopyRight.Font = new System.Drawing.Font("Verdana", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblCopyRight.Location = new System.Drawing.Point(95, 12);
this.lblCopyRight.Name = "lblCopyRight";
this.lblCopyRight.Size = new System.Drawing.Size(365, 65);
this.lblCopyRight.TabIndex = 2;
//
// btnOK
//
this.btnOK.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.btnOK.Image = global::AyaNovaOL.Resource1.OK24;
this.btnOK.Location = new System.Drawing.Point(404, 89);
this.btnOK.Name = "btnOK";
this.btnOK.Size = new System.Drawing.Size(56, 35);
this.btnOK.TabIndex = 100;
this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
//
// pbLogo
//
this.pbLogo.Image = global::AyaNovaOL.Resource1.AyaNovaOLI64;
this.pbLogo.Location = new System.Drawing.Point(12, 12);
this.pbLogo.Name = "pbLogo";
this.pbLogo.Size = new System.Drawing.Size(65, 65);
this.pbLogo.TabIndex = 101;
this.pbLogo.TabStop = false;
//
// About
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(472, 132);
this.Controls.Add(this.pbLogo);
this.Controls.Add(this.btnOK);
this.Controls.Add(this.lblCopyRight);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.Name = "About";
this.Text = "About AyaNova OLI";
this.Load += new System.EventHandler(this.About_Load);
((System.ComponentModel.ISupportInitialize)(this.pbLogo)).EndInit();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Label lblCopyRight;
private System.Windows.Forms.Button btnOK;
private System.Windows.Forms.PictureBox pbLogo;
}
}

View File

@@ -0,0 +1,42 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Reflection;
namespace AyaNovaOL
{
public partial class About : Form
{
public About()
{
InitializeComponent();
}
private void About_Load(object sender, EventArgs e)
{
StringBuilder sb = new StringBuilder();
Assembly a = Assembly.GetExecutingAssembly();
sb.Append("AyaNova® OLI ");
sb.Append(GZTW.AyaNova.BLL.AyaBizUtils.DisplayVersion(a.GetName().Version));
sb.Append("\r\n");
System.Diagnostics.FileVersionInfo fileVersion = System.Diagnostics.FileVersionInfo.GetVersionInfo(a.Location);
int nHotFix = fileVersion.FileBuildPart;
if (nHotFix > 0)
sb.AppendLine("(Patch " + nHotFix.ToString() + ")");
sb.Append("Copyright © 1999-2018 Ground Zero Tech-Works Inc.\r\n");
sb.Append("All rights reserved\r\n");
lblCopyRight.Text = sb.ToString();
}
private void btnOK_Click(object sender, EventArgs e)
{
Close();
}
}
}

View 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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@@ -0,0 +1,51 @@
using System.Reflection;
using System.Runtime.CompilerServices;
//
// 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("AyaNovaOL")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Ground Zero Tech-Works Inc.")]
[assembly: AssemblyProduct("AyaNovaOL")]
[assembly: AssemblyCopyright("Copyright © 2009-2018 Ground Zero Tech-Works Inc.")]
[assembly: AssemblyTrademark("AyaNova is a registered trademark of Ground Zero Tech-Works Inc.")]
[assembly: AssemblyCulture("")]
//
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Revision
// Build Number
//
// You can specify all the value or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("7.5.0.0")]
//
// In order to sign your assembly you must specify a key to use. Refer to the
// Microsoft .NET Framework documentation for more information on assembly signing.
//
// Use the attributes below to control which key is used for signing.
//
// Notes:
// (*) If no key is specified - the assembly cannot be signed.
// (*) KeyName refers to a key that has been installed in the Crypto Service
// Provider (CSP) on your machine.
// (*) If the key file and a key name attributes are both specified, the
// following processing occurs:
// (1) If the KeyName can be found in the CSP - that key is used.
// (2) If the KeyName does not exist and the KeyFile does exist, the key
// in the file is installed into the CSP and used.
// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
// documentation for more information on this.
//
//[assembly: AssemblyDelaySign(false)]
//[assembly: AssemblyKeyFile("")]
//[assembly: AssemblyKeyName("")]
[assembly: AssemblyFileVersionAttribute("7.5.0.0")]

View File

@@ -0,0 +1,331 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{0082F005-55A8-4C02-ACCD-111B1D8D1CBB}</ProjectGuid>
<OutputType>Library</OutputType>
<StartupObject>
</StartupObject>
<NoStandardLibraries>false</NoStandardLibraries>
<AssemblyName>AyaNovaOL</AssemblyName>
<RootNamespace>AyaNovaOL</RootNamespace>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\..\..\keys\AyaNova.snk</AssemblyOriginatorKeyFile>
<ApplicationIcon>
</ApplicationIcon>
<ApplicationManifest>app.manifest</ApplicationManifest>
<FileUpgradeFlags>
</FileUpgradeFlags>
<OldToolsVersion>3.5</OldToolsVersion>
<UpgradeBackupLocation />
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
<TargetFrameworkProfile>
</TargetFrameworkProfile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<Optimize>false</Optimize>
<OutputPath>.\bin\Debug\</OutputPath>
<EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<WarningLevel>4</WarningLevel>
<IncrementalBuild>false</IncrementalBuild>
<RegisterForComInterop>true</RegisterForComInterop>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugSymbols>false</DebugSymbols>
<Optimize>true</Optimize>
<OutputPath>..\..\..\release\</OutputPath>
<EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
<DefineConstants>TRACE</DefineConstants>
<WarningLevel>4</WarningLevel>
<IncrementalBuild>false</IncrementalBuild>
<RegisterForComInterop>true</RegisterForComInterop>
</PropertyGroup>
<ItemGroup>
<Reference Include="Infragistics4.Shared.v11.2, Version=11.2.20112.2135, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>C:\Program Files\Infragistics\NetAdvantage 2011.2\Windows Forms\CLR4.0\Bin\Infragistics4.Shared.v11.2.dll</HintPath>
</Reference>
<Reference Include="Infragistics4.Win.Misc.v11.2, Version=11.2.20112.2135, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>C:\Program Files\Infragistics\NetAdvantage 2011.2\Windows Forms\CLR4.0\Bin\Infragistics4.Win.Misc.v11.2.dll</HintPath>
</Reference>
<Reference Include="Infragistics4.Win.UltraWinEditors.v11.2, Version=11.2.20112.2135, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>C:\Program Files\Infragistics\NetAdvantage 2011.2\Windows Forms\CLR4.0\Bin\Infragistics4.Win.UltraWinEditors.v11.2.dll</HintPath>
</Reference>
<Reference Include="Infragistics4.Win.UltraWinGrid.v11.2, Version=11.2.20112.2135, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>C:\Program Files\Infragistics\NetAdvantage 2011.2\Windows Forms\CLR4.0\Bin\Infragistics4.Win.UltraWinGrid.v11.2.dll</HintPath>
</Reference>
<Reference Include="Infragistics4.Win.v11.2, Version=11.2.20112.2135, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>C:\Program Files\Infragistics\NetAdvantage 2011.2\Windows Forms\CLR4.0\Bin\Infragistics4.Win.v11.2.dll</HintPath>
</Reference>
<Reference Include="Extensibility, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<Private>True</Private>
</Reference>
<Reference Include="FirebirdSql.Data.FirebirdClient, Version=2.5.0.0, Culture=neutral, PublicKeyToken=3750abcc3150b00c, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\3rdprtylibs\firebird ado.net driver\FirebirdSql.Data.FirebirdClient.dll</HintPath>
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="Microsoft.Office.Interop.Outlook, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<EmbedInteropTypes>True</EmbedInteropTypes>
<HintPath>..\..\..\3rdprtylibs\OfficeXPPIA\Microsoft.Office.Interop.Outlook.dll</HintPath>
</Reference>
<Reference Include="Microsoft.VisualBasic" />
<Reference Include="office, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<EmbedInteropTypes>True</EmbedInteropTypes>
<HintPath>..\..\..\3rdprtylibs\OfficeXPPIA\office.dll</HintPath>
</Reference>
<Reference Include="System">
<HintPath>System.dll</HintPath>
<Name>System</Name>
</Reference>
<Reference Include="System.Data">
<HintPath>System.Data.dll</HintPath>
<Name>System.Data</Name>
</Reference>
<Reference Include="System.Design" />
<Reference Include="System.Drawing" />
<Reference Include="System.Runtime.Serialization.Formatters.Soap" />
<Reference Include="System.Web" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.XML">
<HintPath>System.XML.dll</HintPath>
<Name>System.XML</Name>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="About.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="About.Designer.cs">
<DependentUpon>About.cs</DependentUpon>
</Compile>
<Compile Include="AssemblyInfo.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="ChooseAyaContactType.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="ChooseAyaContactType.Designer.cs">
<DependentUpon>ChooseAyaContactType.cs</DependentUpon>
</Compile>
<Compile Include="Connect.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="ContactExportOptions.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="ContactExportOptions.Designer.cs">
<DependentUpon>ContactExportOptions.cs</DependentUpon>
</Compile>
<Compile Include="ExportContactsToAyaNova.cs" />
<Compile Include="FuzzyFetch.cs" />
<Compile Include="ImportContactsFromAyaNova.cs" />
<Compile Include="ImportSchedule.cs" />
<Compile Include="Login.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="MapPhoneAddress.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="MapPhoneAddress.Designer.cs">
<DependentUpon>MapPhoneAddress.cs</DependentUpon>
</Compile>
<Compile Include="MsgToWo.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="MsgToWo.Designer.cs">
<DependentUpon>MsgToWo.cs</DependentUpon>
</Compile>
<Compile Include="Options.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Options.Designer.cs">
<DependentUpon>Options.cs</DependentUpon>
</Compile>
<Compile Include="OutlookWrapperClasses.cs" />
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
<DependentUpon>Settings.settings</DependentUpon>
</Compile>
<Compile Include="Resource1.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resource1.resx</DependentUpon>
</Compile>
<Compile Include="ScheduleMarkerForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="ScheduleMarkerForm.Designer.cs">
<DependentUpon>ScheduleMarkerForm.cs</DependentUpon>
</Compile>
<Compile Include="SearchForAyaNovaItem.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="SearchForAyaNovaItem.Designer.cs">
<DependentUpon>SearchForAyaNovaItem.cs</DependentUpon>
</Compile>
<Compile Include="SelectAyaNovaContacts.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="SelectAyaNovaContacts.Designer.cs">
<DependentUpon>SelectAyaNovaContacts.cs</DependentUpon>
</Compile>
<Compile Include="Settings.cs" />
<Compile Include="Timestamp.cs" />
<Compile Include="WorkorderSelector.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="WorkorderSelector.Designer.cs">
<DependentUpon>WorkorderSelector.cs</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="app.manifest" />
<None Include="app.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<None Include="Resources\Splash.png" />
<None Include="Resources\AyaNova5.ico" />
<None Include="Resources\Login32.png" />
<None Include="Resources\LoginPassword32.png" />
<None Include="Resources\Cancel24.png" />
<None Include="Resources\OK24.png" />
<None Include="Resources\SearchDatabase16.png" />
<None Include="Resources\ServiceWorkorder16icon.ico" />
<None Include="Resources\Delete16.png" />
<None Include="Resources\ScheduleMarker16icon.ico" />
<None Include="Resources\Client32.png" />
<None Include="Resources\HeadOffice32.png" />
<None Include="Resources\Vendor32.png" />
<None Include="Resources\AyaNovaOLIsplash.png" />
<None Include="Resources\AyaNovaOLI64.png" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="About.resx">
<DependentUpon>About.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="ChooseAyaContactType.resx">
<DependentUpon>ChooseAyaContactType.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="ContactExportOptions.resx">
<DependentUpon>ContactExportOptions.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Login.resx">
<DependentUpon>Login.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="MapPhoneAddress.resx">
<DependentUpon>MapPhoneAddress.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="MsgToWo.resx">
<DependentUpon>MsgToWo.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Options.resx">
<DependentUpon>Options.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\licenses.licx" />
<EmbeddedResource Include="Resource1.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resource1.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Include="ScheduleMarkerForm.resx">
<DependentUpon>ScheduleMarkerForm.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="SearchForAyaNovaItem.resx">
<DependentUpon>SearchForAyaNovaItem.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="SelectAyaNovaContacts.resx">
<DependentUpon>SelectAyaNovaContacts.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="WorkorderSelector.resx">
<DependentUpon>WorkorderSelector.cs</DependentUpon>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\bizobjects\AyaLib\GZTW.AyaNova.BLL.csproj">
<Project>{50B807B6-FC35-4CC3-B54D-91C78426A943}</Project>
<Name>GZTW.AyaNova.BLL</Name>
</ProjectReference>
<ProjectReference Include="..\..\csla10\CSLA.Core.Bindablebase\CSLA.Core.Bindablebase.csproj">
<Project>{C2392355-12A9-4197-A1D3-603C390B1E62}</Project>
<Name>CSLA.Core.Bindablebase</Name>
</ProjectReference>
<ProjectReference Include="..\..\csla10\CSLA.Server.DataPortal\CSLA.Server.DataPortal.vbproj">
<Project>{80828E2C-E9FB-4E73-A27C-7F9CDB96FCDE}</Project>
<Name>CSLA.Server.DataPortal</Name>
</ProjectReference>
<ProjectReference Include="..\..\csla10\CSLA\CSLA.vbproj">
<Project>{1B9A38BB-461A-47A4-AD72-099C694138A0}</Project>
<Name>CSLA</Name>
</ProjectReference>
<ProjectReference Include="..\..\Data\Data\GZTW.Data.csproj">
<Project>{701893AA-C042-4FB2-8643-E139372C1117}</Project>
<Name>GZTW.Data</Name>
</ProjectReference>
<ProjectReference Include="..\..\GZWFControls\GZTW.WinForm.Controls.csproj">
<Project>{FE5614F3-E435-423C-A23D-E3372B7EAEAB}</Project>
<Name>GZTW.WinForm.Controls</Name>
</ProjectReference>
<ProjectReference Include="..\..\Profile\GZTW.Profile\GZTW.Profile.csproj">
<Project>{EDE897E2-E2E6-441D-9F83-0B973AE09670}</Project>
<Name>GZTW.Profile</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
<Visible>False</Visible>
<ProductName>Windows Installer 3.1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
<PropertyGroup>
<PreBuildEvent>"C:\data\AyaNova\utils\TimeStamp\bin\Release\TimeStamp.exe" "$(ProjectDir)Timestamp.cs" "/N:AyaNova.PlugIn.AyaNovaOL"</PreBuildEvent>
<PostBuildEvent>
</PostBuildEvent>
</PropertyGroup>
<ProjectExtensions>
<VisualStudio>
</VisualStudio>
</ProjectExtensions>
</Project>

View File

@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<StartWorkingDirectory>C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\</StartWorkingDirectory>
<StartProgram>C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe</StartProgram>
<StartAction>Program</StartAction>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<StartWorkingDirectory>C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\</StartWorkingDirectory>
<StartProgram>C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe</StartProgram>
<StartAction>Program</StartAction>
</PropertyGroup>
<PropertyGroup>
<PublishUrlHistory />
<InstallUrlHistory />
<SupportUrlHistory />
<UpdateUrlHistory />
<BootstrapperUrlHistory />
<ErrorReportUrlHistory />
<FallbackCulture>en-US</FallbackCulture>
<VerifyUploadedFiles>false</VerifyUploadedFiles>
</PropertyGroup>
</Project>

View File

@@ -0,0 +1,139 @@
namespace AyaNovaOL
{
partial class ChooseAyaContactType
{
/// <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.btnClient = new System.Windows.Forms.Button();
this.btnHeadOffice = new System.Windows.Forms.Button();
this.btnVendor = new System.Windows.Forms.Button();
this.lblVendorType = new Infragistics.Win.Misc.UltraLabel();
this.cbVendorType = new GZTW.WinForm.Controls.GZUltraComboEditor();
this.btnMap = new System.Windows.Forms.Button();
((System.ComponentModel.ISupportInitialize)(this.cbVendorType)).BeginInit();
this.SuspendLayout();
//
// btnClient
//
this.btnClient.Image = global::AyaNovaOL.Resource1.Client32;
this.btnClient.ImageAlign = System.Drawing.ContentAlignment.TopCenter;
this.btnClient.Location = new System.Drawing.Point(30, 27);
this.btnClient.Name = "btnClient";
this.btnClient.Size = new System.Drawing.Size(169, 59);
this.btnClient.TabIndex = 0;
this.btnClient.Text = "LT:O.Client";
this.btnClient.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
this.btnClient.UseVisualStyleBackColor = true;
this.btnClient.Click += new System.EventHandler(this.btnClient_Click);
//
// btnHeadOffice
//
this.btnHeadOffice.Image = global::AyaNovaOL.Resource1.HeadOffice32;
this.btnHeadOffice.ImageAlign = System.Drawing.ContentAlignment.TopCenter;
this.btnHeadOffice.Location = new System.Drawing.Point(30, 116);
this.btnHeadOffice.Name = "btnHeadOffice";
this.btnHeadOffice.Size = new System.Drawing.Size(169, 59);
this.btnHeadOffice.TabIndex = 1;
this.btnHeadOffice.Text = "LT:O.HeadOffice";
this.btnHeadOffice.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
this.btnHeadOffice.UseVisualStyleBackColor = true;
this.btnHeadOffice.Click += new System.EventHandler(this.btnHeadOffice_Click);
//
// btnVendor
//
this.btnVendor.Image = global::AyaNovaOL.Resource1.Vendor32;
this.btnVendor.ImageAlign = System.Drawing.ContentAlignment.TopCenter;
this.btnVendor.Location = new System.Drawing.Point(30, 205);
this.btnVendor.Name = "btnVendor";
this.btnVendor.Size = new System.Drawing.Size(169, 59);
this.btnVendor.TabIndex = 2;
this.btnVendor.Text = "LT:O.Vendor";
this.btnVendor.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
this.btnVendor.UseVisualStyleBackColor = true;
this.btnVendor.Click += new System.EventHandler(this.btnVendor_Click);
//
// lblVendorType
//
this.lblVendorType.AutoSize = true;
this.lblVendorType.Location = new System.Drawing.Point(30, 277);
this.lblVendorType.Name = "lblVendorType";
this.lblVendorType.Size = new System.Drawing.Size(153, 14);
this.lblVendorType.TabIndex = 111;
this.lblVendorType.Tag = "";
this.lblVendorType.Text = "LT:Vendor.Label.VendorType";
this.lblVendorType.WrapText = false;
//
// cbVendorType
//
this.cbVendorType.AllowEmptySelection = false;
this.cbVendorType.Location = new System.Drawing.Point(30, 298);
this.cbVendorType.Name = "cbVendorType";
this.cbVendorType.Size = new System.Drawing.Size(171, 21);
this.cbVendorType.TabIndex = 110;
//
// btnMap
//
this.btnMap.Location = new System.Drawing.Point(21, 377);
this.btnMap.Name = "btnMap";
this.btnMap.Size = new System.Drawing.Size(189, 23);
this.btnMap.TabIndex = 112;
this.btnMap.Text = "Map phone and address fields";
this.btnMap.UseVisualStyleBackColor = true;
this.btnMap.Click += new System.EventHandler(this.btnMap_Click);
//
// ChooseAyaContactType
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(232, 432);
this.Controls.Add(this.btnMap);
this.Controls.Add(this.lblVendorType);
this.Controls.Add(this.cbVendorType);
this.Controls.Add(this.btnVendor);
this.Controls.Add(this.btnHeadOffice);
this.Controls.Add(this.btnClient);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.Name = "ChooseAyaContactType";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Choose contact type:";
this.Load += new System.EventHandler(this.ChooseAyaContactType_Load);
((System.ComponentModel.ISupportInitialize)(this.cbVendorType)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button btnClient;
private System.Windows.Forms.Button btnHeadOffice;
private System.Windows.Forms.Button btnVendor;
private Infragistics.Win.Misc.UltraLabel lblVendorType;
private GZTW.WinForm.Controls.GZUltraComboEditor cbVendorType;
private System.Windows.Forms.Button btnMap;
}
}

View File

@@ -0,0 +1,66 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using GZTW.AyaNova.BLL;
namespace AyaNovaOL
{
public partial class ChooseAyaContactType : Form
{
public ChooseAyaContactType()
{
InitializeComponent();
SelectedObjectType = RootObjectTypes.Nothing;
}
public RootObjectTypes SelectedObjectType { get;set; }
public VendorTypes SelectedVendorType { get; set; }
private void btnClient_Click(object sender, EventArgs e)
{
SelectedObjectType = RootObjectTypes.Client;
Util.MapFields();
Close();
}
private void btnHeadOffice_Click(object sender, EventArgs e)
{
SelectedObjectType = RootObjectTypes.HeadOffice;
Util.MapFields();
Close();
}
private void btnVendor_Click(object sender, EventArgs e)
{
SelectedObjectType = RootObjectTypes.Vendor;
SelectedVendorType = (VendorTypes)cbVendorType.SelectedItem.DataValue;
Util.MapFields();
Close();
}
private void ChooseAyaContactType_Load(object sender, EventArgs e)
{
Infragistics.Win.ValueListItem vli= cbVendorType.Items.Add(VendorTypes.Manufacturer, Util.LocaleText.GetLocalizedText("Vendor.Label.VendorType.Manufacturer"));
cbVendorType.Items.Add(VendorTypes.Shipper, Util.LocaleText.GetLocalizedText("Vendor.Label.VendorType.Shipper"));
cbVendorType.Items.Add(VendorTypes.SubContractor, Util.LocaleText.GetLocalizedText("Vendor.Label.VendorType.SubContractor"));
cbVendorType.Items.Add(VendorTypes.ThirdPartyRepair, Util.LocaleText.GetLocalizedText("Vendor.Label.VendorType.ThirdPartyRepair"));
cbVendorType.Items.Add(VendorTypes.Wholesaler, Util.LocaleText.GetLocalizedText("Vendor.Label.VendorType.Wholesaler"));
cbVendorType.SelectedItem = vli;
Util.Localize(this);
}
private void btnMap_Click(object sender, EventArgs e)
{
MapPhoneAddress d = new MapPhoneAddress();
d.ShowDialog();
d.Dispose();
}
//-----------------------------------------------
}
}

View 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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@@ -0,0 +1,235 @@
namespace AyaNovaOL
{
using System;
using Extensibility;
using System.Runtime.InteropServices;
using Outlook=Microsoft.Office.Interop.Outlook;
using Microsoft.Office.Core;
using System.Windows.Forms;
using System.Reflection;
using System.Collections.Generic;
#region Read me for Add-in installation and setup information.
// When run, the Add-in wizard prepared the registry for the Add-in.
// At a later time, if the Add-in becomes unavailable for reasons such as:
// 1) You moved this project to a computer other than which is was originally created on.
// 2) You chose 'Yes' when presented with a message asking if you wish to remove the Add-in.
// 3) Registry corruption.
// you will need to re-register the Add-in by building the AyaNovaOLSetup project,
// right click the project in the Solution Explorer, then choose install.
#endregion
/// <summary>
/// The object for implementing an Add-in.
/// </summary>
/// <seealso class='IDTExtensibility2' />
[GuidAttribute("E40A95F9-61D2-4B47-AF80-54BCC5AC9D7F"), ProgId("AyaNovaOL.Connect")]
public class Connect : Object, Extensibility.IDTExtensibility2
{
// Our UI will consist of a single CommandBarButton
// private CommandBarButton btnAyaNova;
private Outlook.Application _OutlookApplication;
private object _addInInstance;
// Wrapper stuff
Outlook.Inspectors _Inspectors;
Outlook.Explorers _Explorers;
// This dictionary holds our Wrapped Inspectors, Explorers, Folders, Items, Whatever
Dictionary<Guid, WrapperClass> _WrappedObjects;
/// <summary>
/// Implements the constructor for the Add-in object.
/// Place your initialization code within this method.
/// </summary>
public Connect()
{
}
/// <summary>
/// Implements the OnConnection method of the IDTExtensibility2 interface.
/// Receives notification that the Add-in is being loaded.
/// </summary>
/// <param term='application'>
/// Root object of the host application.
/// </param>
/// <param term='connectMode'>
/// Describes how the Add-in is being loaded.
/// </param>
/// <param term='addInInst'>
/// Object representing this Add-in.
/// </param>
/// <seealso class='IDTExtensibility2' />
public void OnConnection(object application, Extensibility.ext_ConnectMode connectMode, object addInInst, ref System.Array custom)
{
Util.db("OLI -> OnConnection()");
//MessageBox.Show("OnConnection");
_OutlookApplication = application as Outlook.Application;
_addInInstance = addInInst;
if (connectMode != Extensibility.ext_ConnectMode.ext_cm_Startup)
{
OnStartupComplete(ref custom);
}
}
/// <summary>
/// Implements the OnDisconnection method of the IDTExtensibility2 interface.
/// Receives notification that the Add-in is being unloaded.
/// </summary>
/// <param term='disconnectMode'>
/// Describes how the Add-in is being unloaded.
/// </param>
/// <param term='custom'>
/// Array of parameters that are host application specific.
/// </param>
/// <seealso class='IDTExtensibility2' />
public void OnDisconnection(Extensibility.ext_DisconnectMode disconnectMode, ref System.Array custom)
{
//MessageBox.Show("OnDisconnection");
if (disconnectMode != Extensibility.ext_DisconnectMode.ext_dm_HostShutdown)
{
OnBeginShutdown(ref custom);
}
//MessageBox.Show("OnDisconnection completed");
}
/// <summary>
/// Implements the OnAddInsUpdate method of the IDTExtensibility2 interface.
/// Receives notification that the collection of Add-ins has changed.
/// </summary>
/// <param term='custom'>
/// Array of parameters that are host application specific.
/// </param>
/// <seealso class='IDTExtensibility2' />
public void OnAddInsUpdate(ref System.Array custom)
{
}
/// <summary>
/// Implements the OnStartupComplete method of the IDTExtensibility2 interface.
/// Receives notification that the host application has completed loading.
/// </summary>
/// <param term='custom'>
/// Array of parameters that are host application specific.
/// </param>
/// <seealso class='IDTExtensibility2' />
public void OnStartupComplete(ref System.Array custom)
{
_WrappedObjects = new Dictionary<Guid, WrapperClass>();
//// Inspectors stuff
_Inspectors = _OutlookApplication.Inspectors;
_Inspectors.NewInspector += new Microsoft.Office.Interop.Outlook.InspectorsEvents_NewInspectorEventHandler(_Inspectors_NewInspector);
// Are there any open Inspector after Startup ?
for (int i = _Inspectors.Count; i >= 1; i--)
{
// Wrap the Inspector and do some usefull with it
WrapInspector(_Inspectors[i]);
}
//// Explorer stuff
_Explorers = _OutlookApplication.Explorers;
_Explorers.NewExplorer += new Microsoft.Office.Interop.Outlook.ExplorersEvents_NewExplorerEventHandler(_Explorers_NewExplorer);
// Are there any open Explorers after Startup ?
for (int i = _Explorers.Count; i >= 1; i--)
{
// Wrap the Explorer and do some usefull with it
WrapExplorer(_Explorers[i]);
}
}
/// <summary>
/// Implements the OnBeginShutdown method of the IDTExtensibility2 interface.
/// Receives notification that the host application is being unloaded.
/// </summary>
/// <param term='custom'>
/// Array of parameters that are host application specific.
/// </param>
/// <seealso class='IDTExtensibility2' />
public void OnBeginShutdown(ref System.Array custom)
{
//MessageBox.Show("Cleanup starting in OnBeginShutdown");
CleanUp();
//MessageBox.Show("Cleanup completed in OnBeginShutdown");
}
#region Wrapper specific
void CleanUp()
{
if (_OutlookApplication != null)
{
_WrappedObjects.Clear();
_Inspectors.NewInspector -= new Microsoft.Office.Interop.Outlook.InspectorsEvents_NewInspectorEventHandler(_Inspectors_NewInspector);
_Inspectors = null;
_Explorers.NewExplorer -= new Outlook.ExplorersEvents_NewExplorerEventHandler(_Explorers_NewExplorer);
_Explorers = null;
_addInInstance = null;
_OutlookApplication = null;
GC.Collect();
GC.WaitForPendingFinalizers();
}
}
void _Explorers_NewExplorer(Microsoft.Office.Interop.Outlook.Explorer Explorer)
{
WrapExplorer(Explorer);
}
void WrapExplorer(Microsoft.Office.Interop.Outlook.Explorer Explorer)
{
//Util.d("WrapExplorer:" + Explorer.Caption);
ExplorerWrapper wrappedExplorer = new ExplorerWrapper(Explorer);
wrappedExplorer.Closed += new WrapperClosedDelegate(wrappedObject_Closed);
_WrappedObjects[wrappedExplorer.Id] = wrappedExplorer;
}
void _Inspectors_NewInspector(Microsoft.Office.Interop.Outlook.Inspector Inspector)
{
if (Inspector.CurrentItem is Outlook.MailItem)
{
InspectorWrapper wrappedInspector = new InspectorWrapper(Inspector);
wrappedInspector.Closed += new WrapperClosedDelegate(wrappedObject_Closed);
_WrappedObjects[wrappedInspector.Id] = wrappedInspector;
}
}
/// <summary>
/// The Inspector is "wrapped" and used in the application.
/// </summary>
/// <param name="inspector">The new Inspector instance</param>
void WrapInspector(Outlook.Inspector inspector)
{
if (inspector.CurrentItem is Outlook.MailItem)
{
InspectorWrapper wrappedInspector = new InspectorWrapper(inspector);
wrappedInspector.Closed += new WrapperClosedDelegate(wrappedObject_Closed);
_WrappedObjects[wrappedInspector.Id] = wrappedInspector;
}
}
void wrappedObject_Closed(Guid id)
{
_WrappedObjects.Remove(id);
}
#endregion
}
}

View File

@@ -0,0 +1,275 @@
namespace AyaNovaOL
{
partial class ContactExportOptions
{
/// <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.cbRegion = new GZTW.WinForm.Controls.GZUltraComboEditor();
this.lblRegionID = new Infragistics.Win.Misc.UltraLabel();
this.cbDispatchZone = new GZTW.WinForm.Controls.GZUltraComboEditor();
this.ultraLabel1 = new Infragistics.Win.Misc.UltraLabel();
this.radClient = new System.Windows.Forms.RadioButton();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.ultraLabel2 = new Infragistics.Win.Misc.UltraLabel();
this.cbContractID = new GZTW.WinForm.Controls.GZUltraComboEditor();
this.lblVendorType = new Infragistics.Win.Misc.UltraLabel();
this.cbVendorType = new GZTW.WinForm.Controls.GZUltraComboEditor();
this.radVendor = new System.Windows.Forms.RadioButton();
this.radHeadOffice = new System.Windows.Forms.RadioButton();
this.btnCancel = new System.Windows.Forms.Button();
this.btnOK = new System.Windows.Forms.Button();
this.btnMap = new System.Windows.Forms.Button();
((System.ComponentModel.ISupportInitialize)(this.cbRegion)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.cbDispatchZone)).BeginInit();
this.groupBox1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.cbContractID)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.cbVendorType)).BeginInit();
this.SuspendLayout();
//
// cbRegion
//
this.cbRegion.AllowEmptySelection = false;
this.cbRegion.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.cbRegion.Location = new System.Drawing.Point(34, 90);
this.cbRegion.Name = "cbRegion";
this.cbRegion.Size = new System.Drawing.Size(320, 21);
this.cbRegion.TabIndex = 6;
//
// lblRegionID
//
this.lblRegionID.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.lblRegionID.Location = new System.Drawing.Point(34, 74);
this.lblRegionID.Name = "lblRegionID";
this.lblRegionID.Size = new System.Drawing.Size(220, 16);
this.lblRegionID.TabIndex = 7;
this.lblRegionID.Tag = "";
this.lblRegionID.Text = "LT:O.Region";
this.lblRegionID.WrapText = false;
//
// cbDispatchZone
//
this.cbDispatchZone.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.cbDispatchZone.Location = new System.Drawing.Point(34, 136);
this.cbDispatchZone.Name = "cbDispatchZone";
this.cbDispatchZone.Size = new System.Drawing.Size(320, 21);
this.cbDispatchZone.TabIndex = 8;
//
// ultraLabel1
//
this.ultraLabel1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.ultraLabel1.Location = new System.Drawing.Point(34, 120);
this.ultraLabel1.Name = "ultraLabel1";
this.ultraLabel1.Size = new System.Drawing.Size(220, 16);
this.ultraLabel1.TabIndex = 9;
this.ultraLabel1.Tag = "";
this.ultraLabel1.Text = "LT:O.DispatchZone";
this.ultraLabel1.WrapText = false;
//
// radClient
//
this.radClient.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.radClient.AutoSize = true;
this.radClient.Checked = true;
this.radClient.Location = new System.Drawing.Point(22, 25);
this.radClient.Name = "radClient";
this.radClient.Size = new System.Drawing.Size(78, 17);
this.radClient.TabIndex = 10;
this.radClient.TabStop = true;
this.radClient.Text = "LT:O.Client";
this.radClient.UseVisualStyleBackColor = true;
this.radClient.CheckedChanged += new System.EventHandler(this.radClient_CheckedChanged);
//
// groupBox1
//
this.groupBox1.Controls.Add(this.ultraLabel2);
this.groupBox1.Controls.Add(this.cbContractID);
this.groupBox1.Controls.Add(this.lblVendorType);
this.groupBox1.Controls.Add(this.ultraLabel1);
this.groupBox1.Controls.Add(this.cbVendorType);
this.groupBox1.Controls.Add(this.cbDispatchZone);
this.groupBox1.Controls.Add(this.radVendor);
this.groupBox1.Controls.Add(this.cbRegion);
this.groupBox1.Controls.Add(this.lblRegionID);
this.groupBox1.Controls.Add(this.radHeadOffice);
this.groupBox1.Controls.Add(this.radClient);
this.groupBox1.Location = new System.Drawing.Point(16, 22);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(384, 320);
this.groupBox1.TabIndex = 11;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "Export / Sync as:";
//
// ultraLabel2
//
this.ultraLabel2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.ultraLabel2.Location = new System.Drawing.Point(34, 170);
this.ultraLabel2.Name = "ultraLabel2";
this.ultraLabel2.Size = new System.Drawing.Size(220, 16);
this.ultraLabel2.TabIndex = 111;
this.ultraLabel2.Tag = "";
this.ultraLabel2.Text = "LT:O.Contract";
this.ultraLabel2.WrapText = false;
//
// cbContractID
//
this.cbContractID.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.cbContractID.Location = new System.Drawing.Point(34, 186);
this.cbContractID.Name = "cbContractID";
this.cbContractID.Size = new System.Drawing.Size(320, 21);
this.cbContractID.TabIndex = 110;
//
// lblVendorType
//
this.lblVendorType.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.lblVendorType.Location = new System.Drawing.Point(34, 257);
this.lblVendorType.Name = "lblVendorType";
this.lblVendorType.Size = new System.Drawing.Size(216, 21);
this.lblVendorType.TabIndex = 109;
this.lblVendorType.Tag = "";
this.lblVendorType.Text = "LT:Vendor.Label.VendorType";
this.lblVendorType.WrapText = false;
//
// cbVendorType
//
this.cbVendorType.AllowEmptySelection = false;
this.cbVendorType.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.cbVendorType.Enabled = false;
this.cbVendorType.Location = new System.Drawing.Point(34, 278);
this.cbVendorType.Name = "cbVendorType";
this.cbVendorType.Size = new System.Drawing.Size(321, 21);
this.cbVendorType.TabIndex = 108;
//
// radVendor
//
this.radVendor.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.radVendor.AutoSize = true;
this.radVendor.Location = new System.Drawing.Point(22, 231);
this.radVendor.Name = "radVendor";
this.radVendor.Size = new System.Drawing.Size(86, 17);
this.radVendor.TabIndex = 12;
this.radVendor.Text = "LT:O.Vendor";
this.radVendor.UseVisualStyleBackColor = true;
this.radVendor.CheckedChanged += new System.EventHandler(this.radVendor_CheckedChanged);
//
// radHeadOffice
//
this.radHeadOffice.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.radHeadOffice.AutoSize = true;
this.radHeadOffice.Location = new System.Drawing.Point(22, 42);
this.radHeadOffice.Name = "radHeadOffice";
this.radHeadOffice.Size = new System.Drawing.Size(106, 17);
this.radHeadOffice.TabIndex = 11;
this.radHeadOffice.Text = "LT:O.HeadOffice";
this.radHeadOffice.UseVisualStyleBackColor = true;
this.radHeadOffice.CheckedChanged += new System.EventHandler(this.radHeadOffice_CheckedChanged);
//
// btnCancel
//
this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.btnCancel.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.btnCancel.Image = global::AyaNovaOL.Resource1.Cancel24;
this.btnCancel.Location = new System.Drawing.Point(16, 432);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(56, 35);
this.btnCancel.TabIndex = 32;
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
//
// btnOK
//
this.btnOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnOK.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.btnOK.Image = global::AyaNovaOL.Resource1.OK24;
this.btnOK.Location = new System.Drawing.Point(344, 432);
this.btnOK.Name = "btnOK";
this.btnOK.Size = new System.Drawing.Size(56, 35);
this.btnOK.TabIndex = 33;
this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
//
// btnMap
//
this.btnMap.Location = new System.Drawing.Point(16, 359);
this.btnMap.Name = "btnMap";
this.btnMap.Size = new System.Drawing.Size(189, 23);
this.btnMap.TabIndex = 34;
this.btnMap.Text = "Map phone and address fields";
this.btnMap.UseVisualStyleBackColor = true;
this.btnMap.Click += new System.EventHandler(this.btnMap_Click);
//
// ContactExportOptions
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(419, 479);
this.Controls.Add(this.btnMap);
this.Controls.Add(this.btnOK);
this.Controls.Add(this.btnCancel);
this.Controls.Add(this.groupBox1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.Name = "ContactExportOptions";
this.Text = "Contact export options";
this.Load += new System.EventHandler(this.ContactExportOptions_Load);
((System.ComponentModel.ISupportInitialize)(this.cbRegion)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.cbDispatchZone)).EndInit();
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.cbContractID)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.cbVendorType)).EndInit();
this.ResumeLayout(false);
}
#endregion
private GZTW.WinForm.Controls.GZUltraComboEditor cbRegion;
private Infragistics.Win.Misc.UltraLabel lblRegionID;
private GZTW.WinForm.Controls.GZUltraComboEditor cbDispatchZone;
private Infragistics.Win.Misc.UltraLabel ultraLabel1;
private System.Windows.Forms.RadioButton radClient;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.RadioButton radVendor;
private System.Windows.Forms.RadioButton radHeadOffice;
private Infragistics.Win.Misc.UltraLabel lblVendorType;
private GZTW.WinForm.Controls.GZUltraComboEditor cbVendorType;
private Infragistics.Win.Misc.UltraLabel ultraLabel2;
private GZTW.WinForm.Controls.GZUltraComboEditor cbContractID;
private System.Windows.Forms.Button btnCancel;
private System.Windows.Forms.Button btnOK;
private System.Windows.Forms.Button btnMap;
}
}

View File

@@ -0,0 +1,199 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using GZTW.AyaNova.BLL;
using Outlook = Microsoft.Office.Interop.Outlook;
using Office = Microsoft.Office.Core;
namespace AyaNovaOL
{
public partial class ContactExportOptions : Form
{
public ContactExportOptions()
{
InitializeComponent();
}
private void ContactExportOptions_Load(object sender, EventArgs e)
{
//Util.d("ContactExportOptions_Load");
Util.Localize(this);
Util.FillGZComboBoxWithNameIDList("Region", cbRegion, false, Guid.Empty, true);
Util.ComboSelectGuid(cbRegion, GZTW.AyaNova.BLL.Region.DefaultRegionID);
Util.FillGZComboBoxWithNameIDList("DispatchZone", cbDispatchZone, false, Guid.Empty, true);
Util.FillGZComboBoxWithNameIDList("Contract", cbContractID, false, Guid.Empty, true);
Infragistics.Win.ValueListItem vli = cbVendorType.Items.Add(VendorTypes.Manufacturer, Util.LocaleText.GetLocalizedText("Vendor.Label.VendorType.Manufacturer"));
cbVendorType.Items.Add(VendorTypes.Shipper, Util.LocaleText.GetLocalizedText("Vendor.Label.VendorType.Shipper"));
cbVendorType.Items.Add(VendorTypes.SubContractor, Util.LocaleText.GetLocalizedText("Vendor.Label.VendorType.SubContractor"));
cbVendorType.Items.Add(VendorTypes.ThirdPartyRepair, Util.LocaleText.GetLocalizedText("Vendor.Label.VendorType.ThirdPartyRepair"));
cbVendorType.Items.Add(VendorTypes.Wholesaler, Util.LocaleText.GetLocalizedText("Vendor.Label.VendorType.Wholesaler"));
cbVendorType.SelectedItem = vli;
LoadSettings(false);
//Util.d("ContactExportOptions_Load BOTTOM");
}
private void btnCancel_Click(object sender, EventArgs e)
{
Close();
}
private void btnOK_Click(object sender, EventArgs e)
{
SaveSettings();
Util.MapFields();
DialogResult = DialogResult.OK;
Close();
}
private void radClient_CheckedChanged(object sender, EventArgs e)
{
AdjustDisplay();
}
private void radHeadOffice_CheckedChanged(object sender, EventArgs e)
{
AdjustDisplay();
}
private void radVendor_CheckedChanged(object sender, EventArgs e)
{
AdjustDisplay();
}
private void AdjustDisplay()
{
if (bIgnoreRadChecks) return;
// Util.d("AdjustDisplay top");
SaveSettings();
bool bVend = radVendor.Checked;
cbVendorType.Enabled = bVend;
cbContractID.Enabled = !bVend;
cbDispatchZone.Enabled = !bVend;
cbRegion.Enabled = !bVend;
LoadSettings(true);
//Util.d("AdjustDisplay bottom");
}
bool bIgnoreRadChecks = false;
private void LoadSettings(bool bPhoneOnly)
{
//Util.d("LoadSettings top phone only="+bPhoneOnly.ToString());
bIgnoreRadChecks = true;
if (!bPhoneOnly)
{
Util.ComboSelectGuid(cbRegion, AyaNovaOL.Properties.Settings.Default.Region);
Util.ComboSelectGuid(cbDispatchZone, AyaNovaOL.Properties.Settings.Default.Zone);
Util.ComboSelectGuid(cbContractID, AyaNovaOL.Properties.Settings.Default.Contract);
switch ((RootObjectTypes)AyaNovaOL.Properties.Settings.Default.RootObjectType)
{
case RootObjectTypes.Client:
radClient.Checked = true;
break;
case RootObjectTypes.HeadOffice:
radHeadOffice.Checked = true;
break;
case RootObjectTypes.Vendor:
radVendor.Checked = true;
cbSelectVendorType(cbVendorType, AyaNovaOL.Properties.Settings.Default.VendorType);
break;
}
}
bIgnoreRadChecks = false;
//Util.d("LoadSettings bottom");
}
private void SaveSettings()
{
// Util.d("SaveSettings top");
if (radClient.Checked)
{
AyaNovaOL.Properties.Settings.Default.RootObjectType = (int)RootObjectTypes.Client;
}
if (radHeadOffice.Checked)
{
AyaNovaOL.Properties.Settings.Default.RootObjectType = (int)RootObjectTypes.HeadOffice;
}
if (radVendor.Checked)
{
AyaNovaOL.Properties.Settings.Default.RootObjectType = (int)RootObjectTypes.Vendor;
AyaNovaOL.Properties.Settings.Default.VendorType = (int)(VendorTypes)cbVendorType.SelectedItem.DataValue;
}
AyaNovaOL.Properties.Settings.Default.Zone = (Guid)cbDispatchZone.Value;
AyaNovaOL.Properties.Settings.Default.Region = (Guid)cbRegion.Value;
AyaNovaOL.Properties.Settings.Default.Contract = (Guid)cbContractID.Value;
AyaNovaOL.Properties.Settings.Default.Save();
//Util.d("SaveSettings bottom");
}
private void cbSelectPhone(GZTW.WinForm.Controls.GZUltraComboEditor cb, int phtype)
{
foreach (Infragistics.Win.ValueListItem vi in cb.Items)
{
if ((AYOLPhoneNumberType)vi.DataValue == (AYOLPhoneNumberType)phtype)
{
cb.SelectedItem = vi;
break;
}
}
}
private void cbSelectAddress(GZTW.WinForm.Controls.GZUltraComboEditor cb, int adrtype)
{
foreach (Infragistics.Win.ValueListItem vi in cb.Items)
{
if ((AYOLAddressType)vi.DataValue == (AYOLAddressType)adrtype)
{
cb.SelectedItem = vi;
break;
}
}
}
private void cbSelectVendorType(GZTW.WinForm.Controls.GZUltraComboEditor cb, int vendtype)
{
foreach (Infragistics.Win.ValueListItem vi in cb.Items)
{
if ((VendorTypes)vi.DataValue == (VendorTypes)vendtype)
{
cb.SelectedItem = vi;
break;
}
}
}
private void btnMap_Click(object sender, EventArgs e)
{
MapPhoneAddress d = new MapPhoneAddress();
d.ShowDialog();
d.Dispose();
}
//yadda yadda yadda end of class blah blah blah blah
}
}

View 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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@@ -0,0 +1,461 @@
using System;
using System.Collections.Generic;
using System.Text;
using GZTW.AyaNova.BLL;
using Outlook = Microsoft.Office.Interop.Outlook;
using Office = Microsoft.Office.Core;
using System.Windows.Forms;
using System.Collections;
namespace AyaNovaOL
{
public class ExportContactsToAyaNova
{
private RootObjectTypes olRootObjectType;
private Dictionary<string,Guid> mIDList;
public bool DoExport(bool bSelectedOnly, Outlook.Explorer exp)
{
Cursor.Current = Cursors.WaitCursor;
if (bSelectedOnly && exp.Selection.Count < 1) return true;
olRootObjectType = (RootObjectTypes)AyaNovaOL.Properties.Settings.Default.RootObjectType;
//Because fuzzy fetch can only work with client object types we need to build a list of other types first
if (olRootObjectType == RootObjectTypes.HeadOffice)
{
if (mIDList == null) mIDList = new Dictionary<string, Guid>();
mIDList.Clear();
GenericNVList l = GenericNVList.GetList("HEADOFFICE", "ID", "NAME", true, false, true);
foreach (DictionaryEntry d in l.BindableList)
mIDList.Add(d.Value.ToString().ToLower(),new Guid(d.Key.ToString()));
}
else if (olRootObjectType == RootObjectTypes.Vendor)
{
if (mIDList == null) mIDList = new Dictionary<string, Guid>();
mIDList.Clear();
VendorPickList cpl = VendorPickList.GetList((VendorTypes)AyaNovaOL.Properties.Settings.Default.VendorType);
foreach (VendorPickList.VendorPickListInfo i in cpl)
mIDList.Add(i.Name.ToLower(), i.ID);
}
if (bSelectedOnly)
{
for (int x = 0; x < exp.Selection.Count; x++)
{
ExportItem((Outlook.ContactItem)exp.Selection[x+1]);
}
}
else
{
for (int x = 0; x < exp.CurrentFolder.Items.Count; x++)
{
ExportItem((Outlook.ContactItem)exp.CurrentFolder.Items[x + 1]);
}
}
return true;
}
private string GetPhoneNumber(RootObjectTypes obType, int nAyaPhoneSlot, Outlook.ContactItem ci)
{
//////Util.d("Get phone number top. OBTYPE: " + obType.ToString() + ", slot: " + nAyaPhoneSlot.ToString());
#region GetPhoneNumber
AYOLPhoneNumberType ptype = AYOLPhoneNumberType.BusinessTelephoneNumber;
switch (obType)
{
case RootObjectTypes.Client:
switch (nAyaPhoneSlot)
{
case 1:
ptype = (AYOLPhoneNumberType)AyaNovaOL.Properties.Settings.Default.ClientPhone1;
break;
case 2:
ptype = (AYOLPhoneNumberType)AyaNovaOL.Properties.Settings.Default.ClientPhone2;
break;
case 3:
ptype = (AYOLPhoneNumberType)AyaNovaOL.Properties.Settings.Default.ClientPhone3;
break;
case 4:
ptype = (AYOLPhoneNumberType)AyaNovaOL.Properties.Settings.Default.ClientPhone4;
break;
case 5:
ptype = (AYOLPhoneNumberType)AyaNovaOL.Properties.Settings.Default.ClientPhone5;
break;
}
break;
case RootObjectTypes.HeadOffice:
switch (nAyaPhoneSlot)
{
case 1:
ptype = (AYOLPhoneNumberType)AyaNovaOL.Properties.Settings.Default.HeadOfficePhone1;
break;
case 2:
ptype = (AYOLPhoneNumberType)AyaNovaOL.Properties.Settings.Default.HeadOfficePhone2;
break;
case 3:
ptype = (AYOLPhoneNumberType)AyaNovaOL.Properties.Settings.Default.HeadOfficePhone3;
break;
case 4:
ptype = (AYOLPhoneNumberType)AyaNovaOL.Properties.Settings.Default.HeadOfficePhone4;
break;
case 5:
ptype = (AYOLPhoneNumberType)AyaNovaOL.Properties.Settings.Default.HeadOfficePhone5;
break;
}
break;
case RootObjectTypes.Vendor:
switch (nAyaPhoneSlot)
{
case 1:
ptype = (AYOLPhoneNumberType)AyaNovaOL.Properties.Settings.Default.VendorPhone1;
break;
case 2:
ptype = (AYOLPhoneNumberType)AyaNovaOL.Properties.Settings.Default.VendorPhone2;
break;
case 3:
ptype = (AYOLPhoneNumberType)AyaNovaOL.Properties.Settings.Default.VendorPhone3;
break;
case 4:
ptype = (AYOLPhoneNumberType)AyaNovaOL.Properties.Settings.Default.VendorPhone4;
break;
case 5:
ptype = (AYOLPhoneNumberType)AyaNovaOL.Properties.Settings.Default.VendorPhone5;
break;
}
break;
}
//////Util.d("Get phone number - Got type: " + ptype.ToString());
switch (ptype)
{
case AYOLPhoneNumberType.Unused:
return "";
case AYOLPhoneNumberType.AssistantTelephoneNumber:
return ss(ci.AssistantTelephoneNumber);
case AYOLPhoneNumberType.Business2TelephoneNumber:
return ss(ci.Business2TelephoneNumber);
case AYOLPhoneNumberType.BusinessFaxNumber:
return ss(ci.BusinessFaxNumber);
case AYOLPhoneNumberType.BusinessTelephoneNumber:
return ss(ci.BusinessTelephoneNumber);
case AYOLPhoneNumberType.CallbackTelephoneNumber:
return ss(ci.CallbackTelephoneNumber);
case AYOLPhoneNumberType.CarTelephoneNumber:
return ss(ci.CarTelephoneNumber);
case AYOLPhoneNumberType.CompanyMainTelephoneNumber:
return ss(ci.CompanyMainTelephoneNumber);
case AYOLPhoneNumberType.Home2TelephoneNumber:
return ss(ci.Home2TelephoneNumber);
case AYOLPhoneNumberType.HomeFaxNumber:
return ss(ci.HomeFaxNumber);
case AYOLPhoneNumberType.HomeTelephoneNumber:
return ss(ci.HomeTelephoneNumber);
case AYOLPhoneNumberType.ISDNNumber:
return ss(ci.ISDNNumber);
case AYOLPhoneNumberType.MobileTelephoneNumber:
return ss(ci.MobileTelephoneNumber);
case AYOLPhoneNumberType.OtherFaxNumber:
return ss(ci.OtherFaxNumber);
case AYOLPhoneNumberType.OtherTelephoneNumber:
return ss(ci.OtherTelephoneNumber);
case AYOLPhoneNumberType.PagerNumber:
return ss(ci.PagerNumber);
case AYOLPhoneNumberType.PrimaryTelephoneNumber:
return ss(ci.PrimaryTelephoneNumber);
case AYOLPhoneNumberType.RadioTelephoneNumber:
return ss(ci.RadioTelephoneNumber);
case AYOLPhoneNumberType.TelexNumber:
return ss(ci.TelexNumber);
case AYOLPhoneNumberType.TTYTDDTelephoneNumber:
return ss(ci.TTYTDDTelephoneNumber);
}
return "";
#endregion getphone number
}
/// <summary>
/// Get the lowest numbered (most primary) email address
/// that actually contains information
/// </summary>
/// <param name="ci"></param>
/// <returns></returns>
private string GetEmailAddress(Outlook.ContactItem ci)
{
string sEmail = "";
if(!string.IsNullOrEmpty(ss(ci.Email3Address))) sEmail = ss(ci.Email3Address);
if (!string.IsNullOrEmpty(ss(ci.Email2Address))) sEmail = ss(ci.Email2Address);
if (!string.IsNullOrEmpty(ss(ci.Email1Address))) sEmail = ss(ci.Email1Address);
return sEmail;
}
private void SetAddress(AddressTypes adrType, GZTW.AyaNova.BLL.Address adr, Outlook.ContactItem ci)
{
//Util.d("Set Address top. adrType: " + adrType.ToString() + ", Address: " + adr.ToString());
#region is postal and use ThisIsTheMailingAddress
if (adrType == AddressTypes.Postal && !AyaNovaOL.Properties.Settings.Default.IgnoreThisIsTheMailingAddress)
{
//User has chosen to use the mailing address
//see if it's empty and use it if it's not
if (!string.IsNullOrEmpty(ss(ci.MailingAddress)))
{
//Util.d("Set address. Using ThisIsTheMailingAddress");
adr.DeliveryAddress = ss(ci.MailingAddressStreet);
if (!string.IsNullOrEmpty(ss(ci.MailingAddressPostOfficeBox)))
adr.DeliveryAddress += "\r\n" + ss(ci.MailingAddressPostOfficeBox);
adr.City = ss(ci.MailingAddressCity);
adr.StateProv = ss(ci.MailingAddressState);
adr.Country = ss(ci.MailingAddressCountry);
adr.Postal = ss(ci.MailingAddressPostalCode);
return;
}
}
#endregion
#region Forced address setting
AYOLAddressType OLAddressTypeToUse = AYOLAddressType.Unused;
if (adrType == AddressTypes.Physical)
OLAddressTypeToUse = (AYOLAddressType)AyaNovaOL.Properties.Settings.Default.PhysicalAddressEquals;
else
OLAddressTypeToUse = (AYOLAddressType)AyaNovaOL.Properties.Settings.Default.PostalAddressEquals;
switch (OLAddressTypeToUse)
{
case AYOLAddressType.Business:
{
//Util.d("Set address. Using biz");
//see if it's empty and use it if it's not
if (!string.IsNullOrEmpty(ss(ci.BusinessAddress)))
{
adr.DeliveryAddress = ss(ci.BusinessAddressStreet);
if (!string.IsNullOrEmpty(ss(ci.BusinessAddressPostOfficeBox)))
adr.DeliveryAddress += "\r\n" + ss(ci.BusinessAddressPostOfficeBox);
adr.City = ss(ci.BusinessAddressCity);
adr.StateProv = ss(ci.BusinessAddressState);
adr.Country = ss(ci.BusinessAddressCountry);
adr.Postal = ss(ci.BusinessAddressPostalCode);
}
return;
}
case AYOLAddressType.Home:
{
//Util.d("Set address. Using Home");
try
{
//see if it's empty and use it if it's not
if (!string.IsNullOrEmpty(ss(ci.HomeAddress)))
{
adr.DeliveryAddress = ss(ci.HomeAddressStreet);
if (!string.IsNullOrEmpty(ss(ci.HomeAddressPostOfficeBox)))
adr.DeliveryAddress += "\r\n" + ss(ci.HomeAddressPostOfficeBox);
adr.City = ss(ci.HomeAddressCity);
adr.StateProv = ss(ci.HomeAddressState);
adr.Country = ss(ci.HomeAddressCountry);
adr.Postal = ss(ci.HomeAddressPostalCode);
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message + "\r\nStack trace:\r\n" + ex.StackTrace);
throw (ex);
}
return;
}
case AYOLAddressType.Other:
{
//Util.d("Set address. Using Other");
//see if it's empty and use it if it's not
if (!string.IsNullOrEmpty(ss(ci.OtherAddress)))
{
adr.DeliveryAddress = ss(ci.OtherAddressStreet);
if (!string.IsNullOrEmpty(ss(ci.OtherAddressPostOfficeBox)))
adr.DeliveryAddress += "\r\n" + ss(ci.OtherAddressPostOfficeBox);
adr.City = ss(ci.OtherAddressCity);
adr.StateProv = ss(ci.OtherAddressState);
adr.Country = ss(ci.OtherAddressCountry);
adr.Postal = ss(ci.OtherAddressPostalCode);
}
return;
}
}//switch
#endregion
//Util.d("Set address done");
}
private bool ExportItem(Outlook.ContactItem ci)
{
string sName = ci.CompanyName;
if (string.IsNullOrEmpty(sName))
sName = ci.FullName;
if (string.IsNullOrEmpty(sName)) return false;
switch (olRootObjectType)
{
case RootObjectTypes.Client:
{
////Util.d("Top of export client");
Client c = FuzzyFetch.GetMeThe<Client>(sName);
c.RegionID = AyaNovaOL.Properties.Settings.Default.Region;
c.DispatchZoneID = AyaNovaOL.Properties.Settings.Default.Zone;
c.ContractID = AyaNovaOL.Properties.Settings.Default.Contract;
if (c.IsNew)
{
c.ContractExpires = DateTime.Now.AddYears(1);
c.ContactNotes = "Imported from Outlook: " + System.DateTime.Now.ToString();
}
////Util.d("export client - email");
c.Email = GetEmailAddress(ci);
c.Notes = ss(ci.Body);
////Util.d("export client - phone numbers");
c.Phone1 = GetPhoneNumber(RootObjectTypes.Client, 1,ci);
c.Phone2 = GetPhoneNumber(RootObjectTypes.Client, 2, ci);
c.Phone3 = GetPhoneNumber(RootObjectTypes.Client, 3, ci);
c.Phone4 = GetPhoneNumber(RootObjectTypes.Client, 4, ci);
////Util.d("Get slot 5 number...");
c.Phone5 = GetPhoneNumber(RootObjectTypes.Client, 5, ci);
////Util.d("export client - Address physical");
SetAddress(AddressTypes.Physical, c.GoToAddress, ci);
////Util.d("export client - Address mail to");
SetAddress(AddressTypes.Postal, c.MailToAddress, ci);
c.Contact = ss(ci.FullName);
c.WebAddress = ss(ci.WebPage);
if (c.IsSavable)
c.Save();
////Util.d("export client - saved/done");
}
break;
case RootObjectTypes.HeadOffice:
{
HeadOffice c = null;
if (mIDList.ContainsKey(sName.ToLower()))
{
c=HeadOffice.GetItem(mIDList[sName.ToLower()]);
}
else
{
c=HeadOffice.NewItem();
c.Name=sName;
}
//FuzzyFetch.GetMeThe<HeadOffice>(sName);
c.RegionID = AyaNovaOL.Properties.Settings.Default.Region;
c.ContractID = AyaNovaOL.Properties.Settings.Default.Contract;
if (c.IsNew)
{
c.ContractExpires = DateTime.Now.AddYears(1);
c.ContactNotes = "Imported from Outlook: " + System.DateTime.Now.ToString();
}
c.Email = GetEmailAddress(ci);
c.Notes = ss(ci.Body);
c.Phone1 = GetPhoneNumber(RootObjectTypes.Client, 1, ci);
c.Phone2 = GetPhoneNumber(RootObjectTypes.Client, 2, ci);
c.Phone3 = GetPhoneNumber(RootObjectTypes.Client, 3, ci);
c.Phone4 = GetPhoneNumber(RootObjectTypes.Client, 4, ci);
////Util.d("Getting phone slot 5...");
c.Phone5 = GetPhoneNumber(RootObjectTypes.Client, 5, ci);
////Util.d("Got slot 5, getting physical address");
SetAddress(AddressTypes.Physical, c.GoToAddress, ci);
SetAddress(AddressTypes.Postal, c.MailToAddress, ci);
c.Contact = ss(ci.FullName);
c.WebAddress = ss(ci.WebPage);
if (c.IsSavable)
c.Save();
}
break;
case RootObjectTypes.Vendor:
{
//Vendor c = FuzzyFetch.GetMeThe<Vendor>(sName);
Vendor c = null;
if (mIDList.ContainsKey(sName.ToLower()))
{
c = Vendor.GetItem(mIDList[sName.ToLower()]);
}
else
{
c = Vendor.NewItem();
c.Name = sName;
}
c.VendorType = (VendorTypes)AyaNovaOL.Properties.Settings.Default.VendorType;
if (c.IsNew)
{
c.ContactNotes = "Imported from Outlook: " + System.DateTime.Now.ToString();
}
c.Email = GetEmailAddress(ci);
c.Notes = ss(ci.Body);
c.Phone1 = GetPhoneNumber(RootObjectTypes.Client, 1, ci);
c.Phone2 = GetPhoneNumber(RootObjectTypes.Client, 2, ci);
c.Phone3 = GetPhoneNumber(RootObjectTypes.Client, 3, ci);
c.Phone4 = GetPhoneNumber(RootObjectTypes.Client, 4, ci);
c.Phone5 = GetPhoneNumber(RootObjectTypes.Client, 5, ci);
SetAddress(AddressTypes.Physical, c.GoToAddress, ci);
SetAddress(AddressTypes.Postal, c.MailToAddress, ci);
c.Contact = ss(ci.FullName);
c.WebAddress = ss(ci.WebPage);
if (c.IsSavable)
c.Save();
}
break;
}
return true;
}
//Note: though it's not documented anywhere it appears that outlook
//or the interop layer at least throws a null reference exception
//if you try to return an empty phone number or one that isn't selected as one of the visible
//ones in the outlook UI
//tried to find out why but could get no results however the below method works
//why setting a variable from the phone number works while returning it throws an exception is a mystery
private string ss(object ContactItemField)
{
if (ContactItemField == null) return "";
return ContactItemField.ToString();
}
}//end of class
//end of namespace
}

View File

@@ -0,0 +1,85 @@
using System;
using System.Collections.Generic;
using System.Text;
using GZTW.AyaNova.BLL;
using CSLA;
namespace AyaNovaOL
{
class FuzzyFetch
{
/// <summary>
/// Tries to find a matching object of type T in AyaNova DB,
/// if none found creates a new one of that name
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="sName"></param>
/// <returns></returns>
public static T GetMeThe<T>(string sName)
{
T bizobject = default(T);
RootObjectTypes objectType = RootObjectTypes.Nothing;
if (typeof(T) == typeof(GZTW.AyaNova.BLL.Client)) objectType = RootObjectTypes.Client;
if (typeof(T) == typeof(GZTW.AyaNova.BLL.HeadOffice)) objectType = RootObjectTypes.HeadOffice;
if (typeof(T) == typeof(GZTW.AyaNova.BLL.Vendor)) objectType = RootObjectTypes.Vendor;
SearchResultList sr = SearchResultList.GetPickListForObjectType(sName, objectType);
foreach (Guid id in sr.ListPickListID)
{
switch (objectType)
{
case RootObjectTypes.Client:
{
Client c = Client.GetItem(id);
if (c.Name.Equals(sName, StringComparison.CurrentCultureIgnoreCase))
return (T)(object)c;
}
break;
case RootObjectTypes.HeadOffice:
{
HeadOffice c = HeadOffice.GetItem(id);
if (c.Name.Equals(sName, StringComparison.CurrentCultureIgnoreCase))
return (T)(object)c;
}
break;
case RootObjectTypes.Vendor:
{
Vendor c = Vendor.GetItem(id);
if (c.Name.Equals(sName, StringComparison.CurrentCultureIgnoreCase))
return (T)(object)c;
}
break;
}
}
//no matches so return a new one
switch (objectType)
{
case RootObjectTypes.Client:
{
Client c = Client.NewItem();
c.Name = sName;
return (T)(object)c;
}
case RootObjectTypes.HeadOffice:
{
HeadOffice c = HeadOffice.NewItem();
c.Name = sName;
return (T)(object)c;
}
case RootObjectTypes.Vendor:
{
Vendor c = Vendor.NewItem();
c.Name = sName;
return (T)(object)c;
}
}
return bizobject;
}
}
}

View File

@@ -0,0 +1,377 @@
using System;
using System.Collections.Generic;
using System.Text;
using GZTW.AyaNova.BLL;
using Outlook = Microsoft.Office.Interop.Outlook;
using Office = Microsoft.Office.Core;
using System.Windows.Forms;
using System.Collections;
namespace AyaNovaOL
{
class ImportContactsFromAyaNova
{
Outlook.MAPIFolder mFldr;
RootObjectTypes mObjectType;
List<Guid> mIDList;
VendorTypes mVendorType;
public bool DoImport(bool bSelectedOnly, Outlook.MAPIFolder fldr, RootObjectTypes objectType, VendorTypes selectedVendorType, List<Guid> IDList)
{
Cursor.Current = Cursors.WaitCursor;
mFldr = fldr;
mObjectType = objectType;
mIDList = IDList;
mVendorType = selectedVendorType;
//build a list if it's all items
if (!bSelectedOnly)
BuildIDListForAll();
// Util.d("Importing / syncing " + mIDList.Count.ToString() + " contacts...");
foreach (Guid id in mIDList)
try
{
ImportContactItem(id);
}
catch (Exception ex)
{
MessageBox.Show("Error importing contact item from AyaNova: \r\n" + ex.Message + "\r\n" + ex.StackTrace);
}
return true;
}
private Outlook.ContactItem GetContactItem(string sName)
{
Outlook.ContactItem ci = null;
//search for it first
ci = (Outlook.ContactItem)mFldr.Items.Find(String.Format("[CompanyName]='{0}'", sName.Replace("'","''")));
if (ci == null)
{
// MessageBox.Show("Not found creating new contact item: " + sName);
ci = (Outlook.ContactItem)mFldr.Items.Add(Outlook.OlItemType.olContactItem);
}
//else
// MessageBox.Show("Found matching contact item " + sName);
return ci;
}
private void ImportContactItem(Guid id)
{
try
{
switch (mObjectType)
{
case RootObjectTypes.Client:
{
Client c = Client.GetItemNoMRU(id);
Outlook.ContactItem ci = GetContactItem(c.Name);
ci.CompanyName = c.Name;
ci.Email1Address = c.Email;
ci.Body = c.Notes;
ci.FullName = c.Contact;
ci.WebPage = c.WebAddress;
ImportAddress(c.MailToAddress, AddressTypes.Postal, ci);
ImportAddress(c.GoToAddress, AddressTypes.Physical, ci);
ImportPhoneNumber(c.Phone1, 1, ci);
ImportPhoneNumber(c.Phone2, 2, ci);
ImportPhoneNumber(c.Phone3, 3, ci);
ImportPhoneNumber(c.Phone4, 4, ci);
ImportPhoneNumber(c.Phone5, 5, ci);
ci.Save();
}
break;
case RootObjectTypes.HeadOffice:
{
HeadOffice c = HeadOffice.GetItemNoMRU(id);
Outlook.ContactItem ci = GetContactItem(c.Name);
ci.CompanyName = c.Name;
ci.Email1Address = c.Email;
ci.Body = c.Notes;
ci.FullName = c.Contact;
ci.WebPage = c.WebAddress;
ImportAddress(c.MailToAddress, AddressTypes.Postal, ci);
ImportAddress(c.GoToAddress, AddressTypes.Physical, ci);
ImportPhoneNumber(c.Phone1, 1, ci);
ImportPhoneNumber(c.Phone2, 2, ci);
ImportPhoneNumber(c.Phone3, 3, ci);
ImportPhoneNumber(c.Phone4, 4, ci);
ImportPhoneNumber(c.Phone5, 5, ci);
ci.Save();
}
break;
case RootObjectTypes.Vendor:
{
Vendor c = Vendor.GetItemNoMRU(id);
Outlook.ContactItem ci = GetContactItem(c.Name);
ci.CompanyName = c.Name;
ci.Email1Address = c.Email;
ci.Body = c.Notes;
ci.FullName = c.Contact;
ci.WebPage = c.WebAddress;
ImportAddress(c.MailToAddress, AddressTypes.Postal, ci);
ImportAddress(c.GoToAddress, AddressTypes.Physical, ci);
ImportPhoneNumber(c.Phone1, 1, ci);
ImportPhoneNumber(c.Phone2, 2, ci);
ImportPhoneNumber(c.Phone3, 3, ci);
ImportPhoneNumber(c.Phone4, 4, ci);
ImportPhoneNumber(c.Phone5, 5, ci);
ci.Save();
}
break;
}
}
catch { };
}
private void ImportAddress(GZTW.AyaNova.BLL.Address adr, AddressTypes adrType, Outlook.ContactItem ci)
{
#region Address setting
AYOLAddressType OLAddressTypeToUse = AYOLAddressType.Unused;
if (adrType == AddressTypes.Physical)
OLAddressTypeToUse = (AYOLAddressType)AyaNovaOL.Properties.Settings.Default.PhysicalAddressEquals;
else
OLAddressTypeToUse = (AYOLAddressType)AyaNovaOL.Properties.Settings.Default.PostalAddressEquals;
switch (OLAddressTypeToUse)
{
case AYOLAddressType.Business:
{
ci.BusinessAddressStreet = adr.DeliveryAddress;
ci.BusinessAddressCity = adr.City;
ci.BusinessAddressState = adr.StateProv;
ci.BusinessAddressCountry = adr.Country;
ci.BusinessAddressPostalCode = adr.Postal;
if (adrType == AddressTypes.Postal)
{
ci.BusinessAddressPostOfficeBox = adr.DeliveryAddress;
ci.SelectedMailingAddress = Microsoft.Office.Interop.Outlook.OlMailingAddress.olBusiness;
}
return;
}
case AYOLAddressType.Home:
{
ci.HomeAddressStreet = adr.DeliveryAddress;
ci.HomeAddressCity = adr.City;
ci.HomeAddressState = adr.StateProv;
ci.HomeAddressCountry = adr.Country;
ci.HomeAddressPostalCode = adr.Postal;
if (adrType == AddressTypes.Postal)
{
ci.HomeAddressPostOfficeBox = adr.DeliveryAddress;
ci.SelectedMailingAddress = Microsoft.Office.Interop.Outlook.OlMailingAddress.olHome;
}
return;
}
case AYOLAddressType.Other:
{
ci.OtherAddressStreet = adr.DeliveryAddress;
ci.OtherAddressCity = adr.City;
ci.OtherAddressState = adr.StateProv;
ci.OtherAddressCountry = adr.Country;
ci.OtherAddressPostalCode = adr.Postal;
if (adrType == AddressTypes.Postal)
{
ci.OtherAddressPostOfficeBox = adr.DeliveryAddress;
ci.SelectedMailingAddress = Microsoft.Office.Interop.Outlook.OlMailingAddress.olOther;
}
return;
}
}//switch
#endregion
}
private void ImportPhoneNumber(string sPhone, int nSlot, Outlook.ContactItem ci)
{
#region Determine where to put it
AYOLPhoneNumberType ptype = AYOLPhoneNumberType.BusinessTelephoneNumber;
switch (mObjectType)
{
case RootObjectTypes.Client:
switch (nSlot)
{
case 1:
ptype = (AYOLPhoneNumberType)AyaNovaOL.Properties.Settings.Default.ClientPhone1;
break;
case 2:
ptype = (AYOLPhoneNumberType)AyaNovaOL.Properties.Settings.Default.ClientPhone2;
break;
case 3:
ptype = (AYOLPhoneNumberType)AyaNovaOL.Properties.Settings.Default.ClientPhone3;
break;
case 4:
ptype = (AYOLPhoneNumberType)AyaNovaOL.Properties.Settings.Default.ClientPhone4;
break;
case 5:
ptype = (AYOLPhoneNumberType)AyaNovaOL.Properties.Settings.Default.ClientPhone5;
break;
}
break;
case RootObjectTypes.HeadOffice:
switch (nSlot)
{
case 1:
ptype = (AYOLPhoneNumberType)AyaNovaOL.Properties.Settings.Default.HeadOfficePhone1;
break;
case 2:
ptype = (AYOLPhoneNumberType)AyaNovaOL.Properties.Settings.Default.HeadOfficePhone2;
break;
case 3:
ptype = (AYOLPhoneNumberType)AyaNovaOL.Properties.Settings.Default.HeadOfficePhone3;
break;
case 4:
ptype = (AYOLPhoneNumberType)AyaNovaOL.Properties.Settings.Default.HeadOfficePhone4;
break;
case 5:
ptype = (AYOLPhoneNumberType)AyaNovaOL.Properties.Settings.Default.HeadOfficePhone5;
break;
}
break;
case RootObjectTypes.Vendor:
switch (nSlot)
{
case 1:
ptype = (AYOLPhoneNumberType)AyaNovaOL.Properties.Settings.Default.VendorPhone1;
break;
case 2:
ptype = (AYOLPhoneNumberType)AyaNovaOL.Properties.Settings.Default.VendorPhone2;
break;
case 3:
ptype = (AYOLPhoneNumberType)AyaNovaOL.Properties.Settings.Default.VendorPhone3;
break;
case 4:
ptype = (AYOLPhoneNumberType)AyaNovaOL.Properties.Settings.Default.VendorPhone4;
break;
case 5:
ptype = (AYOLPhoneNumberType)AyaNovaOL.Properties.Settings.Default.VendorPhone5;
break;
}
break;
}
#endregion determine where to put it
#region Import
switch (ptype)
{
case AYOLPhoneNumberType.Unused:
return;
case AYOLPhoneNumberType.AssistantTelephoneNumber:
ci.AssistantTelephoneNumber=sPhone;break;
case AYOLPhoneNumberType.Business2TelephoneNumber:
ci.Business2TelephoneNumber=sPhone;break;
case AYOLPhoneNumberType.BusinessFaxNumber:
ci.BusinessFaxNumber=sPhone;break;
case AYOLPhoneNumberType.BusinessTelephoneNumber:
ci.BusinessTelephoneNumber=sPhone;break;
case AYOLPhoneNumberType.CallbackTelephoneNumber:
ci.CallbackTelephoneNumber=sPhone;break;
case AYOLPhoneNumberType.CarTelephoneNumber:
ci.CarTelephoneNumber=sPhone;break;
case AYOLPhoneNumberType.CompanyMainTelephoneNumber:
ci.CompanyMainTelephoneNumber=sPhone;break;
case AYOLPhoneNumberType.Home2TelephoneNumber:
ci.Home2TelephoneNumber=sPhone;break;
case AYOLPhoneNumberType.HomeFaxNumber:
ci.HomeFaxNumber=sPhone;break;
case AYOLPhoneNumberType.HomeTelephoneNumber:
ci.HomeTelephoneNumber=sPhone;break;
case AYOLPhoneNumberType.ISDNNumber:
ci.ISDNNumber=sPhone;break;
case AYOLPhoneNumberType.MobileTelephoneNumber:
ci.MobileTelephoneNumber=sPhone;break;
case AYOLPhoneNumberType.OtherFaxNumber:
ci.OtherFaxNumber=sPhone;break;
case AYOLPhoneNumberType.OtherTelephoneNumber:
ci.OtherTelephoneNumber=sPhone;break;
case AYOLPhoneNumberType.PagerNumber:
ci.PagerNumber=sPhone;break;
case AYOLPhoneNumberType.PrimaryTelephoneNumber:
ci.PrimaryTelephoneNumber=sPhone;break;
case AYOLPhoneNumberType.RadioTelephoneNumber:
ci.RadioTelephoneNumber=sPhone;break;
case AYOLPhoneNumberType.TelexNumber:
ci.TelexNumber=sPhone;break;
case AYOLPhoneNumberType.TTYTDDTelephoneNumber:
ci.TTYTDDTelephoneNumber=sPhone;break;
}
#endregion getphone number
}
/// <summary>
/// Build id list for object type selected
/// </summary>
private void BuildIDListForAll()
{
if(mIDList==null) mIDList=new List<Guid>();
mIDList.Clear();
switch (mObjectType)
{
case RootObjectTypes.Client:
{
ClientPickList cpl = ClientPickList.GetList(true);
foreach (ClientPickList.ClientPickListInfo i in cpl)
mIDList.Add(i.ID);
}
break;
case RootObjectTypes.HeadOffice:
{
GenericNVList l = GenericNVList.GetList("HEADOFFICE", "ID", "NAME", true, false, true);
foreach (DictionaryEntry d in l.BindableList)
mIDList.Add(new Guid(d.Key.ToString()));
}
break;
case RootObjectTypes.Vendor:
{
VendorPickList cpl = VendorPickList.GetList(mVendorType);
foreach (VendorPickList.VendorPickListInfo i in cpl)
mIDList.Add(i.ID);
}
break;
}
}
}//end class
}//end ns

View File

@@ -0,0 +1,729 @@
using System;
using System.Collections.Generic;
using System.Text;
using GZTW.AyaNova.BLL;
using Outlook = Microsoft.Office.Interop.Outlook;
using Office = Microsoft.Office.Core;
using System.Reflection;
using System.ComponentModel;
using System.Security.Cryptography;
using System.Runtime.InteropServices;
using System.Windows.Forms;
namespace AyaNovaOL
{
class ImportSchedule
{
#region Globals
private Outlook.Application moutApp = null;
//Holds the current logged in user's localized text
//lookup object
private LocalizedTextTable mLocaleText = null;
public ImportSchedule(Outlook.Application outapp, LocalizedTextTable localeText)
{
moutApp = outapp;
mLocaleText = localeText;
}
public LocalizedTextTable LocaleText
{
get
{
return mLocaleText;
}
}
#endregion globals
#region Outlook api globals and util methods
#region Outlook application object
public Outlook.Application outApp
{
get
{
return moutApp;
}
}
#endregion outlook app object
#region AyaNova calendar folder
Outlook.MAPIFolder mAyaCalendar = null;
/// <summary>
/// Get the AyaNova calendar
/// create it if required
/// </summary>
public Outlook.MAPIFolder AyaCalendar
{
get
{
if (mAyaCalendar == null)
{
if (bdiag) d("Check for existing AyaNovaSchedule calendar...");
//see if there is one already, if not create it
mAyaCalendar = GetFolder(Outlook.OlDefaultFolders.olFolderCalendar, "AyaNovaSchedule");
if (mAyaCalendar == null)
{
if (bdiag) d("Calendar AyaNovaSchedule not found in Outlook. Creating it...");
//get required objects to do the op
Outlook.NameSpace ns = outApp.GetNamespace("MAPI");
Outlook.MAPIFolder fldDefault = ns.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderCalendar);
Outlook.Folders fldDefaultFolders = fldDefault.Folders;
//create it
mAyaCalendar = fldDefaultFolders.Add("AyaNovaSchedule", Outlook.OlDefaultFolders.olFolderCalendar);
mAyaCalendar.Description = "AyaNova OLI exported items";
//release required objects
Marshal.ReleaseComObject(fldDefaultFolders);
fldDefaultFolders = null;
Marshal.ReleaseComObject(fldDefault);
fldDefault = null;
Marshal.ReleaseComObject(ns);
ns = null;
}
}
return mAyaCalendar;
}
}
#endregion ayanova calendar folder
#region Remove AyaNova generated appointment from Outlook
public void RemoveOutlookAppointment(TypeAndID tid)
{
// d("Remove outlook appointment top...");
Outlook.AppointmentItem oaiToDelete = null;
Outlook.Items ayCalItems = AyaCalendar.Items;
bool bFoundIt = false;
for (int x = 0; x < ayCalItems.Count; x++)
{
//d("fetching outlook appointment for comparison...");
Outlook.AppointmentItem oai = (Outlook.AppointmentItem)ayCalItems[x + 1];
//d("examining outlook appointment user properties...");
Outlook.UserProperties props = null;
if (oai.UserProperties != null)
props = oai.UserProperties;
if (props != null && props.Count > 0)
{
Outlook.UserProperty prop = props["AyaNovaTypeAndID"];
if (prop != null)
{
//d("prop.value to string:" + prop.Value.ToString());
//d("Tid to string:" + tid.ToString());//bugbug tid is null here
if (prop.Value.ToString() == tid.ToString())
{
//d("Have a match!");
oaiToDelete = oai;
bFoundIt = true;
}
Marshal.ReleaseComObject(prop); prop = null;
}
Marshal.ReleaseComObject(props); props = null;
}
//d("Found? - " + bFoundIt.ToString());
if (bFoundIt)
break;
else
Marshal.ReleaseComObject(oai); oai = null;
}
Marshal.ReleaseComObject(ayCalItems); ayCalItems = null;
//d("Finished in loop");
//Remove from Outlook
if (oaiToDelete != null)
{
//d("Deleteing outlook appointment " + oaiToDelete.Subject + " ...");
oaiToDelete.Delete();
if (oaiToDelete != null)
{
Marshal.ReleaseComObject(oaiToDelete); oaiToDelete = null;
}
}
else
throw new System.ApplicationException("Outlook schedule plugin: Error RemoveOutlookAppointment: appointment matching [" + tid.ToString() + "] not found in Outlook");
//d("Remove outlook appointment bottom.");
}
#endregion
#region Insert Shadow appointment into Outlook
public void InsertShadowAppointment(ShadowAppointment sa)
{
Outlook.Items ayCalItems = AyaCalendar.Items;
Outlook.AppointmentItem oa = (Outlook.AppointmentItem)ayCalItems.Add(Outlook.OlItemType.olAppointmentItem);
Outlook.UserProperties props = oa.UserProperties;
Outlook.UserProperty prop = props.Add("AyaNovaTypeAndID", Microsoft.Office.Interop.Outlook.OlUserPropertyType.olText, false, null);
prop.Value = sa.AyaNovaTypeAndID.ToString();
oa.Subject = sa.Subject;
oa.Location = sa.Location;
oa.Start = sa.Start;
oa.End = sa.End;
oa.Body = sa.BodyText;
if (sa.ShowTimeAsBusy)
oa.BusyStatus = Microsoft.Office.Interop.Outlook.OlBusyStatus.olBusy;
else
oa.BusyStatus = Microsoft.Office.Interop.Outlook.OlBusyStatus.olTentative;
oa.ReminderSet = false;
oa.Save();
Marshal.ReleaseComObject(prop); prop = null;
Marshal.ReleaseComObject(props); props = null;
Marshal.ReleaseComObject(oa); oa = null;
Marshal.ReleaseComObject(ayCalItems); ayCalItems = null;
}
#endregion insert shadow appt.
#region Localized text stuff
string mSchedUserLocalizedText = null;
string mSchedMarkerLocalizedText = null;
public string SchedMarkerLocalizedText
{
get
{
if (mSchedMarkerLocalizedText == null)
mSchedMarkerLocalizedText = LocaleText.GetLocalizedText("O.ScheduleMarker");
return mSchedMarkerLocalizedText;
}
}
public string SchedUserLocalizedText
{
get
{
if (mSchedUserLocalizedText == null)
mSchedUserLocalizedText = LocaleText.GetLocalizedText("O.WorkorderItemScheduledUser");
return mSchedUserLocalizedText;
}
}
#endregion LocalizedTextstuff
#region Client contact cache
Dictionary<Guid, string> clientInfoCache = null;
/// <summary>
/// Get client info
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
public string GetClientInfoDisplay(Guid id)
{
//check in cache first
if (clientInfoCache == null)
clientInfoCache = new Dictionary<Guid, string>();
if (!clientInfoCache.ContainsKey(id))
{
//retrieve the client record
Client c = Client.GetItemNoMRU(id);
StringBuilder b = new StringBuilder();
b.Append(c.Name);
b.Append("\r\n");
b.Append(c.GoToAddress.FullAddress);
b.Append("\r\n");
b.Append(c.GetPrimaryContactDefaultContactInfo());
//if (c.TechNotes != "")
//{
// b.Append(LocaleText.GetLocalizedText("Client.Label.TechNotes"));
// b.Append(":\r\n");
// b.Append(c.TechNotes);
//}
clientInfoCache.Add(id, b.ToString());
}
return clientInfoCache[id];
}
#endregion client contact cache
#region utils
#region ShadowAppointmentStuff
/// <summary>
///
/// </summary>
/// <param name="i"></param>
/// <returns></returns>
public ShadowAppointment GetShadowAppointment(AppointmentList.AppointmentListInfo i)
{
ShadowAppointment a = new ShadowAppointment();
if (i.SourceObjectType == RootObjectTypes.ScheduleMarker)
{
ScheduleMarker sm = ScheduleMarker.GetItem(i.SourceObjectID);
a.Subject = sm.Name;
a.Location = SchedMarkerLocalizedText;
a.Start = i.StartDateTime;
a.End = i.EndDateTime;
a.ShowTimeAsBusy = false;
string sFollowUpText = "";
if (sm.FollowID != Guid.Empty)
sFollowUpText = NameFetcher.GetItem(new TypeAndID(sm.FollowType, sm.FollowID)).RecordName + "\r\n";
a.BodyText = sFollowUpText + sm.Notes;
a.AyaNovaTypeAndID = new TypeAndID(RootObjectTypes.ScheduleMarker, i.SourceObjectID);
}
else//workorderitemscheduleuser
{
WorkorderServiceList.WorkorderServiceListInfo woinfo = WorkorderServiceList.GetListForSingleItem(i.WorkorderID)[0];
a.Subject = i.ServiceNumber.ToString() + " " + woinfo.LT_O_Client.Display;
a.Location = SchedUserLocalizedText;
a.Start = i.StartDateTime;
a.End = i.EndDateTime;
a.ShowTimeAsBusy = true;
a.BodyText = i.Subject + "\r\n------------------------------------\r\n" + GetClientInfoDisplay(woinfo.LT_O_Client.Value);
a.AyaNovaTypeAndID = new TypeAndID(i.SourceObjectType, i.SourceObjectID);
}
System.Text.StringBuilder sb = new StringBuilder();
sb.Append(a.Subject);
sb.Append(a.Location);
sb.Append(a.Start.ToString("yyyyMMddHHmm"));
sb.Append(a.End.ToString("yyyyMMddHHmm"));
sb.Append(a.BodyText);
a.CheckSum = GetHash(sb.ToString());
//if (i.SourceObjectType == RootObjectTypes.ScheduleMarker)
// d("Shadow appt. checksum:" + a.CheckSum + "\r\nData was:\r\n" + sb.ToString());
return a;
}
#endregion shadowappointmentstuff
#region Outlook folder stuff
/// <summary>
/// Iterates all folders of type specified and returns the one with the name specified
/// Caller MUST release folder returned
/// </summary>
/// <param name="sNameContains"></param>
/// <returns></returns>
public Outlook.MAPIFolder GetFolder(Outlook.OlDefaultFolders folderType, string sNameContains)
{
//d("Top of GetFolder...");
//get required objects to do the op
Outlook.NameSpace ns = outApp.GetNamespace("MAPI");
Outlook.MAPIFolder f = GetCalendar(ns.GetDefaultFolder(folderType), sNameContains);
// d("Got folder, releasing objects...");
if (ns != null)
{
Marshal.ReleaseComObject(ns);
ns = null;
}
return f;
}
/// <summary>
/// Recursive method to iterate folders and return one that contains the name specified
/// </summary>
/// <param name="mf"></param>
/// <param name="sNameContains"></param>
/// <returns></returns>
public Outlook.MAPIFolder GetCalendar(Outlook.MAPIFolder mf, string sNameContains)
{
//d("Top of GetCalendar " + mf.FolderPath + ", " + sNameContains);
if (mf.FolderPath.Contains(sNameContains))
{
//d("GetCalendar: Found it, returning.");
return mf;
}
Outlook.Folders fldrs = mf.Folders;
for (int x = 0; x < fldrs.Count; x++)
{
//d("GetCalendar: Checking calendar " + x.ToString() + " of " + mf.Folders.Count.ToString());
Outlook.MAPIFolder f = mf.Folders[x + 1];
if (GetCalendar(f, sNameContains) != null)
{
Marshal.ReleaseComObject(fldrs); fldrs = null;
return f;
}
else
{
Marshal.ReleaseComObject(f); f = null;
}
}
//d("GetCalendar: Not here, returning.");
Marshal.ReleaseComObject(fldrs); fldrs = null;
return null;
}
#endregion Outlook folder stuff
#region Checksum stuff
private aptOut GetOutlookAppointmentChecksum(Outlook.AppointmentItem oai)
{
//d("top of GetOutlookAppointmentChecksum(" + oai.Subject + ")");
aptOut a;
a.CheckSum = "";
a.AyaNovaTypeAndID = new TypeAndID(RootObjectTypes.Nothing, Guid.Empty);
if (oai == null) return a;
if (string.IsNullOrEmpty(oai.EntryID)) return a;
Outlook.UserProperties props = oai.UserProperties;
Outlook.UserProperty prop = props["AyaNovaTypeAndID"];
a.AyaNovaTypeAndID = TypeAndID.Parse(prop.Value.ToString());
Marshal.ReleaseComObject(prop); prop = null;
Marshal.ReleaseComObject(props); props = null;
System.Text.StringBuilder sb = new StringBuilder();
sb.Append(oai.Subject);
sb.Append(oai.Location);
sb.Append(oai.Start.ToString("yyyyMMddHHmm"));
sb.Append(oai.End.ToString("yyyyMMddHHmm"));
sb.Append(oai.Body);
a.CheckSum = GetHash(sb.ToString());
//if(a.CheckSum.StartsWith("92C"))
// d("Outlook appt. checksum:"+a.CheckSum+"\r\nData was:\r\n" + sb.ToString());
return a;
}
/// <summary>
/// Get a reliable hash value
/// </summary>
/// <param name="s"></param>
/// <returns></returns>
private string GetHash(string s)
{
//TODO: FIPS
SHA256 shaM = new SHA256Managed();
UTF8Encoding enc = new UTF8Encoding();
return BitConverter.ToString(shaM.ComputeHash(enc.GetBytes(s))).Replace("-", "");
}
#endregion checksum stuff
#endregion utils
#endregion outlook api globals and util methods
#region Diagnostic messages
/// <summary>
/// Diagnostics messages
/// </summary>
/// <param name="s"></param>
private void d(string s)
{
if (bdiag)
MessageBox.Show(s);
}
private bool bdiag = false;
#endregion diags
#region DoImport
/// <summary>
/// Do the import
/// </summary>
public void Import(bool DiagnosticMode)
{
bdiag = DiagnosticMode;
DateTime dtStarted = DateTime.Now.AddMinutes(-1);
if (bdiag) d("Starting export of items between " + dtStarted.ToString() + " and " + dtStarted.AddYears(1) + "...");
List<aptOut> lsaptOut = new List<aptOut>();
List<ShadowAppointment> lsShadowApt = new List<ShadowAppointment>();
AppointmentList apl = null;
try
{
#region Build checksum list of appointments in Outlook
if (bdiag) d("Inspecting existing AyaNovaSchedule items in Outlook ...");
Outlook.Items ayCalItems = AyaCalendar.Items;
// d("Raw AyaCalendar.Items.Count=" + ayCalItems.Count);
for (int x = 0; x < ayCalItems.Count; x++)
{
//d("Fetching existing item " + x.ToString()+" ...");
Outlook.AppointmentItem oai = (Outlook.AppointmentItem)ayCalItems[x + 1];
if (oai.Start > dtStarted || oai.End > dtStarted)//appointments that start after now or end after now
{
Outlook.UserProperties props = oai.UserProperties;
if (props != null && props.Count > 0)
{
Outlook.UserProperty prop = props["AyaNovaTypeAndID"];
if (prop != null)
{
lsaptOut.Add(GetOutlookAppointmentChecksum(oai));
Marshal.ReleaseComObject(prop); prop = null;
}
Marshal.ReleaseComObject(props); props = null;
}
}
Marshal.ReleaseComObject(oai); oai = null;
}
Marshal.ReleaseComObject(ayCalItems); ayCalItems = null;
if (bdiag) d(lsaptOut.Count.ToString() + " existing relevant AyaNovaSchedule Outlook calendar items found in Outlook.");
#endregion build checksum list
#region Build shadow appointment list
if (bdiag) d("Fetching any existing open AyaNova schedule items in the next year for current logged in user...");
apl = AppointmentList.GetList(dtStarted, dtStarted.AddYears(1), User.CurrentThreadUserID);
UserListScheduleable uls = UserListScheduleable.GetList();
foreach (AppointmentList.AppointmentListInfo i in apl)
{
switch (i.SourceObjectType)
{
case RootObjectTypes.WorkorderItemScheduledUser:
{
lsShadowApt.Add(GetShadowAppointment(i));
}
break;
case RootObjectTypes.ScheduleMarker:
{
#region schedmarkers
////Could be a bunch by region , global , dispatchzone, schedusergroup
////or could be a single by one user ID
switch (i.AppliesToObjectType)
{
case RootObjectTypes.User:
if (i.AppliesToObjectID == User.CurrentThreadUserID)
lsShadowApt.Add(GetShadowAppointment(i));
break;
case RootObjectTypes.Region:
{
//Loop through all active scheduleable users
//if the region ID matches the marker region ID then
//add a marker on the calendar for it
foreach (UserListScheduleable.UserListScheduleableInfo ui in uls)
{
if (ui.ID == User.CurrentThreadUserID)
{
//case 58
if (i.AppliesToObjectID == GZTW.AyaNova.BLL.Region.DefaultRegionID)//SM is for default region? Then applies to everyone
lsShadowApt.Add(GetShadowAppointment(i));
else if (ui.RegionID == GZTW.AyaNova.BLL.Region.DefaultRegionID)//User is in default region? Then applies to them
lsShadowApt.Add(GetShadowAppointment(i));
else if (ui.RegionID == i.AppliesToObjectID)//SM and User in same non default region
lsShadowApt.Add(GetShadowAppointment(i));
break;
}
}
}
break;
case RootObjectTypes.DispatchZone:
{
//Loop through all active scheduleable users
//if the Dispatch zone ID matches the marker zone ID then
//add a marker on the calendar for it
foreach (UserListScheduleable.UserListScheduleableInfo ui in uls)
if (ui.ID == User.CurrentThreadUserID)
{
if (ui.DispatchZoneID == i.AppliesToObjectID)
lsShadowApt.Add(GetShadowAppointment(i));
break;
}
}
break;
case RootObjectTypes.ScheduleableUserGroup:
{
ScheduleableUserGroupUsersList ScheduleMarkerGroup = ScheduleableUserGroupUsersList.GetList(i.AppliesToObjectID);
//Loop through all active scheduleable users
//if they are in the ScheduleableUserGroup then
//add a marker on the calendar for it
foreach (UserListScheduleable.UserListScheduleableInfo ui in uls)
if (ui.ID == User.CurrentThreadUserID)
{
if (ScheduleMarkerGroup.Contains(ui.ID))
lsShadowApt.Add(GetShadowAppointment(i));
break;
}
}
break;
case RootObjectTypes.Global:
{
lsShadowApt.Add(GetShadowAppointment(i));
}
break;
}
#endregion schedmarkers
}
break;
}
}
if (bdiag) d(lsShadowApt.Count.ToString() + " existing AyaNova schedule items found in AyaNova.");
#endregion build shadow appointment list
//Do Export:
#region step 1 remove stale outlook appointments
if (bdiag) d("Removing existing AyaNovaSchedule Outlook calendar items that are changed since last export ...");
//iterate outlook appointments list, for each AyaNova generated one
//that has no matching checksum in shadow, delete it from outlook then from outlist
int nlsaptOutCount = lsaptOut.Count;
int nTotalStaleCount = 0;
#region mismatch Diagnostics stuff
if (bdiag)
{
System.Text.StringBuilder sbdiag = new StringBuilder();
sbdiag.Append("Shadowlist:\r\n");
foreach (ShadowAppointment sa in lsShadowApt)
{
sbdiag.Append(sa.Subject);
sbdiag.Append(" ck:");
sbdiag.Append(sa.CheckSum);
sbdiag.Append("\r\n");
}
d(sbdiag.ToString());
sbdiag.Length = 0;
sbdiag.Append("Outlist:\r\n");
foreach (aptOut sa in lsaptOut)
{
sbdiag.Append(sa.AyaNovaTypeAndID.ToString());
sbdiag.Append(" ck:");
sbdiag.Append(sa.CheckSum);
sbdiag.Append("\r\n");
}
d(sbdiag.ToString());
}
#endregion mismatch diags
//iterate the outlook appointments list
for (int x = 0; x < nlsaptOutCount; x++)
{
//d("x=" + x.ToString() + ", nlsaptOutCount=" + nlsaptOutCount.ToString() + ", lsaptOut.Count=" + lsaptOut.Count.ToString() + ", lsShadowApt.count=" + lsShadowApt.Count.ToString());
bool bExists = false;
//if outlook appointment checksum not in shadow list delete it
aptOut ThisapOut = lsaptOut[x];
foreach (ShadowAppointment sa in lsShadowApt)
{
//System.Diagnostics.Debug.Assert(!string.IsNullOrEmpty(sa.CheckSum));
//d("Comparing outlook checksum:\r\n " + ThisapOut.CheckSum + "\r\nTo shadow checksum:\r\n" + sa.CheckSum);
if (sa.CheckSum == ThisapOut.CheckSum)
{
//d("Identical match: " + sa.CheckSum);
bExists = true;
break;
}
}
if (!bExists)
{
//d("Unmatched outlook checksum:\r\n " + ThisapOut.CheckSum );
//remove from outlook
RemoveOutlookAppointment(ThisapOut.AyaNovaTypeAndID);
//remove from the working list
lsaptOut.RemoveAt(x);
x--;
nlsaptOutCount--;
nTotalStaleCount++;
}
}
if (bdiag) d(nTotalStaleCount.ToString() + " stale items removed from Outlook.");
#endregion step 1
#region Step 2 Remove unchanged appointments from shadow appointment list
if (bdiag) d("Identifying AyaNova items that already exist identically in Outlook and do not need to be exported...");
//Iterate through shadow appointments, for each one that has matching checksum in outlook apts remove it from shadow list
int nShadowListCount = lsShadowApt.Count;
int nTotalUnchangedShadowItems = 0;
for (int x = 0; x < nShadowListCount; x++)
{
bool bExists = false;
ShadowAppointment sa = lsShadowApt[x];
foreach (aptOut ao in lsaptOut)
{
if (ao.CheckSum == sa.CheckSum)
{
bExists = true;
break;
}
}
if (bExists)
{
//remove from shadowlist
lsShadowApt.RemoveAt(x);
x--;
nShadowListCount--;
nTotalUnchangedShadowItems++;
}
}
if (bdiag) d(nTotalUnchangedShadowItems.ToString() + " items in AyaNova already exist unchanged in Outlook and won't be exported.");
#endregion Step 2
#region Step 3 Insert remaining shadow appointments in Outlook
if (bdiag)
{
if (lsShadowApt.Count > 0)
d("Exporting " + lsShadowApt.Count.ToString() + " new / updated AyaNova schedule items to Outlook...");
else
d("No items found to export to Outlook.");
}
foreach (ShadowAppointment sa in lsShadowApt)
{
InsertShadowAppointment(sa);
}
#endregion step 3
}
catch (Exception ex)
{
throw (ex);
}
finally
{
#region Step 4 release objects
if (bdiag) d("Releasing calendar object...");
if (mAyaCalendar != null)
{
Marshal.ReleaseComObject(mAyaCalendar); mAyaCalendar = null;
}
//if (bdiag) d("Releasing app object...");
//if (moutApp != null)
//{
// Marshal.ReleaseComObject(moutApp); moutApp = null;
//}
//clear the client cache
if (clientInfoCache != null)
{
if (bdiag) d("Clearing client cache...");
clientInfoCache.Clear();
clientInfoCache = null;
}
if (bdiag) d("All done!");
#endregion step 4
}
}
#endregion doimport
#region Appointment and comparison structs
public struct aptOut
{
public TypeAndID AyaNovaTypeAndID;
public string CheckSum;
}
/// <summary>
/// contains all the data that will go into an Outlook appointment
/// </summary>
public struct ShadowAppointment
{
public string Subject;
public string Location;
public DateTime Start;
public DateTime End;
public bool ShowTimeAsBusy;
public string BodyText;
public TypeAndID AyaNovaTypeAndID;
public string CheckSum;
}
#endregion appt comparison structs
}//end of class
}

View File

@@ -0,0 +1,261 @@
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Runtime.InteropServices;
namespace AyaNovaOL
{
/// <summary>
/// Summary description for Login.
/// </summary>
public class Login : System.Windows.Forms.Form
{
// private IContainer components;
// Create a logger for use in this class
//private static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
private string mUsername;
private string mPassword;
private System.Windows.Forms.PictureBox pictureBox3;
private System.Windows.Forms.PictureBox pictureBox2;
private System.Windows.Forms.Button btnLogin;
private System.Windows.Forms.Button btnCancel;
private System.Windows.Forms.TextBox edPassword;
private System.Windows.Forms.TextBox edUsername;
private PictureBox pictureBox1;
private bool mLogin;
//case 1157
private const int WM_ACTIVATEAPP = 0x001C;
[DllImportAttribute("User32.dll")]
private static extern int SetForegroundWindow( IntPtr hWnd );
public Login(string defUserName, string defPassword)
{
//
//
// Required for Windows Form Designer support
//
InitializeComponent();
this.pictureBox1.Image = Resource1.AyaNovaOLIsplash;
this.Icon = Resource1.AyaNova5;
this.edPassword.Text=defPassword;
this.edUsername.Text=defUserName;
mUsername="";
mPassword="";
mLogin=false;
//case 1157
SetForegroundWindow(this.Handle);
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
//if(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.pictureBox3 = new System.Windows.Forms.PictureBox();
this.pictureBox2 = new System.Windows.Forms.PictureBox();
this.btnLogin = new System.Windows.Forms.Button();
this.btnCancel = new System.Windows.Forms.Button();
this.edPassword = new System.Windows.Forms.TextBox();
this.edUsername = new System.Windows.Forms.TextBox();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.SuspendLayout();
//
// pictureBox3
//
this.pictureBox3.Image = global::AyaNovaOL.Resource1.Login32;
this.pictureBox3.Location = new System.Drawing.Point(14, 120);
this.pictureBox3.Name = "pictureBox3";
this.pictureBox3.Size = new System.Drawing.Size(68, 39);
this.pictureBox3.TabIndex = 29;
this.pictureBox3.TabStop = false;
//
// pictureBox2
//
this.pictureBox2.Image = global::AyaNovaOL.Resource1.LoginPassword32;
this.pictureBox2.Location = new System.Drawing.Point(14, 166);
this.pictureBox2.Name = "pictureBox2";
this.pictureBox2.Size = new System.Drawing.Size(68, 35);
this.pictureBox2.TabIndex = 28;
this.pictureBox2.TabStop = false;
//
// btnLogin
//
this.btnLogin.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.btnLogin.Image = global::AyaNovaOL.Resource1.OK24;
this.btnLogin.Location = new System.Drawing.Point(386, 227);
this.btnLogin.Name = "btnLogin";
this.btnLogin.Size = new System.Drawing.Size(68, 41);
this.btnLogin.TabIndex = 26;
this.btnLogin.Click += new System.EventHandler(this.btnLogin_Click);
//
// btnCancel
//
this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.btnCancel.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.btnCancel.Image = global::AyaNovaOL.Resource1.Cancel24;
this.btnCancel.Location = new System.Drawing.Point(14, 227);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(68, 41);
this.btnCancel.TabIndex = 25;
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
//
// edPassword
//
this.edPassword.Location = new System.Drawing.Point(82, 166);
this.edPassword.Name = "edPassword";
this.edPassword.PasswordChar = '*';
this.edPassword.Size = new System.Drawing.Size(376, 22);
this.edPassword.TabIndex = 24;
//
// edUsername
//
this.edUsername.Location = new System.Drawing.Point(82, 120);
this.edUsername.Name = "edUsername";
this.edUsername.Size = new System.Drawing.Size(372, 22);
this.edUsername.TabIndex = 23;
//
// pictureBox1
//
this.pictureBox1.Location = new System.Drawing.Point(14, 14);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(440, 83);
this.pictureBox1.TabIndex = 30;
this.pictureBox1.TabStop = false;
//
// Login
//
this.AcceptButton = this.btnLogin;
this.AutoScaleBaseSize = new System.Drawing.Size(6, 15);
this.CancelButton = this.btnCancel;
this.ClientSize = new System.Drawing.Size(476, 287);
this.ControlBox = false;
this.Controls.Add(this.pictureBox1);
this.Controls.Add(this.pictureBox3);
this.Controls.Add(this.pictureBox2);
this.Controls.Add(this.btnLogin);
this.Controls.Add(this.btnCancel);
this.Controls.Add(this.edPassword);
this.Controls.Add(this.edUsername);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Name = "Login";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Tag = "";
this.Text = "AyaNova";
this.TopMost = true;
this.Closing += new System.ComponentModel.CancelEventHandler(this.Login_Closing);
this.Load += new System.EventHandler(this.Login_Load);
((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private void edUsername_TextChanged(object sender, System.EventArgs e)
{
btnLogin.Enabled=(edUsername.Text.Length>0);
}
private void btnLogin_Click(object sender, System.EventArgs e)
{
//case 1039 //log.Debug("btnLogin_Click");
mUsername=edUsername.Text;
mPassword=edPassword.Text;
mLogin=true;
Hide();
}
private void btnCancel_Click(object sender, System.EventArgs e)
{
//case 1039 //log.Debug("btnCancel_Click");
mUsername="";
mPassword="";
mLogin=false;
Hide();
}
private void Login_Load(object sender, System.EventArgs e)
{
//case 1039 //log.Debug("Login_Load");
////case 1157
//this.TopLevel = true;
//this.Focus();
//edUsername.Focus();
//this.BringToFront();
}
private void Login_Closing(object sender, System.ComponentModel.CancelEventArgs e)
{
//case 1039 //log.Debug("Login_Closing");
}
public string Username
{
get
{
return mUsername;
}
}
public string Password
{
get
{
return mPassword;
}
}
public bool LoggingIn
{
get
{
return mLogin;
}
}
}
}

View 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>

View File

@@ -0,0 +1,494 @@
namespace AyaNovaOL
{
partial class MapPhoneAddress
{
/// <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.ckIgnoreThisIsTheMailingAddress = new System.Windows.Forms.CheckBox();
this.label17 = new System.Windows.Forms.Label();
this.cbPhone5 = new GZTW.WinForm.Controls.GZUltraComboEditor();
this.lblPhone5 = new System.Windows.Forms.Label();
this.label15 = new System.Windows.Forms.Label();
this.cbPhone4 = new GZTW.WinForm.Controls.GZUltraComboEditor();
this.lblPhone4 = new System.Windows.Forms.Label();
this.label13 = new System.Windows.Forms.Label();
this.cbPhone3 = new GZTW.WinForm.Controls.GZUltraComboEditor();
this.lblPhone3 = new System.Windows.Forms.Label();
this.label11 = new System.Windows.Forms.Label();
this.cbPhone2 = new GZTW.WinForm.Controls.GZUltraComboEditor();
this.lblPhone2 = new System.Windows.Forms.Label();
this.label10 = new System.Windows.Forms.Label();
this.label9 = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.cbPhone1 = new GZTW.WinForm.Controls.GZUltraComboEditor();
this.lblPhone1 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.cbOLToPostal = new GZTW.WinForm.Controls.GZUltraComboEditor();
this.label4 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.cbOLToPhysical = new GZTW.WinForm.Controls.GZUltraComboEditor();
this.label1 = new System.Windows.Forms.Label();
this.grp = new System.Windows.Forms.GroupBox();
this.radVendor = new System.Windows.Forms.RadioButton();
this.radHeadOffice = new System.Windows.Forms.RadioButton();
this.radClient = new System.Windows.Forms.RadioButton();
this.btnOK = new System.Windows.Forms.Button();
this.btnCancel = new System.Windows.Forms.Button();
((System.ComponentModel.ISupportInitialize)(this.cbPhone5)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.cbPhone4)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.cbPhone3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.cbPhone2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.cbPhone1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.cbOLToPostal)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.cbOLToPhysical)).BeginInit();
this.grp.SuspendLayout();
this.SuspendLayout();
//
// ckIgnoreThisIsTheMailingAddress
//
this.ckIgnoreThisIsTheMailingAddress.AutoSize = true;
this.ckIgnoreThisIsTheMailingAddress.Location = new System.Drawing.Point(33, 54);
this.ckIgnoreThisIsTheMailingAddress.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.ckIgnoreThisIsTheMailingAddress.Name = "ckIgnoreThisIsTheMailingAddress";
this.ckIgnoreThisIsTheMailingAddress.Size = new System.Drawing.Size(394, 21);
this.ckIgnoreThisIsTheMailingAddress.TabIndex = 159;
this.ckIgnoreThisIsTheMailingAddress.Text = "Ignore \"This is the mailing address\" and use default below";
this.ckIgnoreThisIsTheMailingAddress.UseVisualStyleBackColor = true;
//
// label17
//
this.label17.AutoSize = true;
this.label17.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label17.Location = new System.Drawing.Point(325, 466);
this.label17.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label17.Name = "label17";
this.label17.Size = new System.Drawing.Size(35, 17);
this.label17.TabIndex = 158;
this.label17.Text = "--->";
//
// cbPhone5
//
this.cbPhone5.AllowEmptySelection = false;
this.cbPhone5.Location = new System.Drawing.Point(33, 457);
this.cbPhone5.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.cbPhone5.Name = "cbPhone5";
this.cbPhone5.Size = new System.Drawing.Size(289, 24);
this.cbPhone5.TabIndex = 157;
//
// lblPhone5
//
this.lblPhone5.AutoSize = true;
this.lblPhone5.Location = new System.Drawing.Point(371, 466);
this.lblPhone5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lblPhone5.Name = "lblPhone5";
this.lblPhone5.Size = new System.Drawing.Size(156, 17);
this.lblPhone5.TabIndex = 156;
this.lblPhone5.Text = "LT:Client.Label.Phone5";
//
// label15
//
this.label15.AutoSize = true;
this.label15.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label15.Location = new System.Drawing.Point(325, 433);
this.label15.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label15.Name = "label15";
this.label15.Size = new System.Drawing.Size(35, 17);
this.label15.TabIndex = 155;
this.label15.Text = "--->";
//
// cbPhone4
//
this.cbPhone4.AllowEmptySelection = false;
this.cbPhone4.Location = new System.Drawing.Point(33, 423);
this.cbPhone4.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.cbPhone4.Name = "cbPhone4";
this.cbPhone4.Size = new System.Drawing.Size(289, 24);
this.cbPhone4.TabIndex = 154;
//
// lblPhone4
//
this.lblPhone4.AutoSize = true;
this.lblPhone4.Location = new System.Drawing.Point(371, 433);
this.lblPhone4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lblPhone4.Name = "lblPhone4";
this.lblPhone4.Size = new System.Drawing.Size(156, 17);
this.lblPhone4.TabIndex = 153;
this.lblPhone4.Text = "LT:Client.Label.Phone4";
//
// label13
//
this.label13.AutoSize = true;
this.label13.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label13.Location = new System.Drawing.Point(325, 400);
this.label13.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(35, 17);
this.label13.TabIndex = 152;
this.label13.Text = "--->";
//
// cbPhone3
//
this.cbPhone3.AllowEmptySelection = false;
this.cbPhone3.Location = new System.Drawing.Point(33, 390);
this.cbPhone3.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.cbPhone3.Name = "cbPhone3";
this.cbPhone3.Size = new System.Drawing.Size(289, 24);
this.cbPhone3.TabIndex = 151;
//
// lblPhone3
//
this.lblPhone3.AutoSize = true;
this.lblPhone3.Location = new System.Drawing.Point(371, 400);
this.lblPhone3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lblPhone3.Name = "lblPhone3";
this.lblPhone3.Size = new System.Drawing.Size(156, 17);
this.lblPhone3.TabIndex = 150;
this.lblPhone3.Text = "LT:Client.Label.Phone3";
//
// label11
//
this.label11.AutoSize = true;
this.label11.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label11.Location = new System.Drawing.Point(325, 367);
this.label11.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(35, 17);
this.label11.TabIndex = 149;
this.label11.Text = "--->";
//
// cbPhone2
//
this.cbPhone2.AllowEmptySelection = false;
this.cbPhone2.Location = new System.Drawing.Point(33, 357);
this.cbPhone2.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.cbPhone2.Name = "cbPhone2";
this.cbPhone2.Size = new System.Drawing.Size(289, 24);
this.cbPhone2.TabIndex = 148;
//
// lblPhone2
//
this.lblPhone2.AutoSize = true;
this.lblPhone2.Location = new System.Drawing.Point(371, 367);
this.lblPhone2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lblPhone2.Name = "lblPhone2";
this.lblPhone2.Size = new System.Drawing.Size(156, 17);
this.lblPhone2.TabIndex = 147;
this.lblPhone2.Text = "LT:Client.Label.Phone2";
//
// label10
//
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(35, 151);
this.label10.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(230, 17);
this.label10.TabIndex = 146;
this.label10.Text = "Use this address for onsite service:";
//
// label9
//
this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(35, 90);
this.label9.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(181, 17);
this.label9.TabIndex = 145;
this.label9.Text = "Use this address for postal:";
//
// label7
//
this.label7.AutoSize = true;
this.label7.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label7.Location = new System.Drawing.Point(35, 25);
this.label7.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(138, 17);
this.label7.TabIndex = 143;
this.label7.Text = "Address mapping:";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label5.Location = new System.Drawing.Point(325, 334);
this.label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(35, 17);
this.label5.TabIndex = 142;
this.label5.Text = "--->";
//
// cbPhone1
//
this.cbPhone1.AllowEmptySelection = false;
this.cbPhone1.Location = new System.Drawing.Point(33, 324);
this.cbPhone1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.cbPhone1.Name = "cbPhone1";
this.cbPhone1.Size = new System.Drawing.Size(289, 24);
this.cbPhone1.TabIndex = 141;
//
// lblPhone1
//
this.lblPhone1.AutoSize = true;
this.lblPhone1.Location = new System.Drawing.Point(371, 334);
this.lblPhone1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lblPhone1.Name = "lblPhone1";
this.lblPhone1.Size = new System.Drawing.Size(156, 17);
this.lblPhone1.TabIndex = 140;
this.lblPhone1.Text = "LT:Client.Label.Phone1";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label3.Location = new System.Drawing.Point(215, 123);
this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(35, 17);
this.label3.TabIndex = 139;
this.label3.Text = "--->";
//
// cbOLToPostal
//
this.cbOLToPostal.AllowEmptySelection = false;
this.cbOLToPostal.Location = new System.Drawing.Point(33, 113);
this.cbOLToPostal.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.cbOLToPostal.Name = "cbOLToPostal";
this.cbOLToPostal.Size = new System.Drawing.Size(176, 24);
this.cbOLToPostal.TabIndex = 138;
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(260, 123);
this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(251, 17);
this.label4.TabIndex = 137;
this.label4.Text = "LT:Address.Label.AddressType.Postal";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label2.Location = new System.Drawing.Point(215, 182);
this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(35, 17);
this.label2.TabIndex = 136;
this.label2.Text = "--->";
//
// cbOLToPhysical
//
this.cbOLToPhysical.AllowEmptySelection = false;
this.cbOLToPhysical.Location = new System.Drawing.Point(33, 172);
this.cbOLToPhysical.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.cbOLToPhysical.Name = "cbOLToPhysical";
this.cbOLToPhysical.Size = new System.Drawing.Size(176, 24);
this.cbOLToPhysical.TabIndex = 135;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(260, 182);
this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(264, 17);
this.label1.TabIndex = 134;
this.label1.Text = "LT:Address.Label.AddressType.Physical";
//
// grp
//
this.grp.Controls.Add(this.radVendor);
this.grp.Controls.Add(this.radHeadOffice);
this.grp.Controls.Add(this.radClient);
this.grp.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.grp.Location = new System.Drawing.Point(33, 246);
this.grp.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.grp.Name = "grp";
this.grp.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.grp.Size = new System.Drawing.Size(568, 59);
this.grp.TabIndex = 160;
this.grp.TabStop = false;
this.grp.Text = "Phone number mapping";
//
// radVendor
//
this.radVendor.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.radVendor.AutoSize = true;
this.radVendor.Location = new System.Drawing.Point(421, 23);
this.radVendor.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.radVendor.Name = "radVendor";
this.radVendor.Size = new System.Drawing.Size(163, 26);
this.radVendor.TabIndex = 14;
this.radVendor.Text = "LT:O.Vendor";
this.radVendor.UseVisualStyleBackColor = true;
this.radVendor.CheckedChanged += new System.EventHandler(this.radVendor_CheckedChanged);
//
// radHeadOffice
//
this.radHeadOffice.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.radHeadOffice.AutoSize = true;
this.radHeadOffice.Location = new System.Drawing.Point(193, 23);
this.radHeadOffice.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.radHeadOffice.Name = "radHeadOffice";
this.radHeadOffice.Size = new System.Drawing.Size(201, 26);
this.radHeadOffice.TabIndex = 13;
this.radHeadOffice.Text = "LT:O.HeadOffice";
this.radHeadOffice.UseVisualStyleBackColor = true;
this.radHeadOffice.CheckedChanged += new System.EventHandler(this.radHeadOffice_CheckedChanged);
//
// radClient
//
this.radClient.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.radClient.AutoSize = true;
this.radClient.Checked = true;
this.radClient.Location = new System.Drawing.Point(8, 23);
this.radClient.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.radClient.Name = "radClient";
this.radClient.Size = new System.Drawing.Size(148, 26);
this.radClient.TabIndex = 12;
this.radClient.TabStop = true;
this.radClient.Text = "LT:O.Client";
this.radClient.UseVisualStyleBackColor = true;
this.radClient.CheckedChanged += new System.EventHandler(this.radClient_CheckedChanged);
//
// btnOK
//
this.btnOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnOK.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.btnOK.Image = global::AyaNovaOL.Resource1.OK24;
this.btnOK.Location = new System.Drawing.Point(509, 555);
this.btnOK.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.btnOK.Name = "btnOK";
this.btnOK.Size = new System.Drawing.Size(75, 43);
this.btnOK.TabIndex = 162;
this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
//
// btnCancel
//
this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.btnCancel.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.btnCancel.Image = global::AyaNovaOL.Resource1.Cancel24;
this.btnCancel.Location = new System.Drawing.Point(33, 555);
this.btnCancel.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(75, 43);
this.btnCancel.TabIndex = 161;
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
//
// MapPhoneAddress
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(617, 613);
this.Controls.Add(this.btnOK);
this.Controls.Add(this.btnCancel);
this.Controls.Add(this.grp);
this.Controls.Add(this.ckIgnoreThisIsTheMailingAddress);
this.Controls.Add(this.label17);
this.Controls.Add(this.cbPhone5);
this.Controls.Add(this.lblPhone5);
this.Controls.Add(this.label15);
this.Controls.Add(this.cbPhone4);
this.Controls.Add(this.lblPhone4);
this.Controls.Add(this.label13);
this.Controls.Add(this.cbPhone3);
this.Controls.Add(this.lblPhone3);
this.Controls.Add(this.label11);
this.Controls.Add(this.cbPhone2);
this.Controls.Add(this.lblPhone2);
this.Controls.Add(this.label10);
this.Controls.Add(this.label9);
this.Controls.Add(this.label7);
this.Controls.Add(this.label5);
this.Controls.Add(this.cbPhone1);
this.Controls.Add(this.lblPhone1);
this.Controls.Add(this.label3);
this.Controls.Add(this.cbOLToPostal);
this.Controls.Add(this.label4);
this.Controls.Add(this.label2);
this.Controls.Add(this.cbOLToPhysical);
this.Controls.Add(this.label1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.Name = "MapPhoneAddress";
this.Text = "Map phone and address fields";
this.Load += new System.EventHandler(this.MapPhoneAddress_Load);
((System.ComponentModel.ISupportInitialize)(this.cbPhone5)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.cbPhone4)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.cbPhone3)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.cbPhone2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.cbPhone1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.cbOLToPostal)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.cbOLToPhysical)).EndInit();
this.grp.ResumeLayout(false);
this.grp.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.CheckBox ckIgnoreThisIsTheMailingAddress;
private System.Windows.Forms.Label label17;
private GZTW.WinForm.Controls.GZUltraComboEditor cbPhone5;
private System.Windows.Forms.Label lblPhone5;
private System.Windows.Forms.Label label15;
private GZTW.WinForm.Controls.GZUltraComboEditor cbPhone4;
private System.Windows.Forms.Label lblPhone4;
private System.Windows.Forms.Label label13;
private GZTW.WinForm.Controls.GZUltraComboEditor cbPhone3;
private System.Windows.Forms.Label lblPhone3;
private System.Windows.Forms.Label label11;
private GZTW.WinForm.Controls.GZUltraComboEditor cbPhone2;
private System.Windows.Forms.Label lblPhone2;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label label5;
private GZTW.WinForm.Controls.GZUltraComboEditor cbPhone1;
private System.Windows.Forms.Label lblPhone1;
private System.Windows.Forms.Label label3;
private GZTW.WinForm.Controls.GZUltraComboEditor cbOLToPostal;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label2;
private GZTW.WinForm.Controls.GZUltraComboEditor cbOLToPhysical;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.GroupBox grp;
private System.Windows.Forms.RadioButton radHeadOffice;
private System.Windows.Forms.RadioButton radClient;
private System.Windows.Forms.RadioButton radVendor;
private System.Windows.Forms.Button btnOK;
private System.Windows.Forms.Button btnCancel;
}
}

View File

@@ -0,0 +1,294 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using GZTW.AyaNova.BLL;
using Outlook = Microsoft.Office.Interop.Outlook;
using Office = Microsoft.Office.Core;
namespace AyaNovaOL
{
public partial class MapPhoneAddress : Form
{
public MapPhoneAddress()
{
InitializeComponent();
}
private void MapPhoneAddress_Load(object sender, EventArgs e)
{
Util.Localize(this);
cbOLToPhysical.DataSource = Enum.GetValues(typeof(AYOLAddressType));
cbOLToPostal.DataSource = Enum.GetValues(typeof(AYOLAddressType));
cbPhone1.DataSource = Enum.GetValues(typeof(AYOLPhoneNumberType));
cbPhone2.DataSource = Enum.GetValues(typeof(AYOLPhoneNumberType));
cbPhone3.DataSource = Enum.GetValues(typeof(AYOLPhoneNumberType));
cbPhone4.DataSource = Enum.GetValues(typeof(AYOLPhoneNumberType));
cbPhone5.DataSource = Enum.GetValues(typeof(AYOLPhoneNumberType));
LoadSettings(false, RootObjectTypes.Client);
}
private void btnCancel_Click(object sender, EventArgs e)
{
Close();
}
private void btnOK_Click(object sender, EventArgs e)
{
if (radClient.Checked)
SaveSettings(RootObjectTypes.Client);
else if (radHeadOffice.Checked)
SaveSettings(RootObjectTypes.HeadOffice);
else if (radVendor.Checked)
SaveSettings(RootObjectTypes.Vendor);
DialogResult = DialogResult.OK;
Close();
}
private void radClient_CheckedChanged(object sender, EventArgs e)
{
if (radClient.Checked)
LoadSettings(true, RootObjectTypes.Client);
else
SaveSettings(RootObjectTypes.Client);
//If checked is false that means it was checked before so save
//if checked is true that means it was switched to and load
// AdjustDisplay();
}
private void radHeadOffice_CheckedChanged(object sender, EventArgs e)
{
if (radHeadOffice.Checked)
LoadSettings(true, RootObjectTypes.HeadOffice);
else
SaveSettings(RootObjectTypes.HeadOffice);
}
private void radVendor_CheckedChanged(object sender, EventArgs e)
{
if (radVendor.Checked)
LoadSettings(true, RootObjectTypes.Vendor);
else
SaveSettings(RootObjectTypes.Vendor);
}
private void AdjustDisplay()
{
if (radClient.Checked)
{
lblPhone1.Text = Util.LocaleText.GetLocalizedText("Client.Label.Phone1");
lblPhone2.Text = Util.LocaleText.GetLocalizedText("Client.Label.Phone2");
lblPhone3.Text = Util.LocaleText.GetLocalizedText("Client.Label.Phone3");
lblPhone4.Text = Util.LocaleText.GetLocalizedText("Client.Label.Phone4");
lblPhone5.Text = Util.LocaleText.GetLocalizedText("Client.Label.Phone5");
}
if (radHeadOffice.Checked)
{
lblPhone1.Text = Util.LocaleText.GetLocalizedText("HeadOffice.Label.Phone1");
lblPhone2.Text = Util.LocaleText.GetLocalizedText("HeadOffice.Label.Phone2");
lblPhone3.Text = Util.LocaleText.GetLocalizedText("HeadOffice.Label.Phone3");
lblPhone4.Text = Util.LocaleText.GetLocalizedText("HeadOffice.Label.Phone4");
lblPhone5.Text = Util.LocaleText.GetLocalizedText("HeadOffice.Label.Phone5");
}
if (radVendor.Checked)
{
lblPhone1.Text = Util.LocaleText.GetLocalizedText("Vendor.Label.Phone1");
lblPhone2.Text = Util.LocaleText.GetLocalizedText("Vendor.Label.Phone2");
lblPhone3.Text = Util.LocaleText.GetLocalizedText("Vendor.Label.Phone3");
lblPhone4.Text = Util.LocaleText.GetLocalizedText("Vendor.Label.Phone4");
lblPhone5.Text = Util.LocaleText.GetLocalizedText("Vendor.Label.Phone5");
}
//Util.d("AdjustDisplay bottom");
}
private void LoadSettings(bool bPhoneOnly, RootObjectTypes oltype)
{
//Util.d("LoadSettings top phone only="+bPhoneOnly.ToString() + " oltype="+oltype.ToString());
if (!bPhoneOnly)
{
cbSelectAddress(cbOLToPhysical, AyaNovaOL.Properties.Settings.Default.PhysicalAddressEquals);
cbSelectAddress(cbOLToPostal, AyaNovaOL.Properties.Settings.Default.PostalAddressEquals);
switch ((RootObjectTypes)AyaNovaOL.Properties.Settings.Default.RootObjectType)
{
case RootObjectTypes.Client:
radClient.Checked = true;
break;
case RootObjectTypes.HeadOffice:
radHeadOffice.Checked = true;
break;
case RootObjectTypes.Vendor:
radVendor.Checked = true;
break;
}
ckIgnoreThisIsTheMailingAddress.Checked = AyaNovaOL.Properties.Settings.Default.IgnoreThisIsTheMailingAddress;
}
switch (oltype)
{
//phone
case RootObjectTypes.Client:
{
//Util.d("LoadSettings - SetClientPhone1:" + ((AYOLPhoneNumberType)AyaNovaOL.Properties.Settings.Default.ClientPhone1).ToString());
cbSelectPhone(cbPhone1, AyaNovaOL.Properties.Settings.Default.ClientPhone1);
cbSelectPhone(cbPhone2, AyaNovaOL.Properties.Settings.Default.ClientPhone2);
cbSelectPhone(cbPhone3, AyaNovaOL.Properties.Settings.Default.ClientPhone3);
cbSelectPhone(cbPhone4, AyaNovaOL.Properties.Settings.Default.ClientPhone4);
cbSelectPhone(cbPhone5, AyaNovaOL.Properties.Settings.Default.ClientPhone5);
}
break;
case RootObjectTypes.HeadOffice:
{
//Util.d("LoadSettings - SetHeadOfficePhone1:" + ((AYOLPhoneNumberType)AyaNovaOL.Properties.Settings.Default.HeadOfficePhone1).ToString());
cbSelectPhone(cbPhone1, AyaNovaOL.Properties.Settings.Default.HeadOfficePhone1);
cbSelectPhone(cbPhone2, AyaNovaOL.Properties.Settings.Default.HeadOfficePhone2);
cbSelectPhone(cbPhone3, AyaNovaOL.Properties.Settings.Default.HeadOfficePhone3);
cbSelectPhone(cbPhone4, AyaNovaOL.Properties.Settings.Default.HeadOfficePhone4);
cbSelectPhone(cbPhone5, AyaNovaOL.Properties.Settings.Default.HeadOfficePhone5);
}
break;
case RootObjectTypes.Vendor:
{
//Util.d("LoadSettings - SetVendorPhone1:" + ((AYOLPhoneNumberType)AyaNovaOL.Properties.Settings.Default.VendorPhone1).ToString());
cbSelectPhone(cbPhone1, AyaNovaOL.Properties.Settings.Default.VendorPhone1);
cbSelectPhone(cbPhone2, AyaNovaOL.Properties.Settings.Default.VendorPhone2);
cbSelectPhone(cbPhone3, AyaNovaOL.Properties.Settings.Default.VendorPhone3);
cbSelectPhone(cbPhone4, AyaNovaOL.Properties.Settings.Default.VendorPhone4);
cbSelectPhone(cbPhone5, AyaNovaOL.Properties.Settings.Default.VendorPhone5);
}
break;
}
AdjustDisplay();
//Util.d("LoadSettings bottom");
}
/// <summary>
/// Save selected settings
/// </summary>
/// <param name="obtype"></param>
private void SaveSettings(RootObjectTypes obtype)
{
//Util.d("SaveSettings top");
switch (obtype)
{
case RootObjectTypes.Client:
{
//Util.d("SaveSettings - GetClientPhone1:" + ((AYOLPhoneNumberType)cbPhone1.SelectedItem.DataValue).ToString());
AyaNovaOL.Properties.Settings.Default.ClientPhone1 = (int)(AYOLPhoneNumberType)cbPhone1.SelectedItem.DataValue;
AyaNovaOL.Properties.Settings.Default.ClientPhone2 = (int)(AYOLPhoneNumberType)cbPhone2.SelectedItem.DataValue;
AyaNovaOL.Properties.Settings.Default.ClientPhone3 = (int)(AYOLPhoneNumberType)cbPhone3.SelectedItem.DataValue;
AyaNovaOL.Properties.Settings.Default.ClientPhone4 = (int)(AYOLPhoneNumberType)cbPhone4.SelectedItem.DataValue;
AyaNovaOL.Properties.Settings.Default.ClientPhone5 = (int)(AYOLPhoneNumberType)cbPhone5.SelectedItem.DataValue;
}
break;
case RootObjectTypes.HeadOffice:
{
//Util.d("SaveSettings - GetHeadOfficePhone1:" + ((AYOLPhoneNumberType)cbPhone1.SelectedItem.DataValue).ToString());
AyaNovaOL.Properties.Settings.Default.HeadOfficePhone1 = (int)(AYOLPhoneNumberType)cbPhone1.SelectedItem.DataValue;
AyaNovaOL.Properties.Settings.Default.HeadOfficePhone2 = (int)(AYOLPhoneNumberType)cbPhone2.SelectedItem.DataValue;
AyaNovaOL.Properties.Settings.Default.HeadOfficePhone3 = (int)(AYOLPhoneNumberType)cbPhone3.SelectedItem.DataValue;
AyaNovaOL.Properties.Settings.Default.HeadOfficePhone4 = (int)(AYOLPhoneNumberType)cbPhone4.SelectedItem.DataValue;
AyaNovaOL.Properties.Settings.Default.HeadOfficePhone5 = (int)(AYOLPhoneNumberType)cbPhone5.SelectedItem.DataValue;
}
break;
case RootObjectTypes.Vendor:
{
//Util.d("SaveSettings - GetVendorPhone1:" + ((AYOLPhoneNumberType)cbPhone1.SelectedItem.DataValue).ToString());
AyaNovaOL.Properties.Settings.Default.VendorPhone1 = (int)(AYOLPhoneNumberType)cbPhone1.SelectedItem.DataValue;
AyaNovaOL.Properties.Settings.Default.VendorPhone2 = (int)(AYOLPhoneNumberType)cbPhone2.SelectedItem.DataValue;
AyaNovaOL.Properties.Settings.Default.VendorPhone3 = (int)(AYOLPhoneNumberType)cbPhone3.SelectedItem.DataValue;
AyaNovaOL.Properties.Settings.Default.VendorPhone4 = (int)(AYOLPhoneNumberType)cbPhone4.SelectedItem.DataValue;
AyaNovaOL.Properties.Settings.Default.VendorPhone5 = (int)(AYOLPhoneNumberType)cbPhone5.SelectedItem.DataValue;
}
break;
}
AyaNovaOL.Properties.Settings.Default.PhysicalAddressEquals = (int)(AYOLAddressType)cbOLToPhysical.SelectedItem.DataValue;
AyaNovaOL.Properties.Settings.Default.PostalAddressEquals = (int)(AYOLAddressType)cbOLToPostal.SelectedItem.DataValue;
AyaNovaOL.Properties.Settings.Default.IgnoreThisIsTheMailingAddress = ckIgnoreThisIsTheMailingAddress.Checked;
AyaNovaOL.Properties.Settings.Default.FieldsMapped = true;
AyaNovaOL.Properties.Settings.Default.Save();
//Util.d("SaveSettings bottom");
}
private void cbSelectPhone(GZTW.WinForm.Controls.GZUltraComboEditor cb, int phtype)
{
foreach (Infragistics.Win.ValueListItem vi in cb.Items)
{
if ((AYOLPhoneNumberType)vi.DataValue == (AYOLPhoneNumberType)phtype)
{
cb.SelectedItem = vi;
break;
}
}
}
private void cbSelectAddress(GZTW.WinForm.Controls.GZUltraComboEditor cb, int adrtype)
{
foreach (Infragistics.Win.ValueListItem vi in cb.Items)
{
if ((AYOLAddressType)vi.DataValue == (AYOLAddressType)adrtype)
{
cb.SelectedItem = vi;
break;
}
}
}
//-----------------
}
}

View 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>

View File

@@ -0,0 +1,725 @@
namespace AyaNovaOL
{
partial class MsgToWo
{
/// <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.components = new System.ComponentModel.Container();
Infragistics.Win.Appearance appearance1 = new Infragistics.Win.Appearance();
this.lblClientID = new System.Windows.Forms.Label();
this.cbProjectID = new System.Windows.Forms.ComboBox();
this.lblScheduledUserID = new System.Windows.Forms.Label();
this.btnOK = new System.Windows.Forms.Button();
this.btnCancel = new System.Windows.Forms.Button();
this.edClient = new System.Windows.Forms.TextBox();
this.edCustomerContactName = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.edCustomerReferenceNumber = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.edInternalReferenceNumber = new System.Windows.Forms.TextBox();
this.ckOnsite = new System.Windows.Forms.CheckBox();
this.cbWorkorderStatusID = new System.Windows.Forms.ComboBox();
this.label4 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.edSummary = new System.Windows.Forms.TextBox();
this.cbWorkorderCategoryID = new System.Windows.Forms.ComboBox();
this.label6 = new System.Windows.Forms.Label();
this.dtCloseByDate = new Infragistics.Win.UltraWinEditors.UltraDateTimeEditor();
this.label7 = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label();
this.dtServiceDate = new Infragistics.Win.UltraWinEditors.UltraDateTimeEditor();
this.epWO = new System.Windows.Forms.ErrorProvider(this.components);
this.ckIsDirty = new System.Windows.Forms.CheckBox();
this.tabControl1 = new System.Windows.Forms.TabControl();
this.tbHeader = new System.Windows.Forms.TabPage();
this.tbWorkorderItem = new System.Windows.Forms.TabPage();
this.cbUnitServiceTypeID = new System.Windows.Forms.ComboBox();
this.label16 = new System.Windows.Forms.Label();
this.cbUnitID = new System.Windows.Forms.ComboBox();
this.label15 = new System.Windows.Forms.Label();
this.ckWorkorderItemWarrantyService = new System.Windows.Forms.CheckBox();
this.cbWorkorderItemTypeID = new System.Windows.Forms.ComboBox();
this.label14 = new System.Windows.Forms.Label();
this.cbWorkorderItemPriorityID = new System.Windows.Forms.ComboBox();
this.label13 = new System.Windows.Forms.Label();
this.cbWorkorderItemStatusID = new System.Windows.Forms.ComboBox();
this.label12 = new System.Windows.Forms.Label();
this.label11 = new System.Windows.Forms.Label();
this.dtWorkorderItemRequestDate = new Infragistics.Win.UltraWinEditors.UltraDateTimeEditor();
this.label10 = new System.Windows.Forms.Label();
this.edWorkorderItemTechNotes = new System.Windows.Forms.TextBox();
this.label9 = new System.Windows.Forms.Label();
this.edWorkorderItemSummary = new System.Windows.Forms.TextBox();
this.tbScheduledUsers = new System.Windows.Forms.TabPage();
this.gridScheduledUsers = new Infragistics.Win.UltraWinGrid.UltraGrid();
this.tipError = new System.Windows.Forms.ToolTip(this.components);
this.GridCalendar = new Infragistics.Win.UltraWinEditors.UltraDateTimeEditor();
this.btnTest = new System.Windows.Forms.Button();
((System.ComponentModel.ISupportInitialize)(this.dtCloseByDate)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dtServiceDate)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.epWO)).BeginInit();
this.tabControl1.SuspendLayout();
this.tbHeader.SuspendLayout();
this.tbWorkorderItem.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dtWorkorderItemRequestDate)).BeginInit();
this.tbScheduledUsers.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.gridScheduledUsers)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.GridCalendar)).BeginInit();
this.SuspendLayout();
//
// lblClientID
//
this.lblClientID.AutoSize = true;
this.lblClientID.Location = new System.Drawing.Point(24, 27);
this.lblClientID.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lblClientID.Name = "lblClientID";
this.lblClientID.Size = new System.Drawing.Size(79, 17);
this.lblClientID.TabIndex = 1;
this.lblClientID.Text = "LT:O.Client";
//
// cbProjectID
//
this.cbProjectID.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend;
this.cbProjectID.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
this.cbProjectID.FormattingEnabled = true;
this.cbProjectID.Location = new System.Drawing.Point(419, 268);
this.cbProjectID.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.cbProjectID.Name = "cbProjectID";
this.cbProjectID.Size = new System.Drawing.Size(367, 24);
this.cbProjectID.TabIndex = 6;
//
// lblScheduledUserID
//
this.lblScheduledUserID.AutoSize = true;
this.lblScheduledUserID.Location = new System.Drawing.Point(415, 247);
this.lblScheduledUserID.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lblScheduledUserID.Name = "lblScheduledUserID";
this.lblScheduledUserID.Size = new System.Drawing.Size(88, 17);
this.lblScheduledUserID.TabIndex = 5;
this.lblScheduledUserID.Text = "LT:O.Project";
//
// btnOK
//
this.btnOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnOK.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.btnOK.Image = global::AyaNovaOL.Resource1.OK24;
this.btnOK.Location = new System.Drawing.Point(1175, 548);
this.btnOK.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.btnOK.Name = "btnOK";
this.btnOK.Size = new System.Drawing.Size(75, 43);
this.btnOK.TabIndex = 32;
this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
//
// btnCancel
//
this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.btnCancel.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.btnCancel.Image = global::AyaNovaOL.Resource1.Cancel24;
this.btnCancel.Location = new System.Drawing.Point(16, 548);
this.btnCancel.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(75, 43);
this.btnCancel.TabIndex = 31;
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
//
// edClient
//
this.edClient.Location = new System.Drawing.Point(24, 47);
this.edClient.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.edClient.Multiline = true;
this.edClient.Name = "edClient";
this.edClient.ReadOnly = true;
this.edClient.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
this.edClient.Size = new System.Drawing.Size(367, 152);
this.edClient.TabIndex = 33;
//
// edCustomerContactName
//
this.edCustomerContactName.Location = new System.Drawing.Point(419, 68);
this.edCustomerContactName.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.edCustomerContactName.Name = "edCustomerContactName";
this.edCustomerContactName.Size = new System.Drawing.Size(349, 22);
this.edCustomerContactName.TabIndex = 34;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(419, 47);
this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(284, 17);
this.label1.TabIndex = 35;
this.label1.Text = "LT:Workorder.Label.CustomerContactName";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(419, 137);
this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(315, 17);
this.label2.TabIndex = 37;
this.label2.Text = "LT:Workorder.Label.CustomerReferenceNumber";
//
// edCustomerReferenceNumber
//
this.edCustomerReferenceNumber.Location = new System.Drawing.Point(419, 159);
this.edCustomerReferenceNumber.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.edCustomerReferenceNumber.Name = "edCustomerReferenceNumber";
this.edCustomerReferenceNumber.Size = new System.Drawing.Size(349, 22);
this.edCustomerReferenceNumber.TabIndex = 36;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(828, 47);
this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(302, 17);
this.label3.TabIndex = 39;
this.label3.Text = "LT:Workorder.Label.InternalReferenceNumber";
//
// edInternalReferenceNumber
//
this.edInternalReferenceNumber.Location = new System.Drawing.Point(828, 68);
this.edInternalReferenceNumber.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.edInternalReferenceNumber.Name = "edInternalReferenceNumber";
this.edInternalReferenceNumber.Size = new System.Drawing.Size(349, 22);
this.edInternalReferenceNumber.TabIndex = 38;
//
// ckOnsite
//
this.ckOnsite.AutoSize = true;
this.ckOnsite.Location = new System.Drawing.Point(828, 162);
this.ckOnsite.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.ckOnsite.Name = "ckOnsite";
this.ckOnsite.Size = new System.Drawing.Size(202, 21);
this.ckOnsite.TabIndex = 40;
this.ckOnsite.Text = "LT:Workorder.Label.Onsite";
this.ckOnsite.UseVisualStyleBackColor = true;
//
// cbWorkorderStatusID
//
this.cbWorkorderStatusID.FormattingEnabled = true;
this.cbWorkorderStatusID.Location = new System.Drawing.Point(24, 268);
this.cbWorkorderStatusID.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.cbWorkorderStatusID.Name = "cbWorkorderStatusID";
this.cbWorkorderStatusID.Size = new System.Drawing.Size(367, 24);
this.cbWorkorderStatusID.TabIndex = 42;
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(20, 247);
this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(151, 17);
this.label4.TabIndex = 41;
this.label4.Text = "LT:O.WorkorderStatus";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(24, 340);
this.label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(198, 17);
this.label5.TabIndex = 44;
this.label5.Text = "LT:Workorder.Label.Summary";
//
// edSummary
//
this.edSummary.Location = new System.Drawing.Point(24, 362);
this.edSummary.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.edSummary.Name = "edSummary";
this.edSummary.Size = new System.Drawing.Size(363, 22);
this.edSummary.TabIndex = 43;
//
// cbWorkorderCategoryID
//
this.cbWorkorderCategoryID.FormattingEnabled = true;
this.cbWorkorderCategoryID.Location = new System.Drawing.Point(419, 361);
this.cbWorkorderCategoryID.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.cbWorkorderCategoryID.Name = "cbWorkorderCategoryID";
this.cbWorkorderCategoryID.Size = new System.Drawing.Size(367, 24);
this.cbWorkorderCategoryID.TabIndex = 46;
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(415, 340);
this.label6.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(168, 17);
this.label6.TabIndex = 45;
this.label6.Text = "LT:O.WorkorderCategory";
//
// dtCloseByDate
//
this.dtCloseByDate.DateTime = new System.DateTime(2009, 12, 14, 0, 0, 0, 0);
this.dtCloseByDate.Location = new System.Drawing.Point(828, 268);
this.dtCloseByDate.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.dtCloseByDate.Name = "dtCloseByDate";
this.dtCloseByDate.Size = new System.Drawing.Size(351, 24);
this.dtCloseByDate.TabIndex = 47;
this.dtCloseByDate.Value = new System.DateTime(2009, 12, 14, 0, 0, 0, 0);
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(828, 247);
this.label7.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(267, 17);
this.label7.TabIndex = 48;
this.label7.Text = "LT:WorkorderService.Label.CloseByDate";
//
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(828, 340);
this.label8.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(263, 17);
this.label8.TabIndex = 50;
this.label8.Text = "LT:WorkorderService.Label.ServiceDate";
//
// dtServiceDate
//
this.dtServiceDate.DateTime = new System.DateTime(2009, 12, 29, 0, 0, 0, 0);
this.dtServiceDate.Location = new System.Drawing.Point(828, 361);
this.dtServiceDate.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.dtServiceDate.Name = "dtServiceDate";
this.dtServiceDate.Size = new System.Drawing.Size(351, 24);
this.dtServiceDate.TabIndex = 49;
this.dtServiceDate.Value = new System.DateTime(2009, 12, 29, 0, 0, 0, 0);
//
// epWO
//
this.epWO.ContainerControl = this;
//
// ckIsDirty
//
this.ckIsDirty.Location = new System.Drawing.Point(-89, -148);
this.ckIsDirty.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.ckIsDirty.Name = "ckIsDirty";
this.ckIsDirty.Size = new System.Drawing.Size(44, 18);
this.ckIsDirty.TabIndex = 149;
//
// tabControl1
//
this.tabControl1.Controls.Add(this.tbHeader);
this.tabControl1.Controls.Add(this.tbWorkorderItem);
this.tabControl1.Controls.Add(this.tbScheduledUsers);
this.tabControl1.Location = new System.Drawing.Point(3, 15);
this.tabControl1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0;
this.tabControl1.Size = new System.Drawing.Size(1247, 526);
this.tabControl1.TabIndex = 150;
//
// tbHeader
//
this.tbHeader.Controls.Add(this.edClient);
this.tbHeader.Controls.Add(this.lblClientID);
this.tbHeader.Controls.Add(this.label8);
this.tbHeader.Controls.Add(this.lblScheduledUserID);
this.tbHeader.Controls.Add(this.dtServiceDate);
this.tbHeader.Controls.Add(this.cbProjectID);
this.tbHeader.Controls.Add(this.label7);
this.tbHeader.Controls.Add(this.edCustomerContactName);
this.tbHeader.Controls.Add(this.dtCloseByDate);
this.tbHeader.Controls.Add(this.label1);
this.tbHeader.Controls.Add(this.cbWorkorderCategoryID);
this.tbHeader.Controls.Add(this.edCustomerReferenceNumber);
this.tbHeader.Controls.Add(this.label6);
this.tbHeader.Controls.Add(this.label2);
this.tbHeader.Controls.Add(this.label5);
this.tbHeader.Controls.Add(this.edInternalReferenceNumber);
this.tbHeader.Controls.Add(this.edSummary);
this.tbHeader.Controls.Add(this.label3);
this.tbHeader.Controls.Add(this.cbWorkorderStatusID);
this.tbHeader.Controls.Add(this.ckOnsite);
this.tbHeader.Controls.Add(this.label4);
this.tbHeader.Location = new System.Drawing.Point(4, 25);
this.tbHeader.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.tbHeader.Name = "tbHeader";
this.tbHeader.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.tbHeader.Size = new System.Drawing.Size(1239, 497);
this.tbHeader.TabIndex = 0;
this.tbHeader.Text = "LT:O.WorkorderService";
this.tbHeader.UseVisualStyleBackColor = true;
//
// tbWorkorderItem
//
this.tbWorkorderItem.Controls.Add(this.cbUnitServiceTypeID);
this.tbWorkorderItem.Controls.Add(this.label16);
this.tbWorkorderItem.Controls.Add(this.cbUnitID);
this.tbWorkorderItem.Controls.Add(this.label15);
this.tbWorkorderItem.Controls.Add(this.ckWorkorderItemWarrantyService);
this.tbWorkorderItem.Controls.Add(this.cbWorkorderItemTypeID);
this.tbWorkorderItem.Controls.Add(this.label14);
this.tbWorkorderItem.Controls.Add(this.cbWorkorderItemPriorityID);
this.tbWorkorderItem.Controls.Add(this.label13);
this.tbWorkorderItem.Controls.Add(this.cbWorkorderItemStatusID);
this.tbWorkorderItem.Controls.Add(this.label12);
this.tbWorkorderItem.Controls.Add(this.label11);
this.tbWorkorderItem.Controls.Add(this.dtWorkorderItemRequestDate);
this.tbWorkorderItem.Controls.Add(this.label10);
this.tbWorkorderItem.Controls.Add(this.edWorkorderItemTechNotes);
this.tbWorkorderItem.Controls.Add(this.label9);
this.tbWorkorderItem.Controls.Add(this.edWorkorderItemSummary);
this.tbWorkorderItem.Location = new System.Drawing.Point(4, 25);
this.tbWorkorderItem.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.tbWorkorderItem.Name = "tbWorkorderItem";
this.tbWorkorderItem.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.tbWorkorderItem.Size = new System.Drawing.Size(1239, 497);
this.tbWorkorderItem.TabIndex = 1;
this.tbWorkorderItem.Text = "LT:O.WorkorderItem";
this.tbWorkorderItem.UseVisualStyleBackColor = true;
//
// cbUnitServiceTypeID
//
this.cbUnitServiceTypeID.FormattingEnabled = true;
this.cbUnitServiceTypeID.Location = new System.Drawing.Point(844, 375);
this.cbUnitServiceTypeID.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.cbUnitServiceTypeID.Name = "cbUnitServiceTypeID";
this.cbUnitServiceTypeID.Size = new System.Drawing.Size(367, 24);
this.cbUnitServiceTypeID.TabIndex = 61;
//
// label16
//
this.label16.AutoSize = true;
this.label16.Location = new System.Drawing.Point(840, 354);
this.label16.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label16.Name = "label16";
this.label16.Size = new System.Drawing.Size(148, 17);
this.label16.TabIndex = 60;
this.label16.Text = "LT:O.UnitServiceType";
//
// cbUnitID
//
this.cbUnitID.FormattingEnabled = true;
this.cbUnitID.Location = new System.Drawing.Point(844, 314);
this.cbUnitID.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.cbUnitID.Name = "cbUnitID";
this.cbUnitID.Size = new System.Drawing.Size(367, 24);
this.cbUnitID.TabIndex = 59;
//
// label15
//
this.label15.AutoSize = true;
this.label15.Location = new System.Drawing.Point(840, 293);
this.label15.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label15.Name = "label15";
this.label15.Size = new System.Drawing.Size(69, 17);
this.label15.TabIndex = 58;
this.label15.Text = "LT:O.Unit";
//
// ckWorkorderItemWarrantyService
//
this.ckWorkorderItemWarrantyService.AutoSize = true;
this.ckWorkorderItemWarrantyService.Location = new System.Drawing.Point(844, 262);
this.ckWorkorderItemWarrantyService.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.ckWorkorderItemWarrantyService.Name = "ckWorkorderItemWarrantyService";
this.ckWorkorderItemWarrantyService.Size = new System.Drawing.Size(389, 26);
this.ckWorkorderItemWarrantyService.TabIndex = 57;
this.ckWorkorderItemWarrantyService.Text = "LT:WorkorderItem.Label.WarrantyService";
this.ckWorkorderItemWarrantyService.UseVisualStyleBackColor = true;
//
// cbWorkorderItemTypeID
//
this.cbWorkorderItemTypeID.FormattingEnabled = true;
this.cbWorkorderItemTypeID.Location = new System.Drawing.Point(844, 218);
this.cbWorkorderItemTypeID.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.cbWorkorderItemTypeID.Name = "cbWorkorderItemTypeID";
this.cbWorkorderItemTypeID.Size = new System.Drawing.Size(367, 24);
this.cbWorkorderItemTypeID.TabIndex = 56;
//
// label14
//
this.label14.AutoSize = true;
this.label14.Location = new System.Drawing.Point(840, 197);
this.label14.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(169, 17);
this.label14.TabIndex = 55;
this.label14.Text = "LT:O.WorkorderItemType";
//
// cbWorkorderItemPriorityID
//
this.cbWorkorderItemPriorityID.FormattingEnabled = true;
this.cbWorkorderItemPriorityID.Location = new System.Drawing.Point(844, 159);
this.cbWorkorderItemPriorityID.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.cbWorkorderItemPriorityID.Name = "cbWorkorderItemPriorityID";
this.cbWorkorderItemPriorityID.Size = new System.Drawing.Size(367, 24);
this.cbWorkorderItemPriorityID.TabIndex = 54;
//
// label13
//
this.label13.AutoSize = true;
this.label13.Location = new System.Drawing.Point(840, 138);
this.label13.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(222, 17);
this.label13.TabIndex = 53;
this.label13.Text = "LT:WorkorderItem.Label.PriorityID";
//
// cbWorkorderItemStatusID
//
this.cbWorkorderItemStatusID.FormattingEnabled = true;
this.cbWorkorderItemStatusID.Location = new System.Drawing.Point(844, 100);
this.cbWorkorderItemStatusID.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.cbWorkorderItemStatusID.Name = "cbWorkorderItemStatusID";
this.cbWorkorderItemStatusID.Size = new System.Drawing.Size(367, 24);
this.cbWorkorderItemStatusID.TabIndex = 52;
//
// label12
//
this.label12.AutoSize = true;
this.label12.Location = new System.Drawing.Point(840, 79);
this.label12.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(285, 17);
this.label12.TabIndex = 51;
this.label12.Text = "LT:WorkorderItem.Label.WorkorderStatusID";
//
// label11
//
this.label11.AutoSize = true;
this.label11.Location = new System.Drawing.Point(844, 10);
this.label11.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(248, 17);
this.label11.TabIndex = 50;
this.label11.Text = "LT:WorkorderItem.Label.RequestDate";
//
// dtWorkorderItemRequestDate
//
this.dtWorkorderItemRequestDate.DateTime = new System.DateTime(2009, 12, 14, 0, 0, 0, 0);
this.dtWorkorderItemRequestDate.Location = new System.Drawing.Point(844, 31);
this.dtWorkorderItemRequestDate.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.dtWorkorderItemRequestDate.Name = "dtWorkorderItemRequestDate";
this.dtWorkorderItemRequestDate.Size = new System.Drawing.Size(351, 24);
this.dtWorkorderItemRequestDate.TabIndex = 49;
this.dtWorkorderItemRequestDate.Value = new System.DateTime(2009, 12, 14, 0, 0, 0, 0);
//
// label10
//
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(8, 81);
this.label10.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(234, 17);
this.label10.TabIndex = 48;
this.label10.Text = "LT:WorkorderItem.Label.TechNotes";
//
// edWorkorderItemTechNotes
//
this.edWorkorderItemTechNotes.AcceptsReturn = true;
this.edWorkorderItemTechNotes.AcceptsTab = true;
this.edWorkorderItemTechNotes.Location = new System.Drawing.Point(12, 101);
this.edWorkorderItemTechNotes.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.edWorkorderItemTechNotes.Multiline = true;
this.edWorkorderItemTechNotes.Name = "edWorkorderItemTechNotes";
this.edWorkorderItemTechNotes.ScrollBars = System.Windows.Forms.ScrollBars.Both;
this.edWorkorderItemTechNotes.Size = new System.Drawing.Size(799, 367);
this.edWorkorderItemTechNotes.TabIndex = 47;
//
// label9
//
this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(8, 9);
this.label9.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(224, 17);
this.label9.TabIndex = 46;
this.label9.Text = "LT:WorkorderItem.Label.Summary";
//
// edWorkorderItemSummary
//
this.edWorkorderItemSummary.AcceptsReturn = true;
this.edWorkorderItemSummary.AcceptsTab = true;
this.edWorkorderItemSummary.Location = new System.Drawing.Point(8, 31);
this.edWorkorderItemSummary.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.edWorkorderItemSummary.Multiline = true;
this.edWorkorderItemSummary.Name = "edWorkorderItemSummary";
this.edWorkorderItemSummary.ScrollBars = System.Windows.Forms.ScrollBars.Both;
this.edWorkorderItemSummary.Size = new System.Drawing.Size(803, 46);
this.edWorkorderItemSummary.TabIndex = 45;
//
// tbScheduledUsers
//
this.tbScheduledUsers.Controls.Add(this.gridScheduledUsers);
this.tbScheduledUsers.Location = new System.Drawing.Point(4, 25);
this.tbScheduledUsers.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.tbScheduledUsers.Name = "tbScheduledUsers";
this.tbScheduledUsers.Size = new System.Drawing.Size(1239, 497);
this.tbScheduledUsers.TabIndex = 2;
this.tbScheduledUsers.Text = "LT:WorkorderItem.Label.ScheduledUsers";
this.tbScheduledUsers.UseVisualStyleBackColor = true;
//
// gridScheduledUsers
//
this.gridScheduledUsers.Cursor = System.Windows.Forms.Cursors.Default;
appearance1.FontData.BoldAsString = "True";
appearance1.TextHAlignAsString = "Left";
this.gridScheduledUsers.DisplayLayout.CaptionAppearance = appearance1;
this.gridScheduledUsers.Dock = System.Windows.Forms.DockStyle.Fill;
this.gridScheduledUsers.Location = new System.Drawing.Point(0, 0);
this.gridScheduledUsers.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.gridScheduledUsers.Name = "gridScheduledUsers";
this.gridScheduledUsers.Size = new System.Drawing.Size(1236, 494);
this.gridScheduledUsers.TabIndex = 4;
this.gridScheduledUsers.Text = "LT:WorkorderItem.Label.ScheduledUsers";
this.gridScheduledUsers.AfterCellUpdate += new Infragistics.Win.UltraWinGrid.CellEventHandler(this.gridScheduledUsers_AfterCellUpdate);
this.gridScheduledUsers.InitializeLayout += new Infragistics.Win.UltraWinGrid.InitializeLayoutEventHandler(this.gridScheduledUsers_InitializeLayout);
this.gridScheduledUsers.InitializeRow += new Infragistics.Win.UltraWinGrid.InitializeRowEventHandler(this.gridScheduledUsers_InitializeRow_1);
this.gridScheduledUsers.BeforeRowCancelUpdate += new Infragistics.Win.UltraWinGrid.CancelableRowEventHandler(this.gridScheduledUsers_BeforeRowCancelUpdate);
this.gridScheduledUsers.ClickCellButton += new Infragistics.Win.UltraWinGrid.CellEventHandler(this.gridScheduledUsers_ClickCellButton);
this.gridScheduledUsers.BeforeRowInsert += new Infragistics.Win.UltraWinGrid.BeforeRowInsertEventHandler(this.gridScheduledUsers_BeforeRowInsert);
this.gridScheduledUsers.MouseEnterElement += new Infragistics.Win.UIElementEventHandler(this.gridScheduledUsers_MouseEnterElement_1);
//
// tipError
//
this.tipError.IsBalloon = true;
//
// GridCalendar
//
this.GridCalendar.DateTime = new System.DateTime(2009, 12, 29, 0, 0, 0, 0);
this.GridCalendar.Location = new System.Drawing.Point(191, 556);
this.GridCalendar.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.GridCalendar.Name = "GridCalendar";
this.GridCalendar.Size = new System.Drawing.Size(52, 24);
this.GridCalendar.TabIndex = 151;
this.GridCalendar.Value = new System.DateTime(2009, 12, 29, 0, 0, 0, 0);
this.GridCalendar.Visible = false;
//
// btnTest
//
this.btnTest.Location = new System.Drawing.Point(583, 556);
this.btnTest.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.btnTest.Name = "btnTest";
this.btnTest.Size = new System.Drawing.Size(100, 28);
this.btnTest.TabIndex = 152;
this.btnTest.Text = "Diag";
this.btnTest.UseVisualStyleBackColor = true;
this.btnTest.Visible = false;
this.btnTest.Click += new System.EventHandler(this.btnTest_Click);
//
// MsgToWo
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1265, 606);
this.Controls.Add(this.btnTest);
this.Controls.Add(this.GridCalendar);
this.Controls.Add(this.tabControl1);
this.Controls.Add(this.ckIsDirty);
this.Controls.Add(this.btnOK);
this.Controls.Add(this.btnCancel);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "MsgToWo";
this.Text = "MsgToWo";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MsgToWo_FormClosing);
this.Load += new System.EventHandler(this.MsgToWo_Load);
((System.ComponentModel.ISupportInitialize)(this.dtCloseByDate)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.dtServiceDate)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.epWO)).EndInit();
this.tabControl1.ResumeLayout(false);
this.tbHeader.ResumeLayout(false);
this.tbHeader.PerformLayout();
this.tbWorkorderItem.ResumeLayout(false);
this.tbWorkorderItem.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.dtWorkorderItemRequestDate)).EndInit();
this.tbScheduledUsers.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.gridScheduledUsers)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.GridCalendar)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label lblClientID;
private System.Windows.Forms.ComboBox cbProjectID;
private System.Windows.Forms.Label lblScheduledUserID;
private System.Windows.Forms.Button btnOK;
private System.Windows.Forms.Button btnCancel;
private System.Windows.Forms.TextBox edClient;
private System.Windows.Forms.TextBox edCustomerContactName;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox edCustomerReferenceNumber;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox edInternalReferenceNumber;
private System.Windows.Forms.CheckBox ckOnsite;
private System.Windows.Forms.ComboBox cbWorkorderStatusID;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.TextBox edSummary;
private System.Windows.Forms.ComboBox cbWorkorderCategoryID;
private System.Windows.Forms.Label label6;
private Infragistics.Win.UltraWinEditors.UltraDateTimeEditor dtCloseByDate;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label label8;
private Infragistics.Win.UltraWinEditors.UltraDateTimeEditor dtServiceDate;
private System.Windows.Forms.ErrorProvider epWO;
private System.Windows.Forms.CheckBox ckIsDirty;
private System.Windows.Forms.TabControl tabControl1;
private System.Windows.Forms.TabPage tbHeader;
private System.Windows.Forms.TabPage tbWorkorderItem;
private System.Windows.Forms.TabPage tbScheduledUsers;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.TextBox edWorkorderItemSummary;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.TextBox edWorkorderItemTechNotes;
private System.Windows.Forms.Label label11;
private Infragistics.Win.UltraWinEditors.UltraDateTimeEditor dtWorkorderItemRequestDate;
private System.Windows.Forms.ComboBox cbWorkorderItemStatusID;
private System.Windows.Forms.Label label12;
private System.Windows.Forms.ComboBox cbWorkorderItemTypeID;
private System.Windows.Forms.Label label14;
private System.Windows.Forms.ComboBox cbWorkorderItemPriorityID;
private System.Windows.Forms.Label label13;
private System.Windows.Forms.CheckBox ckWorkorderItemWarrantyService;
private System.Windows.Forms.ComboBox cbUnitServiceTypeID;
private System.Windows.Forms.Label label16;
private System.Windows.Forms.ComboBox cbUnitID;
private System.Windows.Forms.Label label15;
private Infragistics.Win.UltraWinGrid.UltraGrid gridScheduledUsers;
private System.Windows.Forms.ToolTip tipError;
private Infragistics.Win.UltraWinEditors.UltraDateTimeEditor GridCalendar;
private System.Windows.Forms.Button btnTest;
}
}

View File

@@ -0,0 +1,779 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using GZTW.AyaNova.BLL;
using System.Collections;
using Infragistics.Win;
using Infragistics.Win.UltraWinGrid;
using System.Threading;
namespace AyaNovaOL
{
public partial class MsgToWo : Form
{
#region Read only list objects initialization
//Read only lists used for quick lookup
// private PriorityPickList mPriorityList;
//private UnitPickList mClientUnitList;
private RatePickList mRateList;
// private PartPickList mPartList;
private UserListScheduleable mUserList;
//private UserPickList mAllUsers;
// private TaxCodeList mTaxList;
// private VendorPickList mVendors;
// private TaskPickList mTaskList;
// private LoanItemPickList mLoanItemList;
//Case 640
//private PartWarehousePickList mWarehouseList;
//case 1121
// private WorkorderItemTypePickList mTypeList;
/// <summary>
///
/// </summary>
private void LoadReadOnlyLists()
{
//case 1039 //log.Debug("LoadReadOnlyLists");
// mPriorityList = PriorityPickList.GetList();
// mClientUnitList = UnitPickList.GetListByClient(mWorkorder.ClientID);
if (mWorkorder.IsTemplate)
mRateList = RatePickList.GetListAllActiveRates();
else
{
if (mWorkorder.ContractResolved() == null)
mRateList = RatePickList.GetList(true);
else
mRateList = RatePickList.GetListWithContract(mWorkorder.ContractIDResolved());
}
//case 1160 - this is redundant, the part list is loaded on demand when required
//mPartList=PartPickList.GetAllParts();
mUserList = UserListScheduleable.GetList();
//mAllUsers = UserPickList.GetList(false);//case 58 not regional
// mTaxList = TaxCodeList.GetList(mWorkorder.ListOfTaxCodesSelected());
// mVendors = VendorPickList.GetList();
// mTaskList = TaskPickList.GetList();
// mLoanItemList = LoanItemPickList.GetList(true);
//Case 640
// mWarehouseList = PartWarehousePickList.GetActiveOnlyListWithExceptions(mWorkorder.ListOfPartWarehousesSelected());
//case 1121
// mTypeList = WorkorderItemTypePickList.GetList();
}
#endregion
#region Init / loadform / Closeform
/// <summary>
/// Used to track whether the close was done by the program
/// or done by the user clicking on the upper left corner X control
/// </summary>
bool bClosingHandled = false;
public MsgToWo()
{
InitializeComponent();
this.Icon = Resource1.ServiceWorkorder16icon;
}
public string EmailText { get; set; }
public Workorder mWorkorder { get; set; }
public WorkorderItem mWorkorderItem { get; set; }
private void MsgToWo_Load(object sender, EventArgs e)
{
Util.Localize(this);
if (mWorkorder.WorkorderService.ServiceNumber != 0)
this.Text = Util.LocaleText.GetLocalizedText("O.WorkorderService") + " " + mWorkorder.WorkorderService.ServiceNumber.ToString();
else
this.Text = Util.LocaleText.GetLocalizedText("O.WorkorderService");
LoadReadOnlyLists();
FillComboBoxes();
DataBind();
Application.ThreadException += new ThreadExceptionEventHandler(
Application_ThreadException);
// Application.Idle += new EventHandler(Application_Idle);
}
public static void Application_ThreadException(
object sender, ThreadExceptionEventArgs e)
{
// Handle exception.
//This is a workaround to a weird problem
//where a serialization exception cannot load csla happens
//if a user moves off a schedule item while entering it but not fully
//can't figure out why it's happening but it's safely ignored
if (e.Exception is System.Runtime.Serialization.SerializationException)
{
return;
}
// The exception object is contained in e.Exception.
MessageBox.Show("Unhandled exception: \r\n" + e.Exception.Message + "\r\n====================\r\n" + e.Exception.StackTrace);
}
private void MsgToWo_FormClosing(object sender, FormClosingEventArgs e)
{
if (!bClosingHandled)
{
//Save record if necessary
//User may opt to not cancel exit
if (!RecordUpdate(RecordActionType.PromptToSave))
{
e.Cancel = true;
return;
}
}
Application.ThreadException -= new ThreadExceptionEventHandler(
Application_ThreadException);
}
#endregion init loadform
#region Sync
private void Application_Idle(object sender, EventArgs e)
{
btnOK.Enabled = (mWorkorder.IsSavable && mWorkorder.IsSaveAllowed);
this.Text = DateTime.Now.ToString();
}
#endregion sync
#region combo boxes
private void FillComboBoxes()
{
#region project
Dictionary<Guid, string> dProjects = new Dictionary<Guid, string>();
dProjects.Add(Guid.Empty, "-");
ProjectList pl = ProjectList.GetList("");
foreach (ProjectList.ProjectListInfo i in pl)
{
dProjects.Add(i.LT_O_Project.Value, i.LT_O_Project.Display);
}
cbProjectID.DataSource = new BindingSource(dProjects, "");
cbProjectID.ValueMember = "Key";
cbProjectID.DisplayMember = "Value";
#endregion projects
#region categories
{
GenericNVList l = GenericNVList.GetList("WORKORDERCATEGORY", "ID", "NAME", true, false, false);
Dictionary<Guid, string> dCategories = new Dictionary<Guid, string>();
dCategories.Add(Guid.Empty, "-");
foreach (DictionaryEntry d in l.BindableList)
dCategories.Add(new Guid(d.Key.ToString()), d.Value.ToString());
cbWorkorderCategoryID.DataSource = new BindingSource(dCategories, "");
cbWorkorderCategoryID.ValueMember = "Key";
cbWorkorderCategoryID.DisplayMember = "Value";
}
#endregion
#region Status
WorkorderStatusPickList wsp = WorkorderStatusPickList.GetList();
Dictionary<Guid, string> dStatusList = new Dictionary<Guid, string>();
dStatusList.Add(Guid.Empty, "-");
foreach (WorkorderStatusPickList.WorkorderStatusPickListInfo i in wsp)
dStatusList.Add(i.ID, i.Name);
cbWorkorderStatusID.DataSource = new BindingSource(dStatusList, "");
cbWorkorderStatusID.ValueMember = "Key";
cbWorkorderStatusID.DisplayMember = "Value";
#endregion status
//Workorder Item combo boxes
#region Status
Dictionary<Guid, string> dWIStatusList = new Dictionary<Guid, string>();
dWIStatusList.Add(Guid.Empty, "-");
foreach (WorkorderStatusPickList.WorkorderStatusPickListInfo i in wsp)
dWIStatusList.Add(i.ID, i.Name);
cbWorkorderItemStatusID.DataSource = new BindingSource(dWIStatusList, "");
cbWorkorderItemStatusID.ValueMember = "Key";
cbWorkorderItemStatusID.DisplayMember = "Value";
#endregion status
#region Priority
{
PriorityPickList ppl = PriorityPickList.GetList();
Dictionary<Guid, string> dPriorityList = new Dictionary<Guid, string>();
dPriorityList.Add(Guid.Empty, "-");
foreach (PriorityPickList.PriorityPickListInfo i in ppl)
dPriorityList.Add(i.ID, i.Name);
cbWorkorderItemPriorityID.DataSource = new BindingSource(dPriorityList, "");
cbWorkorderItemPriorityID.ValueMember = "Key";
cbWorkorderItemPriorityID.DisplayMember = "Value";
}
#endregion Priority
#region Type
{
WorkorderItemTypePickList tpl = WorkorderItemTypePickList.GetList();
Dictionary<Guid, string> dTypeList = new Dictionary<Guid, string>();
dTypeList.Add(Guid.Empty, "-");
foreach (WorkorderItemTypePickList.WorkorderItemTypePickListInfo i in tpl)
dTypeList.Add(i.ID, i.Name);
cbWorkorderItemTypeID.DataSource = new BindingSource(dTypeList, "");
cbWorkorderItemTypeID.ValueMember = "Key";
cbWorkorderItemTypeID.DisplayMember = "Value";
}
#endregion Type
#region Unit
{
UnitPickList upl = UnitPickList.GetListByClient(mWorkorder.ClientID);
Dictionary<Guid, string> dUnitList = new Dictionary<Guid, string>();
dUnitList.Add(Guid.Empty, "-");
foreach (UnitPickList.UnitPickListInfo i in upl)
dUnitList.Add(i.ID, i.UnitName());
cbUnitID.DataSource = new BindingSource(dUnitList, "");
cbUnitID.ValueMember = "Key";
cbUnitID.DisplayMember = "Value";
}
#endregion Unit
#region UnitServiceType
{
GenericNVList l = GenericNVList.GetList("UNITSERVICETYPE", "ID", "NAME", true, false, false);
Dictionary<Guid, string> dUnitServiceTypes = new Dictionary<Guid, string>();
dUnitServiceTypes.Add(Guid.Empty, "-");
foreach (DictionaryEntry d in l.BindableList)
dUnitServiceTypes.Add(new Guid(d.Key.ToString()), d.Value.ToString());
cbUnitServiceTypeID.DataSource = new BindingSource(dUnitServiceTypes, "");
cbUnitServiceTypeID.ValueMember = "Key";
cbUnitServiceTypeID.DisplayMember = "Value";
}
#endregion
}
#endregion combo boxes
#region Form DataBinding and BrokenRules handling
private bool AmBinding = false;
/// <summary>
/// Bind controls to business objects
/// </summary>
private void DataBind()
{
AmBinding = true;
//Subscribe to broken rules changed event OnBrokenRulesChanged
mWorkorder.GetBrokenRulesCollection().ListChanged += new System.ComponentModel.ListChangedEventHandler(OnBrokenRulesChanged);
//=-=-=-=-=-=- Form Field bindings =-=-=-=-=-=-=-=-=-=-=-=
//Not bound but needs to be filled
edClient.Text = mWorkorder.NameAndAddress;
//Text editors
Util.BindField(edSummary, "Text", mWorkorder, "Summary");
Util.BindField(edCustomerReferenceNumber, "Text", mWorkorder, "CustomerReferenceNumber");
Util.BindField(edInternalReferenceNumber, "Text", mWorkorder, "InternalReferenceNumber");
Util.BindField(edCustomerContactName, "Text", mWorkorder, "CustomerContactName");
Util.BindField(edWorkorderItemSummary, "Text", mWorkorderItem, "Summary");
Util.BindField(edWorkorderItemTechNotes, "Text", mWorkorderItem, "TechNotes");
//Combo boxes
Util.BindField(cbWorkorderCategoryID, "SelectedValue", mWorkorder, "WorkorderCategoryID");
Util.BindField(cbProjectID, "SelectedValue", mWorkorder, "ProjectID");
Util.BindField(cbWorkorderStatusID, "SelectedValue", mWorkorder.WorkorderService, "WorkorderStatusID");
Util.BindField(cbWorkorderItemStatusID, "SelectedValue", mWorkorderItem, "WorkorderStatusID");
Util.BindField(cbWorkorderItemPriorityID, "SelectedValue", mWorkorderItem, "PriorityID");
Util.BindField(cbWorkorderItemTypeID, "SelectedValue", mWorkorderItem, "TypeID");
Util.BindField(cbUnitID, "SelectedValue", mWorkorderItem, "UnitID");
Util.BindField(cbUnitServiceTypeID, "SelectedValue", mWorkorderItem, "WorkorderItemUnitServiceTypeID");
//Check boxes
Util.BindField(ckOnsite, "Checked", mWorkorder, "Onsite");
Util.BindField(ckWorkorderItemWarrantyService, "Checked", mWorkorderItem, "WarrantyService");
//Added: 2-Oct-2006
this.edSummary.MaxLength = 255;
this.edCustomerContactName.MaxLength = 255;
this.edCustomerReferenceNumber.MaxLength = 255;
this.edInternalReferenceNumber.MaxLength = 255;
this.edWorkorderItemSummary.MaxLength = 255;
//DateTime
Util.BindField(dtServiceDate, "Value", mWorkorder.WorkorderService, "ServiceDate");
Util.BindField(dtCloseByDate, "Value", mWorkorder.WorkorderService, "CloseByDate");
Util.BindField(dtWorkorderItemRequestDate, "Value", mWorkorderItem, "RequestDate");
//GRIDS
Util.BindField(this.gridScheduledUsers, "DataSource", mWorkorderItem, "ScheduledUsers");
//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
//Bind IsDirty property to hidden checkbox to
//ensure isdirtychanged event is available
//to data binding infrastructure
Util.BindField(ckIsDirty, "Checked", mWorkorder, "IsDirty");
//Setup initial link to broken rules
OnBrokenRulesChanged(null, null);
AmBinding = false;
}
/// <summary>
/// Handle a change in broken rules
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void OnBrokenRulesChanged(object sender, System.ComponentModel.ListChangedEventArgs e)
{
Util.BrokenRuleFeedback(this, mWorkorder, epWO);
}
#endregion
#region ScheduledUsers items grid events / Initialization
private bool bScheduledUsersGridIntialized = false;
private void gridScheduledUsers_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e)
{
if (bScheduledUsersGridIntialized || gridScheduledUsers.DisplayLayout.Bands[0].Columns.Count == 0) return;
//case 1039 //log.Debug("gridScheduledUsers_InitializeLayout");
gridScheduledUsers.DisplayLayout.Override.HeaderClickAction = HeaderClickAction.SortSingle;
gridScheduledUsers.DisplayLayout.Override.AllowAddNew = AllowAddNew.TemplateOnBottom;
Util.GridPreLocalize("WorkorderItemScheduledUser", this.gridScheduledUsers.DisplayLayout.Bands[0]);
Util.FetchGridLayout("WorkorderItemScheduledUsers", "", gridScheduledUsers);
//Hide unwanted workorder item ScheduledUsers fields in that grid
foreach (UltraGridColumn c in gridScheduledUsers.DisplayLayout.Bands[0].Columns)
{
c.Hidden = true;
}
//Show the ones we want to...
gridScheduledUsers.DisplayLayout.Bands[0].Columns["UserID"].Hidden = false;
gridScheduledUsers.DisplayLayout.Bands[0].Columns["ServiceRateID"].Hidden = false;
gridScheduledUsers.DisplayLayout.Bands[0].Columns["StartDate"].Hidden = mWorkorder.IsTemplate;
gridScheduledUsers.DisplayLayout.Bands[0].Columns["StartDate"].EditorComponent = this.GridCalendar;
gridScheduledUsers.DisplayLayout.Bands[0].Columns["StopDate"].Hidden = mWorkorder.IsTemplate;
gridScheduledUsers.DisplayLayout.Bands[0].Columns["StopDate"].EditorComponent = this.GridCalendar;
gridScheduledUsers.DisplayLayout.Bands[0].Columns["EstimatedQuantity"].Hidden = false;
gridScheduledUsers.DisplayLayout.Bands[0].Columns["EstimatedQuantity"].Format = "g29";
Util.LocalizeGrid(gridScheduledUsers);
gridScheduledUsers.DisplayLayout.ValueLists.Clear();
//**************************************************
//Populate value lists
FillScheduledUserRatesList();
#region ======== Sheduleable users value list ========
//Clear any previous value list from this column
gridScheduledUsers.DisplayLayout.Bands[0].Columns["UserID"].ValueList = null;
//Add all potential active items
ValueList vlTechs = new ValueList();
//Empty is valid choice here
vlTechs.ValueListItems.Add(Guid.Empty, Util.NoSelectionString);//Case 318
foreach (UserListScheduleable.UserListScheduleableInfo ui in mUserList)
{
if (ui.Active == true)
vlTechs.ValueListItems.Add(ui.ID, ui.Name(Util.GlobalSettings.DefaultScheduleableUserNameDisplayFormat));
}
//Show sorted alphabetically
vlTechs.SortStyle = ValueListSortStyle.Ascending;
//Add manual items that are inactive but need to be displayed to list
foreach (WorkorderItem wi in mWorkorder.WorkorderItems)
{
foreach (WorkorderItemScheduledUser wl in wi.ScheduledUsers)
{
//Is this schedtechs item's User ID in the list already?
if (vlTechs.FindByDataValue(wl.UserID) != null)
continue;//17-April-2006 was a break; causing the loop to end prematurely
else
{
//Nope, add it to the list manually
foreach (UserListScheduleable.UserListScheduleableInfo ui in mUserList)
{
if (ui.ID == wl.UserID)
{
ValueListItem vi = vlTechs.ValueListItems.Add(ui.ID, ui.Name(Util.GlobalSettings.DefaultScheduleableUserNameDisplayFormat));
vi.Appearance.ForeColor = System.Drawing.SystemColors.GrayText;
}
}
}
}
}
//Bind value lists to correct columns in grid
gridScheduledUsers.DisplayLayout.Bands[0].Columns["UserID"].ValueList = vlTechs;
//Set column to dropdownlist style so that user can not type an invalid value in a cell
//but must select from the list only
gridScheduledUsers.DisplayLayout.Bands[0].Columns["UserID"].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.DropDownValidate;//Case 96 for autocomplete (was DropDownList)
gridScheduledUsers.DisplayLayout.Bands[0].Columns["UserID"].AutoCompleteMode = Infragistics.Win.AutoCompleteMode.SuggestAppend;
#endregion
//Allow empty string entry on grid
Util.SetTextColumnsNullable(gridScheduledUsers);
//case 1105
if (mWorkorder.IsEditable)
Util.GridAddDeleteButton(gridScheduledUsers);
else
Util.GridRemoveDeleteButton(gridScheduledUsers);
//=========DONE==============
bScheduledUsersGridIntialized = true;
}
private void FillScheduledUserRatesList()
{
//case 1039 //log.Debug("FillScheduledUserRatesList");
#region ======== Rates value list ========
//Clear any previous value list from this column
gridScheduledUsers.DisplayLayout.Bands[0].Columns["ServiceRateID"].ValueList = null;
//Add all potential active items
ValueList vlRates = new ValueList();
//Empty not valid but looks better this way when new record is added
//biz object's broken rules will catch any invalide entry anyway
vlRates.ValueListItems.Add(Guid.Empty, "-");//Case 318
//fill list with active labor (service) rates
foreach (RatePickList.RatePickListInfo ui in mRateList)
{
if ((ui.Selectable == true) && ui.RateType == RateTypes.Service)
{
vlRates.ValueListItems.Add(ui.ID, ui.Name);
}
}
vlRates.SortStyle = ValueListSortStyle.Ascending;
//Add manual items that are inactive but need to be displayed to list
foreach (WorkorderItem wi in mWorkorder.WorkorderItems)
{
foreach (WorkorderItemScheduledUser wl in wi.ScheduledUsers)
{
//Is this labor item's service rate ID in the list already?
if (vlRates.FindByDataValue(wl.ServiceRateID) != null)
continue;//17-April-2006 was a break; causing the loop to end prematurely
else
{
//Nope, add it to the list manually
ValueListItem vi = vlRates.ValueListItems.Add(wl.ServiceRateID, mRateList[wl.ServiceRateID].Name);
vi.Appearance.ForeColor = System.Drawing.SystemColors.GrayText;
}
}
}
//Bind value lists to correct columns in grid
gridScheduledUsers.DisplayLayout.Bands[0].Columns["ServiceRateID"].ValueList = vlRates;
//Set column to dropdownlist style so that user can not type an invalid value in a cell
//but must select from the list only
gridScheduledUsers.DisplayLayout.Bands[0].Columns["ServiceRateID"].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.DropDownValidate;//Case 96 for autocomplete (was DropDownList)
gridScheduledUsers.DisplayLayout.Bands[0].Columns["ServiceRateID"].AutoCompleteMode = Infragistics.Win.AutoCompleteMode.SuggestAppend;
#endregion
}
/// <summary>
///
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void gridScheduledUsers_BeforeRowInsert(object sender, Infragistics.Win.UltraWinGrid.BeforeRowInsertEventArgs e)
{
//case 1039 //log.Debug("gridScheduledUsers_BeforeRowInsert");
if (mWorkorder.Closed || mWorkorder.ServiceCompleted) return;
mWorkorderItem.ScheduledUsers.Add(mWorkorderItem);
e.Cancel = true;
}
/// <summary>
/// Handle users changes and update grid as appropriate
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void gridScheduledUsers_AfterCellUpdate(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e)
{
if ("StartDate" == e.Cell.Column.Key || "StopDate" == e.Cell.Column.Key)
{
//case 1251
if (!(e.Cell.Row.Cells["StopDate"].Value is DateTime)) return;
if (!(e.Cell.Row.Cells["StartDate"].Value is DateTime)) return;
DateTime dtStart = (DateTime)e.Cell.Row.Cells["StartDate"].Value;
DateTime dtStop = (DateTime)e.Cell.Row.Cells["StopDate"].Value;
if (dtStart == dtStop) return;
TimeSpan ts = dtStop.Subtract(dtStart);
e.Cell.Row.Cells["EstimatedQuantity"].Value = decimal.Round(
(decimal)ts.TotalHours,
2, MidpointRounding.AwayFromZero);
}
}
private void gridScheduledUsers_InitializeRow_1(object sender, InitializeRowEventArgs e)
{
//show broken rule icon if any
Util.GridShowBrokenRulesErrorIcons(e);
}
private void gridScheduledUsers_MouseEnterElement_1(object sender, UIElementEventArgs e)
{ Util.GridShowBrokenRulesToolTip(e, tipError); }
private void gridScheduledUsers_ClickCellButton(object sender, CellEventArgs e)
{
if (e.Cell.Column.Key == "REMOVE")
gridScheduledUsers.DisplayLayout.ActiveRow.Delete();
}
#endregion sched users grid
private void btnTest_Click(object sender, EventArgs e)
{
MessageBox.Show("What's dirty:\r\n" + mWorkorder.WhatsDirty + "\r\n=-=-=-=-=-=-=-\r\nIsSavable:" + mWorkorder.IsSavable.ToString() +
"\r\n" + "IsSaveAllowed:" + mWorkorder.IsSaveAllowed.ToString() +
"\r\nBroken rules:\r\n" + mWorkorder.BrokenRulesText +
"\r\nBroken rules collection count:\r\n" + mWorkorder.GetBrokenRulesCollection().Count.ToString());
}
#region Business object editing / adding / deletion related code
//Used to signal to main form that there are changes
//which could affect it if true
private bool mbChangesMade = false;
public bool ChangesMade
{
get
{
return mbChangesMade;
}
}
/// <summary>
/// Update record and quit if requested
///
/// </summary>
/// <returns>True if handled, false if not handled</returns>
private bool RecordUpdate(RecordActionType SaveType)
{
//case 1039 //if(log.IsDebugEnabled) //case 1039 //log.Debug("SaveHandler(Action="+SaveType.ToString()+")");
//switch the focus to a non-editable control
//so that any changes in the current editable control
//will get updated before attempting to save
//probably don't need this here since we aren't using a menu just an ok button which takes focus off automatically anyway.
// btnWorkorderCategoryID.Focus();
gridScheduledUsers.UpdateData();
//Added: 17-Nov-2006 to handle concurrency errors more gracefully
try
{
#region Process savetype
switch (SaveType)
{
case RecordActionType.SaveAndExit:
//Save if necessary and exit
if (mWorkorder.IsSavable)
{
mWorkorder.ApplyEdit();
mWorkorder.Save();
bClosingHandled = true;
mbChangesMade = true;
this.Close();
return true;
}
if (mWorkorder.IsDirty)//dirty and unsaveable due to broken rules
{
if (Util.PromptForBrokenRulesCancelSave() == DialogResult.Yes)
{
bClosingHandled = true;
this.Close();
return true;
}
else
return false;
}
//not dirty so just exit
bClosingHandled = true;
this.Close();
return true;
case RecordActionType.SaveOnly:
if (mWorkorder.IsSavable)
{
mWorkorder.ApplyEdit();
mWorkorder = (Workorder)mWorkorder.Save();
//case 1040
DataBind();
mbChangesMade = true;
return true;
}
return true;
case RecordActionType.PromptToSave:
//Prompt to save and save if
//required
if (mWorkorder.IsDirty)
{
DialogResult dr = Util.PromptForSave();
if (dr == DialogResult.Cancel)
{
//Cancel
return false;
}
if (dr == DialogResult.Yes)
{
//Save before exit
if (mWorkorder.IsSavable)
{
mWorkorder.ApplyEdit();
mWorkorder.Save();
mbChangesMade = true;
return true;
}
if (mWorkorder.IsDirty)//dirty and unsaveable due to broken rules
{
if (Util.PromptForBrokenRulesCancelSave() == DialogResult.Yes)
{
return true;
}
else
return false;
}
}
}
return true;
}
#endregion process savetype
}
catch (Exception ex)
{
//crack the exception
if (ex.InnerException != null)
ex = ex.InnerException;
if (ex is AyConcurrencyException)
{
MessageBox.Show(ex.Message, "", MessageBoxButtons.OK, MessageBoxIcon.Information);
//if (log.IsDebugEnabled)
//case 1039 //log.Debug("Save record concurrency exception", ex);
bClosingHandled = true;
this.Close();
return false;
}
else
throw;
}
return false;
}
#endregion
private void btnCancel_Click(object sender, EventArgs e)
{
bClosingHandled = true;
this.Close();
}
private void btnOK_Click(object sender, EventArgs e)
{
RecordUpdate(RecordActionType.SaveAndExit);
}
private void gridScheduledUsers_BeforeRowCancelUpdate(object sender, CancelableRowEventArgs e)
{
//MessageBox.Show("BeforeRowCancelUpdate");
}
}//end class
}//end namespace

View File

@@ -0,0 +1,126 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema 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>
<metadata name="epWO.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="tipError.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>99, 17</value>
</metadata>
</root>

View File

@@ -0,0 +1,110 @@
namespace AyaNovaOL
{
partial class Options
{
/// <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.ckIncludeEmailHeader = new System.Windows.Forms.CheckBox();
this.btnOK = new System.Windows.Forms.Button();
this.btnCancel = new System.Windows.Forms.Button();
this.btnMap = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// ckIncludeEmailHeader
//
this.ckIncludeEmailHeader.AutoSize = true;
this.ckIncludeEmailHeader.Location = new System.Drawing.Point(16, 28);
this.ckIncludeEmailHeader.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.ckIncludeEmailHeader.Name = "ckIncludeEmailHeader";
this.ckIncludeEmailHeader.Size = new System.Drawing.Size(222, 21);
this.ckIncludeEmailHeader.TabIndex = 0;
this.ckIncludeEmailHeader.Text = "Include email message header";
this.ckIncludeEmailHeader.UseVisualStyleBackColor = true;
//
// btnOK
//
this.btnOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnOK.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.btnOK.Image = global::AyaNovaOL.Resource1.OK24;
this.btnOK.Location = new System.Drawing.Point(252, 161);
this.btnOK.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.btnOK.Name = "btnOK";
this.btnOK.Size = new System.Drawing.Size(75, 43);
this.btnOK.TabIndex = 99;
this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
//
// btnCancel
//
this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.btnCancel.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.btnCancel.Image = global::AyaNovaOL.Resource1.Cancel24;
this.btnCancel.Location = new System.Drawing.Point(16, 161);
this.btnCancel.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(75, 43);
this.btnCancel.TabIndex = 98;
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
//
// btnMap
//
this.btnMap.Location = new System.Drawing.Point(16, 82);
this.btnMap.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.btnMap.Name = "btnMap";
this.btnMap.Size = new System.Drawing.Size(252, 28);
this.btnMap.TabIndex = 100;
this.btnMap.Text = "Map phone and address fields";
this.btnMap.UseVisualStyleBackColor = true;
this.btnMap.Click += new System.EventHandler(this.btnMap_Click);
//
// Options
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(343, 219);
this.Controls.Add(this.btnMap);
this.Controls.Add(this.btnOK);
this.Controls.Add(this.btnCancel);
this.Controls.Add(this.ckIncludeEmailHeader);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.Name = "Options";
this.Text = "Options";
this.Load += new System.EventHandler(this.Options_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.CheckBox ckIncludeEmailHeader;
private System.Windows.Forms.Button btnOK;
private System.Windows.Forms.Button btnCancel;
private System.Windows.Forms.Button btnMap;
}
}

View File

@@ -0,0 +1,44 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace AyaNovaOL
{
public partial class Options : Form
{
public Options()
{
InitializeComponent();
}
private void Options_Load(object sender, EventArgs e)
{
ckIncludeEmailHeader.Checked = AyaNovaOL.Properties.Settings.Default.IncludeEmailHeader;
}
private void btnCancel_Click(object sender, EventArgs e)
{
Close();
}
private void btnOK_Click(object sender, EventArgs e)
{
AyaNovaOL.Properties.Settings.Default.IncludeEmailHeader = ckIncludeEmailHeader.Checked;
AyaNovaOL.Properties.Settings.Default.Save();
Close();
}
private void btnMap_Click(object sender, EventArgs e)
{
MapPhoneAddress d = new MapPhoneAddress();
d.ShowDialog();
d.Dispose();
}
//-----------------------
}
}

View 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>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,326 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.1
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace AyaNovaOL.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default {
get {
return defaultInstance;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("2")]
public int VendorType {
get {
return ((int)(this["VendorType"]));
}
set {
this["VendorType"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("8236e8d1-cab1-4797-9c34-93861954ae6a")]
public global::System.Guid Region {
get {
return ((global::System.Guid)(this["Region"]));
}
set {
this["Region"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("00000000-0000-0000-0000-000000000000")]
public global::System.Guid Zone {
get {
return ((global::System.Guid)(this["Zone"]));
}
set {
this["Zone"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("00000000-0000-0000-0000-000000000000")]
public global::System.Guid Contract {
get {
return ((global::System.Guid)(this["Contract"]));
}
set {
this["Contract"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("0")]
public int PhysicalAddressEquals {
get {
return ((int)(this["PhysicalAddressEquals"]));
}
set {
this["PhysicalAddressEquals"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("0")]
public int PostalAddressEquals {
get {
return ((int)(this["PostalAddressEquals"]));
}
set {
this["PostalAddressEquals"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("0")]
public int ClientPhone1 {
get {
return ((int)(this["ClientPhone1"]));
}
set {
this["ClientPhone1"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("0")]
public int ClientPhone2 {
get {
return ((int)(this["ClientPhone2"]));
}
set {
this["ClientPhone2"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("0")]
public int ClientPhone3 {
get {
return ((int)(this["ClientPhone3"]));
}
set {
this["ClientPhone3"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("0")]
public int ClientPhone4 {
get {
return ((int)(this["ClientPhone4"]));
}
set {
this["ClientPhone4"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("0")]
public int ClientPhone5 {
get {
return ((int)(this["ClientPhone5"]));
}
set {
this["ClientPhone5"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("0")]
public int HeadOfficePhone1 {
get {
return ((int)(this["HeadOfficePhone1"]));
}
set {
this["HeadOfficePhone1"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("0")]
public int HeadOfficePhone2 {
get {
return ((int)(this["HeadOfficePhone2"]));
}
set {
this["HeadOfficePhone2"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("0")]
public int HeadOfficePhone3 {
get {
return ((int)(this["HeadOfficePhone3"]));
}
set {
this["HeadOfficePhone3"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("0")]
public int HeadOfficePhone4 {
get {
return ((int)(this["HeadOfficePhone4"]));
}
set {
this["HeadOfficePhone4"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("0")]
public int HeadOfficePhone5 {
get {
return ((int)(this["HeadOfficePhone5"]));
}
set {
this["HeadOfficePhone5"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("0")]
public int VendorPhone1 {
get {
return ((int)(this["VendorPhone1"]));
}
set {
this["VendorPhone1"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("0")]
public int VendorPhone2 {
get {
return ((int)(this["VendorPhone2"]));
}
set {
this["VendorPhone2"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("0")]
public int VendorPhone3 {
get {
return ((int)(this["VendorPhone3"]));
}
set {
this["VendorPhone3"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("0")]
public int VendorPhone4 {
get {
return ((int)(this["VendorPhone4"]));
}
set {
this["VendorPhone4"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("0")]
public int VendorPhone5 {
get {
return ((int)(this["VendorPhone5"]));
}
set {
this["VendorPhone5"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("3")]
public int RootObjectType {
get {
return ((int)(this["RootObjectType"]));
}
set {
this["RootObjectType"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
public bool IgnoreThisIsTheMailingAddress {
get {
return ((bool)(this["IgnoreThisIsTheMailingAddress"]));
}
set {
this["IgnoreThisIsTheMailingAddress"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool IncludeEmailHeader {
get {
return ((bool)(this["IncludeEmailHeader"]));
}
set {
this["IncludeEmailHeader"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool FieldsMapped {
get {
return ((bool)(this["FieldsMapped"]));
}
set {
this["FieldsMapped"] = value;
}
}
}
}

View File

@@ -0,0 +1,81 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="AyaNovaOL.Properties" GeneratedClassName="Settings">
<Profiles />
<Settings>
<Setting Name="VendorType" Type="System.Int32" Scope="User">
<Value Profile="(Default)">2</Value>
</Setting>
<Setting Name="Region" Type="System.Guid" Scope="User">
<Value Profile="(Default)">8236e8d1-cab1-4797-9c34-93861954ae6a</Value>
</Setting>
<Setting Name="Zone" Type="System.Guid" Scope="User">
<Value Profile="(Default)">00000000-0000-0000-0000-000000000000</Value>
</Setting>
<Setting Name="Contract" Type="System.Guid" Scope="User">
<Value Profile="(Default)">00000000-0000-0000-0000-000000000000</Value>
</Setting>
<Setting Name="PhysicalAddressEquals" Type="System.Int32" Scope="User">
<Value Profile="(Default)">0</Value>
</Setting>
<Setting Name="PostalAddressEquals" Type="System.Int32" Scope="User">
<Value Profile="(Default)">0</Value>
</Setting>
<Setting Name="ClientPhone1" Type="System.Int32" Scope="User">
<Value Profile="(Default)">0</Value>
</Setting>
<Setting Name="ClientPhone2" Type="System.Int32" Scope="User">
<Value Profile="(Default)">0</Value>
</Setting>
<Setting Name="ClientPhone3" Type="System.Int32" Scope="User">
<Value Profile="(Default)">0</Value>
</Setting>
<Setting Name="ClientPhone4" Type="System.Int32" Scope="User">
<Value Profile="(Default)">0</Value>
</Setting>
<Setting Name="ClientPhone5" Type="System.Int32" Scope="User">
<Value Profile="(Default)">0</Value>
</Setting>
<Setting Name="HeadOfficePhone1" Type="System.Int32" Scope="User">
<Value Profile="(Default)">0</Value>
</Setting>
<Setting Name="HeadOfficePhone2" Type="System.Int32" Scope="User">
<Value Profile="(Default)">0</Value>
</Setting>
<Setting Name="HeadOfficePhone3" Type="System.Int32" Scope="User">
<Value Profile="(Default)">0</Value>
</Setting>
<Setting Name="HeadOfficePhone4" Type="System.Int32" Scope="User">
<Value Profile="(Default)">0</Value>
</Setting>
<Setting Name="HeadOfficePhone5" Type="System.Int32" Scope="User">
<Value Profile="(Default)">0</Value>
</Setting>
<Setting Name="VendorPhone1" Type="System.Int32" Scope="User">
<Value Profile="(Default)">0</Value>
</Setting>
<Setting Name="VendorPhone2" Type="System.Int32" Scope="User">
<Value Profile="(Default)">0</Value>
</Setting>
<Setting Name="VendorPhone3" Type="System.Int32" Scope="User">
<Value Profile="(Default)">0</Value>
</Setting>
<Setting Name="VendorPhone4" Type="System.Int32" Scope="User">
<Value Profile="(Default)">0</Value>
</Setting>
<Setting Name="VendorPhone5" Type="System.Int32" Scope="User">
<Value Profile="(Default)">0</Value>
</Setting>
<Setting Name="RootObjectType" Type="System.Int32" Scope="User">
<Value Profile="(Default)">3</Value>
</Setting>
<Setting Name="IgnoreThisIsTheMailingAddress" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
<Setting Name="IncludeEmailHeader" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="FieldsMapped" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
</Settings>
</SettingsFile>

View File

@@ -0,0 +1,2 @@
Infragistics.Win.UltraWinEditors.UltraDateTimeEditor, Infragistics4.Win.UltraWinEditors.v11.2, Version=11.2.20112.2135, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb
Infragistics.Win.UltraWinGrid.UltraGrid, Infragistics4.Win.UltraWinGrid.v11.2, Version=11.2.20112.2135, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb

View File

@@ -0,0 +1,161 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.1
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace AyaNovaOL {
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("AyaNovaOL.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;
}
}
internal static System.Drawing.Icon AyaNova5 {
get {
object obj = ResourceManager.GetObject("AyaNova5", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
internal static System.Drawing.Bitmap AyaNovaOLI64 {
get {
object obj = ResourceManager.GetObject("AyaNovaOLI64", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap AyaNovaOLIsplash {
get {
object obj = ResourceManager.GetObject("AyaNovaOLIsplash", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap Cancel24 {
get {
object obj = ResourceManager.GetObject("Cancel24", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap Client32 {
get {
object obj = ResourceManager.GetObject("Client32", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap Delete16 {
get {
object obj = ResourceManager.GetObject("Delete16", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap HeadOffice32 {
get {
object obj = ResourceManager.GetObject("HeadOffice32", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap Login32 {
get {
object obj = ResourceManager.GetObject("Login32", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap LoginPassword32 {
get {
object obj = ResourceManager.GetObject("LoginPassword32", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap OK24 {
get {
object obj = ResourceManager.GetObject("OK24", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Icon ScheduleMarker16icon {
get {
object obj = ResourceManager.GetObject("ScheduleMarker16icon", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
internal static System.Drawing.Bitmap SearchDatabase16 {
get {
object obj = ResourceManager.GetObject("SearchDatabase16", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Icon ServiceWorkorder16icon {
get {
object obj = ResourceManager.GetObject("ServiceWorkorder16icon", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
internal static System.Drawing.Bitmap Vendor32 {
get {
object obj = ResourceManager.GetObject("Vendor32", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
}
}

View File

@@ -0,0 +1,163 @@
<?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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="AyaNova5" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\AyaNova5.ico;System.Drawing.Icon, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="AyaNovaOLI64" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\AyaNovaOLI64.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="AyaNovaOLIsplash" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\AyaNovaOLIsplash.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Cancel24" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\Cancel24.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Client32" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\Client32.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Delete16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\Delete16.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="HeadOffice32" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\HeadOffice32.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Login32" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\Login32.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="LoginPassword32" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\LoginPassword32.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="OK24" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\OK24.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ScheduleMarker16icon" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\ScheduleMarker16icon.ico;System.Drawing.Icon, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="SearchDatabase16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\SearchDatabase16.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ServiceWorkorder16icon" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\ServiceWorkorder16icon.ico;System.Drawing.Icon, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Vendor32" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\Vendor32.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 761 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 643 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

@@ -0,0 +1,272 @@
namespace AyaNovaOL
{
partial class ScheduleMarkerForm
{
/// <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.components = new System.ComponentModel.Container();
this.btnOpenFollowObject = new System.Windows.Forms.Button();
this.dtStopDate = new Infragistics.Win.UltraWinEditors.UltraDateTimeEditor();
this.dtStartDate = new Infragistics.Win.UltraWinEditors.UltraDateTimeEditor();
this.cbScheduleMarkerSourceID = new Infragistics.Win.UltraWinEditors.UltraComboEditor();
this.edNotes = new Infragistics.Win.UltraWinEditors.UltraTextEditor();
this.edName = new Infragistics.Win.UltraWinEditors.UltraTextEditor();
this.cpColor = new Infragistics.Win.UltraWinEditors.UltraColorPicker();
this.lblScheduleMarkerSourceID = new Infragistics.Win.Misc.UltraLabel();
this.lblContractExpireDate = new Infragistics.Win.Misc.UltraLabel();
this.lblContractStartDate = new Infragistics.Win.Misc.UltraLabel();
this.lblName = new Infragistics.Win.Misc.UltraLabel();
this.lblColor = new Infragistics.Win.Misc.UltraLabel();
this.btnCancel = new System.Windows.Forms.Button();
this.btnOK = new System.Windows.Forms.Button();
this.ckIsDirty = new System.Windows.Forms.CheckBox();
this.epSchedMarker = new System.Windows.Forms.ErrorProvider(this.components);
this.ckCompleted = new Infragistics.Win.UltraWinEditors.UltraCheckEditor();
((System.ComponentModel.ISupportInitialize)(this.dtStopDate)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dtStartDate)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.cbScheduleMarkerSourceID)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.edNotes)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.edName)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.cpColor)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.epSchedMarker)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.ckCompleted)).BeginInit();
this.SuspendLayout();
//
// btnOpenFollowObject
//
this.btnOpenFollowObject.Location = new System.Drawing.Point(12, 220);
this.btnOpenFollowObject.Name = "btnOpenFollowObject";
this.btnOpenFollowObject.Size = new System.Drawing.Size(282, 23);
this.btnOpenFollowObject.TabIndex = 90;
this.btnOpenFollowObject.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnOpenFollowObject.UseVisualStyleBackColor = true;
this.btnOpenFollowObject.Visible = false;
//
// dtStopDate
//
this.dtStopDate.Location = new System.Drawing.Point(194, 124);
this.dtStopDate.Name = "dtStopDate";
this.dtStopDate.Size = new System.Drawing.Size(268, 24);
this.dtStopDate.TabIndex = 87;
//
// dtStartDate
//
this.dtStartDate.Location = new System.Drawing.Point(194, 92);
this.dtStartDate.Name = "dtStartDate";
this.dtStartDate.Size = new System.Drawing.Size(268, 24);
this.dtStartDate.TabIndex = 86;
//
// cbScheduleMarkerSourceID
//
this.cbScheduleMarkerSourceID.AutoCompleteMode = Infragistics.Win.AutoCompleteMode.SuggestAppend;
this.cbScheduleMarkerSourceID.LimitToList = true;
this.cbScheduleMarkerSourceID.Location = new System.Drawing.Point(193, 28);
this.cbScheduleMarkerSourceID.Name = "cbScheduleMarkerSourceID";
this.cbScheduleMarkerSourceID.Size = new System.Drawing.Size(268, 24);
this.cbScheduleMarkerSourceID.TabIndex = 84;
//
// edNotes
//
this.edNotes.AcceptsReturn = true;
this.edNotes.AcceptsTab = true;
this.edNotes.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.edNotes.Location = new System.Drawing.Point(12, 250);
this.edNotes.Multiline = true;
this.edNotes.Name = "edNotes";
this.edNotes.Scrollbars = System.Windows.Forms.ScrollBars.Both;
this.edNotes.Size = new System.Drawing.Size(449, 140);
this.edNotes.TabIndex = 89;
//
// edName
//
this.edName.Location = new System.Drawing.Point(194, 60);
this.edName.Name = "edName";
this.edName.Size = new System.Drawing.Size(268, 24);
this.edName.TabIndex = 85;
//
// cpColor
//
this.cpColor.Location = new System.Drawing.Point(194, 156);
this.cpColor.Name = "cpColor";
this.cpColor.Size = new System.Drawing.Size(268, 24);
this.cpColor.TabIndex = 88;
this.cpColor.Text = "Control";
//
// lblScheduleMarkerSourceID
//
this.lblScheduleMarkerSourceID.BorderStyleOuter = Infragistics.Win.UIElementBorderStyle.None;
this.lblScheduleMarkerSourceID.Location = new System.Drawing.Point(12, 28);
this.lblScheduleMarkerSourceID.Name = "lblScheduleMarkerSourceID";
this.lblScheduleMarkerSourceID.Size = new System.Drawing.Size(136, 16);
this.lblScheduleMarkerSourceID.TabIndex = 95;
this.lblScheduleMarkerSourceID.Tag = "";
this.lblScheduleMarkerSourceID.Text = "LT:ScheduleMarker.Label.SourceID";
//
// lblContractExpireDate
//
this.lblContractExpireDate.BorderStyleOuter = Infragistics.Win.UIElementBorderStyle.None;
this.lblContractExpireDate.Location = new System.Drawing.Point(12, 124);
this.lblContractExpireDate.Name = "lblContractExpireDate";
this.lblContractExpireDate.Size = new System.Drawing.Size(136, 16);
this.lblContractExpireDate.TabIndex = 94;
this.lblContractExpireDate.Tag = "";
this.lblContractExpireDate.Text = "LT:ScheduleMarker.Label.StopDate";
//
// lblContractStartDate
//
this.lblContractStartDate.BorderStyleOuter = Infragistics.Win.UIElementBorderStyle.None;
this.lblContractStartDate.Location = new System.Drawing.Point(12, 92);
this.lblContractStartDate.Name = "lblContractStartDate";
this.lblContractStartDate.Size = new System.Drawing.Size(136, 16);
this.lblContractStartDate.TabIndex = 93;
this.lblContractStartDate.Tag = "";
this.lblContractStartDate.Text = "LT:ScheduleMarker.Label.StartDate";
//
// lblName
//
this.lblName.BorderStyleOuter = Infragistics.Win.UIElementBorderStyle.None;
this.lblName.Location = new System.Drawing.Point(12, 60);
this.lblName.Name = "lblName";
this.lblName.Size = new System.Drawing.Size(136, 16);
this.lblName.TabIndex = 92;
this.lblName.Tag = "";
this.lblName.Text = "LT:ScheduleMarker.Label.Name";
//
// lblColor
//
this.lblColor.BorderStyleOuter = Infragistics.Win.UIElementBorderStyle.None;
this.lblColor.Location = new System.Drawing.Point(12, 156);
this.lblColor.Name = "lblColor";
this.lblColor.Size = new System.Drawing.Size(136, 16);
this.lblColor.TabIndex = 91;
this.lblColor.Tag = "";
this.lblColor.Text = "LT:ScheduleMarker.Label.Color";
//
// btnCancel
//
this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.btnCancel.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.btnCancel.Image = global::AyaNovaOL.Resource1.Cancel24;
this.btnCancel.Location = new System.Drawing.Point(12, 396);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(56, 35);
this.btnCancel.TabIndex = 96;
//
// btnOK
//
this.btnOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnOK.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.btnOK.Image = global::AyaNovaOL.Resource1.OK24;
this.btnOK.Location = new System.Drawing.Point(405, 396);
this.btnOK.Name = "btnOK";
this.btnOK.Size = new System.Drawing.Size(56, 35);
this.btnOK.TabIndex = 97;
this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
//
// ckIsDirty
//
this.ckIsDirty.Location = new System.Drawing.Point(-288, 96);
this.ckIsDirty.Name = "ckIsDirty";
this.ckIsDirty.Size = new System.Drawing.Size(117, 24);
this.ckIsDirty.TabIndex = 98;
//
// epSchedMarker
//
this.epSchedMarker.ContainerControl = this;
//
// ckCompleted
//
this.ckCompleted.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.ckCompleted.Location = new System.Drawing.Point(13, 186);
this.ckCompleted.Name = "ckCompleted";
this.ckCompleted.Size = new System.Drawing.Size(260, 24);
this.ckCompleted.TabIndex = 99;
this.ckCompleted.Text = "LT:ScheduleMarker.Label.Completed";
//
// ScheduleMarkerForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
this.ClientSize = new System.Drawing.Size(473, 443);
this.Controls.Add(this.ckCompleted);
this.Controls.Add(this.ckIsDirty);
this.Controls.Add(this.btnOK);
this.Controls.Add(this.btnCancel);
this.Controls.Add(this.lblScheduleMarkerSourceID);
this.Controls.Add(this.lblContractExpireDate);
this.Controls.Add(this.lblContractStartDate);
this.Controls.Add(this.lblName);
this.Controls.Add(this.lblColor);
this.Controls.Add(this.btnOpenFollowObject);
this.Controls.Add(this.dtStopDate);
this.Controls.Add(this.dtStartDate);
this.Controls.Add(this.cbScheduleMarkerSourceID);
this.Controls.Add(this.edNotes);
this.Controls.Add(this.edName);
this.Controls.Add(this.cpColor);
this.MinimumSize = new System.Drawing.Size(481, 453);
this.Name = "ScheduleMarkerForm";
this.ShowInTaskbar = false;
this.Text = "LT:O.ScheduleMarker";
this.Load += new System.EventHandler(this.ScheduleMarkerForm_Load);
((System.ComponentModel.ISupportInitialize)(this.dtStopDate)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.dtStartDate)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.cbScheduleMarkerSourceID)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.edNotes)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.edName)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.cpColor)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.epSchedMarker)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.ckCompleted)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button btnOpenFollowObject;
private Infragistics.Win.UltraWinEditors.UltraDateTimeEditor dtStopDate;
private Infragistics.Win.UltraWinEditors.UltraDateTimeEditor dtStartDate;
private Infragistics.Win.UltraWinEditors.UltraComboEditor cbScheduleMarkerSourceID;
private Infragistics.Win.UltraWinEditors.UltraTextEditor edNotes;
private Infragistics.Win.UltraWinEditors.UltraTextEditor edName;
private Infragistics.Win.UltraWinEditors.UltraColorPicker cpColor;
private Infragistics.Win.Misc.UltraLabel lblScheduleMarkerSourceID;
private Infragistics.Win.Misc.UltraLabel lblContractExpireDate;
private Infragistics.Win.Misc.UltraLabel lblContractStartDate;
private Infragistics.Win.Misc.UltraLabel lblName;
private Infragistics.Win.Misc.UltraLabel lblColor;
private System.Windows.Forms.Button btnCancel;
private System.Windows.Forms.Button btnOK;
private System.Windows.Forms.CheckBox ckIsDirty;
private System.Windows.Forms.ErrorProvider epSchedMarker;
private Infragistics.Win.UltraWinEditors.UltraCheckEditor ckCompleted;
}
}

View File

@@ -0,0 +1,627 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Collections;
using System.Text;
using System.Windows.Forms;
using GZTW.AyaNova.BLL;
using Infragistics.Win;
namespace AyaNovaOL
{
public partial class ScheduleMarkerForm : Form
{
public ScheduleMarkerForm()
{
InitializeComponent();
}
#region Form Load / Close
//variable to hold user form settings
//UIUserFormSetting mFormSetting;
public bool bHideFollowObjectButton = false;
/// <summary>
/// Prepare the form
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void ScheduleMarkerForm_Load(object sender, System.EventArgs e)
{
//case 1039 //log.Debug("ScheduleMarkerForm_Load");
Cursor.Current = Cursors.WaitCursor;
this.Visible = false;
this.Icon = Resource1.ScheduleMarker16icon;
//See if user has any rights to be here...
//(this is done here to ensure that no matter what happens if a user has no rights they can't get here
//useful in case we miss a way of getting to a Region edit screen from elsewhere in the program)
if (AyaBizUtils.Right("Object.ScheduleMarker") < (int)SecurityLevelTypes.ReadOnly)//Less than read only instead of NoAccess to catch records where it's zero instead of 1
{
//Inform them of their wicked ways and boot them out of here...
MessageBox.Show(string.Format(
Util.LocaleText.GetLocalizedText("Error.Security.NotAuthorizedToRetrieve"),
Util.LocaleText.GetLocalizedText("O.ScheduleMarker")));
this.Close();
return;
}
//Set locale input format for dates
dtStartDate.MaskInput = Util.LocaleDateTimeMask();
dtStopDate.MaskInput = Util.LocaleDateTimeMask();
InitializeComboBoxes();
DataBind();
Util.Localize(this);
Cursor.Current = Cursors.Default;
//Case 152
(new TabOrderManager(this)).SetTabOrder(TabOrderManager.TabScheme.AcrossFirst);
//restrict UI based on security settings
RestrictUI();
if (mScheduleMarker.FollowID != Guid.Empty)
this.Text = Util.LocaleText.GetLocalizedText("ScheduleMarker.Label.FollowUp");
this.Visible = true;
}
/// <summary>
/// Used to track whether the close was done by the program
/// or done by the user clicking on the upper left corner X control
/// </summary>
bool bClosingHandled = false;
/// <summary>
/// Save form layout and grid layout for next time
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void ScheduleMarkerForm_Closing(object sender, System.ComponentModel.CancelEventArgs e)
{
if (!bClosingHandled && (AyaBizUtils.Right("Object.ScheduleMarker") > (int)SecurityLevelTypes.ReadOnly))
{
//Save record if necessary
//User may opt to not cancel exit
if (!RecordUpdate(RecordActionType.PromptToSave))
{
e.Cancel = true;
return;
}
}
}
#endregion
#region Form UI / Business object synchronization
/// <summary>
/// Adapt UI to accomodate users security access level
/// by default form is set with full rights in mind
/// so this code just needs to restrict them as required
/// </summary>
private void RestrictUI()
{
SecurityLevelTypes right = (SecurityLevelTypes)AyaBizUtils.Right("Object.ScheduleMarker");
bool bReadOnly = right < SecurityLevelTypes.ReadWrite;
edName.Enabled = !bReadOnly;
edNotes.Enabled = !bReadOnly;
cbScheduleMarkerSourceID.Enabled = !bReadOnly;
cpColor.Enabled = !bReadOnly;
dtStartDate.Enabled = !bReadOnly;
dtStopDate.Enabled = !bReadOnly;
ckCompleted.Enabled = !bReadOnly;
bool bshow = !bHideFollowObjectButton;
bshow = bshow && mScheduleMarker.FollowID != Guid.Empty;
btnOpenFollowObject.Visible = bshow;
if (bshow)
btnOpenFollowObject.Text = NameFetcher.GetItem(new TypeAndID(mScheduleMarker.FollowType, mScheduleMarker.FollowID)).RecordName;
//case 1208
if (AyaBizUtils.Lite)
cbScheduleMarkerSourceID.Enabled = false;
}
#endregion
#region Form DataBinding and BrokenRules handling
/// <summary>
/// Bind controls to business objects
/// </summary>
private void DataBind()
{
//case 1039 //log.Debug("DataBind");
//Subscribe to broken rules changed event OnBrokenRulesChanged
mScheduleMarker.GetBrokenRulesCollection().ListChanged += new System.ComponentModel.ListChangedEventHandler(OnBrokenRulesChanged);
//=-=-=-=-=-=- Form Field bindings =-=-=-=-=-=-=-=-=-=-=-=
//Text editors
Util.BindField(edName, "Text", mScheduleMarker, "Name");
Util.BindField(edNotes, "Text", mScheduleMarker, "Notes");
//Date and time
Util.BindField(dtStartDate, "Value", mScheduleMarker, "StartDate");
Util.BindField(dtStopDate, "Value", mScheduleMarker, "StopDate");
//Color which can't be bound but can be set here and in
//the save function
cpColor.Color = Color.FromArgb(mScheduleMarker.ARGB);
//Check boxes
Util.BindField(ckCompleted, "Checked", mScheduleMarker, "Completed");
//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
//Bind IsDirty property to hidden checkbox to
//ensure isdirtychanged event is available
//to data binding infrastructure
Util.BindField(ckIsDirty, "Checked", mScheduleMarker, "IsDirty");
//Setup initial link to broken rules
OnBrokenRulesChanged(null, null);
}
/// <summary>
/// Handle a change in broken rules
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void OnBrokenRulesChanged(object sender, System.ComponentModel.ListChangedEventArgs e)
{
Util.BrokenRuleFeedback(this, mScheduleMarker, epSchedMarker);
}
#endregion
#region Business object editing / adding / deletion related code
private GZTW.AyaNova.BLL.ScheduleMarker mScheduleMarker;
/// <summary>
/// ScheduleMarker record to display
/// set by caller
/// </summary>
public GZTW.AyaNova.BLL.ScheduleMarker ScheduleMarkerToEdit
{
get
{
return mScheduleMarker;
}
set
{
mScheduleMarker = value;
//mScheduleMarker.BeginEdit();
}
}
//Used to signal to main form that there are changes
//which could affect it if true
private bool mbChangesMade = false;
public bool ChangesMade
{
get
{
return mbChangesMade;
}
}
/// <summary>
/// Update record and quit if requested
///
/// </summary>
/// <returns>True if handled, false if not handled</returns>
private bool RecordUpdate(RecordActionType SaveType)
{
//case 1039 //if(log.IsDebugEnabled) //case 1039 //log.Debug("SaveHandler(Action="+SaveType.ToString()+")");
//switch the focus to a non editable control
//so that any changes in the current editable control
//will get updated before attempting to save
lblScheduleMarkerSourceID.Focus();
//Bind data from unbindable controls
cbScheduleMarkerSourceID_ValueChanged(null, null);
mScheduleMarker.ARGB = cpColor.Color.ToArgb();
switch (SaveType)
{
case RecordActionType.SaveAndExit:
//Save if necessary and exit
if (mScheduleMarker.IsSavable)
{
mScheduleMarker.ApplyEdit();
mScheduleMarker.Save();
bClosingHandled = true;
mbChangesMade = true;
this.Close();
return true;
}
if (mScheduleMarker.IsDirty)//dirty and unsaveable due to broken rules
{
if (Util.PromptForBrokenRulesCancelSave() == DialogResult.Yes)
{
bClosingHandled = true;
this.Close();
return true;
}
else
return false;
}
//not dirty so just exit
bClosingHandled = true;
this.Close();
return true;
case RecordActionType.SaveAndNew:
if (mScheduleMarker.IsSavable)
{
mScheduleMarker.ApplyEdit();
mScheduleMarker.Save();
AddNewScheduleMarker();
mbChangesMade = true;
return true;
}
if (mScheduleMarker.IsDirty)//dirty and unsaveable due to broken rules
{
//User says that's ok, continue on?
if (Util.PromptForBrokenRulesCancelSave() == DialogResult.Yes)
{
//Ok, add new Region and don't save old record
AddNewScheduleMarker();
return true;
}
else return false;
}
//Current record isn't dirty so just add a new one
AddNewScheduleMarker();
return true;
case RecordActionType.SaveOnly:
if (mScheduleMarker.IsSavable)
{
mScheduleMarker.ApplyEdit();
mScheduleMarker = (GZTW.AyaNova.BLL.ScheduleMarker)mScheduleMarker.Save();
DataBind();
mbChangesMade = true;
return true;
}
return true;
case RecordActionType.PromptToSave:
//Prompt to save and save if
//required
if (mScheduleMarker.IsDirty)
{
DialogResult dr = Util.PromptForSave();
if (dr == DialogResult.Cancel)
{
//Cancel
return false;
}
if (dr == DialogResult.Yes)
{
//Save before exit
if (mScheduleMarker.IsSavable)
{
mScheduleMarker.ApplyEdit();
mScheduleMarker.Save();
mbChangesMade = true;
return true;
}
if (mScheduleMarker.IsDirty)//dirty and unsaveable due to broken rules
{
if (Util.PromptForBrokenRulesCancelSave() == DialogResult.Yes)
{
return true;
}
else
return false;
}
}
}
return true;
}
return false;
}
/// <summary>
///
///Creates a new ScheduleMarker record and opens it for editing
/// </summary>
private void AddNewScheduleMarker()
{
//case 1039 //log.Debug("AddNewScheduleMarker");
try
{
mScheduleMarker = GZTW.AyaNova.BLL.ScheduleMarker.NewItem();
//mScheduleMarker.BeginEdit();
DataBind();
}
catch (Exception ex)
{
//log.Error("AddNewScheduleMarker",ex);
MessageBox.Show(ex.Message + "\r\n" + ex.Source);
}
}
#endregion
#region Form ComboBoxes (Setup / Events)
//This combo can't be bound because it's got more than just the ID in it's value column
private void cbScheduleMarkerSourceID_ValueChanged(object sender, System.EventArgs e)
{
if (cbScheduleMarkerSourceID.SelectedItem == null) return;
TypeAndID ti = (TypeAndID)cbScheduleMarkerSourceID.SelectedItem.DataValue;
if (mScheduleMarker.SourceID != ti.ID)
{
mScheduleMarker.SourceID = ti.ID;
switch (ti.RootObjectType)
{
case RootObjectTypes.Global:
mScheduleMarker.ScheduleMarkerSourceType = ScheduleMarkerSourceTypes.Global;
break;
case RootObjectTypes.Region:
mScheduleMarker.ScheduleMarkerSourceType = ScheduleMarkerSourceTypes.Regional;
break;
case RootObjectTypes.User:
mScheduleMarker.ScheduleMarkerSourceType = ScheduleMarkerSourceTypes.User;
break;
case RootObjectTypes.DispatchZone:
mScheduleMarker.ScheduleMarkerSourceType = ScheduleMarkerSourceTypes.DispatchZone;
break;
case RootObjectTypes.ScheduleableUserGroup:
mScheduleMarker.ScheduleMarkerSourceType = ScheduleMarkerSourceTypes.ScheduleableUserGroup;
break;
}
}
}
private void InitializeComboBoxes()
{
if (mScheduleMarker.FollowID == Guid.Empty)
{
//Load combo boxes with initial values
//Global object
cbScheduleMarkerSourceID.Items.Add(new TypeAndID(RootObjectTypes.Global, ScheduleMarker.ScheduleMarkerGlobalSourceID), Util.LocaleText.GetLocalizedText("O.Global"));
//Regions...
//NVCHANGED
GenericNVList l = GenericNVList.GetList("aRegion", "aID", "aName", true, false, true);
//Loop through the items in the list and put them
//into the valuelist
for (int x = 0; x < l.Count; x++)
{
cbScheduleMarkerSourceID.Items.Add(new TypeAndID(RootObjectTypes.Region,
new Guid(((DictionaryEntry)l.BindableList[x]).Key.ToString())),
Util.LocaleText.GetLocalizedText("O.Region") + " - " + ((DictionaryEntry)l.BindableList[x]).Value.ToString());
}
}
//***************************************************************
//Scheduleable users....
UserListScheduleable mUserList = UserListScheduleable.GetList();
foreach (UserListScheduleable.UserListScheduleableInfo ui in mUserList)
{
if (ui.Active == true)
{
cbScheduleMarkerSourceID.Items.Add(new TypeAndID(RootObjectTypes.User,
ui.ID),
Util.LocaleText.GetLocalizedText("O.User") + " - " + ui.Name(Util.GlobalSettings.DefaultScheduleableUserNameDisplayFormat));
}
}
//INACTIVE USER? (Only a user can be inactive)
//Is it a user?
if (mScheduleMarker.ScheduleMarkerSourceType == ScheduleMarkerSourceTypes.User)
{
//Get that user record from the list we already have
foreach (UserListScheduleable.UserListScheduleableInfo ui in mUserList)
{
if (ui.ID == mScheduleMarker.SourceID)
{
if (ui.Active == true)
break; //if active then it's already in the list
else
{
//found but not active so add to list as In-Active item
ValueListItem vi = cbScheduleMarkerSourceID.Items.Add(new TypeAndID(RootObjectTypes.User,
ui.ID),
Util.LocaleText.GetLocalizedText("O.User") + " - " + ui.Name(Util.GlobalSettings.DefaultScheduleableUserNameDisplayFormat));
vi.Appearance.ForeColor = System.Drawing.SystemColors.GrayText;
}
}
}
}
//*****************************************************************************
if (mScheduleMarker.FollowID == Guid.Empty)
{
//***************************************************************
//Dispatch zones
DispatchZonePickList DispatchZoneList = DispatchZonePickList.GetList(true);
foreach (DispatchZonePickList.DispatchZonePickListInfo di in DispatchZoneList)
{
if (di.Active == true)
{
cbScheduleMarkerSourceID.Items.Add(new TypeAndID(RootObjectTypes.DispatchZone,
di.ID),
Util.LocaleText.GetLocalizedText("O.DispatchZone") + " - " + di.Name);
}
}
//INACTIVE ZONE?
//Is it a Zone?
if (mScheduleMarker.ScheduleMarkerSourceType == ScheduleMarkerSourceTypes.DispatchZone)
{
//Get that zone record from the list we already have
foreach (DispatchZonePickList.DispatchZonePickListInfo di in DispatchZoneList)
{
if (di.ID == mScheduleMarker.SourceID)
{
if (di.Active == true)
break; //if active then it's already in the list
else
{
//found but not active so add to list as In-Active item
ValueListItem vi = cbScheduleMarkerSourceID.Items.Add(new TypeAndID(RootObjectTypes.DispatchZone,
di.ID),
Util.LocaleText.GetLocalizedText("O.DispatchZone") + " - " + di.Name);
vi.Appearance.ForeColor = System.Drawing.SystemColors.GrayText;
}
}
}
}
//*****************************************************************************
//***************************************************************
//Scheduleable user GROUPS....
ScheduleableUserGroupPickList GroupList = ScheduleableUserGroupPickList.GetList();
foreach (ScheduleableUserGroupPickList.ScheduleableUserGroupPickListInfo gi in GroupList)
{
if (gi.Active == true)
{
cbScheduleMarkerSourceID.Items.Add(new TypeAndID(RootObjectTypes.ScheduleableUserGroup,
gi.ID),
Util.LocaleText.GetLocalizedText("O.ScheduleableUserGroup") + " - " + gi.Name);
}
}
//INACTIVE ScheduleableUserGroup?
//Is it a user?
if (mScheduleMarker.ScheduleMarkerSourceType == ScheduleMarkerSourceTypes.ScheduleableUserGroup)
{
//Get that ScheduleableUserGroup record from the list we already have
foreach (ScheduleableUserGroupPickList.ScheduleableUserGroupPickListInfo gi in GroupList)
{
if (gi.ID == mScheduleMarker.SourceID)
{
if (gi.Active == true)
break; //if active then it's already in the list
else
{
//found but not active so add to list as In-Active item
ValueListItem vi = cbScheduleMarkerSourceID.Items.Add(new TypeAndID(RootObjectTypes.ScheduleableUserGroup,
gi.ID),
Util.LocaleText.GetLocalizedText("O.ScheduleableUserGroup") + " - " + gi.Name);
vi.Appearance.ForeColor = System.Drawing.SystemColors.GrayText;
}
}
}
}
//*****************************************************************************
}
//Select initial value because combo box can't be bound as normal
foreach (ValueListItem vi in cbScheduleMarkerSourceID.Items)
{
if (((TypeAndID)vi.DataValue).ID == mScheduleMarker.SourceID)
{
cbScheduleMarkerSourceID.SelectedItem = vi;
break;
}
}
}
#endregion
private void btnOK_Click(object sender, EventArgs e)
{
RecordUpdate(RecordActionType.SaveAndExit);
}
//-----------------
}//class
}//ns

View File

@@ -0,0 +1,123 @@
<?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>
<metadata name="epSchedMarker.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>449, 57</value>
</metadata>
</root>

View File

@@ -0,0 +1,163 @@
namespace AyaNovaOL
{
partial class SearchForAyaNovaItem
{
/// <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.edEmail = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.edSearchText = new System.Windows.Forms.TextBox();
this.btnOK = new System.Windows.Forms.Button();
this.btnCancel = new System.Windows.Forms.Button();
this.btnSearch = new System.Windows.Forms.Button();
this.cbItems = new System.Windows.Forms.ComboBox();
this.lblItems = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// edEmail
//
this.edEmail.AcceptsReturn = true;
this.edEmail.AcceptsTab = true;
this.edEmail.Location = new System.Drawing.Point(12, 29);
this.edEmail.Multiline = true;
this.edEmail.Name = "edEmail";
this.edEmail.ReadOnly = true;
this.edEmail.ScrollBars = System.Windows.Forms.ScrollBars.Both;
this.edEmail.Size = new System.Drawing.Size(608, 234);
this.edEmail.TabIndex = 1;
this.edEmail.MouseUp += new System.Windows.Forms.MouseEventHandler(this.edEmail_MouseUp);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(13, 10);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(71, 13);
this.label1.TabIndex = 2;
this.label1.Text = "Highlight text ";
//
// edSearchText
//
this.edSearchText.Location = new System.Drawing.Point(12, 293);
this.edSearchText.Name = "edSearchText";
this.edSearchText.Size = new System.Drawing.Size(577, 20);
this.edSearchText.TabIndex = 3;
//
// btnOK
//
this.btnOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnOK.Enabled = false;
this.btnOK.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.btnOK.Image = global::AyaNovaOL.Resource1.OK24;
this.btnOK.Location = new System.Drawing.Point(564, 406);
this.btnOK.Name = "btnOK";
this.btnOK.Size = new System.Drawing.Size(56, 35);
this.btnOK.TabIndex = 30;
this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
//
// btnCancel
//
this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.btnCancel.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.btnCancel.Image = global::AyaNovaOL.Resource1.Cancel24;
this.btnCancel.Location = new System.Drawing.Point(12, 406);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(56, 35);
this.btnCancel.TabIndex = 29;
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
//
// btnSearch
//
this.btnSearch.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.btnSearch.Image = global::AyaNovaOL.Resource1.SearchDatabase16;
this.btnSearch.Location = new System.Drawing.Point(595, 289);
this.btnSearch.Name = "btnSearch";
this.btnSearch.Size = new System.Drawing.Size(25, 26);
this.btnSearch.TabIndex = 31;
this.btnSearch.Click += new System.EventHandler(this.btnSearch_Click);
//
// cbItems
//
this.cbItems.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.cbItems.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend;
this.cbItems.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
this.cbItems.FormattingEnabled = true;
this.cbItems.Location = new System.Drawing.Point(12, 350);
this.cbItems.Name = "cbItems";
this.cbItems.Size = new System.Drawing.Size(608, 21);
this.cbItems.TabIndex = 33;
this.cbItems.SelectedIndexChanged += new System.EventHandler(this.cbItems_SelectedIndexChanged);
//
// lblItems
//
this.lblItems.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.lblItems.AutoSize = true;
this.lblItems.Location = new System.Drawing.Point(9, 333);
this.lblItems.Name = "lblItems";
this.lblItems.Size = new System.Drawing.Size(78, 13);
this.lblItems.TabIndex = 32;
this.lblItems.Text = "Matching items";
//
// SearchForAyaNovaItem
//
this.AcceptButton = this.btnOK;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.btnCancel;
this.ClientSize = new System.Drawing.Size(632, 453);
this.Controls.Add(this.cbItems);
this.Controls.Add(this.lblItems);
this.Controls.Add(this.btnSearch);
this.Controls.Add(this.btnOK);
this.Controls.Add(this.btnCancel);
this.Controls.Add(this.edSearchText);
this.Controls.Add(this.label1);
this.Controls.Add(this.edEmail);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.Name = "SearchForAyaNovaItem";
this.Text = "Search";
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.TextBox edEmail;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox edSearchText;
private System.Windows.Forms.Button btnOK;
private System.Windows.Forms.Button btnCancel;
private System.Windows.Forms.Button btnSearch;
private System.Windows.Forms.ComboBox cbItems;
private System.Windows.Forms.Label lblItems;
}
}

View File

@@ -0,0 +1,88 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using GZTW.AyaNova.BLL;
namespace AyaNovaOL
{
public partial class SearchForAyaNovaItem : Form
{
private RootObjectTypes mRootObjectType;
public SearchForAyaNovaItem(string sEmailText, RootObjectTypes rootObjectType)
{
InitializeComponent();
if (!string.IsNullOrEmpty(sEmailText))
edEmail.Text = sEmailText;
mRootObjectType = rootObjectType;
edEmail.SelectionStart = 0;
edEmail.SelectionLength = 0;
}
private void edEmail_MouseUp(object sender, MouseEventArgs e)
{
if (edEmail.SelectionLength > 0)
edSearchText.Text = edEmail.SelectedText.Trim().Replace("\r\n", " ");
}
private void btnCancel_Click(object sender, EventArgs e)
{
this.DialogResult = DialogResult.Cancel;
this.Close();
}
Dictionary<Guid, string> dictItemList { get; set; }
private void btnSearch_Click(object sender, EventArgs e)
{
if (dictItemList == null)
{
dictItemList = new Dictionary<Guid, string>();
}
else
dictItemList.Clear();
cbItems.DataSource = null;
if (!string.IsNullOrEmpty(edSearchText.Text))
{
SearchResultList srl = SearchResultList.GetPickListForObjectType(edSearchText.Text, mRootObjectType);
if (srl.ListPickListID.Count != 0)
{
foreach (Guid g in srl.ListPickListID)
{
dictItemList.Add(g, NameFetcher.GetItem(new TypeAndID(mRootObjectType, g)).RecordName);
}
cbItems.DataSource = new BindingSource(dictItemList, "");
cbItems.ValueMember = "Key";
cbItems.DisplayMember = "Value";
}
}
}
private void btnOK_Click(object sender, EventArgs e)
{
this.DialogResult = DialogResult.OK;
this.Close();
}
public Guid SelectedItemID { get; set; }
private void cbItems_SelectedIndexChanged(object sender, EventArgs e)
{
if (cbItems.DataSource != null && cbItems.SelectedItem!=null)
{
// MessageBox.Show(((KeyValuePair<Guid, string>)cbItems.SelectedItem).Value);
SelectedItemID = ((KeyValuePair<Guid, string>)cbItems.SelectedItem).Key;
btnOK.Enabled = true;
}
else
{
btnOK.Enabled = false;
}
}
}
}

View 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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@@ -0,0 +1,150 @@
namespace AyaNovaOL
{
partial class SelectAyaNovaContacts
{
/// <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.grid = new System.Windows.Forms.DataGridView();
this.Select = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.Contact = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.btnCancel = new System.Windows.Forms.Button();
this.btnOK = new System.Windows.Forms.Button();
this.ckAll = new System.Windows.Forms.CheckBox();
((System.ComponentModel.ISupportInitialize)(this.grid)).BeginInit();
this.SuspendLayout();
//
// grid
//
this.grid.AllowUserToAddRows = false;
this.grid.AllowUserToDeleteRows = false;
this.grid.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.grid.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
this.grid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.grid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.Select,
this.Contact,
this.ID});
this.grid.Location = new System.Drawing.Point(3, 4);
this.grid.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.grid.Name = "grid";
this.grid.RowHeadersVisible = false;
this.grid.Size = new System.Drawing.Size(1021, 548);
this.grid.TabIndex = 2;
//
// Select
//
this.Select.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader;
this.Select.HeaderText = "Select";
this.Select.Name = "Select";
this.Select.Width = 53;
//
// Contact
//
this.Contact.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.Contact.HeaderText = "Contact";
this.Contact.Name = "Contact";
this.Contact.ReadOnly = true;
//
// ID
//
this.ID.HeaderText = "ID";
this.ID.Name = "ID";
this.ID.Visible = false;
//
// btnCancel
//
this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.btnCancel.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.btnCancel.Image = global::AyaNovaOL.Resource1.Cancel24;
this.btnCancel.Location = new System.Drawing.Point(3, 635);
this.btnCancel.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(75, 43);
this.btnCancel.TabIndex = 32;
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
//
// btnOK
//
this.btnOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnOK.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.btnOK.Image = global::AyaNovaOL.Resource1.OK24;
this.btnOK.Location = new System.Drawing.Point(940, 635);
this.btnOK.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.btnOK.Name = "btnOK";
this.btnOK.Size = new System.Drawing.Size(75, 43);
this.btnOK.TabIndex = 33;
this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
//
// ckAll
//
this.ckAll.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.ckAll.AutoSize = true;
this.ckAll.Location = new System.Drawing.Point(7, 559);
this.ckAll.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.ckAll.Name = "ckAll";
this.ckAll.Size = new System.Drawing.Size(45, 21);
this.ckAll.TabIndex = 34;
this.ckAll.Text = "All";
this.ckAll.UseVisualStyleBackColor = true;
this.ckAll.CheckedChanged += new System.EventHandler(this.ckAll_CheckedChanged);
//
// SelectAyaNovaContacts
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1031, 693);
this.Controls.Add(this.ckAll);
this.Controls.Add(this.btnOK);
this.Controls.Add(this.btnCancel);
this.Controls.Add(this.grid);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.Name = "SelectAyaNovaContacts";
this.Text = "Select AyaNova contacts";
this.Load += new System.EventHandler(this.SelectAyaNovaContacts_Load);
((System.ComponentModel.ISupportInitialize)(this.grid)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.DataGridView grid;
private System.Windows.Forms.DataGridViewCheckBoxColumn Select;
private System.Windows.Forms.DataGridViewTextBoxColumn Contact;
private System.Windows.Forms.DataGridViewTextBoxColumn ID;
private System.Windows.Forms.Button btnCancel;
private System.Windows.Forms.Button btnOK;
private System.Windows.Forms.CheckBox ckAll;
}
}

View File

@@ -0,0 +1,89 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using GZTW.AyaNova.BLL;
namespace AyaNovaOL
{
public partial class SelectAyaNovaContacts : Form
{
private RootObjectTypes mObjectType;
private VendorTypes mVendorType;
public SelectAyaNovaContacts(RootObjectTypes oType, VendorTypes vType)
{
mObjectType = oType;
mVendorType = vType;
InitializeComponent();
}
public List<Guid> SelectedIDList;
private void SelectAyaNovaContacts_Load(object sender, EventArgs e)
{
SelectedIDList=new List<Guid>();
switch (mObjectType)
{
case RootObjectTypes.Client:
{
ClientPickList cpl = ClientPickList.GetList(true);
foreach (ClientPickList.ClientPickListInfo i in cpl)
{
grid.Rows.Add(false, i.Name, i.ID.ToString());
}
}
break;
case RootObjectTypes.HeadOffice:
{
GenericNVList l = GenericNVList.GetList("HEADOFFICE", "ID", "NAME", true, false, true);
foreach (System.Collections.DictionaryEntry d in l.BindableList)
grid.Rows.Add(false,d.Value.ToString(), new Guid(d.Key.ToString()));
}
break;
case RootObjectTypes.Vendor:
{
VendorPickList cpl = VendorPickList.GetList(mVendorType);
foreach (VendorPickList.VendorPickListInfo i in cpl)
{
grid.Rows.Add(false, i.VendorType.ToString() + " - " + i.Name, i.ID.ToString());
}
}
break;
}
}
private void btnOK_Click(object sender, EventArgs e)
{
//gather up list of id's
foreach (DataGridViewRow r in grid.Rows)
{
if ((bool)r.Cells["Select"].Value == true)
SelectedIDList.Add(new Guid(r.Cells["ID"].Value.ToString()));
}
//and exit
DialogResult = DialogResult.OK;
Close();
}
private void btnCancel_Click(object sender, EventArgs e)
{
DialogResult = DialogResult.Cancel;
Close();
}
private void ckAll_CheckedChanged(object sender, EventArgs e)
{
bool bSelected=ckAll.Checked;
foreach (DataGridViewRow r in grid.Rows)
{
r.Cells["Select"].Value = bSelected;
}
}
}
}

View File

@@ -0,0 +1,129 @@
<?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>
<metadata name="Select.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Contact.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="ID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>

View File

@@ -0,0 +1,28 @@
namespace AyaNovaOL.Properties {
// This class allows you to handle specific events on the settings class:
// The SettingChanging event is raised before a setting's value is changed.
// The PropertyChanged event is raised after a setting's value is changed.
// The SettingsLoaded event is raised after the setting values are loaded.
// The SettingsSaving event is raised before the setting values are saved.
internal sealed partial class Settings {
public Settings() {
// // To add event handlers for saving and changing settings, uncomment the lines below:
//
// this.SettingChanging += this.SettingChangingEventHandler;
//
// this.SettingsSaving += this.SettingsSavingEventHandler;
//
}
private void SettingChangingEventHandler(object sender, System.Configuration.SettingChangingEventArgs e) {
// Add code to handle the SettingChangingEvent event here.
}
private void SettingsSavingEventHandler(object sender, System.ComponentModel.CancelEventArgs e) {
// Add code to handle the SettingsSaving event here.
}
}
}

View File

@@ -0,0 +1,186 @@
namespace AyaNovaOL
{
partial class WorkorderSelector
{
/// <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.cbClientID = new System.Windows.Forms.ComboBox();
this.lblClientID = new System.Windows.Forms.Label();
this.cbWO = new System.Windows.Forms.ComboBox();
this.lblWO = new System.Windows.Forms.Label();
this.cbTemplate = new System.Windows.Forms.ComboBox();
this.lblTemplate = new System.Windows.Forms.Label();
this.btnOK = new System.Windows.Forms.Button();
this.btnCancel = new System.Windows.Forms.Button();
this.btnSearch = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// cbClientID
//
this.cbClientID.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.cbClientID.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend;
this.cbClientID.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
this.cbClientID.FormattingEnabled = true;
this.cbClientID.Location = new System.Drawing.Point(12, 26);
this.cbClientID.Name = "cbClientID";
this.cbClientID.Size = new System.Drawing.Size(440, 21);
this.cbClientID.TabIndex = 4;
this.cbClientID.SelectedIndexChanged += new System.EventHandler(this.cbClientID_SelectedIndexChanged);
//
// lblClientID
//
this.lblClientID.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.lblClientID.AutoSize = true;
this.lblClientID.Location = new System.Drawing.Point(9, 9);
this.lblClientID.Name = "lblClientID";
this.lblClientID.Size = new System.Drawing.Size(33, 13);
this.lblClientID.TabIndex = 3;
this.lblClientID.Text = "Client";
//
// cbWO
//
this.cbWO.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.cbWO.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend;
this.cbWO.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
this.cbWO.FormattingEnabled = true;
this.cbWO.Location = new System.Drawing.Point(12, 80);
this.cbWO.Name = "cbWO";
this.cbWO.Size = new System.Drawing.Size(474, 21);
this.cbWO.TabIndex = 6;
this.cbWO.SelectedIndexChanged += new System.EventHandler(this.cbWO_SelectedIndexChanged);
//
// lblWO
//
this.lblWO.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.lblWO.AutoSize = true;
this.lblWO.Location = new System.Drawing.Point(9, 63);
this.lblWO.Name = "lblWO";
this.lblWO.Size = new System.Drawing.Size(57, 13);
this.lblWO.TabIndex = 5;
this.lblWO.Text = "Workorder";
//
// cbTemplate
//
this.cbTemplate.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.cbTemplate.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend;
this.cbTemplate.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
this.cbTemplate.FormattingEnabled = true;
this.cbTemplate.Location = new System.Drawing.Point(12, 132);
this.cbTemplate.Name = "cbTemplate";
this.cbTemplate.Size = new System.Drawing.Size(474, 21);
this.cbTemplate.TabIndex = 8;
//
// lblTemplate
//
this.lblTemplate.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.lblTemplate.AutoSize = true;
this.lblTemplate.Location = new System.Drawing.Point(9, 115);
this.lblTemplate.Name = "lblTemplate";
this.lblTemplate.Size = new System.Drawing.Size(51, 13);
this.lblTemplate.TabIndex = 7;
this.lblTemplate.Text = "Template";
//
// btnOK
//
this.btnOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnOK.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.btnOK.Image = global::AyaNovaOL.Resource1.OK24;
this.btnOK.Location = new System.Drawing.Point(430, 184);
this.btnOK.Name = "btnOK";
this.btnOK.Size = new System.Drawing.Size(56, 35);
this.btnOK.TabIndex = 28;
this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
//
// btnCancel
//
this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.btnCancel.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.btnCancel.Image = global::AyaNovaOL.Resource1.Cancel24;
this.btnCancel.Location = new System.Drawing.Point(12, 184);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(56, 35);
this.btnCancel.TabIndex = 27;
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
//
// btnSearch
//
this.btnSearch.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.btnSearch.Image = global::AyaNovaOL.Resource1.SearchDatabase16;
this.btnSearch.Location = new System.Drawing.Point(458, 22);
this.btnSearch.Name = "btnSearch";
this.btnSearch.Size = new System.Drawing.Size(28, 26);
this.btnSearch.TabIndex = 29;
this.btnSearch.Click += new System.EventHandler(this.btnSearch_Click);
//
// WorkorderSelector
//
this.AcceptButton = this.btnOK;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.btnCancel;
this.ClientSize = new System.Drawing.Size(498, 236);
this.Controls.Add(this.btnSearch);
this.Controls.Add(this.btnOK);
this.Controls.Add(this.btnCancel);
this.Controls.Add(this.cbTemplate);
this.Controls.Add(this.lblTemplate);
this.Controls.Add(this.cbWO);
this.Controls.Add(this.lblWO);
this.Controls.Add(this.cbClientID);
this.Controls.Add(this.lblClientID);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "WorkorderSelector";
this.Text = "Select work order";
this.Load += new System.EventHandler(this.WorkorderSelector_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.ComboBox cbClientID;
private System.Windows.Forms.Label lblClientID;
private System.Windows.Forms.ComboBox cbWO;
private System.Windows.Forms.Label lblWO;
private System.Windows.Forms.ComboBox cbTemplate;
private System.Windows.Forms.Label lblTemplate;
private System.Windows.Forms.Button btnOK;
private System.Windows.Forms.Button btnCancel;
private System.Windows.Forms.Button btnSearch;
}
}

View File

@@ -0,0 +1,214 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using GZTW.AyaNova.BLL;
namespace AyaNovaOL
{
public partial class WorkorderSelector : Form
{
public WorkorderSelector()
{
//MessageBox.Show("@ WorkorderSelector() constructor");
InitializeComponent();
//MessageBox.Show("@ WorkorderSelector() constructor - DONE");
}
ClientPickList aClientPickList { get; set; }
Dictionary<Guid, string> aWorkorderPickList { get; set; }
Dictionary<Guid, string> aTemplateList { get; set; }
public Guid SuggestedClient { get; set; }
public string EmailText { get; set; }
bool bLoading = true;
private void WorkorderSelector_Load(object sender, EventArgs e)
{
//MessageBox.Show("@ WorkorderSelector_Load TOP");
aTemplateList = new Dictionary<Guid, string>();
aClientPickList = ClientPickList.GetList(true);
cbClientID.DataSource=aClientPickList;
cbClientID.DisplayMember="Name";
cbClientID.ValueMember="ID";
bLoading = false;
aWorkorderPickList = new Dictionary<Guid, string>();
aWorkorderPickList.Add(Guid.Empty, "< New workorder >");
cbWO.DataSource = new BindingSource(aWorkorderPickList, "");
cbWO.ValueMember = "Key";
cbWO.DisplayMember = "Value";
// MessageBox.Show("@ WorkorderSelector_Load MIDDLE");
//This is likely temporary since we should try to autoselect the client before here
PopulateWorkorderList();
PopulateTemplateList();
cbTemplate.Visible = !AyaBizUtils.Lite;
lblTemplate.Visible = !AyaBizUtils.Lite;
SelectClient(SuggestedClient);
//MessageBox.Show("Suggested client: " + SuggestedClient.ToString());
//MessageBox.Show("@ WorkorderSelector_Load BOTTOM");
}
/// <summary>
/// select a client in the client combo
/// </summary>
/// <param name="id"></param>
private void SelectClient(Guid id)
{
if (id != Guid.Empty)
{
foreach (ClientPickList.ClientPickListInfo i in cbClientID.Items)
{
if (i.ID == id)
{
cbClientID.SelectedItem = i;
break;
}
}
}
}
private void cbClientID_SelectedIndexChanged(object sender, EventArgs e)
{
PopulateWorkorderList();
}
private void PopulateWorkorderList()
{
if (bLoading) return;
//MessageBox.Show("cbClientID_SelectedIndexChanged");
aWorkorderPickList.Clear();
aWorkorderPickList.Add(Guid.Empty, "< New workorder >");
//Populate workorder list
if (cbClientID.SelectedItem != null)
{
ClientPickList.ClientPickListInfo infClient = (ClientPickList.ClientPickListInfo)cbClientID.SelectedItem;
WorkorderPickList wpl = WorkorderPickList.GetListByClient(infClient.ID);
foreach (WorkorderPickList.WorkorderPickListInfo i in wpl)
{
aWorkorderPickList.Add(i.ID, i.ServiceNumber + " - " + i.ServiceDate.ToString() + " " + i.Summary);
}
//select likely template
Guid gTemplate=TemplateServiceResolver.ResolveTemplate(infClient.ID, User.CurrentThreadUserID);
foreach (KeyValuePair<Guid, String> kvp in cbTemplate.Items)
{
if (kvp.Key == gTemplate)
{
cbTemplate.SelectedItem = kvp;
break;
}
}
}
cbWO.DataSource = new BindingSource(aWorkorderPickList, "");
}
private void cbWO_SelectedIndexChanged(object sender, EventArgs e)
{
if (bLoading) return;
bool bCanSelectTemplate = cbWO.Text == "< New workorder >";
cbTemplate.Enabled = bCanSelectTemplate;
if (!bCanSelectTemplate)
{
if(cbTemplate.Items.Count >0)
cbTemplate.SelectedIndex = 0;
}
}
private void PopulateTemplateList()
{
if (bLoading) return;
aTemplateList.Clear();
if (!AyaBizUtils.Lite)//case 1172
{
TemplatePickList UList = TemplatePickList.GetList(WorkorderTypes.Service, true);
foreach (TemplatePickList.TemplatePickListInfo i in UList)
{
aTemplateList.Add(i.ID, i.Description);
}
}
cbTemplate.DataSource = new BindingSource(aTemplateList, "");
cbTemplate.ValueMember = "Key";
cbTemplate.DisplayMember = "Value";
}
private void btnCancel_Click(object sender, EventArgs e)
{
this.Close();
}
private void btnOK_Click(object sender, EventArgs e)
{
//new workorder or existing
Workorder w;
WorkorderItem wi;
Guid gTemplateID = Guid.Empty;
if (!AyaBizUtils.Lite && cbTemplate.SelectedItem != null)
{
KeyValuePair<Guid, String> kvpSelectedTemplate = (KeyValuePair<Guid, String>)cbTemplate.SelectedItem;
gTemplateID = kvpSelectedTemplate.Key;
}
Guid gClientID=((ClientPickList.ClientPickListInfo)cbClientID.SelectedItem).ID;
KeyValuePair<Guid, String> kvpSelectedWorkorder = (KeyValuePair<Guid, String>) cbWO.SelectedItem;
if (kvpSelectedWorkorder.Key != Guid.Empty)
{
w = Workorder.GetItem(kvpSelectedWorkorder.Key);
wi = w.WorkorderItems.Add(w);
}
else
{
if (gTemplateID != Guid.Empty)
w = Workorder.NewItem(gTemplateID, gClientID);
else
{
w = Workorder.NewItem(WorkorderTypes.Service);
w.ClientID = gClientID;
}
wi = w.WorkorderItems[0];
}
wi.TechNotes += EmailText;
MsgToWo msg2wo = new MsgToWo();
msg2wo.mWorkorder = w;
msg2wo.mWorkorderItem = wi;
msg2wo.ShowDialog();
msg2wo.Dispose();
this.DialogResult = DialogResult.OK;
this.Close();
}
private void btnSearch_Click(object sender, EventArgs e)
{
SearchForAyaNovaItem sd = new SearchForAyaNovaItem(EmailText,RootObjectTypes.Client);
if (sd.ShowDialog() == DialogResult.OK && sd.SelectedItemID != Guid.Empty)
{
SelectClient(sd.SelectedItemID);
}
sd.Dispose();
}
}
}

View 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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@@ -0,0 +1,87 @@
<?xml version="1.0"?>
<configuration>
<configSections>
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<section name="AyaNovaOL.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
</sectionGroup>
</configSections>
<userSettings>
<AyaNovaOL.Properties.Settings>
<setting name="VendorType" serializeAs="String">
<value>2</value>
</setting>
<setting name="Region" serializeAs="String">
<value>8236e8d1-cab1-4797-9c34-93861954ae6a</value>
</setting>
<setting name="Zone" serializeAs="String">
<value>00000000-0000-0000-0000-000000000000</value>
</setting>
<setting name="Contract" serializeAs="String">
<value>00000000-0000-0000-0000-000000000000</value>
</setting>
<setting name="PhysicalAddressEquals" serializeAs="String">
<value>0</value>
</setting>
<setting name="PostalAddressEquals" serializeAs="String">
<value>0</value>
</setting>
<setting name="ClientPhone1" serializeAs="String">
<value>0</value>
</setting>
<setting name="ClientPhone2" serializeAs="String">
<value>0</value>
</setting>
<setting name="ClientPhone3" serializeAs="String">
<value>0</value>
</setting>
<setting name="ClientPhone4" serializeAs="String">
<value>0</value>
</setting>
<setting name="ClientPhone5" serializeAs="String">
<value>0</value>
</setting>
<setting name="HeadOfficePhone1" serializeAs="String">
<value>0</value>
</setting>
<setting name="HeadOfficePhone2" serializeAs="String">
<value>0</value>
</setting>
<setting name="HeadOfficePhone3" serializeAs="String">
<value>0</value>
</setting>
<setting name="HeadOfficePhone4" serializeAs="String">
<value>0</value>
</setting>
<setting name="HeadOfficePhone5" serializeAs="String">
<value>0</value>
</setting>
<setting name="VendorPhone1" serializeAs="String">
<value>0</value>
</setting>
<setting name="VendorPhone2" serializeAs="String">
<value>0</value>
</setting>
<setting name="VendorPhone3" serializeAs="String">
<value>0</value>
</setting>
<setting name="VendorPhone4" serializeAs="String">
<value>0</value>
</setting>
<setting name="VendorPhone5" serializeAs="String">
<value>0</value>
</setting>
<setting name="RootObjectType" serializeAs="String">
<value>3</value>
</setting>
<setting name="IgnoreThisIsTheMailingAddress" serializeAs="String">
<value>True</value>
</setting>
<setting name="IncludeEmailHeader" serializeAs="String">
<value>False</value>
</setting>
<setting name="FieldsMapped" serializeAs="String">
<value>False</value>
</setting>
</AyaNovaOL.Properties.Settings>
</userSettings>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0" /></startup></configuration>

View File

@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<asmv1:assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<assemblyIdentity version="6.0.0.0" name="AyaNovaOL"/>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<!-- UAC Manifest Options
If you want to change the Windows User Account Control level replace the
requestedExecutionLevel node with one of the following.
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
If you want to utilize File and Registry Virtualization for backward
compatibility then delete the requestedExecutionLevel node.
-->
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
</requestedPrivileges>
</security>
</trustInfo>
</asmv1:assembly>