using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using GZTW.AyaNova.BLL;
using Infragistics.Win;
using Infragistics.Win.UltraWinGrid;
using log4net;
namespace AyaNova
{
///
/// Summary description for VendorInfoForm.
///
public class VendorInfoForm : System.Windows.Forms.Form
{
// Create a logger for use in this class
//case 1039 private static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
private System.Windows.Forms.CheckBox ckIsDirty;
private Infragistics.Win.Misc.UltraDropDownButton btnAddress;
private Infragistics.Win.UltraWinEditors.UltraTextEditor edWebAddress;
private Infragistics.Win.UltraWinEditors.UltraTextEditor edAccountNumber;
private Infragistics.Win.Misc.UltraLabel lblAccountNumber;
private Infragistics.Win.UltraWinEditors.UltraTextEditor edName;
private Infragistics.Win.Misc.UltraLabel lblName;
private System.Windows.Forms.ErrorProvider ErrorProvider;
private Infragistics.Win.UltraWinEditors.UltraTextEditor edNotes;
private Infragistics.Win.UltraWinEditors.UltraCheckEditor ckActive;
private System.Windows.Forms.Panel panelLeft;
private System.Windows.Forms.Panel panelRight;
private Infragistics.Win.UltraWinEditors.UltraTextEditor edPhysicalAddress;
private Infragistics.Win.UltraWinEditors.UltraTextEditor edPostalAddress;
private System.Windows.Forms.Panel panelCustom;
private Infragistics.Win.UltraWinGrid.UltraGrid gridCustom;
private Infragistics.Win.Misc.UltraLabel lblVendorType;
private GZTW.WinForm.Controls.GZUltraComboEditor cbVendorType;
private Infragistics.Win.UltraWinToolbars.UltraToolbarsManager tbManager;
private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _VendorInfoForm_Toolbars_Dock_Area_Left;
private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _VendorInfoForm_Toolbars_Dock_Area_Right;
private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _VendorInfoForm_Toolbars_Dock_Area_Top;
private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _VendorInfoForm_Toolbars_Dock_Area_Bottom;
private Infragistics.Win.Misc.UltraButton btnWebAddress;
private System.Windows.Forms.HelpProvider helpProvider1;
private Infragistics.Win.UltraWinEditors.UltraTextEditor edEmail;
private Infragistics.Win.Misc.UltraLabel lblEmail;
private Infragistics.Win.UltraWinEditors.UltraTextEditor edPhone5;
private Infragistics.Win.Misc.UltraLabel lblPhone5;
private Infragistics.Win.UltraWinEditors.UltraTextEditor edPhone4;
private Infragistics.Win.Misc.UltraLabel lblPhone4;
private Infragistics.Win.UltraWinEditors.UltraTextEditor edPhone3;
private Infragistics.Win.Misc.UltraLabel lblPhone3;
private Infragistics.Win.UltraWinEditors.UltraTextEditor edPhone2;
private Infragistics.Win.Misc.UltraLabel lblPhone2;
private Infragistics.Win.UltraWinEditors.UltraTextEditor edPhone1;
private Infragistics.Win.Misc.UltraLabel lblPhone1;
private Infragistics.Win.UltraWinEditors.UltraTextEditor edContact;
private Infragistics.Win.Misc.UltraLabel lblContact;
private Infragistics.Win.UltraWinEditors.UltraTextEditor edContactNotes;
private Infragistics.Win.Misc.UltraDropDownButton btnNotes;
private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _panelLeft_Toolbars_Dock_Area_Left;
private Infragistics.Win.UltraWinToolbars.UltraToolbarsManager tbmPopups;
private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _panelLeft_Toolbars_Dock_Area_Right;
private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _panelLeft_Toolbars_Dock_Area_Top;
private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _panelLeft_Toolbars_Dock_Area_Bottom;
private System.ComponentModel.IContainer components;
public VendorInfoForm(VendorTypes VendorTypesToOffer)
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
mVendorType = VendorTypesToOffer;
}
///
/// Clean up any resources being used.
///
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows Form Designer generated code
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
Infragistics.Win.Appearance appearance1 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance2 = new Infragistics.Win.Appearance();
Infragistics.Win.UltraWinToolbars.OptionSet optionSet1 = new Infragistics.Win.UltraWinToolbars.OptionSet("OSAddressPop");
Infragistics.Win.UltraWinToolbars.OptionSet optionSet2 = new Infragistics.Win.UltraWinToolbars.OptionSet("OSNotesPop");
Infragistics.Win.UltraWinToolbars.UltraToolbar ultraToolbar1 = new Infragistics.Win.UltraWinToolbars.UltraToolbar("TempSetupTB");
Infragistics.Win.UltraWinToolbars.PopupMenuTool popupMenuTool1 = new Infragistics.Win.UltraWinToolbars.PopupMenuTool("PopupNotesTypes");
Infragistics.Win.UltraWinToolbars.PopupMenuTool popupMenuTool2 = new Infragistics.Win.UltraWinToolbars.PopupMenuTool("PopupAddressTypes");
Infragistics.Win.UltraWinToolbars.PopupMenuTool popupMenuTool3 = new Infragistics.Win.UltraWinToolbars.PopupMenuTool("PopupAddressTypes");
Infragistics.Win.UltraWinToolbars.StateButtonTool stateButtonTool1 = new Infragistics.Win.UltraWinToolbars.StateButtonTool("LT:Address.Label.AddressType.Physical", "OSAddressPop");
Infragistics.Win.UltraWinToolbars.StateButtonTool stateButtonTool2 = new Infragistics.Win.UltraWinToolbars.StateButtonTool("LT:Address.Label.AddressType.Postal", "OSAddressPop");
Infragistics.Win.UltraWinToolbars.StateButtonTool stateButtonTool3 = new Infragistics.Win.UltraWinToolbars.StateButtonTool("LT:Address.Label.AddressType.Postal", "OSAddressPop");
Infragistics.Win.UltraWinToolbars.StateButtonTool stateButtonTool4 = new Infragistics.Win.UltraWinToolbars.StateButtonTool("LT:Address.Label.AddressType.Physical", "OSAddressPop");
Infragistics.Win.UltraWinToolbars.StateButtonTool stateButtonTool6 = new Infragistics.Win.UltraWinToolbars.StateButtonTool("LT:Vendor.Label.Notes", "OSNotesPop");
Infragistics.Win.UltraWinToolbars.PopupMenuTool popupMenuTool4 = new Infragistics.Win.UltraWinToolbars.PopupMenuTool("PopupNotesTypes");
Infragistics.Win.UltraWinToolbars.StateButtonTool stateButtonTool8 = new Infragistics.Win.UltraWinToolbars.StateButtonTool("LT:Vendor.Label.Notes", "OSNotesPop");
Infragistics.Win.UltraWinToolbars.StateButtonTool stateButtonTool12 = new Infragistics.Win.UltraWinToolbars.StateButtonTool("LT:Vendor.Label.ContactNotes", "OSNotesPop");
Infragistics.Win.UltraWinToolbars.StateButtonTool stateButtonTool11 = new Infragistics.Win.UltraWinToolbars.StateButtonTool("LT:Vendor.Label.ContactNotes", "OSNotesPop");
Infragistics.Win.Appearance appearance3 = new Infragistics.Win.Appearance();
Infragistics.Win.UltraWinToolbars.UltraToolbar ultraToolbar2 = new Infragistics.Win.UltraWinToolbars.UltraToolbar("VendorEntryMenuBar");
Infragistics.Win.UltraWinToolbars.PopupMenuTool popupMenuTool5 = new Infragistics.Win.UltraWinToolbars.PopupMenuTool("LT:UI.Toolbar.Print");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool1 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UI.Command.SaveClose");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool2 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:AssignedDoc.Label.List");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool17 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:O.WikiPage");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool3 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UI.Command.RecordHistory");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool6 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:ScheduleMarker.Label.FollowUp");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool4 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UI.Command.SaveNew");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool5 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UI.Command.Save");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool7 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UI.Command.Delete");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool8 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UI.Command.Close");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool9 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UI.Command.SaveClose");
Infragistics.Win.Appearance appearance4 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance5 = new Infragistics.Win.Appearance();
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool10 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:AssignedDoc.Label.List");
Infragistics.Win.Appearance appearance6 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance7 = new Infragistics.Win.Appearance();
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool11 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UI.Command.RecordHistory");
Infragistics.Win.Appearance appearance8 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance9 = new Infragistics.Win.Appearance();
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool12 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UI.Command.Save");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool13 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UI.Command.SaveNew");
Infragistics.Win.Appearance appearance10 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance11 = new Infragistics.Win.Appearance();
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool14 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UI.Command.Close");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool15 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UI.Command.Delete");
Infragistics.Win.Appearance appearance12 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance13 = new Infragistics.Win.Appearance();
Infragistics.Win.UltraWinToolbars.ListTool listTool1 = new Infragistics.Win.UltraWinToolbars.ListTool("REPORTLIST");
Infragistics.Win.UltraWinToolbars.ListToolItem listToolItem1 = new Infragistics.Win.UltraWinToolbars.ListToolItem();
Infragistics.Win.UltraWinToolbars.PopupMenuTool popupMenuTool6 = new Infragistics.Win.UltraWinToolbars.PopupMenuTool("LT:UI.Toolbar.Print");
Infragistics.Win.Appearance appearance14 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance15 = new Infragistics.Win.Appearance();
Infragistics.Win.UltraWinToolbars.ListTool listTool2 = new Infragistics.Win.UltraWinToolbars.ListTool("REPORTLIST");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool16 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:ScheduleMarker.Label.FollowUp");
Infragistics.Win.Appearance appearance16 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance17 = new Infragistics.Win.Appearance();
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool18 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:O.WikiPage");
Infragistics.Win.Appearance appearance18 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance19 = new Infragistics.Win.Appearance();
this.ckIsDirty = new System.Windows.Forms.CheckBox();
this.panelLeft = new System.Windows.Forms.Panel();
this.edPhysicalAddress = new Infragistics.Win.UltraWinEditors.UltraTextEditor();
this.btnWebAddress = new Infragistics.Win.Misc.UltraButton();
this.btnAddress = new Infragistics.Win.Misc.UltraDropDownButton();
this.tbmPopups = new Infragistics.Win.UltraWinToolbars.UltraToolbarsManager(this.components);
this.lblVendorType = new Infragistics.Win.Misc.UltraLabel();
this.cbVendorType = new GZTW.WinForm.Controls.GZUltraComboEditor();
this.edWebAddress = new Infragistics.Win.UltraWinEditors.UltraTextEditor();
this.edAccountNumber = new Infragistics.Win.UltraWinEditors.UltraTextEditor();
this.lblAccountNumber = new Infragistics.Win.Misc.UltraLabel();
this.edName = new Infragistics.Win.UltraWinEditors.UltraTextEditor();
this.lblName = new Infragistics.Win.Misc.UltraLabel();
this.ckActive = new Infragistics.Win.UltraWinEditors.UltraCheckEditor();
this.edPostalAddress = new Infragistics.Win.UltraWinEditors.UltraTextEditor();
this.ErrorProvider = new System.Windows.Forms.ErrorProvider(this.components);
this.panelRight = new System.Windows.Forms.Panel();
this.edContactNotes = new Infragistics.Win.UltraWinEditors.UltraTextEditor();
this.btnNotes = new Infragistics.Win.Misc.UltraDropDownButton();
this.edEmail = new Infragistics.Win.UltraWinEditors.UltraTextEditor();
this.lblEmail = new Infragistics.Win.Misc.UltraLabel();
this.edPhone5 = new Infragistics.Win.UltraWinEditors.UltraTextEditor();
this.lblPhone5 = new Infragistics.Win.Misc.UltraLabel();
this.edPhone4 = new Infragistics.Win.UltraWinEditors.UltraTextEditor();
this.lblPhone4 = new Infragistics.Win.Misc.UltraLabel();
this.edPhone3 = new Infragistics.Win.UltraWinEditors.UltraTextEditor();
this.lblPhone3 = new Infragistics.Win.Misc.UltraLabel();
this.edPhone2 = new Infragistics.Win.UltraWinEditors.UltraTextEditor();
this.lblPhone2 = new Infragistics.Win.Misc.UltraLabel();
this.edPhone1 = new Infragistics.Win.UltraWinEditors.UltraTextEditor();
this.lblPhone1 = new Infragistics.Win.Misc.UltraLabel();
this.edContact = new Infragistics.Win.UltraWinEditors.UltraTextEditor();
this.lblContact = new Infragistics.Win.Misc.UltraLabel();
this.edNotes = new Infragistics.Win.UltraWinEditors.UltraTextEditor();
this.panelCustom = new System.Windows.Forms.Panel();
this.gridCustom = new Infragistics.Win.UltraWinGrid.UltraGrid();
this.tbManager = new Infragistics.Win.UltraWinToolbars.UltraToolbarsManager(this.components);
this._VendorInfoForm_Toolbars_Dock_Area_Left = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea();
this._VendorInfoForm_Toolbars_Dock_Area_Right = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea();
this._VendorInfoForm_Toolbars_Dock_Area_Top = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea();
this._VendorInfoForm_Toolbars_Dock_Area_Bottom = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea();
this.helpProvider1 = new System.Windows.Forms.HelpProvider();
this._panelLeft_Toolbars_Dock_Area_Top = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea();
this._panelLeft_Toolbars_Dock_Area_Bottom = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea();
this._panelLeft_Toolbars_Dock_Area_Left = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea();
this._panelLeft_Toolbars_Dock_Area_Right = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea();
this.panelLeft.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.edPhysicalAddress)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.tbmPopups)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.cbVendorType)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.edWebAddress)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.edAccountNumber)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.edName)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.ckActive)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.edPostalAddress)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.ErrorProvider)).BeginInit();
this.panelRight.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.edContactNotes)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.edEmail)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.edPhone5)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.edPhone4)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.edPhone3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.edPhone2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.edPhone1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.edContact)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.edNotes)).BeginInit();
this.panelCustom.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.gridCustom)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.tbManager)).BeginInit();
this.SuspendLayout();
//
// ckIsDirty
//
this.ckIsDirty.Location = new System.Drawing.Point(-336, 28);
this.ckIsDirty.Name = "ckIsDirty";
this.ckIsDirty.Size = new System.Drawing.Size(186, 27);
this.ckIsDirty.TabIndex = 5;
//
// panelLeft
//
this.panelLeft.Controls.Add(this.edPhysicalAddress);
this.panelLeft.Controls.Add(this.btnWebAddress);
this.panelLeft.Controls.Add(this.btnAddress);
this.panelLeft.Controls.Add(this.lblVendorType);
this.panelLeft.Controls.Add(this.cbVendorType);
this.panelLeft.Controls.Add(this.edWebAddress);
this.panelLeft.Controls.Add(this.edAccountNumber);
this.panelLeft.Controls.Add(this.lblAccountNumber);
this.panelLeft.Controls.Add(this.edName);
this.panelLeft.Controls.Add(this.lblName);
this.panelLeft.Controls.Add(this.ckActive);
this.panelLeft.Controls.Add(this.edPostalAddress);
this.panelLeft.Dock = System.Windows.Forms.DockStyle.Left;
this.panelLeft.Location = new System.Drawing.Point(0, 43);
this.panelLeft.Name = "panelLeft";
this.panelLeft.Size = new System.Drawing.Size(316, 483);
this.panelLeft.TabIndex = 0;
//
// edPhysicalAddress
//
this.edPhysicalAddress.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.edPhysicalAddress.Location = new System.Drawing.Point(10, 231);
this.edPhysicalAddress.Multiline = true;
this.edPhysicalAddress.Name = "edPhysicalAddress";
this.edPhysicalAddress.ReadOnly = true;
this.edPhysicalAddress.Size = new System.Drawing.Size(289, 249);
this.edPhysicalAddress.TabIndex = 110;
this.edPhysicalAddress.Visible = false;
//
// btnWebAddress
//
appearance1.TextHAlignAsString = "Left";
this.btnWebAddress.Appearance = appearance1;
this.btnWebAddress.Location = new System.Drawing.Point(10, 120);
this.btnWebAddress.Name = "btnWebAddress";
this.btnWebAddress.Size = new System.Drawing.Size(158, 24);
this.btnWebAddress.TabIndex = 3;
this.btnWebAddress.Tag = "";
this.btnWebAddress.Text = "LT:Common.Label.WebAddress";
this.btnWebAddress.UseHotTracking = Infragistics.Win.DefaultableBoolean.True;
this.btnWebAddress.WrapText = false;
this.btnWebAddress.Click += new System.EventHandler(this.btnWebAddress_Click);
//
// btnAddress
//
this.btnAddress.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
appearance2.TextHAlignAsString = "Left";
this.btnAddress.Appearance = appearance2;
this.btnAddress.Location = new System.Drawing.Point(10, 203);
this.btnAddress.Name = "btnAddress";
this.btnAddress.PopupItemKey = "PopupAddressTypes";
this.btnAddress.PopupItemProvider = this.tbmPopups;
this.btnAddress.RightAlignPopup = Infragistics.Win.DefaultableBoolean.True;
this.btnAddress.Size = new System.Drawing.Size(289, 28);
this.btnAddress.TabIndex = 5;
this.btnAddress.Tag = "";
this.btnAddress.Text = "LT:Address.Label.AddressType.Postal";
this.btnAddress.WrapText = false;
this.btnAddress.Click += new System.EventHandler(this.btnAddress_Click);
//
// tbmPopups
//
this.tbmPopups.DesignerFlags = 1;
this.tbmPopups.DockWithinContainer = this.panelLeft;
this.tbmPopups.OptionSets.Add(optionSet1);
this.tbmPopups.OptionSets.Add(optionSet2);
this.tbmPopups.ShowFullMenusDelay = 500;
ultraToolbar1.DockedColumn = 0;
ultraToolbar1.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Floating;
ultraToolbar1.DockedRow = 0;
ultraToolbar1.FloatingLocation = new System.Drawing.Point(877, 189);
ultraToolbar1.FloatingSize = new System.Drawing.Size(122, 42);
ultraToolbar1.NonInheritedTools.AddRange(new Infragistics.Win.UltraWinToolbars.ToolBase[] {
popupMenuTool1,
popupMenuTool2});
ultraToolbar1.Text = "TempSetupTB";
ultraToolbar1.Visible = false;
this.tbmPopups.Toolbars.AddRange(new Infragistics.Win.UltraWinToolbars.UltraToolbar[] {
ultraToolbar1});
popupMenuTool3.SharedPropsInternal.Caption = "PopupAddressTypes";
stateButtonTool1.Checked = true;
stateButtonTool1.MenuDisplayStyle = Infragistics.Win.UltraWinToolbars.StateButtonMenuDisplayStyle.DisplayCheckmark;
stateButtonTool2.MenuDisplayStyle = Infragistics.Win.UltraWinToolbars.StateButtonMenuDisplayStyle.DisplayCheckmark;
popupMenuTool3.Tools.AddRange(new Infragistics.Win.UltraWinToolbars.ToolBase[] {
stateButtonTool1,
stateButtonTool2});
stateButtonTool3.MenuDisplayStyle = Infragistics.Win.UltraWinToolbars.StateButtonMenuDisplayStyle.DisplayCheckmark;
stateButtonTool3.OptionSetKey = "OSAddressPop";
stateButtonTool3.SharedPropsInternal.Caption = "LT:Address.Label.AddressType.Physical";
stateButtonTool4.Checked = true;
stateButtonTool4.MenuDisplayStyle = Infragistics.Win.UltraWinToolbars.StateButtonMenuDisplayStyle.DisplayCheckmark;
stateButtonTool4.OptionSetKey = "OSAddressPop";
stateButtonTool4.SharedPropsInternal.Caption = "LT:Address.Label.AddressType.Postal";
stateButtonTool6.Checked = true;
stateButtonTool6.MenuDisplayStyle = Infragistics.Win.UltraWinToolbars.StateButtonMenuDisplayStyle.DisplayCheckmark;
stateButtonTool6.OptionSetKey = "OSNotesPop";
stateButtonTool6.SharedPropsInternal.Caption = "LT:Vendor.Label.Notes";
popupMenuTool4.SharedPropsInternal.Caption = "PopupNotesTypes";
stateButtonTool8.Checked = true;
stateButtonTool8.MenuDisplayStyle = Infragistics.Win.UltraWinToolbars.StateButtonMenuDisplayStyle.DisplayCheckmark;
stateButtonTool12.MenuDisplayStyle = Infragistics.Win.UltraWinToolbars.StateButtonMenuDisplayStyle.DisplayCheckmark;
popupMenuTool4.Tools.AddRange(new Infragistics.Win.UltraWinToolbars.ToolBase[] {
stateButtonTool8,
stateButtonTool12});
stateButtonTool11.MenuDisplayStyle = Infragistics.Win.UltraWinToolbars.StateButtonMenuDisplayStyle.DisplayCheckmark;
stateButtonTool11.OptionSetKey = "OSNotesPop";
stateButtonTool11.SharedPropsInternal.Caption = "LT:Vendor.Label.ContactNotes";
this.tbmPopups.Tools.AddRange(new Infragistics.Win.UltraWinToolbars.ToolBase[] {
popupMenuTool3,
stateButtonTool3,
stateButtonTool4,
stateButtonTool6,
popupMenuTool4,
stateButtonTool11});
this.tbmPopups.ToolClick += new Infragistics.Win.UltraWinToolbars.ToolClickEventHandler(this.tbmPopups_ToolClick);
//
// lblVendorType
//
this.lblVendorType.Location = new System.Drawing.Point(10, 157);
this.lblVendorType.Name = "lblVendorType";
this.lblVendorType.Size = new System.Drawing.Size(158, 24);
this.lblVendorType.TabIndex = 107;
this.lblVendorType.Tag = "";
this.lblVendorType.Text = "LT:Vendor.Label.VendorType";
this.lblVendorType.WrapText = false;
//
// cbVendorType
//
this.cbVendorType.Location = new System.Drawing.Point(192, 157);
this.cbVendorType.Name = "cbVendorType";
this.cbVendorType.Size = new System.Drawing.Size(106, 24);
this.cbVendorType.TabIndex = 4;
//
// edWebAddress
//
this.edWebAddress.Location = new System.Drawing.Point(192, 120);
this.edWebAddress.Name = "edWebAddress";
this.edWebAddress.Size = new System.Drawing.Size(106, 24);
this.edWebAddress.TabIndex = 2;
//
// edAccountNumber
//
this.edAccountNumber.Location = new System.Drawing.Point(192, 83);
this.edAccountNumber.Name = "edAccountNumber";
this.edAccountNumber.Size = new System.Drawing.Size(106, 24);
this.edAccountNumber.TabIndex = 1;
//
// lblAccountNumber
//
this.lblAccountNumber.Location = new System.Drawing.Point(10, 83);
this.lblAccountNumber.Name = "lblAccountNumber";
this.lblAccountNumber.Size = new System.Drawing.Size(158, 24);
this.lblAccountNumber.TabIndex = 94;
this.lblAccountNumber.Tag = "";
this.lblAccountNumber.Text = "LT:Vendor.Label.AccountNumber";
this.lblAccountNumber.WrapText = false;
//
// edName
//
this.edName.Location = new System.Drawing.Point(192, 46);
this.edName.Name = "edName";
this.edName.Size = new System.Drawing.Size(106, 24);
this.edName.TabIndex = 0;
//
// lblName
//
this.lblName.Location = new System.Drawing.Point(10, 46);
this.lblName.Name = "lblName";
this.lblName.Size = new System.Drawing.Size(158, 24);
this.lblName.TabIndex = 92;
this.lblName.Tag = "";
this.lblName.Text = "LT:Vendor.Label.Name";
this.lblName.WrapText = false;
//
// ckActive
//
this.ckActive.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.ckActive.Checked = true;
this.ckActive.CheckState = System.Windows.Forms.CheckState.Checked;
this.ckActive.Location = new System.Drawing.Point(10, 9);
this.ckActive.Name = "ckActive";
this.ckActive.Size = new System.Drawing.Size(275, 19);
this.ckActive.TabIndex = 6;
this.ckActive.Tag = "";
this.ckActive.Text = "LT:Common.Label.Active";
//
// edPostalAddress
//
this.edPostalAddress.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.edPostalAddress.Location = new System.Drawing.Point(10, 231);
this.edPostalAddress.Multiline = true;
this.edPostalAddress.Name = "edPostalAddress";
this.edPostalAddress.ReadOnly = true;
this.edPostalAddress.Size = new System.Drawing.Size(289, 249);
this.edPostalAddress.TabIndex = 7;
//
// ErrorProvider
//
this.ErrorProvider.ContainerControl = this;
//
// panelRight
//
this.panelRight.Controls.Add(this.edContactNotes);
this.panelRight.Controls.Add(this.btnNotes);
this.panelRight.Controls.Add(this.edEmail);
this.panelRight.Controls.Add(this.lblEmail);
this.panelRight.Controls.Add(this.edPhone5);
this.panelRight.Controls.Add(this.lblPhone5);
this.panelRight.Controls.Add(this.edPhone4);
this.panelRight.Controls.Add(this.lblPhone4);
this.panelRight.Controls.Add(this.edPhone3);
this.panelRight.Controls.Add(this.lblPhone3);
this.panelRight.Controls.Add(this.edPhone2);
this.panelRight.Controls.Add(this.lblPhone2);
this.panelRight.Controls.Add(this.edPhone1);
this.panelRight.Controls.Add(this.lblPhone1);
this.panelRight.Controls.Add(this.edContact);
this.panelRight.Controls.Add(this.lblContact);
this.panelRight.Controls.Add(this.edNotes);
this.panelRight.Dock = System.Windows.Forms.DockStyle.Left;
this.panelRight.Location = new System.Drawing.Point(316, 43);
this.panelRight.Name = "panelRight";
this.panelRight.Size = new System.Drawing.Size(320, 483);
this.panelRight.TabIndex = 101;
//
// edContactNotes
//
this.edContactNotes.AcceptsReturn = true;
this.edContactNotes.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.edContactNotes.Location = new System.Drawing.Point(4, 238);
this.edContactNotes.Multiline = true;
this.edContactNotes.Name = "edContactNotes";
this.edContactNotes.Size = new System.Drawing.Size(306, 242);
this.edContactNotes.TabIndex = 179;
this.edContactNotes.Visible = false;
//
// btnNotes
//
this.btnNotes.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
appearance3.TextHAlignAsString = "Left";
this.btnNotes.Appearance = appearance3;
this.btnNotes.Location = new System.Drawing.Point(4, 203);
this.btnNotes.Name = "btnNotes";
this.btnNotes.PopupItemKey = "PopupNotesTypes";
this.btnNotes.PopupItemProvider = this.tbmPopups;
this.btnNotes.RightAlignPopup = Infragistics.Win.DefaultableBoolean.True;
this.btnNotes.Size = new System.Drawing.Size(306, 28);
this.btnNotes.Style = Infragistics.Win.Misc.SplitButtonDisplayStyle.DropDownButtonOnly;
this.btnNotes.TabIndex = 178;
this.btnNotes.Tag = "";
this.btnNotes.Text = "LT:Vendor.Label.Notes";
this.btnNotes.WrapText = false;
//
// edEmail
//
this.edEmail.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.edEmail.Location = new System.Drawing.Point(214, 33);
this.edEmail.Name = "edEmail";
this.edEmail.Size = new System.Drawing.Size(96, 24);
this.edEmail.TabIndex = 163;
//
// lblEmail
//
this.lblEmail.BorderStyleOuter = Infragistics.Win.UIElementBorderStyle.None;
this.lblEmail.Location = new System.Drawing.Point(4, 39);
this.lblEmail.Name = "lblEmail";
this.lblEmail.Size = new System.Drawing.Size(169, 19);
this.lblEmail.TabIndex = 164;
this.lblEmail.Tag = "";
this.lblEmail.Text = "LT:Vendor.Label.Email";
this.lblEmail.WrapText = false;
//
// edPhone5
//
this.edPhone5.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.edPhone5.Location = new System.Drawing.Point(214, 166);
this.edPhone5.Name = "edPhone5";
this.edPhone5.Size = new System.Drawing.Size(96, 24);
this.edPhone5.TabIndex = 161;
//
// lblPhone5
//
this.lblPhone5.BorderStyleOuter = Infragistics.Win.UIElementBorderStyle.None;
this.lblPhone5.Location = new System.Drawing.Point(4, 172);
this.lblPhone5.Name = "lblPhone5";
this.lblPhone5.Size = new System.Drawing.Size(169, 18);
this.lblPhone5.TabIndex = 162;
this.lblPhone5.Tag = "";
this.lblPhone5.Text = "LT:Vendor.Label.Phone5";
this.lblPhone5.WrapText = false;
//
// edPhone4
//
this.edPhone4.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.edPhone4.Location = new System.Drawing.Point(214, 140);
this.edPhone4.Name = "edPhone4";
this.edPhone4.Size = new System.Drawing.Size(96, 24);
this.edPhone4.TabIndex = 159;
//
// lblPhone4
//
this.lblPhone4.BorderStyleOuter = Infragistics.Win.UIElementBorderStyle.None;
this.lblPhone4.Location = new System.Drawing.Point(4, 145);
this.lblPhone4.Name = "lblPhone4";
this.lblPhone4.Size = new System.Drawing.Size(169, 19);
this.lblPhone4.TabIndex = 160;
this.lblPhone4.Tag = "";
this.lblPhone4.Text = "LT:Vendor.Label.Phone4";
this.lblPhone4.WrapText = false;
//
// edPhone3
//
this.edPhone3.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.edPhone3.Location = new System.Drawing.Point(214, 113);
this.edPhone3.Name = "edPhone3";
this.edPhone3.Size = new System.Drawing.Size(96, 24);
this.edPhone3.TabIndex = 157;
//
// lblPhone3
//
this.lblPhone3.BorderStyleOuter = Infragistics.Win.UIElementBorderStyle.None;
this.lblPhone3.Location = new System.Drawing.Point(4, 115);
this.lblPhone3.Name = "lblPhone3";
this.lblPhone3.Size = new System.Drawing.Size(169, 22);
this.lblPhone3.TabIndex = 158;
this.lblPhone3.Tag = "";
this.lblPhone3.Text = "LT:Vendor.Label.Phone3";
this.lblPhone3.WrapText = false;
//
// edPhone2
//
this.edPhone2.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.edPhone2.Location = new System.Drawing.Point(214, 87);
this.edPhone2.Name = "edPhone2";
this.edPhone2.Size = new System.Drawing.Size(96, 24);
this.edPhone2.TabIndex = 155;
//
// lblPhone2
//
this.lblPhone2.BorderStyleOuter = Infragistics.Win.UIElementBorderStyle.None;
this.lblPhone2.Location = new System.Drawing.Point(4, 92);
this.lblPhone2.Name = "lblPhone2";
this.lblPhone2.Size = new System.Drawing.Size(169, 19);
this.lblPhone2.TabIndex = 156;
this.lblPhone2.Tag = "";
this.lblPhone2.Text = "LT:Vendor.Label.Phone2";
this.lblPhone2.WrapText = false;
//
// edPhone1
//
this.edPhone1.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.edPhone1.Location = new System.Drawing.Point(214, 60);
this.edPhone1.Name = "edPhone1";
this.edPhone1.Size = new System.Drawing.Size(96, 24);
this.edPhone1.TabIndex = 153;
//
// lblPhone1
//
this.lblPhone1.BorderStyleOuter = Infragistics.Win.UIElementBorderStyle.None;
this.lblPhone1.Location = new System.Drawing.Point(4, 66);
this.lblPhone1.Name = "lblPhone1";
this.lblPhone1.Size = new System.Drawing.Size(169, 18);
this.lblPhone1.TabIndex = 154;
this.lblPhone1.Tag = "";
this.lblPhone1.Text = "LT:Vendor.Label.Phone1";
this.lblPhone1.WrapText = false;
//
// edContact
//
this.edContact.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.edContact.Location = new System.Drawing.Point(214, 7);
this.edContact.Name = "edContact";
this.edContact.Size = new System.Drawing.Size(96, 24);
this.edContact.TabIndex = 151;
//
// lblContact
//
this.lblContact.BorderStyleOuter = Infragistics.Win.UIElementBorderStyle.None;
this.lblContact.Location = new System.Drawing.Point(4, 13);
this.lblContact.Name = "lblContact";
this.lblContact.Size = new System.Drawing.Size(169, 18);
this.lblContact.TabIndex = 152;
this.lblContact.Tag = "";
this.lblContact.Text = "LT:Vendor.Label.Contact";
this.lblContact.WrapText = false;
//
// edNotes
//
this.edNotes.AcceptsReturn = 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(5, 238);
this.edNotes.Multiline = true;
this.edNotes.Name = "edNotes";
this.edNotes.Size = new System.Drawing.Size(305, 242);
this.edNotes.TabIndex = 0;
//
// panelCustom
//
this.panelCustom.Controls.Add(this.gridCustom);
this.panelCustom.Dock = System.Windows.Forms.DockStyle.Right;
this.panelCustom.Location = new System.Drawing.Point(637, 43);
this.panelCustom.Name = "panelCustom";
this.panelCustom.Size = new System.Drawing.Size(269, 483);
this.panelCustom.TabIndex = 108;
//
// gridCustom
//
this.gridCustom.Cursor = System.Windows.Forms.Cursors.Default;
this.gridCustom.Dock = System.Windows.Forms.DockStyle.Fill;
this.gridCustom.Location = new System.Drawing.Point(0, 0);
this.gridCustom.Name = "gridCustom";
this.gridCustom.Size = new System.Drawing.Size(269, 483);
this.gridCustom.TabIndex = 0;
this.gridCustom.Tag = "";
this.gridCustom.Text = "LT:ObjectCustomField.Label.CustomGrid";
this.gridCustom.AfterCellUpdate += new Infragistics.Win.UltraWinGrid.CellEventHandler(this.gridCustom_AfterCellUpdate);
//
// tbManager
//
this.tbManager.DesignerFlags = 1;
this.tbManager.DockWithinContainer = this;
this.tbManager.DockWithinContainerBaseType = typeof(System.Windows.Forms.Form);
this.tbManager.ShowFullMenusDelay = 500;
ultraToolbar2.DockedColumn = 0;
ultraToolbar2.DockedRow = 0;
ultraToolbar2.NonInheritedTools.AddRange(new Infragistics.Win.UltraWinToolbars.ToolBase[] {
popupMenuTool5,
buttonTool1,
buttonTool2,
buttonTool17,
buttonTool3,
buttonTool6,
buttonTool4,
buttonTool5,
buttonTool7,
buttonTool8});
ultraToolbar2.Text = "VendorEntryMenuBar";
this.tbManager.Toolbars.AddRange(new Infragistics.Win.UltraWinToolbars.UltraToolbar[] {
ultraToolbar2});
this.tbManager.ToolbarSettings.AllowCustomize = Infragistics.Win.DefaultableBoolean.False;
this.tbManager.ToolbarSettings.AllowFloating = Infragistics.Win.DefaultableBoolean.False;
this.tbManager.ToolbarSettings.AllowHiding = Infragistics.Win.DefaultableBoolean.False;
buttonTool9.SharedPropsInternal.AccessibleDescription = "recorddd";
appearance4.Image = global::AyaNova.Resource1.SaveExit32;
buttonTool9.SharedPropsInternal.AppearancesLarge.Appearance = appearance4;
appearance5.Image = global::AyaNova.Resource1.SaveExit16;
buttonTool9.SharedPropsInternal.AppearancesSmall.Appearance = appearance5;
buttonTool9.SharedPropsInternal.Caption = "LT:UI.Command.SaveClose";
appearance6.Image = global::AyaNova.Resource1.Documents32;
buttonTool10.SharedPropsInternal.AppearancesLarge.Appearance = appearance6;
appearance7.Image = global::AyaNova.Resource1.Documents16;
buttonTool10.SharedPropsInternal.AppearancesSmall.Appearance = appearance7;
buttonTool10.SharedPropsInternal.Caption = "LT:AssignedDoc.Label.List";
appearance8.Image = global::AyaNova.Resource1.RecordHistory32;
buttonTool11.SharedPropsInternal.AppearancesLarge.Appearance = appearance8;
appearance9.Image = global::AyaNova.Resource1.RecordHistory16;
buttonTool11.SharedPropsInternal.AppearancesSmall.Appearance = appearance9;
buttonTool11.SharedPropsInternal.Caption = "LT:UI.Command.RecordHistory";
buttonTool12.SharedPropsInternal.Caption = "LT:UI.Command.Save";
buttonTool12.SharedPropsInternal.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.TextOnlyAlways;
appearance10.Image = global::AyaNova.Resource1.SaveNew32;
buttonTool13.SharedPropsInternal.AppearancesLarge.Appearance = appearance10;
appearance11.Image = global::AyaNova.Resource1.SaveNew16;
buttonTool13.SharedPropsInternal.AppearancesSmall.Appearance = appearance11;
buttonTool13.SharedPropsInternal.Caption = "LT:UI.Command.SaveNew";
buttonTool14.SharedPropsInternal.Caption = "LT:UI.Command.Close";
buttonTool14.SharedPropsInternal.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.TextOnlyAlways;
appearance12.Image = global::AyaNova.Resource1.Delete32;
buttonTool15.SharedPropsInternal.AppearancesLarge.Appearance = appearance12;
appearance13.Image = global::AyaNova.Resource1.Delete16;
buttonTool15.SharedPropsInternal.AppearancesSmall.Appearance = appearance13;
buttonTool15.SharedPropsInternal.Caption = "LT:UI.Command.Delete";
listTool1.DisplayCheckmark = false;
listToolItem1.Text = "xxxxxxxxxxxxxxxxx";
listTool1.ListToolItemsInternal.Add(listToolItem1);
appearance14.Image = global::AyaNova.Resource1.Print32;
popupMenuTool6.SharedPropsInternal.AppearancesLarge.Appearance = appearance14;
appearance15.Image = global::AyaNova.Resource1.Print16;
popupMenuTool6.SharedPropsInternal.AppearancesSmall.Appearance = appearance15;
popupMenuTool6.SharedPropsInternal.Caption = "LT:UI.Toolbar.Print";
popupMenuTool6.SharedPropsInternal.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageOnlyOnToolbars;
popupMenuTool6.Tools.AddRange(new Infragistics.Win.UltraWinToolbars.ToolBase[] {
listTool2});
appearance16.Image = global::AyaNova.Resource1.FollowUp32;
buttonTool16.SharedPropsInternal.AppearancesLarge.Appearance = appearance16;
appearance17.Image = global::AyaNova.Resource1.FollowUp16;
buttonTool16.SharedPropsInternal.AppearancesSmall.Appearance = appearance17;
buttonTool16.SharedPropsInternal.Caption = "LT:ScheduleMarker.Label.FollowUp";
buttonTool16.SharedPropsInternal.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageOnlyOnToolbars;
appearance18.Image = global::AyaNova.Resource1.Wiki32;
buttonTool18.SharedPropsInternal.AppearancesLarge.Appearance = appearance18;
appearance19.Image = global::AyaNova.Resource1.Wiki16;
buttonTool18.SharedPropsInternal.AppearancesSmall.Appearance = appearance19;
buttonTool18.SharedPropsInternal.Caption = "LT:O.WikiPage";
this.tbManager.Tools.AddRange(new Infragistics.Win.UltraWinToolbars.ToolBase[] {
buttonTool9,
buttonTool10,
buttonTool11,
buttonTool12,
buttonTool13,
buttonTool14,
buttonTool15,
listTool1,
popupMenuTool6,
buttonTool16,
buttonTool18});
this.tbManager.UseLargeImagesOnToolbar = true;
this.tbManager.ToolClick += new Infragistics.Win.UltraWinToolbars.ToolClickEventHandler(this.tbManager_ToolClick);
//
// _VendorInfoForm_Toolbars_Dock_Area_Left
//
this._VendorInfoForm_Toolbars_Dock_Area_Left.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
this._VendorInfoForm_Toolbars_Dock_Area_Left.BackColor = System.Drawing.SystemColors.Control;
this._VendorInfoForm_Toolbars_Dock_Area_Left.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Left;
this._VendorInfoForm_Toolbars_Dock_Area_Left.ForeColor = System.Drawing.SystemColors.ControlText;
this._VendorInfoForm_Toolbars_Dock_Area_Left.Location = new System.Drawing.Point(0, 43);
this._VendorInfoForm_Toolbars_Dock_Area_Left.Name = "_VendorInfoForm_Toolbars_Dock_Area_Left";
this._VendorInfoForm_Toolbars_Dock_Area_Left.Size = new System.Drawing.Size(0, 483);
this._VendorInfoForm_Toolbars_Dock_Area_Left.ToolbarsManager = this.tbManager;
//
// _VendorInfoForm_Toolbars_Dock_Area_Right
//
this._VendorInfoForm_Toolbars_Dock_Area_Right.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
this._VendorInfoForm_Toolbars_Dock_Area_Right.BackColor = System.Drawing.SystemColors.Control;
this._VendorInfoForm_Toolbars_Dock_Area_Right.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Right;
this._VendorInfoForm_Toolbars_Dock_Area_Right.ForeColor = System.Drawing.SystemColors.ControlText;
this._VendorInfoForm_Toolbars_Dock_Area_Right.Location = new System.Drawing.Point(906, 43);
this._VendorInfoForm_Toolbars_Dock_Area_Right.Name = "_VendorInfoForm_Toolbars_Dock_Area_Right";
this._VendorInfoForm_Toolbars_Dock_Area_Right.Size = new System.Drawing.Size(0, 483);
this._VendorInfoForm_Toolbars_Dock_Area_Right.ToolbarsManager = this.tbManager;
//
// _VendorInfoForm_Toolbars_Dock_Area_Top
//
this._VendorInfoForm_Toolbars_Dock_Area_Top.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
this._VendorInfoForm_Toolbars_Dock_Area_Top.BackColor = System.Drawing.SystemColors.Control;
this._VendorInfoForm_Toolbars_Dock_Area_Top.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Top;
this._VendorInfoForm_Toolbars_Dock_Area_Top.ForeColor = System.Drawing.SystemColors.ControlText;
this._VendorInfoForm_Toolbars_Dock_Area_Top.Location = new System.Drawing.Point(0, 0);
this._VendorInfoForm_Toolbars_Dock_Area_Top.Name = "_VendorInfoForm_Toolbars_Dock_Area_Top";
this._VendorInfoForm_Toolbars_Dock_Area_Top.Size = new System.Drawing.Size(906, 43);
this._VendorInfoForm_Toolbars_Dock_Area_Top.ToolbarsManager = this.tbManager;
//
// _VendorInfoForm_Toolbars_Dock_Area_Bottom
//
this._VendorInfoForm_Toolbars_Dock_Area_Bottom.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
this._VendorInfoForm_Toolbars_Dock_Area_Bottom.BackColor = System.Drawing.SystemColors.Control;
this._VendorInfoForm_Toolbars_Dock_Area_Bottom.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Bottom;
this._VendorInfoForm_Toolbars_Dock_Area_Bottom.ForeColor = System.Drawing.SystemColors.ControlText;
this._VendorInfoForm_Toolbars_Dock_Area_Bottom.Location = new System.Drawing.Point(0, 526);
this._VendorInfoForm_Toolbars_Dock_Area_Bottom.Name = "_VendorInfoForm_Toolbars_Dock_Area_Bottom";
this._VendorInfoForm_Toolbars_Dock_Area_Bottom.Size = new System.Drawing.Size(906, 0);
this._VendorInfoForm_Toolbars_Dock_Area_Bottom.ToolbarsManager = this.tbManager;
//
// _panelLeft_Toolbars_Dock_Area_Top
//
this._panelLeft_Toolbars_Dock_Area_Top.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
this._panelLeft_Toolbars_Dock_Area_Top.BackColor = System.Drawing.SystemColors.Control;
this._panelLeft_Toolbars_Dock_Area_Top.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Top;
this._panelLeft_Toolbars_Dock_Area_Top.ForeColor = System.Drawing.SystemColors.ControlText;
this._panelLeft_Toolbars_Dock_Area_Top.Location = new System.Drawing.Point(0, 43);
this._panelLeft_Toolbars_Dock_Area_Top.Name = "_panelLeft_Toolbars_Dock_Area_Top";
this._panelLeft_Toolbars_Dock_Area_Top.Size = new System.Drawing.Size(906, 0);
this._panelLeft_Toolbars_Dock_Area_Top.ToolbarsManager = this.tbmPopups;
//
// _panelLeft_Toolbars_Dock_Area_Bottom
//
this._panelLeft_Toolbars_Dock_Area_Bottom.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
this._panelLeft_Toolbars_Dock_Area_Bottom.BackColor = System.Drawing.SystemColors.Control;
this._panelLeft_Toolbars_Dock_Area_Bottom.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Bottom;
this._panelLeft_Toolbars_Dock_Area_Bottom.ForeColor = System.Drawing.SystemColors.ControlText;
this._panelLeft_Toolbars_Dock_Area_Bottom.Location = new System.Drawing.Point(0, 526);
this._panelLeft_Toolbars_Dock_Area_Bottom.Name = "_panelLeft_Toolbars_Dock_Area_Bottom";
this._panelLeft_Toolbars_Dock_Area_Bottom.Size = new System.Drawing.Size(906, 0);
this._panelLeft_Toolbars_Dock_Area_Bottom.ToolbarsManager = this.tbmPopups;
//
// _panelLeft_Toolbars_Dock_Area_Left
//
this._panelLeft_Toolbars_Dock_Area_Left.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
this._panelLeft_Toolbars_Dock_Area_Left.BackColor = System.Drawing.SystemColors.Control;
this._panelLeft_Toolbars_Dock_Area_Left.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Left;
this._panelLeft_Toolbars_Dock_Area_Left.ForeColor = System.Drawing.SystemColors.ControlText;
this._panelLeft_Toolbars_Dock_Area_Left.Location = new System.Drawing.Point(0, 43);
this._panelLeft_Toolbars_Dock_Area_Left.Name = "_panelLeft_Toolbars_Dock_Area_Left";
this._panelLeft_Toolbars_Dock_Area_Left.Size = new System.Drawing.Size(0, 483);
this._panelLeft_Toolbars_Dock_Area_Left.ToolbarsManager = this.tbmPopups;
//
// _panelLeft_Toolbars_Dock_Area_Right
//
this._panelLeft_Toolbars_Dock_Area_Right.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
this._panelLeft_Toolbars_Dock_Area_Right.BackColor = System.Drawing.SystemColors.Control;
this._panelLeft_Toolbars_Dock_Area_Right.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Right;
this._panelLeft_Toolbars_Dock_Area_Right.ForeColor = System.Drawing.SystemColors.ControlText;
this._panelLeft_Toolbars_Dock_Area_Right.Location = new System.Drawing.Point(906, 43);
this._panelLeft_Toolbars_Dock_Area_Right.Name = "_panelLeft_Toolbars_Dock_Area_Right";
this._panelLeft_Toolbars_Dock_Area_Right.Size = new System.Drawing.Size(0, 483);
this._panelLeft_Toolbars_Dock_Area_Right.ToolbarsManager = this.tbmPopups;
//
// VendorInfoForm
//
this.AllowDrop = true;
this.AutoScaleBaseSize = new System.Drawing.Size(6, 15);
this.ClientSize = new System.Drawing.Size(906, 526);
this.Controls.Add(this.panelCustom);
this.Controls.Add(this.panelRight);
this.Controls.Add(this.panelLeft);
this.Controls.Add(this.ckIsDirty);
this.Controls.Add(this._panelLeft_Toolbars_Dock_Area_Left);
this.Controls.Add(this._panelLeft_Toolbars_Dock_Area_Right);
this.Controls.Add(this._VendorInfoForm_Toolbars_Dock_Area_Left);
this.Controls.Add(this._VendorInfoForm_Toolbars_Dock_Area_Right);
this.Controls.Add(this._panelLeft_Toolbars_Dock_Area_Bottom);
this.Controls.Add(this._VendorInfoForm_Toolbars_Dock_Area_Bottom);
this.Controls.Add(this._panelLeft_Toolbars_Dock_Area_Top);
this.Controls.Add(this._VendorInfoForm_Toolbars_Dock_Area_Top);
this.helpProvider1.SetHelpKeyword(this, "");
this.helpProvider1.SetHelpNavigator(this, System.Windows.Forms.HelpNavigator.Topic);
this.MinimumSize = new System.Drawing.Size(614, 563);
this.Name = "VendorInfoForm";
this.helpProvider1.SetShowHelp(this, true);
this.ShowInTaskbar = false;
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Show;
this.Closing += new System.ComponentModel.CancelEventHandler(this.VendorInfoForm_Closing);
this.Load += new System.EventHandler(this.VendorInfoForm_Load);
this.SizeChanged += new System.EventHandler(this.VendorInfoForm_SizeChanged);
this.DragDrop += new System.Windows.Forms.DragEventHandler(this.Form_DragDrop);
this.DragEnter += new System.Windows.Forms.DragEventHandler(this.Form_DragEnter);
this.panelLeft.ResumeLayout(false);
this.panelLeft.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.edPhysicalAddress)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.tbmPopups)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.cbVendorType)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.edWebAddress)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.edAccountNumber)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.edName)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.ckActive)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.edPostalAddress)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.ErrorProvider)).EndInit();
this.panelRight.ResumeLayout(false);
this.panelRight.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.edContactNotes)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.edEmail)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.edPhone5)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.edPhone4)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.edPhone3)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.edPhone2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.edPhone1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.edContact)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.edNotes)).EndInit();
this.panelCustom.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.gridCustom)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.tbManager)).EndInit();
this.ResumeLayout(false);
}
#endregion
// __ _ _ ___ ____ __ __ __ __ __ ___ ___
// / _)( )( )/ __)(_ _)/ \( \/ ) / _)/ \( \( _)
// ( (_ )()( \__ \ )( ( () )) ( ( (_( () )) ) )) _)
// \__) \__/ (___/ (__) \__/(_/\/\_) \__)\__/(___/(___)
//
#region Form Load / Close
//variable to hold user form settings
//UIUserFormSetting mFormSetting;
///
/// Prepare the form
///
///
///
private void VendorInfoForm_Load(object sender, System.EventArgs e)
{
//
// helpProvider1
//
this.helpProvider1.HelpNamespace = Util.BaseHelpUrl + "vendors.htm";
//case 1039 //log.Debug("VendorInfoForm_Load");
Cursor.Current = Cursors.WaitCursor;
this.Visible=false;
this.Icon = Resource1.Vendor16icon;
//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 Vendor edit screen from elsewhere in the program)
if(AyaBizUtils.Right("Object.Vendor")< (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.Vendor")));
this.Close();
return;
}
InitializeComboBoxes();
DataBind();
Util.LoadFormCustomization("VendorInfo", this, tbManager, false);
Util.PluginInsertMenu(tbManager, new Util.PluginMenuOptionData(true, RootObjectTypes.Vendor, mVendor, null));//case 941
Util.LocalizeHelperInsertMenu(tbManager, this); //case 1810
Util.Localize(this);
Util.Localize(tbmPopups);
//restrict UI based on security settings
RestrictUI();
Cursor.Current = Cursors.Default;
if (AyaBizUtils.Right("Object.Report") < (int)SecurityLevelTypes.ReadOnly)
{
tbManager.Tools["LT:UI.Toolbar.Print"].SharedProps.Visible = false;
}
else
{
tbManager.Tools["LT:UI.Toolbar.Print"].SharedProps.Visible = true;
Util.ReportFillList(this.tbManager.Tools["REPORTLIST"], VendorList.ReportKey,
VendorListDetailed.ReportKey);
}
//Case 152
(new TabOrderManager(this)).SetTabOrder(TabOrderManager.TabScheme.AcrossFirst);
Application.Idle+= new EventHandler(Application_Idle);
this.Visible=true;
}
///
/// Used to track whether the close was done by the program
/// or done by the user clicking on the upper left corner X control
///
bool bClosingHandled=false;
///
/// Save form layout and grid layout for next time
///
///
///
private void VendorInfoForm_Closing(object sender, System.ComponentModel.CancelEventArgs e)
{
//case 1039 //log.Debug("VendorInfoForm_Closing");
if(!bClosingHandled)
{
//Save record if necessary
//User may opt to not cancel exit
if(!RecordUpdate(RecordActionType.PromptToSave) )
{
e.Cancel=true;
return;
}
}
Application.Idle-= new EventHandler(Application_Idle);
Util.SaveFormCustomization("VendorInfo", this, tbManager, false);
}
#endregion
#region Form Sizing
///
/// Adjust the layout proportionately as it's sized by user
///
///
///
private void VendorInfoForm_SizeChanged(object sender, System.EventArgs e)
{
//case 1039 //log.Debug("VendorInfoForm_SizeChanged");
int nWidth=0;
int nHeight=(this.DisplayRectangle.Height/3)*2;
if(bShowCustomFields) //there are three panels
nWidth=this.DisplayRectangle.Width/3;
else//there are two panels
nWidth=this.DisplayRectangle.Width/2;
this.panelLeft.Width=nWidth;
this.panelRight.Width=nWidth;
if(bShowCustomFields)
this.panelCustom.Width=nWidth;
this.panelLeft.Height=nHeight;
this.panelRight.Height=nHeight;
this.panelCustom.Height=nHeight;
//Size of controls in panel
//One third
int nLeftWidth=(this.panelLeft.Width/3);
//two thirds
int nRightWidth=this.panelLeft.Width-nLeftWidth;
//make room for error icons
nRightWidth-=16;
//case 3179 overlapping
int nGap = 16;
//Size and align controls in Left panel
lblName.Width = nLeftWidth - nGap;
edName.Left=nLeftWidth;
edName.Width=nRightWidth;
lblAccountNumber.Width = nLeftWidth - nGap;
edAccountNumber.Left=nLeftWidth;
edAccountNumber.Width=nRightWidth;
btnWebAddress.Width = nLeftWidth - nGap;
edWebAddress.Left=nLeftWidth;
edWebAddress.Width=nRightWidth;
lblVendorType.Width = nLeftWidth - nGap;
cbVendorType.Left=nLeftWidth;
cbVendorType.Width=nRightWidth;
//CONTACT FIELDS
lblContact.Width = nLeftWidth - nGap;
edContact.Left = nLeftWidth;
edContact.Width = nRightWidth;
lblEmail.Width = nLeftWidth - nGap;
edEmail.Left = nLeftWidth;
edEmail.Width = nRightWidth;
lblPhone1.Width = nLeftWidth - nGap;
edPhone1.Left = nLeftWidth;
edPhone1.Width = nRightWidth;
lblPhone2.Width = nLeftWidth - nGap;
edPhone2.Left = nLeftWidth;
edPhone2.Width = nRightWidth;
lblPhone3.Width = nLeftWidth - nGap;
edPhone3.Left = nLeftWidth;
edPhone3.Width = nRightWidth;
lblPhone4.Width = nLeftWidth - nGap;
edPhone4.Left = nLeftWidth;
edPhone4.Width = nRightWidth;
lblPhone5.Width = nLeftWidth - nGap;
edPhone5.Left = nLeftWidth;
edPhone5.Width = nRightWidth;
}
#endregion
#region Form UI commands
#region Toolbar menu items
///
/// Respond to a click on a toolbar menu item
///
///
///
private void tbManager_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e)
{
//case 1039 //if(log.IsDebugEnabled) //case 1039 //log.Debug("ToolClick: "+e.Tool.Key);
switch (e.Tool.Key)
{
case "LT:UI.Command.SaveClose": // ButtonTool
RecordUpdate(RecordActionType.SaveAndExit);
break;
case "LT:AssignedDoc.Label.List": // ButtonTool
DocsForm d=new DocsForm();
d.DocsToEdit=mVendor.Docs;
d.RootObjectID=mVendor.ID;
d.ExactObjectType = d.RootObjectType = RootObjectTypes.Vendor;
d.ShowDialog();
break;
case "LT:UI.Command.RecordHistory": // ButtonTool
RecordHistoryForm RH=new RecordHistoryForm(mVendor.Creator,mVendor.Modifier,mVendor.Created,mVendor.Modified);
RH.ShowDialog(); RH.Dispose();
break;
case "LT:UI.Command.Save": // ButtonTool
RecordUpdate(RecordActionType.SaveOnly);
break;
case "LT:UI.Command.SaveNew": // ButtonTool
RecordUpdate(RecordActionType.SaveAndNew);
break;
case "LT:UI.Command.Close": // ButtonTool
this.Close();
break;
case "LT:UI.Command.Delete": // ButtonTool
RecordUpdate(RecordActionType.DeleteAndExit);
break;
case "REPORTLIST":
{
if(Util.ReportHandleToolClickIsSummary(e.Tool))
Util.ReportHandleToolClick(e.Tool,VendorList.ReportKey,
VendorList.GetListForSingleItem(mVendor.ID));
else
{
Util.ReportHandleToolClick(e.Tool,VendorListDetailed.ReportKey,
VendorListDetailed.GetListForSingleItem(mVendor.ID));
}
Util.ReportFillList(this.tbManager.Tools["REPORTLIST"],VendorList.ReportKey,
VendorListDetailed.ReportKey);
break;
}
case "LT:ScheduleMarker.Label.FollowUp":
{
FollowUpSelector f = new FollowUpSelector(mVendor.ID, RootObjectTypes.Vendor);
f.ShowDialog();
f.Dispose();
break;
}
case "LT:O.WikiPage":
{
Util.OpenWikiPage(RootObjectTypes.Vendor, mVendor.ID, false);
break;
}
}
}
#endregion Toolbar menu items
#region Popup Addresses / Notes
///
/// Handle popup menu clicks
///
///
///
private void tbmPopups_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e)
{
//case 1039 //if(log.IsDebugEnabled) //case 1039 //log.Debug("tbmPopups_ToolClick: "+e.Tool.Key);
switch (e.Tool.Key)
{
//Addresses
case "LT:Address.Label.AddressType.Physical": // StateButtonTool
//switch to physical address view
btnAddress.Text=Util.LocaleText.GetLocalizedText("Address.Label.AddressType.Physical");
edPhysicalAddress.Visible=true;
edPostalAddress.Visible=false;
break;
case "LT:Address.Label.AddressType.Postal": // StateButtonTool
//switch to postal address view
btnAddress.Text=Util.LocaleText.GetLocalizedText("Address.Label.AddressType.Postal");
edPhysicalAddress.Visible=false;
edPostalAddress.Visible=true;
break;
case "LT:Vendor.Label.Notes": // StateButtonTool
btnNotes.Text = Util.LocaleText.GetLocalizedText("Vendor.Label.Notes");
edNotes.Visible = true;
edContactNotes.Visible = false;
break;
case "LT:Vendor.Label.ContactNotes": // StateButtonTool
btnNotes.Text = Util.LocaleText.GetLocalizedText("Vendor.Label.ContactNotes");
edNotes.Visible = false;
edContactNotes.Visible = true;
break;
}
}
///
/// Display full address dialog for editing
///
///
///
private void btnAddress_Click(object sender, System.EventArgs e)
{
//case 1039 //log.Debug("btnAddress_Click");
bool bPhysical=edPhysicalAddress.Visible;
AddressForm AF=new AddressForm(bPhysical,false,(AyaBizUtils.Right("Object.Vendor")<(int)SecurityLevelTypes.ReadWrite));
if(bPhysical)
{
AF.AddressToEdit=mVendor.GoToAddress;
AF.CopyToAddressToEdit=mVendor.MailToAddress;
}
else
{
AF.AddressToEdit=mVendor.MailToAddress;
AF.CopyToAddressToEdit=mVendor.GoToAddress;
}
AF.ShowDialog();
}
#endregion PopUp Addresses
#region hyperButtons
private void btnWebAddress_Click(object sender, System.EventArgs e)
{
//case 1039 //log.Debug("btnWebAddress_Click");
Util.OpenWebURL(mVendor.WebAddress);
}
#endregion hyperButtons
#endregion
#region Form UI / Business object synchronization
private int mLastDocsCount=-1;
///
/// Synchronize the state of the UI to the BO's
///
private void SyncUI()
{
//Read only full address boxes
edPostalAddress.Text=mVendor.MailToAddress.FullAddress;
edPhysicalAddress.Text=mVendor.GoToAddress.FullAddress;
//display Vendor name in title bar
this.Text=mVendor.Name;
//Indicate if any docs in icon
//case 918
if (this.mLastDocsCount != mVendor.Docs.Count)
{
this.mLastDocsCount = mVendor.Docs.Count;
Util.AssignedDocsSetImage(tbManager, (mLastDocsCount > 0));
}
}
///
/// When the application enters an idle state
/// update the UI to reflect changs in BO status
/// (required because grids don't tell the UI to update when they are
/// bound to a business object and are edited)
///
///
///
private void Application_Idle(object sender, EventArgs e)
{
SyncUI();
}
///
/// 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
///
private void RestrictUI()
{
//case 1039 //if(log.IsDebugEnabled) //case 1039 //log.Debug("RestrictUI: " + ((SecurityLevelTypes)AyaBizUtils.Right("Object.Vendor")).ToString());
bool bDelete=AyaBizUtils.Right("Object.Vendor")== (int)SecurityLevelTypes.ReadWriteDelete;
bool bReadOnly=AyaBizUtils.Right("Object.Vendor") < (int)SecurityLevelTypes.ReadWrite;
tbManager.Tools["LT:UI.Command.Delete"].SharedProps.Visible=bDelete;
if(bDelete)
{
gridCustom.DisplayLayout.Override.AllowDelete=DefaultableBoolean.True;
}
else
{
gridCustom.DisplayLayout.Override.AllowDelete=DefaultableBoolean.False;
}
tbManager.Tools["LT:UI.Command.SaveClose"].SharedProps.Visible=!bReadOnly;
tbManager.Tools["LT:UI.Command.SaveNew"].SharedProps.Visible=!bReadOnly;
tbManager.Tools["LT:UI.Command.Save"].SharedProps.Visible=!bReadOnly;
//Case 181
tbManager.Tools["LT:UI.Command.Close"].SharedProps.Visible=false;
tbManager.Tools["LT:ScheduleMarker.Label.FollowUp"].SharedProps.Visible = AyaBizUtils.Right("Object.ScheduleMarker") > (int)SecurityLevelTypes.NoAccess;
//case 73
tbManager.Tools["LT:O.WikiPage"].SharedProps.Visible = mVendor.CanWiki;
//case 1172
tbManager.Tools["LT:AssignedDoc.Label.List"].SharedProps.Visible = !AyaBizUtils.Lite;
//DISABLE EDITABLE CONTROLS
//Text editors
edName.Enabled=!bReadOnly;
edAccountNumber.Enabled=!bReadOnly;
edNotes.Enabled=!bReadOnly;
edWebAddress.Enabled=!bReadOnly;
//CONTACT FIELDS
edContactNotes.Enabled = !bReadOnly;
edEmail.Enabled = !bReadOnly;
edContact.Enabled = !bReadOnly;
edPhone1.Enabled = !bReadOnly;
edPhone2.Enabled = !bReadOnly;
edPhone3.Enabled = !bReadOnly;
edPhone4.Enabled = !bReadOnly;
edPhone5.Enabled = !bReadOnly;
//Combo boxes
cbVendorType.Enabled=!bReadOnly;
//Check boxes
ckActive.Enabled=!bReadOnly;
//Grids
if(bReadOnly)
{
gridCustom.DisplayLayout.Override.AllowAddNew=AllowAddNew.No;
gridCustom.DisplayLayout.Override.AllowUpdate=DefaultableBoolean.False;
}
else
{
gridCustom.DisplayLayout.Override.AllowAddNew=AllowAddNew.TemplateOnBottom;
gridCustom.DisplayLayout.Override.AllowUpdate=DefaultableBoolean.True;
}
}
#endregion
#region Form DataBinding and BrokenRules handling
bool bShowCustomFields=false;
///
/// Bind controls to business objects
///
private void DataBind()
{
//case 1039 //log.Debug("DataBind");
//Custom fields are not databound, but must be initiated manually...
FillCustomFieldGrid();
//Subscribe to broken rules changed event OnBrokenRulesChanged
mVendor.GetBrokenRulesCollection().ListChanged += new System.ComponentModel.ListChangedEventHandler(OnBrokenRulesChanged);
//=-=-=-=-=-=- Form Field bindings =-=-=-=-=-=-=-=-=-=-=-=
if(mVendor.VendorType==0 )
mVendor.VendorType=mVendorType;
//Text editors
Util.BindField(edName,"Text",mVendor,"Name");
Util.BindField(edAccountNumber,"Text",mVendor,"AccountNumber");
Util.BindField(edNotes,"Text",mVendor,"Notes");
Util.BindField(edWebAddress,"Text",mVendor,"WebAddress");
//Contact fields
Util.BindField(edContactNotes, "Text", mVendor, "ContactNotes");
Util.BindField(edContact, "Text", mVendor, "Contact");
Util.BindField(edEmail, "Text", mVendor, "Email");
Util.BindField(edPhone1, "Text", mVendor, "Phone1");
Util.BindField(edPhone2, "Text", mVendor, "Phone2");
Util.BindField(edPhone3, "Text", mVendor, "Phone3");
Util.BindField(edPhone4, "Text", mVendor, "Phone4");
Util.BindField(edPhone5, "Text", mVendor, "Phone5");
//Combo boxes
Util.BindField(cbVendorType,"Value",mVendor,"VendorType");
//Check boxes
Util.BindField(ckActive,"Checked",mVendor,"Active");
//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
//Bind IsDirty property to hidden checkbox to
//ensure isdirtychanged event is available
//to data binding infrastructure
Util.BindField(ckIsDirty,"Checked",mVendor,"IsDirty");
//Setup initial link to broken rules
OnBrokenRulesChanged(null,null);
}
///
/// Handle a change in broken rules
///
///
///
private void OnBrokenRulesChanged(object sender, System.ComponentModel.ListChangedEventArgs e)
{
Util.BrokenRuleFeedback(this,mVendor,ErrorProvider);
}
#endregion
#region Business object editing / adding / deletion related code
private Vendor mVendor;
///
/// Vendor record to display
/// set by caller
///
public Vendor VendorToEdit
{
get
{
return mVendor;
}
set
{
mVendor=value;
//mVendor.BeginEdit();
}
}
private VendorTypes mVendorType;
/////
///// Type of vendor
/////
//public VendorTypes VendorTypeToEdit
//{
// get
// {
// return mVendorType;
// }
// set
// {
// mVendorType=value;
// }
//}
//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;
}
}
///
/// Update record and quit if requested
///
///
/// True if handled, false if not handled
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
btnAddress.Focus();
switch(SaveType)
{
case RecordActionType.DeleteAndExit:
if(Util.PromptForDelete()==DialogResult.Yes)
{
//Delete, then exit
try
{
Vendor.DeleteItem(mVendor.ID);
}
catch(Exception ex)
{
Util.ReportSQLError(ex);
return false;
}
bClosingHandled=true;
this.Close();
mbChangesMade=true;
return true;
}
else return false;
case RecordActionType.SaveAndExit:
//Save if necessary and exit
if(mVendor.IsSavable)
{
mVendor.ApplyEdit();
mVendor.Save();
bClosingHandled=true;
mbChangesMade=true;
this.Close();
return true;
}
if(mVendor.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(mVendor.IsSavable)
{
mVendor.ApplyEdit();
mVendor.Save();
AddNewVendor();
mbChangesMade=true;
return true;
}
if(mVendor.IsDirty)//dirty and unsaveable due to broken rules
{
//User says that's ok, continue on?
if(Util.PromptForBrokenRulesCancelSave()==DialogResult.Yes)
{
//Ok, add new Vendor and don't save old record
AddNewVendor();
return true;
}
else return false;
}
//Current record isn't dirty so just add a new Vendor
AddNewVendor();
return true;
case RecordActionType.SaveOnly:
if(mVendor.IsSavable)
{
mVendor.ApplyEdit();
mVendor=(Vendor)mVendor.Save();
DataBind();
mbChangesMade=true;
return true;
}
return true;
case RecordActionType.PromptToSave:
//Prompt to save and save if
//required
if(mVendor.IsDirty)
{
DialogResult dr=Util.PromptForSave();
if(dr==DialogResult.Cancel)
{
//Cancel
return false;
}
if(dr==DialogResult.Yes)
{
//Save before exit
if(mVendor.IsSavable)
{
mVendor.ApplyEdit();
mVendor.Save();
mbChangesMade=true;
return true;
}
if(mVendor.IsDirty)//dirty and unsaveable due to broken rules
{
if(Util.PromptForBrokenRulesCancelSave()==DialogResult.Yes)
{
return true;
}
else
return false;
}
}
}
return true;
}
return false;
}
///
///
///Creates a new Vendor record and opens it for editing
///
private void AddNewVendor()
{
//case 1039 //log.Debug("AddNewVendor");
try
{
mVendor=Vendor.NewItem();
if (mVendorType != VendorTypes.All)
mVendor.VendorType = mVendorType;
//mVendor.BeginEdit();
DataBind();
}
catch(Exception ex)
{
//log.Error("AddNewVendor",ex);
MessageBox.Show(ex.Message+"\r\n"+ex.Source);
}
}
#endregion
#region Form ComboBoxes (Setup / Events)
private void InitializeComboBoxes()
{
//case 1039 //log.Debug("InitializeComboBoxes");
switch (mVendorType)
{
case VendorTypes.All:
{
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"));
}
break;
case VendorTypes.Manufacturer:
{
cbVendorType.Items.Add(VendorTypes.Manufacturer, Util.LocaleText.GetLocalizedText("Vendor.Label.VendorType.Manufacturer"));
}
break;
case VendorTypes.Shipper:
{
cbVendorType.Items.Add(VendorTypes.Shipper, Util.LocaleText.GetLocalizedText("Vendor.Label.VendorType.Shipper"));
}
break;
case VendorTypes.SubContractor:
{
cbVendorType.Items.Add(VendorTypes.SubContractor, Util.LocaleText.GetLocalizedText("Vendor.Label.VendorType.SubContractor"));
}
break;
case VendorTypes.ThirdPartyRepair:
{
cbVendorType.Items.Add(VendorTypes.ThirdPartyRepair, Util.LocaleText.GetLocalizedText("Vendor.Label.VendorType.ThirdPartyRepair"));
}
break;
case VendorTypes.Wholesaler:
{
cbVendorType.Items.Add(VendorTypes.Wholesaler, Util.LocaleText.GetLocalizedText("Vendor.Label.VendorType.Wholesaler"));
}
break;
}
}
#endregion
#region Custom fields
///
/// put custom field data into custom grid and show it if applicable
///
private void FillCustomFieldGrid()
{
//case 1039 //log.Debug("FillCustomFieldGrid");
bShowCustomFields=Util.PrepareCustomFieldsGrid("Vendor",gridCustom);
if(bShowCustomFields)
{
this.panelCustom.Visible=true;
Util.GridFromCustomFields(mVendor,gridCustom);
}
else
{
this.panelCustom.Visible=false;
}
}
private void gridCustom_AfterCellUpdate(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e)
{
Util.GridToCustomFields(mVendor,gridCustom);
}
#endregion
#region Drag and drop docs
private void Form_DragEnter(object sender, System.Windows.Forms.DragEventArgs e)
{
Util.DragEnter(e);
}
private void Form_DragDrop(object sender, System.Windows.Forms.DragEventArgs e)
{
Util.DragDrop(e, mVendor.Docs, RootObjectTypes.Vendor, mVendor.ID, RootObjectTypes.Vendor);
}
#endregion
#region Accelerator keys
///
/// Case 37
///
///
///
///
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
{
//Short circuit:
//Only process modified keystrokes (i.e. when a modifier like ctrl-alt-or shift is also
//being held down
if (ModifierKeys == Keys.None) return base.ProcessCmdKey(ref msg, keyData);
switch (Util.HotKeys(keyData))
{
//Close form
case HotKeyAction.CloseForm:
this.Close();
return true;
}
return base.ProcessCmdKey(ref msg, keyData);
}
#endregion
}
}