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 UnitInfoForm. /// public class UnitInfoForm : 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 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.UltraWinToolbars.UltraToolbarsManager tbManager; private System.Windows.Forms.Panel panelCustom; private Infragistics.Win.UltraWinGrid.UltraGrid gridCustom; private Infragistics.Win.Misc.UltraLabel lblSerial; private Infragistics.Win.UltraWinEditors.UltraTextEditor edSerial; private Infragistics.Win.UltraWinEditors.UltraTextEditor edDescription; private Infragistics.Win.Misc.UltraLabel lblDescription; private GZTW.WinForm.Controls.GZUltraComboEditor cbUnitModelID; private GZTW.WinForm.Controls.GZUltraComboEditor cbClientID; private Infragistics.Win.Misc.UltraLabel lblPurchasedDate; private GZTW.WinForm.Controls.GZUltraComboEditor cbPurchasedFromID; private Infragistics.Win.UltraWinEditors.UltraTextEditor edReceiptNumber; private Infragistics.Win.Misc.UltraLabel lblReceiptNumber; private Infragistics.Win.UltraWinEditors.UltraCheckEditor ckBoughtHere; private GZTW.WinForm.Controls.GZUltraComboEditor cbReplacedByUnitID; private Infragistics.Win.Misc.UltraButton btnAddress; private Infragistics.Win.UltraWinEditors.UltraCheckEditor ckUnitHasOwnAddress; private Infragistics.Win.UltraWinEditors.UltraCheckEditor ckUnitOverrideWarranty; private GZTW.WinForm.Controls.GZDateTimePicker dtPurchasedDate; private Infragistics.Win.Misc.UltraButton btnPurchaseFromID; private Infragistics.Win.Misc.UltraButton btnClientID; private Infragistics.Win.Misc.UltraButton btnUnitModelID; private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _UnitInfoForm_Toolbars_Dock_Area_Left; private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _UnitInfoForm_Toolbars_Dock_Area_Right; private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _UnitInfoForm_Toolbars_Dock_Area_Top; private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _UnitInfoForm_Toolbars_Dock_Area_Bottom; private Infragistics.Win.Misc.UltraLabel lblParentUnitID; private Infragistics.Win.Misc.UltraLabel lblReplacedByUnitID; private GZTW.WinForm.Controls.GZUltraComboEditor cbParentID; private Infragistics.Win.UltraWinEditors.UltraCheckEditor ckUsesBanking; private Infragistics.Win.Misc.UltraButton btnUsesBanking; private Infragistics.Win.Misc.UltraLabel lblNotes; private Infragistics.Win.Misc.UltraButton btnMetered; private Infragistics.Win.UltraWinEditors.UltraCheckEditor ckMetered; private Infragistics.Win.Misc.UltraLabel lblOverrideWarrantyLength; private Infragistics.Win.Misc.UltraLabel lblOverrideWarrantyTerms; private Infragistics.Win.UltraWinEditors.UltraTextEditor edWarrantyTerms; private Infragistics.Win.UltraWinEditors.UltraTextEditor edWarrantyLength; private Infragistics.Win.UltraWinEditors.UltraCheckEditor ckLifeTimeWarranty; private System.Windows.Forms.HelpProvider helpProvider1; private Infragistics.Win.UltraWinEditors.UltraTextEditor edText1; private Infragistics.Win.Misc.UltraLabel lblText1; private Infragistics.Win.UltraWinEditors.UltraTextEditor edText4; private Infragistics.Win.Misc.UltraLabel lblText4; private Infragistics.Win.UltraWinEditors.UltraTextEditor edText3; private Infragistics.Win.Misc.UltraLabel lblText3; private Infragistics.Win.UltraWinEditors.UltraTextEditor edText2; private Infragistics.Win.Misc.UltraLabel lblText2; private System.ComponentModel.IContainer components; public UnitInfoForm() { // // Required for Windows Form Designer support // InitializeComponent(); } /// /// 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.Appearance appearance3 = new Infragistics.Win.Appearance(); Infragistics.Win.UltraWinToolbars.UltraToolbar ultraToolbar1 = new Infragistics.Win.UltraWinToolbars.UltraToolbar("UnitEntryMenuBar"); Infragistics.Win.UltraWinToolbars.PopupMenuTool popupMenuTool1 = 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 buttonTool3 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:O.WikiPage"); Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool4 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UI.Command.RecordHistory"); Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool5 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:ScheduleMarker.Label.FollowUp"); Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool6 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UI.Command.SaveNew"); Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool7 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UI.Command.Save"); Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool8 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UI.Command.Delete"); Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool9 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UI.Command.Close"); Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool10 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UI.Command.Duplicate"); Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool11 = 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 buttonTool12 = 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 buttonTool13 = 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 buttonTool14 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UI.Command.Save"); Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool15 = 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 buttonTool16 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UI.Command.Close"); Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool17 = 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.PopupMenuTool popupMenuTool2 = 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 buttonTool18 = 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 buttonTool19 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:O.WikiPage"); Infragistics.Win.Appearance appearance18 = new Infragistics.Win.Appearance(); Infragistics.Win.Appearance appearance19 = new Infragistics.Win.Appearance(); Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool20 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UI.Command.Duplicate"); Infragistics.Win.Appearance appearance20 = new Infragistics.Win.Appearance(); Infragistics.Win.Appearance appearance21 = new Infragistics.Win.Appearance(); this.ckIsDirty = new System.Windows.Forms.CheckBox(); this.panelLeft = new System.Windows.Forms.Panel(); this.btnMetered = new Infragistics.Win.Misc.UltraButton(); this.ckMetered = new Infragistics.Win.UltraWinEditors.UltraCheckEditor(); this.lblParentUnitID = new Infragistics.Win.Misc.UltraLabel(); this.btnUnitModelID = new Infragistics.Win.Misc.UltraButton(); this.cbUnitModelID = new GZTW.WinForm.Controls.GZUltraComboEditor(); this.edDescription = new Infragistics.Win.UltraWinEditors.UltraTextEditor(); this.lblDescription = new Infragistics.Win.Misc.UltraLabel(); this.edSerial = new Infragistics.Win.UltraWinEditors.UltraTextEditor(); this.lblSerial = new Infragistics.Win.Misc.UltraLabel(); this.cbParentID = new GZTW.WinForm.Controls.GZUltraComboEditor(); this.ckActive = new Infragistics.Win.UltraWinEditors.UltraCheckEditor(); this.cbReplacedByUnitID = new GZTW.WinForm.Controls.GZUltraComboEditor(); this.lblReplacedByUnitID = new Infragistics.Win.Misc.UltraLabel(); this.lblNotes = new Infragistics.Win.Misc.UltraLabel(); this.edNotes = new Infragistics.Win.UltraWinEditors.UltraTextEditor(); this.ckUnitHasOwnAddress = new Infragistics.Win.UltraWinEditors.UltraCheckEditor(); this.btnAddress = new Infragistics.Win.Misc.UltraButton(); this.btnUsesBanking = new Infragistics.Win.Misc.UltraButton(); this.ckUsesBanking = new Infragistics.Win.UltraWinEditors.UltraCheckEditor(); this.btnClientID = new Infragistics.Win.Misc.UltraButton(); this.cbClientID = new GZTW.WinForm.Controls.GZUltraComboEditor(); this.ckUnitOverrideWarranty = new Infragistics.Win.UltraWinEditors.UltraCheckEditor(); this.ErrorProvider = new System.Windows.Forms.ErrorProvider(this.components); this.panelRight = new System.Windows.Forms.Panel(); this.edText4 = new Infragistics.Win.UltraWinEditors.UltraTextEditor(); this.lblText4 = new Infragistics.Win.Misc.UltraLabel(); this.edText3 = new Infragistics.Win.UltraWinEditors.UltraTextEditor(); this.lblText3 = new Infragistics.Win.Misc.UltraLabel(); this.edText2 = new Infragistics.Win.UltraWinEditors.UltraTextEditor(); this.lblText2 = new Infragistics.Win.Misc.UltraLabel(); this.edText1 = new Infragistics.Win.UltraWinEditors.UltraTextEditor(); this.lblText1 = new Infragistics.Win.Misc.UltraLabel(); this.lblOverrideWarrantyTerms = new Infragistics.Win.Misc.UltraLabel(); this.edWarrantyTerms = new Infragistics.Win.UltraWinEditors.UltraTextEditor(); this.ckLifeTimeWarranty = new Infragistics.Win.UltraWinEditors.UltraCheckEditor(); this.edWarrantyLength = new Infragistics.Win.UltraWinEditors.UltraTextEditor(); this.lblOverrideWarrantyLength = new Infragistics.Win.Misc.UltraLabel(); this.btnPurchaseFromID = new Infragistics.Win.Misc.UltraButton(); this.dtPurchasedDate = new GZTW.WinForm.Controls.GZDateTimePicker(); this.edReceiptNumber = new Infragistics.Win.UltraWinEditors.UltraTextEditor(); this.lblReceiptNumber = new Infragistics.Win.Misc.UltraLabel(); this.lblPurchasedDate = new Infragistics.Win.Misc.UltraLabel(); this.cbPurchasedFromID = new GZTW.WinForm.Controls.GZUltraComboEditor(); this.ckBoughtHere = new Infragistics.Win.UltraWinEditors.UltraCheckEditor(); this.panelCustom = new System.Windows.Forms.Panel(); this.gridCustom = new Infragistics.Win.UltraWinGrid.UltraGrid(); this._UnitInfoForm_Toolbars_Dock_Area_Left = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea(); this._UnitInfoForm_Toolbars_Dock_Area_Right = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea(); this._UnitInfoForm_Toolbars_Dock_Area_Top = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea(); this._UnitInfoForm_Toolbars_Dock_Area_Bottom = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea(); this.helpProvider1 = new System.Windows.Forms.HelpProvider(); this.tbManager = new Infragistics.Win.UltraWinToolbars.UltraToolbarsManager(this.components); this.panelLeft.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.ckMetered)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.cbUnitModelID)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.edDescription)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.edSerial)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.cbParentID)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.ckActive)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.cbReplacedByUnitID)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.edNotes)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.ckUnitHasOwnAddress)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.ckUsesBanking)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.cbClientID)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.ckUnitOverrideWarranty)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.ErrorProvider)).BeginInit(); this.panelRight.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.edText4)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.edText3)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.edText2)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.edText1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.edWarrantyTerms)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.ckLifeTimeWarranty)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.edWarrantyLength)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.dtPurchasedDate)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.edReceiptNumber)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.cbPurchasedFromID)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.ckBoughtHere)).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(220, 27); this.ckIsDirty.TabIndex = 5; // // panelLeft // this.panelLeft.Controls.Add(this.btnMetered); this.panelLeft.Controls.Add(this.ckMetered); this.panelLeft.Controls.Add(this.lblParentUnitID); this.panelLeft.Controls.Add(this.btnUnitModelID); this.panelLeft.Controls.Add(this.cbUnitModelID); this.panelLeft.Controls.Add(this.edDescription); this.panelLeft.Controls.Add(this.lblDescription); this.panelLeft.Controls.Add(this.edSerial); this.panelLeft.Controls.Add(this.lblSerial); this.panelLeft.Controls.Add(this.cbParentID); this.panelLeft.Controls.Add(this.ckActive); this.panelLeft.Controls.Add(this.cbReplacedByUnitID); this.panelLeft.Controls.Add(this.lblReplacedByUnitID); this.panelLeft.Controls.Add(this.lblNotes); this.panelLeft.Controls.Add(this.edNotes); this.panelLeft.Controls.Add(this.ckUnitHasOwnAddress); this.panelLeft.Controls.Add(this.btnAddress); this.panelLeft.Controls.Add(this.btnUsesBanking); this.panelLeft.Controls.Add(this.ckUsesBanking); 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(300, 520); this.panelLeft.TabIndex = 0; // // btnMetered // this.btnMetered.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.btnMetered.Location = new System.Drawing.Point(12, 378); this.btnMetered.Name = "btnMetered"; this.btnMetered.Size = new System.Drawing.Size(282, 27); this.btnMetered.TabIndex = 11; this.btnMetered.Tag = ""; this.btnMetered.Text = "LT:Unit.Label.Metered"; this.btnMetered.Click += new System.EventHandler(this.btnMetered_Click); // // ckMetered // this.ckMetered.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.ckMetered.Location = new System.Drawing.Point(12, 351); this.ckMetered.Name = "ckMetered"; this.ckMetered.Size = new System.Drawing.Size(286, 18); this.ckMetered.TabIndex = 10; this.ckMetered.Tag = ""; this.ckMetered.Text = "LT:Unit.Label.Metered"; // // lblParentUnitID // this.lblParentUnitID.Location = new System.Drawing.Point(10, 185); this.lblParentUnitID.Name = "lblParentUnitID"; this.lblParentUnitID.Size = new System.Drawing.Size(96, 18); this.lblParentUnitID.TabIndex = 145; this.lblParentUnitID.Tag = ""; this.lblParentUnitID.Text = "LT:Unit.Label.ParentUnitID"; this.lblParentUnitID.WrapText = false; // // btnUnitModelID // appearance1.TextHAlignAsString = "Left"; this.btnUnitModelID.Appearance = appearance1; this.btnUnitModelID.ButtonStyle = Infragistics.Win.UIElementButtonStyle.PopupSoftBorderless; this.btnUnitModelID.Location = new System.Drawing.Point(10, 148); this.btnUnitModelID.Name = "btnUnitModelID"; this.btnUnitModelID.Size = new System.Drawing.Size(96, 24); this.btnUnitModelID.TabIndex = 4; this.btnUnitModelID.Tag = ""; this.btnUnitModelID.Text = "LT:O.UnitModel"; this.btnUnitModelID.UseHotTracking = Infragistics.Win.DefaultableBoolean.True; this.btnUnitModelID.WrapText = false; this.btnUnitModelID.Click += new System.EventHandler(this.btnUnitModelID_Click); // // cbUnitModelID // this.cbUnitModelID.Location = new System.Drawing.Point(192, 148); this.cbUnitModelID.Name = "cbUnitModelID"; this.cbUnitModelID.Size = new System.Drawing.Size(106, 24); this.cbUnitModelID.TabIndex = 2; this.cbUnitModelID.NeedMoreData += new GZTW.WinForm.Controls.NeedMoreDataHandler(this.cbUnitModelID_NeedMoreData); // // edDescription // this.edDescription.Location = new System.Drawing.Point(192, 111); this.edDescription.Name = "edDescription"; this.edDescription.Size = new System.Drawing.Size(106, 24); this.edDescription.TabIndex = 1; // // lblDescription // this.lblDescription.Location = new System.Drawing.Point(10, 111); this.lblDescription.Name = "lblDescription"; this.lblDescription.Size = new System.Drawing.Size(96, 18); this.lblDescription.TabIndex = 94; this.lblDescription.Tag = ""; this.lblDescription.Text = "LT:Unit.Label.Description"; this.lblDescription.WrapText = false; // // edSerial // this.edSerial.BorderStyle = Infragistics.Win.UIElementBorderStyle.Solid; this.edSerial.Location = new System.Drawing.Point(192, 74); this.edSerial.Name = "edSerial"; this.edSerial.Size = new System.Drawing.Size(106, 22); this.edSerial.TabIndex = 0; this.edSerial.AfterExitEditMode += new System.EventHandler(this.edSerial_AfterExitEditMode); // // lblSerial // this.lblSerial.Location = new System.Drawing.Point(10, 74); this.lblSerial.Name = "lblSerial"; this.lblSerial.Size = new System.Drawing.Size(96, 18); this.lblSerial.TabIndex = 92; this.lblSerial.Tag = ""; this.lblSerial.Text = "LT:Unit.Label.Serial"; this.lblSerial.WrapText = false; // // cbParentID // this.cbParentID.Location = new System.Drawing.Point(192, 185); this.cbParentID.Name = "cbParentID"; this.cbParentID.Size = new System.Drawing.Size(106, 24); this.cbParentID.TabIndex = 3; this.cbParentID.NeedMoreData += new GZTW.WinForm.Controls.NeedMoreDataHandler(this.cbParentID_NeedMoreData); // // 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(259, 19); this.ckActive.TabIndex = 4; this.ckActive.Tag = ""; this.ckActive.Text = "LT:Common.Label.Active"; // // cbReplacedByUnitID // this.cbReplacedByUnitID.Location = new System.Drawing.Point(182, 37); this.cbReplacedByUnitID.Name = "cbReplacedByUnitID"; this.cbReplacedByUnitID.Size = new System.Drawing.Size(116, 24); this.cbReplacedByUnitID.TabIndex = 5; this.cbReplacedByUnitID.NeedMoreData += new GZTW.WinForm.Controls.NeedMoreDataHandler(this.cbReplacedByUnitID_NeedMoreData); // // lblReplacedByUnitID // this.lblReplacedByUnitID.Location = new System.Drawing.Point(10, 37); this.lblReplacedByUnitID.Name = "lblReplacedByUnitID"; this.lblReplacedByUnitID.Size = new System.Drawing.Size(96, 18); this.lblReplacedByUnitID.TabIndex = 137; this.lblReplacedByUnitID.Tag = ""; this.lblReplacedByUnitID.Text = "LT:Unit.Label.ReplacedByUnitID"; this.lblReplacedByUnitID.WrapText = false; // // lblNotes // this.lblNotes.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.lblNotes.Location = new System.Drawing.Point(10, 415); this.lblNotes.Name = "lblNotes"; this.lblNotes.Size = new System.Drawing.Size(259, 19); this.lblNotes.TabIndex = 8; this.lblNotes.Tag = ""; this.lblNotes.Text = "LT:Unit.Label.Notes"; // // 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(10, 434); this.edNotes.Multiline = true; this.edNotes.Name = "edNotes"; this.edNotes.Size = new System.Drawing.Size(284, 81); this.edNotes.TabIndex = 12; // // ckUnitHasOwnAddress // this.ckUnitHasOwnAddress.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.ckUnitHasOwnAddress.Location = new System.Drawing.Point(10, 222); this.ckUnitHasOwnAddress.Name = "ckUnitHasOwnAddress"; this.ckUnitHasOwnAddress.Size = new System.Drawing.Size(288, 18); this.ckUnitHasOwnAddress.TabIndex = 6; this.ckUnitHasOwnAddress.Tag = ""; this.ckUnitHasOwnAddress.Text = "LT:Unit.Label.UnitHasOwnAddress"; // // btnAddress // this.btnAddress.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.btnAddress.Location = new System.Drawing.Point(10, 249); this.btnAddress.Name = "btnAddress"; this.btnAddress.Size = new System.Drawing.Size(284, 28); this.btnAddress.TabIndex = 7; this.btnAddress.Tag = ""; this.btnAddress.Text = "LT:Unit.Label.UnitHasOwnAddress"; this.btnAddress.Click += new System.EventHandler(this.btnAddress_Click); // // btnUsesBanking // this.btnUsesBanking.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.btnUsesBanking.Location = new System.Drawing.Point(10, 314); this.btnUsesBanking.Name = "btnUsesBanking"; this.btnUsesBanking.Size = new System.Drawing.Size(284, 26); this.btnUsesBanking.TabIndex = 9; this.btnUsesBanking.Tag = ""; this.btnUsesBanking.Text = "LT:Common.Label.UsesBanking"; this.btnUsesBanking.Click += new System.EventHandler(this.btnUsesBanking_Click); // // ckUsesBanking // this.ckUsesBanking.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.ckUsesBanking.Location = new System.Drawing.Point(10, 295); this.ckUsesBanking.Name = "ckUsesBanking"; this.ckUsesBanking.Size = new System.Drawing.Size(288, 19); this.ckUsesBanking.TabIndex = 8; this.ckUsesBanking.Tag = ""; this.ckUsesBanking.Text = "LT:Common.Label.UsesBanking"; // // btnClientID // appearance2.TextHAlignAsString = "Left"; this.btnClientID.Appearance = appearance2; this.btnClientID.ButtonStyle = Infragistics.Win.UIElementButtonStyle.PopupSoftBorderless; this.btnClientID.Location = new System.Drawing.Point(5, 148); this.btnClientID.Name = "btnClientID"; this.btnClientID.Size = new System.Drawing.Size(105, 24); this.btnClientID.TabIndex = 8; this.btnClientID.Tag = ""; this.btnClientID.Text = "LT:O.Client"; this.btnClientID.UseHotTracking = Infragistics.Win.DefaultableBoolean.True; this.btnClientID.WrapText = false; this.btnClientID.Click += new System.EventHandler(this.btnClientID_Click); // // cbClientID // this.cbClientID.Location = new System.Drawing.Point(192, 148); this.cbClientID.Name = "cbClientID"; this.cbClientID.Size = new System.Drawing.Size(106, 24); this.cbClientID.TabIndex = 4; this.cbClientID.NeedMoreData += new GZTW.WinForm.Controls.NeedMoreDataHandler(this.cbClientID_NeedMoreData); // // ckUnitOverrideWarranty // this.ckUnitOverrideWarranty.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.ckUnitOverrideWarranty.Location = new System.Drawing.Point(5, 217); this.ckUnitOverrideWarranty.Name = "ckUnitOverrideWarranty"; this.ckUnitOverrideWarranty.Size = new System.Drawing.Size(255, 18); this.ckUnitOverrideWarranty.TabIndex = 5; this.ckUnitOverrideWarranty.Tag = ""; this.ckUnitOverrideWarranty.Text = "LT:Unit.Label.OverrideWarranty"; // // ErrorProvider // this.ErrorProvider.ContainerControl = this; // // panelRight // this.panelRight.Controls.Add(this.edText4); this.panelRight.Controls.Add(this.lblText4); this.panelRight.Controls.Add(this.edText3); this.panelRight.Controls.Add(this.lblText3); this.panelRight.Controls.Add(this.edText2); this.panelRight.Controls.Add(this.lblText2); this.panelRight.Controls.Add(this.edText1); this.panelRight.Controls.Add(this.lblText1); this.panelRight.Controls.Add(this.lblOverrideWarrantyTerms); this.panelRight.Controls.Add(this.edWarrantyTerms); this.panelRight.Controls.Add(this.ckLifeTimeWarranty); this.panelRight.Controls.Add(this.edWarrantyLength); this.panelRight.Controls.Add(this.lblOverrideWarrantyLength); this.panelRight.Controls.Add(this.btnPurchaseFromID); this.panelRight.Controls.Add(this.dtPurchasedDate); this.panelRight.Controls.Add(this.edReceiptNumber); this.panelRight.Controls.Add(this.lblReceiptNumber); this.panelRight.Controls.Add(this.lblPurchasedDate); this.panelRight.Controls.Add(this.cbPurchasedFromID); this.panelRight.Controls.Add(this.ckBoughtHere); this.panelRight.Controls.Add(this.ckUnitOverrideWarranty); this.panelRight.Controls.Add(this.btnClientID); this.panelRight.Controls.Add(this.cbClientID); this.panelRight.Dock = System.Windows.Forms.DockStyle.Left; this.panelRight.Location = new System.Drawing.Point(300, 43); this.panelRight.Name = "panelRight"; this.panelRight.Size = new System.Drawing.Size(306, 520); this.panelRight.TabIndex = 101; // // edText4 // this.edText4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.edText4.Location = new System.Drawing.Point(187, 492); this.edText4.MaxLength = 255; this.edText4.Name = "edText4"; this.edText4.Size = new System.Drawing.Size(106, 24); this.edText4.TabIndex = 141; // // lblText4 // this.lblText4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.lblText4.Location = new System.Drawing.Point(6, 496); this.lblText4.Name = "lblText4"; this.lblText4.Size = new System.Drawing.Size(106, 19); this.lblText4.TabIndex = 142; this.lblText4.Tag = ""; this.lblText4.Text = "LT:Unit.Label.Text4"; this.lblText4.WrapText = false; // // edText3 // this.edText3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.edText3.Location = new System.Drawing.Point(187, 462); this.edText3.MaxLength = 255; this.edText3.Name = "edText3"; this.edText3.Size = new System.Drawing.Size(106, 24); this.edText3.TabIndex = 139; // // lblText3 // this.lblText3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.lblText3.Location = new System.Drawing.Point(6, 466); this.lblText3.Name = "lblText3"; this.lblText3.Size = new System.Drawing.Size(106, 19); this.lblText3.TabIndex = 140; this.lblText3.Tag = ""; this.lblText3.Text = "LT:Unit.Label.Text3"; this.lblText3.WrapText = false; // // edText2 // this.edText2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.edText2.Location = new System.Drawing.Point(187, 432); this.edText2.MaxLength = 255; this.edText2.Name = "edText2"; this.edText2.Size = new System.Drawing.Size(106, 24); this.edText2.TabIndex = 137; // // lblText2 // this.lblText2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.lblText2.Location = new System.Drawing.Point(6, 436); this.lblText2.Name = "lblText2"; this.lblText2.Size = new System.Drawing.Size(106, 19); this.lblText2.TabIndex = 138; this.lblText2.Tag = ""; this.lblText2.Text = "LT:Unit.Label.Text2"; this.lblText2.WrapText = false; // // edText1 // this.edText1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.edText1.Location = new System.Drawing.Point(187, 402); this.edText1.MaxLength = 255; this.edText1.Name = "edText1"; this.edText1.Size = new System.Drawing.Size(106, 24); this.edText1.TabIndex = 135; // // lblText1 // this.lblText1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.lblText1.Location = new System.Drawing.Point(6, 406); this.lblText1.Name = "lblText1"; this.lblText1.Size = new System.Drawing.Size(106, 19); this.lblText1.TabIndex = 136; this.lblText1.Tag = ""; this.lblText1.Text = "LT:Unit.Label.Text1"; this.lblText1.WrapText = false; // // lblOverrideWarrantyTerms // this.lblOverrideWarrantyTerms.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.lblOverrideWarrantyTerms.Location = new System.Drawing.Point(5, 318); this.lblOverrideWarrantyTerms.Name = "lblOverrideWarrantyTerms"; this.lblOverrideWarrantyTerms.Size = new System.Drawing.Size(284, 19); this.lblOverrideWarrantyTerms.TabIndex = 134; this.lblOverrideWarrantyTerms.Tag = ""; this.lblOverrideWarrantyTerms.Text = "LT:Unit.Label.OverrideWarrantyTerms"; // // edWarrantyTerms // this.edWarrantyTerms.AcceptsReturn = true; this.edWarrantyTerms.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.edWarrantyTerms.Location = new System.Drawing.Point(5, 337); this.edWarrantyTerms.MaxLength = 255; this.edWarrantyTerms.Multiline = true; this.edWarrantyTerms.Name = "edWarrantyTerms"; this.edWarrantyTerms.Size = new System.Drawing.Size(288, 45); this.edWarrantyTerms.TabIndex = 11; // // ckLifeTimeWarranty // this.ckLifeTimeWarranty.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.ckLifeTimeWarranty.Location = new System.Drawing.Point(5, 254); this.ckLifeTimeWarranty.Name = "ckLifeTimeWarranty"; this.ckLifeTimeWarranty.Size = new System.Drawing.Size(230, 18); this.ckLifeTimeWarranty.TabIndex = 9; this.ckLifeTimeWarranty.Tag = ""; this.ckLifeTimeWarranty.Text = "LT:Unit.Label.OverrideLifeTime"; // // edWarrantyLength // this.edWarrantyLength.Location = new System.Drawing.Point(192, 282); this.edWarrantyLength.Name = "edWarrantyLength"; this.edWarrantyLength.Size = new System.Drawing.Size(101, 24); this.edWarrantyLength.TabIndex = 10; // // lblOverrideWarrantyLength // this.lblOverrideWarrantyLength.Location = new System.Drawing.Point(5, 282); this.lblOverrideWarrantyLength.Name = "lblOverrideWarrantyLength"; this.lblOverrideWarrantyLength.Size = new System.Drawing.Size(168, 24); this.lblOverrideWarrantyLength.TabIndex = 132; this.lblOverrideWarrantyLength.Tag = ""; this.lblOverrideWarrantyLength.Text = "LT:Unit.Label.OverrideLength"; this.lblOverrideWarrantyLength.WrapText = false; // // btnPurchaseFromID // appearance3.TextHAlignAsString = "Left"; this.btnPurchaseFromID.Appearance = appearance3; this.btnPurchaseFromID.ButtonStyle = Infragistics.Win.UIElementButtonStyle.PopupBorderless; this.btnPurchaseFromID.Location = new System.Drawing.Point(5, 37); this.btnPurchaseFromID.Name = "btnPurchaseFromID"; this.btnPurchaseFromID.Size = new System.Drawing.Size(105, 24); this.btnPurchaseFromID.TabIndex = 2; this.btnPurchaseFromID.Tag = ""; this.btnPurchaseFromID.Text = "LT:Unit.Label.PurchaseFromID"; this.btnPurchaseFromID.UseHotTracking = Infragistics.Win.DefaultableBoolean.True; this.btnPurchaseFromID.WrapText = false; this.btnPurchaseFromID.Click += new System.EventHandler(this.btnPurchaseFromID_Click); // // dtPurchasedDate // this.dtPurchasedDate.GZEnabled = true; this.dtPurchasedDate.GZReadOnly = false; this.dtPurchasedDate.Location = new System.Drawing.Point(192, 74); this.dtPurchasedDate.Name = "dtPurchasedDate"; this.dtPurchasedDate.Size = new System.Drawing.Size(106, 24); this.dtPurchasedDate.TabIndex = 2; // // edReceiptNumber // this.edReceiptNumber.Location = new System.Drawing.Point(192, 111); this.edReceiptNumber.Name = "edReceiptNumber"; this.edReceiptNumber.Size = new System.Drawing.Size(106, 24); this.edReceiptNumber.TabIndex = 3; // // lblReceiptNumber // this.lblReceiptNumber.Location = new System.Drawing.Point(5, 111); this.lblReceiptNumber.Name = "lblReceiptNumber"; this.lblReceiptNumber.Size = new System.Drawing.Size(105, 18); this.lblReceiptNumber.TabIndex = 129; this.lblReceiptNumber.Tag = ""; this.lblReceiptNumber.Text = "LT:Unit.Label.Receipt"; this.lblReceiptNumber.WrapText = false; // // lblPurchasedDate // this.lblPurchasedDate.Location = new System.Drawing.Point(5, 74); this.lblPurchasedDate.Name = "lblPurchasedDate"; this.lblPurchasedDate.Size = new System.Drawing.Size(105, 18); this.lblPurchasedDate.TabIndex = 120; this.lblPurchasedDate.Tag = ""; this.lblPurchasedDate.Text = "LT:Unit.Label.PurchasedDate"; this.lblPurchasedDate.WrapText = false; // // cbPurchasedFromID // this.cbPurchasedFromID.Location = new System.Drawing.Point(192, 37); this.cbPurchasedFromID.Name = "cbPurchasedFromID"; this.cbPurchasedFromID.Size = new System.Drawing.Size(106, 24); this.cbPurchasedFromID.TabIndex = 1; this.cbPurchasedFromID.NeedMoreData += new GZTW.WinForm.Controls.NeedMoreDataHandler(this.cbPurchasedFromID_NeedMoreData); // // ckBoughtHere // this.ckBoughtHere.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.ckBoughtHere.Location = new System.Drawing.Point(5, 9); this.ckBoughtHere.Name = "ckBoughtHere"; this.ckBoughtHere.Size = new System.Drawing.Size(265, 19); this.ckBoughtHere.TabIndex = 0; this.ckBoughtHere.Tag = ""; this.ckBoughtHere.Text = "LT:Unit.Label.BoughtHere"; // // panelCustom // this.panelCustom.Controls.Add(this.gridCustom); this.panelCustom.Dock = System.Windows.Forms.DockStyle.Right; this.panelCustom.Location = new System.Drawing.Point(612, 43); this.panelCustom.Name = "panelCustom"; this.panelCustom.Size = new System.Drawing.Size(269, 520); 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, 520); 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); // // _UnitInfoForm_Toolbars_Dock_Area_Left // this._UnitInfoForm_Toolbars_Dock_Area_Left.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping; this._UnitInfoForm_Toolbars_Dock_Area_Left.BackColor = System.Drawing.SystemColors.Control; this._UnitInfoForm_Toolbars_Dock_Area_Left.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Left; this._UnitInfoForm_Toolbars_Dock_Area_Left.ForeColor = System.Drawing.SystemColors.ControlText; this._UnitInfoForm_Toolbars_Dock_Area_Left.Location = new System.Drawing.Point(0, 43); this._UnitInfoForm_Toolbars_Dock_Area_Left.Name = "_UnitInfoForm_Toolbars_Dock_Area_Left"; this._UnitInfoForm_Toolbars_Dock_Area_Left.Size = new System.Drawing.Size(0, 520); this._UnitInfoForm_Toolbars_Dock_Area_Left.ToolbarsManager = this.tbManager; // // _UnitInfoForm_Toolbars_Dock_Area_Right // this._UnitInfoForm_Toolbars_Dock_Area_Right.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping; this._UnitInfoForm_Toolbars_Dock_Area_Right.BackColor = System.Drawing.SystemColors.Control; this._UnitInfoForm_Toolbars_Dock_Area_Right.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Right; this._UnitInfoForm_Toolbars_Dock_Area_Right.ForeColor = System.Drawing.SystemColors.ControlText; this._UnitInfoForm_Toolbars_Dock_Area_Right.Location = new System.Drawing.Point(881, 43); this._UnitInfoForm_Toolbars_Dock_Area_Right.Name = "_UnitInfoForm_Toolbars_Dock_Area_Right"; this._UnitInfoForm_Toolbars_Dock_Area_Right.Size = new System.Drawing.Size(0, 520); this._UnitInfoForm_Toolbars_Dock_Area_Right.ToolbarsManager = this.tbManager; // // _UnitInfoForm_Toolbars_Dock_Area_Top // this._UnitInfoForm_Toolbars_Dock_Area_Top.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping; this._UnitInfoForm_Toolbars_Dock_Area_Top.BackColor = System.Drawing.SystemColors.Control; this._UnitInfoForm_Toolbars_Dock_Area_Top.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Top; this._UnitInfoForm_Toolbars_Dock_Area_Top.ForeColor = System.Drawing.SystemColors.ControlText; this._UnitInfoForm_Toolbars_Dock_Area_Top.Location = new System.Drawing.Point(0, 0); this._UnitInfoForm_Toolbars_Dock_Area_Top.Name = "_UnitInfoForm_Toolbars_Dock_Area_Top"; this._UnitInfoForm_Toolbars_Dock_Area_Top.Size = new System.Drawing.Size(881, 43); this._UnitInfoForm_Toolbars_Dock_Area_Top.ToolbarsManager = this.tbManager; // // _UnitInfoForm_Toolbars_Dock_Area_Bottom // this._UnitInfoForm_Toolbars_Dock_Area_Bottom.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping; this._UnitInfoForm_Toolbars_Dock_Area_Bottom.BackColor = System.Drawing.SystemColors.Control; this._UnitInfoForm_Toolbars_Dock_Area_Bottom.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Bottom; this._UnitInfoForm_Toolbars_Dock_Area_Bottom.ForeColor = System.Drawing.SystemColors.ControlText; this._UnitInfoForm_Toolbars_Dock_Area_Bottom.Location = new System.Drawing.Point(0, 563); this._UnitInfoForm_Toolbars_Dock_Area_Bottom.Name = "_UnitInfoForm_Toolbars_Dock_Area_Bottom"; this._UnitInfoForm_Toolbars_Dock_Area_Bottom.Size = new System.Drawing.Size(881, 0); this._UnitInfoForm_Toolbars_Dock_Area_Bottom.ToolbarsManager = this.tbManager; // // tbManager // this.tbManager.DesignerFlags = 1; this.tbManager.DockWithinContainer = this; this.tbManager.DockWithinContainerBaseType = typeof(System.Windows.Forms.Form); this.tbManager.SettingsKey = "UnitInfoForm.tbManager"; this.tbManager.ShowFullMenusDelay = 500; ultraToolbar1.DockedColumn = 0; ultraToolbar1.DockedRow = 0; ultraToolbar1.NonInheritedTools.AddRange(new Infragistics.Win.UltraWinToolbars.ToolBase[] { popupMenuTool1, buttonTool1, buttonTool2, buttonTool3, buttonTool4, buttonTool5, buttonTool6, buttonTool7, buttonTool8, buttonTool9, buttonTool10}); ultraToolbar1.Text = "UnitEntryMenuBar"; this.tbManager.Toolbars.AddRange(new Infragistics.Win.UltraWinToolbars.UltraToolbar[] { ultraToolbar1}); this.tbManager.ToolbarSettings.AllowCustomize = Infragistics.Win.DefaultableBoolean.False; this.tbManager.ToolbarSettings.AllowFloating = Infragistics.Win.DefaultableBoolean.False; this.tbManager.ToolbarSettings.AllowHiding = Infragistics.Win.DefaultableBoolean.False; buttonTool11.SharedPropsInternal.AccessibleDescription = "recorddd"; appearance4.Image = global::AyaNova.Resource1.SaveExit32; buttonTool11.SharedPropsInternal.AppearancesLarge.Appearance = appearance4; appearance5.Image = global::AyaNova.Resource1.SaveExit16; buttonTool11.SharedPropsInternal.AppearancesSmall.Appearance = appearance5; buttonTool11.SharedPropsInternal.Caption = "LT:UI.Command.SaveClose"; appearance6.Image = global::AyaNova.Resource1.Documents32; buttonTool12.SharedPropsInternal.AppearancesLarge.Appearance = appearance6; appearance7.Image = global::AyaNova.Resource1.Documents16; buttonTool12.SharedPropsInternal.AppearancesSmall.Appearance = appearance7; buttonTool12.SharedPropsInternal.Caption = "LT:AssignedDoc.Label.List"; appearance8.Image = global::AyaNova.Resource1.RecordHistory32; buttonTool13.SharedPropsInternal.AppearancesLarge.Appearance = appearance8; appearance9.Image = global::AyaNova.Resource1.RecordHistory16; buttonTool13.SharedPropsInternal.AppearancesSmall.Appearance = appearance9; buttonTool13.SharedPropsInternal.Caption = "LT:UI.Command.RecordHistory"; buttonTool14.SharedPropsInternal.Caption = "LT:UI.Command.Save"; buttonTool14.SharedPropsInternal.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.TextOnlyAlways; appearance10.Image = global::AyaNova.Resource1.SaveNew32; buttonTool15.SharedPropsInternal.AppearancesLarge.Appearance = appearance10; appearance11.Image = global::AyaNova.Resource1.SaveNew16; buttonTool15.SharedPropsInternal.AppearancesSmall.Appearance = appearance11; buttonTool15.SharedPropsInternal.Caption = "LT:UI.Command.SaveNew"; buttonTool16.SharedPropsInternal.Caption = "LT:UI.Command.Close"; buttonTool16.SharedPropsInternal.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.TextOnlyAlways; appearance12.Image = global::AyaNova.Resource1.Delete32; buttonTool17.SharedPropsInternal.AppearancesLarge.Appearance = appearance12; appearance13.Image = global::AyaNova.Resource1.Delete16; buttonTool17.SharedPropsInternal.AppearancesSmall.Appearance = appearance13; buttonTool17.SharedPropsInternal.Caption = "LT:UI.Command.Delete"; appearance14.Image = global::AyaNova.Resource1.Print32; popupMenuTool2.SharedPropsInternal.AppearancesLarge.Appearance = appearance14; appearance15.Image = global::AyaNova.Resource1.Print16; popupMenuTool2.SharedPropsInternal.AppearancesSmall.Appearance = appearance15; popupMenuTool2.SharedPropsInternal.Caption = "LT:UI.Toolbar.Print"; popupMenuTool2.SharedPropsInternal.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageOnlyOnToolbars; popupMenuTool2.Tools.AddRange(new Infragistics.Win.UltraWinToolbars.ToolBase[] { listTool2}); appearance16.Image = global::AyaNova.Resource1.FollowUp32; buttonTool18.SharedPropsInternal.AppearancesLarge.Appearance = appearance16; appearance17.Image = global::AyaNova.Resource1.FollowUp16; buttonTool18.SharedPropsInternal.AppearancesSmall.Appearance = appearance17; buttonTool18.SharedPropsInternal.Caption = "LT:ScheduleMarker.Label.FollowUp"; buttonTool18.SharedPropsInternal.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageOnlyOnToolbars; appearance18.Image = global::AyaNova.Resource1.Wiki32; buttonTool19.SharedPropsInternal.AppearancesLarge.Appearance = appearance18; appearance19.Image = global::AyaNova.Resource1.Wiki16; buttonTool19.SharedPropsInternal.AppearancesSmall.Appearance = appearance19; buttonTool19.SharedPropsInternal.Caption = "LT:O.WikiPage"; appearance20.Image = global::AyaNova.Resource1.Duplicate32; buttonTool20.SharedPropsInternal.AppearancesLarge.Appearance = appearance20; appearance21.Image = global::AyaNova.Resource1.Duplicate16; buttonTool20.SharedPropsInternal.AppearancesSmall.Appearance = appearance21; buttonTool20.SharedPropsInternal.Caption = "LT:UI.Command.Duplicate"; this.tbManager.Tools.AddRange(new Infragistics.Win.UltraWinToolbars.ToolBase[] { buttonTool11, buttonTool12, buttonTool13, buttonTool14, buttonTool15, buttonTool16, buttonTool17, listTool1, popupMenuTool2, buttonTool18, buttonTool19, buttonTool20}); this.tbManager.UseLargeImagesOnToolbar = true; this.tbManager.ToolClick += new Infragistics.Win.UltraWinToolbars.ToolClickEventHandler(this.tbManager_ToolClick); // // UnitInfoForm // this.AllowDrop = true; this.AutoScaleBaseSize = new System.Drawing.Size(6, 15); this.ClientSize = new System.Drawing.Size(881, 563); this.Controls.Add(this.panelCustom); this.Controls.Add(this.panelRight); this.Controls.Add(this.panelLeft); this.Controls.Add(this.ckIsDirty); this.Controls.Add(this._UnitInfoForm_Toolbars_Dock_Area_Left); this.Controls.Add(this._UnitInfoForm_Toolbars_Dock_Area_Right); this.Controls.Add(this._UnitInfoForm_Toolbars_Dock_Area_Bottom); this.Controls.Add(this._UnitInfoForm_Toolbars_Dock_Area_Top); this.helpProvider1.SetHelpKeyword(this, ""); this.helpProvider1.SetHelpNavigator(this, System.Windows.Forms.HelpNavigator.Topic); this.MinimumSize = new System.Drawing.Size(614, 600); this.Name = "UnitInfoForm"; this.helpProvider1.SetShowHelp(this, true); this.ShowInTaskbar = false; this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Show; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Closing += new System.ComponentModel.CancelEventHandler(this.UnitInfoForm_Closing); this.Load += new System.EventHandler(this.UnitInfoForm_Load); this.SizeChanged += new System.EventHandler(this.UnitInfoForm_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.ckMetered)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.cbUnitModelID)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.edDescription)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.edSerial)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.cbParentID)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.ckActive)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.cbReplacedByUnitID)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.edNotes)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.ckUnitHasOwnAddress)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.ckUsesBanking)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.cbClientID)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.ckUnitOverrideWarranty)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.ErrorProvider)).EndInit(); this.panelRight.ResumeLayout(false); this.panelRight.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.edText4)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.edText3)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.edText2)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.edText1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.edWarrantyTerms)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.ckLifeTimeWarranty)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.edWarrantyLength)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.dtPurchasedDate)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.edReceiptNumber)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.cbPurchasedFromID)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.ckBoughtHere)).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 UnitInfoForm_Load(object sender, System.EventArgs e) { // // helpProvider1 // this.helpProvider1.HelpNamespace = Util.BaseHelpUrl + "unit_entry_screen.htm"; //case 1039 //log.Debug("UnitInfoForm_Load"); Cursor.Current = Cursors.WaitCursor; this.Visible=false; this.Icon = Resource1.Unit16icon; //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 unit edit screen from elsewhere in the program) if(AyaBizUtils.Right("Object.Unit")< (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.Unit"))); this.Close(); return; } InitializeComboBoxes(); DataBind(); Util.LoadFormCustomization("UnitInfo", this, tbManager, false); Util.PluginInsertMenu(tbManager, new Util.PluginMenuOptionData(true, RootObjectTypes.Unit, mUnit, null));//case 941 //case 1122 Util.ShowAllInsertMenu(tbManager, new TypeAndID(RootObjectTypes.Unit, mUnit.ID), this); Util.LocalizeHelperInsertMenu(tbManager, this); //case 1810 Util.Localize(this); if (AyaBizUtils.Right("Object.Report") < (int)SecurityLevelTypes.ReadOnly) { tbManager.Tools["LT:UI.Toolbar.Print"].SharedProps.Visible = false; }//LT:UI.Toolbar.Print else { tbManager.Tools["LT:UI.Toolbar.Print"].SharedProps.Visible = true; Util.ReportFillList(this.tbManager.Tools["REPORTLIST"], UnitList.ReportKey, UnitList.DetailedReportKey); } Cursor.Current = Cursors.Default; //Case 152 (new TabOrderManager(this)).SetTabOrder(TabOrderManager.TabScheme.AcrossFirst); //restrict UI based on security settings RestrictUI(); 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 UnitInfoForm_Closing(object sender, System.ComponentModel.CancelEventArgs e) { 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("UnitInfo", this, tbManager, false); } #endregion #region Form Sizing /// /// Adjust the layout proportionately as it's sized by user /// /// /// private void UnitInfoForm_SizeChanged(object sender, System.EventArgs e) { //case 1039 //log.Debug("UnitInfoForm_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; //this.panelBottom.Height=(this.DisplayRectangle.Height/3)-40; //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 lblReplacedByUnitID.Width = nLeftWidth - nGap; cbReplacedByUnitID.Left=nLeftWidth; cbReplacedByUnitID.Width=nRightWidth; lblSerial.Width = nLeftWidth - nGap; edSerial.Left=nLeftWidth; edSerial.Width=nRightWidth; lblDescription.Width = nLeftWidth - nGap; edDescription.Left=nLeftWidth; edDescription.Width=nRightWidth; btnUnitModelID.Width = nLeftWidth - nGap; cbUnitModelID.Left=nLeftWidth; cbUnitModelID.Width=nRightWidth; lblParentUnitID.Width = nLeftWidth - nGap; cbParentID.Left=nLeftWidth; cbParentID.Width=nRightWidth; //Size and align controls in right panel nRightWidth=nRightWidth-8; btnPurchaseFromID.Width = nLeftWidth - nGap; cbPurchasedFromID.Left=nLeftWidth+8; cbPurchasedFromID.Width=nRightWidth; lblPurchasedDate.Width = nLeftWidth - nGap; dtPurchasedDate.Left=nLeftWidth+8; dtPurchasedDate.Width=nRightWidth; lblReceiptNumber.Width = nLeftWidth - nGap; edReceiptNumber.Left=nLeftWidth+8; edReceiptNumber.Width=nRightWidth; btnClientID.Width = nLeftWidth - nGap; cbClientID.Left=nLeftWidth+8; cbClientID.Width=nRightWidth; lblOverrideWarrantyLength.Width = nLeftWidth - nGap; edWarrantyLength.Left=nLeftWidth+8; edWarrantyLength.Width=nRightWidth; lblText1.Width = nLeftWidth - nGap; edText1.Left = nLeftWidth + 8; edText1.Width = nRightWidth; lblText2.Width = nLeftWidth - nGap; edText2.Left = nLeftWidth + 8; edText2.Width = nRightWidth; lblText3.Width = nLeftWidth - nGap; edText3.Left = nLeftWidth + 8; edText3.Width = nRightWidth; lblText4.Width = nLeftWidth - nGap; edText4.Left = nLeftWidth + 8; edText4.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=mUnit.Docs; d.RootObjectID=mUnit.ID; d.ExactObjectType = d.RootObjectType = RootObjectTypes.Unit; d.ShowDialog(); break; case "LT:UI.Command.RecordHistory": // ButtonTool RecordHistoryForm RH=new RecordHistoryForm(mUnit.Creator,mUnit.Modifier,mUnit.Created,mUnit.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:O.UnitMeterReading": // ButtonTool // TODO: Show UnitMeterReading grid break; case "LT:UI.Command.Delete": // ButtonTool RecordUpdate(RecordActionType.DeleteAndExit); break; case "REPORTLIST": { //case 3736 RecordUpdate(RecordActionType.PromptToSave); if (Util.ReportHandleToolClickIsSummary(e.Tool)) Util.ReportHandleToolClick(e.Tool, UnitList.ReportKey, UnitList.GetListForSingleItem(mUnit.ID)); //else //{ // Util.ReportHandleToolClick(e.Tool, MemoListDetailed.ReportKey, // MemoListDetailed.GetListForSingleItem(mMemo.ID)); //} Util.ReportFillList(this.tbManager.Tools["REPORTLIST"], UnitList.ReportKey, UnitList.DetailedReportKey); break; } case "LT:ScheduleMarker.Label.FollowUp": { FollowUpSelector f = new FollowUpSelector(mUnit.ID, RootObjectTypes.Unit); f.ShowDialog(); f.Dispose(); break; } case "LT:O.WikiPage": { Util.OpenWikiPage(RootObjectTypes.Unit, mUnit.ID, false); break; } case "LT:UI.Command.Duplicate": // ButtonTool { UnitInfoForm f = new UnitInfoForm(); f.UnitToEdit = mUnit.Duplicate(); this.Visible = false; f.ShowDialog(); f.Dispose(); //case 1087 this.mbChangesMade = f.ChangesMade; Close(); } break; } } #endregion Toolbar menu items #region Popup Address / OverrideWarranty / Rental / UsesBanking /// /// Display full address dialog for editing if ckUnitHasOwnAddress is true /// /// /// private void btnAddress_Click(object sender, System.EventArgs e) { //case 1039 //log.Debug("btnAddress_Click"); AddressForm AF=new AddressForm(true,true,(AyaBizUtils.Right("Object.Unit")<(int)SecurityLevelTypes.ReadWrite)); AF.AddressToEdit=mUnit.GoToAddress; AF.ShowDialog(); mUnit.UnitHasOwnAddress=AF.UnitHasAddress; } //display Banking grid for editing if ckUsesBanking is true private void btnUsesBanking_Click(object sender, System.EventArgs e) { //case 1039 //log.Debug("btnUsesBanking_Click"); //prompt to save first if(mUnit.IsNew) if(!RecordUpdate(RecordActionType.SaveOnly)) return; ServiceBankForm sbf=new ServiceBankForm(); sbf.ObjectType=RootObjectTypes.Unit; sbf.ObjectID=mUnit.ID; sbf.ShowDialog(); } //display UnitMeterReading grid if chMetered is true private void btnMetered_Click(object sender, System.EventArgs e) { //case 1039 //log.Debug("btnMetered_Click"); //prompt to save first if (mUnit.IsNew) if (!RecordUpdate(RecordActionType.SaveOnly)) return; UnitMeterReadingForm sbf=new UnitMeterReadingForm(); sbf.UnitID=mUnit.ID; sbf.ShowDialog(); } #endregion Popup Address #region hyperButtons private void btnUnitModelID_Click(object sender, System.EventArgs e) { //case 1039 //log.Debug("btnUnitModelID_Click"); UnitModelInfoForm cf=new UnitModelInfoForm(); if(cbUnitModelID.Value!=null && (Guid)cbUnitModelID.Value!=Guid.Empty) { cf.UnitModelToEdit=UnitModel.GetItem((Guid)cbUnitModelID.Value); } else { if(AyaBizUtils.Right("Object.UnitModel")< (int)SecurityLevelTypes.ReadWrite) { //case 1039 //log.Debug("No UnitModel selected to view and user has no rights to create a new one."); return; } cf.UnitModelToEdit=UnitModel.NewItem(); } cf.Visible=false; cf.ShowDialog(); if(cf.ChangesMade) { mUnit.UnitModelID=Guid.Empty; //case 1444 cbUnitModelID.Items.Clear(); cbUnitModelID_NeedMoreData(); //Util.FillGZComboBoxWithNameIDList("UnitModel", cbUnitModelID, false, Guid.Empty, false); mUnit.UnitModelID=cf.UnitModelToEdit.ID; } } private void btnClientID_Click(object sender, System.EventArgs e) { //case 1039 //log.Debug("btnClientID_Click"); ClientInfoForm cf=new ClientInfoForm(); if(cbClientID.Value!=null && (Guid)cbClientID.Value!=Guid.Empty) { cf.ClientToEdit=Client.GetItem((Guid)cbClientID.Value); } else { if(AyaBizUtils.Right("Object.Client")< (int)SecurityLevelTypes.ReadWrite) { //case 1039 //log.Debug("No Client selected to view and user has no rights to create a new one."); return; } cf.ClientToEdit=Client.NewItem(); } cf.Visible=false; cf.ShowDialog(); if(cf.ChangesMade) { mUnit.ClientID=Guid.Empty; Util.FillGZComboBoxWithNameIDList("Client",cbClientID,false,Guid.Empty,true); mUnit.ClientID=cf.ClientToEdit.ID; } } private void btnPurchaseFromID_Click(object sender, System.EventArgs e) { //case 1039 //log.Debug("btnPurchaseFromID_Click"); VendorInfoForm cf=new VendorInfoForm(VendorTypes.All); if(cbPurchasedFromID.Value!=null && (Guid)cbPurchasedFromID.Value!=Guid.Empty) { cf.VendorToEdit=Vendor.GetItem((Guid)cbPurchasedFromID.Value); } else { if(AyaBizUtils.Right("Object.Vendor")< (int)SecurityLevelTypes.ReadWrite) { //case 1039 //log.Debug("No Vendor selected to view and user has no rights to create a new one."); return; } cf.VendorToEdit=Vendor.NewItem(); } cf.Visible=false; cf.ShowDialog(); if(cf.ChangesMade) { mUnit.PurchasedFromID=Guid.Empty; Util.FillGZComboBoxWithNameIDList("Vendor", cbPurchasedFromID, false, Guid.Empty, false); mUnit.PurchasedFromID=cf.VendorToEdit.ID; } } #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() { //display unit serial number and unitmodel name in title bar this.Text=mUnit.Serial + " " + cbUnitModelID.Text; if(AyaBizUtils.Right("Object.Unit")> (int)SecurityLevelTypes.ReadOnly) { if (ckUnitOverrideWarranty.Checked==false) { ckLifeTimeWarranty.Enabled=false; lblOverrideWarrantyLength.Enabled=false; edWarrantyLength.Enabled=false; lblOverrideWarrantyTerms.Enabled=false; edWarrantyTerms.Enabled=false; } else { if(ckLifeTimeWarranty.Checked) { ckLifeTimeWarranty.Enabled=true; lblOverrideWarrantyLength.Enabled=false; edWarrantyLength.Enabled=false; lblOverrideWarrantyTerms.Enabled=true; edWarrantyTerms.Enabled=true; } else { ckLifeTimeWarranty.Enabled=true; lblOverrideWarrantyLength.Enabled=true; edWarrantyLength.Enabled=true; lblOverrideWarrantyTerms.Enabled=true; edWarrantyTerms.Enabled=true; } } if(ckMetered.Checked) { btnMetered.Enabled=true; } else { btnMetered.Enabled=false; } if(ckActive.Checked) { lblReplacedByUnitID.Enabled=false; cbReplacedByUnitID.Enabled=false; } else { lblReplacedByUnitID.Enabled=true; cbReplacedByUnitID.Enabled=true; } if(ckBoughtHere.Checked) { btnPurchaseFromID.Enabled=false; cbPurchasedFromID.Enabled=false; } else { btnPurchaseFromID.Enabled=true; cbPurchasedFromID.Enabled=true; } if(ckUsesBanking.Checked) { btnUsesBanking.Enabled=true; } else { btnUsesBanking.Enabled=false; } if(ckUnitHasOwnAddress.Checked) { btnAddress.Enabled=true; } else { btnAddress.Enabled=false; } } //Indicate if any docs in icon //case 918 if (this.mLastDocsCount != mUnit.Docs.Count) { this.mLastDocsCount = mUnit.Docs.Count; Util.AssignedDocsSetImage(tbManager, (mLastDocsCount > 0)); } tbManager.Tools["LT:UI.Command.Duplicate"].SharedProps.Visible = mUnit.CanDuplicate; } /// /// When the application enters an idle state /// update the UI to reflect changes 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.Unit")).ToString()); bool bDelete=AyaBizUtils.Right("Object.Unit")== (int)SecurityLevelTypes.ReadWriteDelete; bool bReadOnly=AyaBizUtils.Right("Object.Unit") < (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; } //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; } 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 = mUnit.CanWiki; //case 1172 tbManager.Tools["LT:AssignedDoc.Label.List"].SharedProps.Visible = !AyaBizUtils.Lite; //DISABLE EDITABLE CONTROLS //Text editors edSerial.Enabled=!bReadOnly; edDescription.Enabled=!bReadOnly; edNotes.Enabled=!bReadOnly; this.edWarrantyLength.Enabled=!bReadOnly; this.edWarrantyTerms.Enabled=!bReadOnly; edReceiptNumber.Enabled=!bReadOnly; edText1.Enabled = !bReadOnly; edText2.Enabled = !bReadOnly; edText3.Enabled = !bReadOnly; edText4.Enabled = !bReadOnly; //date and time editors this.dtPurchasedDate.Enabled=!bReadOnly; //Combo boxes cbUnitModelID.Enabled=!bReadOnly; cbClientID.Enabled=!bReadOnly; cbParentID.Enabled=!bReadOnly; cbPurchasedFromID.Enabled=!bReadOnly; cbReplacedByUnitID.Enabled=!bReadOnly; //Check boxes ckActive.Enabled=!bReadOnly; ckBoughtHere.Enabled=!bReadOnly; this.ckUnitHasOwnAddress.Enabled=!bReadOnly; this.ckUsesBanking.Enabled=!bReadOnly; this.ckUnitOverrideWarranty.Enabled=!bReadOnly; ckMetered.Enabled=!bReadOnly; this.ckLifeTimeWarranty.Enabled=!bReadOnly; //Buttons btnUnitModelID.Enabled=!bReadOnly; btnUnitModelID.Appearance.ForeColorDisabled=System.Drawing.SystemColors.ControlText; btnPurchaseFromID.Enabled=!bReadOnly; btnPurchaseFromID.Appearance.ForeColorDisabled=System.Drawing.SystemColors.ControlText; btnAddress.Enabled=!bReadOnly; btnAddress.Appearance.ForeColorDisabled=System.Drawing.SystemColors.ControlText; } #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 mUnit.GetBrokenRulesCollection().ListChanged += new System.ComponentModel.ListChangedEventHandler(OnBrokenRulesChanged); //=-=-=-=-=-=- Form Field bindings =-=-=-=-=-=-=-=-=-=-=-= //Text editors Util.BindField(edSerial,"Text",mUnit,"Serial"); Util.BindField(edDescription,"Text",mUnit,"Description"); Util.BindField(edNotes,"Text",mUnit,"Notes"); Util.BindField(edReceiptNumber,"Text",mUnit,"Receipt"); Util.BindField(edWarrantyLength,"Text",mUnit,"WarrantyLength"); Util.BindField(edWarrantyTerms,"Text",mUnit,"WarrantyTerms"); Util.BindField(edText1, "Text", mUnit, "Text1"); Util.BindField(edText2, "Text", mUnit, "Text2"); Util.BindField(edText3, "Text", mUnit, "Text3"); Util.BindField(edText4, "Text", mUnit, "Text4"); //Combo boxes Util.BindField(cbUnitModelID,"Value",mUnit,"UnitModelID"); Util.BindField(cbClientID,"Value",mUnit,"ClientID"); Util.BindField(cbParentID,"Value",mUnit,"ParentID"); Util.BindField(cbPurchasedFromID, "Value", mUnit, "PurchasedFromID"); Util.BindField(cbReplacedByUnitID, "Value", mUnit, "ReplacedByUnitID"); //Check boxes Util.BindField(ckActive,"Checked",mUnit,"Active"); Util.BindField(ckBoughtHere,"Checked",mUnit,"BoughtHere"); Util.BindField(ckUnitHasOwnAddress,"Checked",mUnit,"UnitHasOwnAddress"); Util.BindField(ckUnitOverrideWarranty,"Checked",mUnit,"OverrideModelWarranty"); Util.BindField(ckMetered,"Checked",mUnit,"Metered"); Util.BindField(ckUsesBanking,"Checked",mUnit,"UsesBanking"); Util.BindField(ckLifeTimeWarranty,"Checked",mUnit,"LifeTimeWarranty"); //Buttons //TODO: need to bind these to the values themselves // Util.BindField(btnAddress,"Visible",mUnit,"UnitHasOwnAddress"); // Util.BindField(btnRental,"Visible",mUnit,"RentalUnit"); //Date Util.BindField(dtPurchasedDate, "Value", mUnit, "PurchasedDate"); //=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- //Bind IsDirty property to hidden checkbox to //ensure isdirtychanged event is available //to data binding infrastructure Util.BindField(ckIsDirty,"Checked",mUnit,"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,mUnit,ErrorProvider); } #endregion #region Business object editing / adding / deletion related code private Unit mUnit; /// /// Unit record to display /// set by caller /// public Unit UnitToEdit { get { return mUnit; } set { mUnit=value; //mUnit.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; } } /// /// 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 btnUnitModelID.Focus(); switch(SaveType) { case RecordActionType.DeleteAndExit: if(Util.PromptForDelete()==DialogResult.Yes) { //Delete, then exit try { Unit.DeleteItem(mUnit.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(mUnit.IsSavable) { mUnit.ApplyEdit(); mUnit.Save(); bClosingHandled=true; mbChangesMade=true; this.Close(); return true; } if(mUnit.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(mUnit.IsSavable) { mUnit.ApplyEdit(); mUnit.Save(); AddNewUnit(); mbChangesMade=true; return true; } if(mUnit.IsDirty)//dirty and unsaveable due to broken rules { //User says that's ok, continue on? if(Util.PromptForBrokenRulesCancelSave()==DialogResult.Yes) { //Ok, add new Unit and don't save old record AddNewUnit(); return true; } else return false; } //Current record isn't dirty so just add a new Unit AddNewUnit(); return true; case RecordActionType.SaveOnly: if(mUnit.IsSavable) { mUnit.ApplyEdit(); mUnit=(Unit)mUnit.Save(); mbChangesMade=true; return true; } //Changed: 16-June-2006 Added this so that //meter readings can't be added without saving first //and will get feedback why can't save if not //shouldn't this be in all forms? if (mUnit.IsDirty) { MessageBox.Show(Util.BrokenRuleCollectionLocalizer(mUnit.BrokenRulesText)); return false; } return true; case RecordActionType.PromptToSave: //Prompt to save and save if //required if(mUnit.IsDirty) { DialogResult dr=Util.PromptForSave(); if(dr==DialogResult.Cancel) { //Cancel return false; } if(dr==DialogResult.Yes) { //Save before exit if(mUnit.IsSavable) { mUnit.ApplyEdit(); mUnit.Save(); mbChangesMade=true; return true; } if(mUnit.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 Unit record and opens it for editing /// private void AddNewUnit() { //case 1039 //log.Debug("AddNewUnit"); try { mUnit=Unit.NewItem(); //mUnit.BeginEdit(); DataBind(); } catch(Exception ex) { //log.Error("AddNewUnit",ex); MessageBox.Show(ex.Message+"\r\n"+ex.Source); } } #endregion #region Form ComboBoxes (Setup / Events) private void InitializeComboBoxes() { //case 1039 //log.Debug("InitializeComboBoxes"); //Load combo boxes with initial values //Util.FillGZComboBoxWithNameIDList("UnitModel",cbUnitModelID,true,mUnit.UnitModelID); if(mUnit.UnitModelID!=Guid.Empty) { UnitModelPickList UList = UnitModelPickList.GetListOfOneSpecificUnitModel(mUnit.UnitModelID); if(UList.Count>0) { ValueListItem vi=cbUnitModelID.Items.Add(UList[0].ID,UList[0].Name); if(!UList[0].Active) vi.Appearance.ForeColor=System.Drawing.SystemColors.GrayText; } } Util.FillGZComboBoxWithNameIDList("Client",cbClientID,true,mUnit.ClientID,true); if(mUnit.ParentID!=Guid.Empty) { Unit p=Unit.GetItemMRU(mUnit.ParentID,false); ValueListItem vi=cbParentID.Items.Add(mUnit.ParentID,UnitNameFetcher.GetUnitNameFromUnitID(mUnit.ParentID)); if(!p.Active) vi.Appearance.ForeColor=System.Drawing.SystemColors.GrayText; } Util.FillGZComboBoxWithNameIDList("Vendor", cbPurchasedFromID, true, mUnit.PurchasedFromID, false); if(mUnit.ReplacedByUnitID!=Guid.Empty) { ValueListItem vi=cbReplacedByUnitID.Items.Add(mUnit.ReplacedByUnitID,UnitNameFetcher.GetUnitNameFromUnitID(mUnit.ReplacedByUnitID)); } //Util.FillGZComboBoxWithNameIDList("Unit",cbReplacedByUnitID,true,mUnit.ReplacedByUnitID); } private void cbReplacedByUnitID_NeedMoreData() { //Nyet nyet..no name column in unit //Util.FillGZComboBoxWithNameIDList("Unit",cbReplacedByUnitID,false,Guid.Empty); cbReplacedByUnitID.ClearList(); UnitPickList upi = UnitPickList.GetListOfAll(); //Added: 19-July-2006 Huge performance increase with large lists Util.ComboBeginUpdate(cbReplacedByUnitID); foreach(UnitPickList.UnitPickListInfo ui in upi) { if(ui.Active==true) { cbReplacedByUnitID.Items.Add(ui.ID,ui.UnitName(Util.GlobalSettings.DefaultUnitNameDisplayFormat)); } else { //is the current, inactive item the one selected in this record? if(ui.ID==mUnit.ReplacedByUnitID) { //yes, so add it manually and grayed out ValueListItem vi=cbReplacedByUnitID.Items.Add(ui.ID,ui.UnitName(Util.GlobalSettings.DefaultUnitNameDisplayFormat)); vi.Appearance.ForeColor=System.Drawing.SystemColors.GrayText; } } } //Added: 19-July-2006 see above Util.ComboEndUpdate(cbReplacedByUnitID); } private void cbUnitModelID_NeedMoreData() { //Util.FillGZComboBoxWithNameIDList("UnitModel",cbUnitModelID,false,Guid.Empty); UnitModelPickList UList= UnitModelPickList.GetList(); //Added: 19-July-2006 Huge performance increase with large lists Util.ComboBeginUpdate(cbUnitModelID); // Original slow code without above took 30secs with 800 unitmodels, after change no noticeable delay at all foreach (UnitModelPickList.UnitModelPickListInfo ui in UList) { if (ui.Active) cbUnitModelID.Items.Add(ui.ID, ui.Name); else if (ui.ID == this.mUnit.UnitModelID) { ValueListItem vi = cbUnitModelID.Items.Add(ui.ID, ui.Name); vi.Appearance.ForeColor = System.Drawing.SystemColors.GrayText; } } //Added: 19-July-2006 see above Util.ComboEndUpdate(cbUnitModelID); } private void cbParentID_NeedMoreData() { FillParentUnitList(); } private void FillParentUnitList() { //case 1039 //log.Debug("FillParentUnitList"); cbParentID.ClearList(); UnitPickList upi = UnitPickList.GetListOfAll(); //Added: 19-July-2006 Huge performance increase with large lists Util.ComboBeginUpdate(cbParentID); foreach(UnitPickList.UnitPickListInfo ui in upi) { if(ui.Active==true) { cbParentID.Items.Add(ui.ID,ui.UnitName(Util.GlobalSettings.DefaultUnitNameDisplayFormat)); } else { //is the current, inactive item the one selected in this record? if(ui.ID==mUnit.ParentID) { //yes, so add it manually and grayed out ValueListItem vi=cbParentID.Items.Add(ui.ID,ui.UnitName(Util.GlobalSettings.DefaultUnitNameDisplayFormat)); vi.Appearance.ForeColor=System.Drawing.SystemColors.GrayText; } } } //Added: 19-July-2006 see above Util.ComboEndUpdate(cbParentID); } private void cbPurchasedFromID_NeedMoreData() { Util.FillGZComboBoxWithNameIDList("Vendor", cbPurchasedFromID, false, Guid.Empty, false); } private void cbClientID_NeedMoreData() { Util.FillGZComboBoxWithNameIDList("Client",cbClientID,false,Guid.Empty, true); } #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("Unit",gridCustom); if(bShowCustomFields) { this.panelCustom.Visible=true; Util.GridFromCustomFields(mUnit,gridCustom); } else { this.panelCustom.Visible=false; } } private void gridCustom_AfterCellUpdate(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e) { Util.GridToCustomFields(mUnit,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, mUnit.Docs, RootObjectTypes.Unit, mUnit.ID, RootObjectTypes.Unit); } #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; case HotKeyAction.NewWorkorder: case HotKeyAction.NewQuote: case HotKeyAction.NewPreventiveMaintenance: { //Get which client first... if (mUnit.IsNew || mUnit.ClientID == Guid.Empty) return true; Workorder w = null; try { switch (Util.HotKeys(keyData)) { case HotKeyAction.NewWorkorder: w = Workorder.NewItem(WorkorderTypes.Service); break; case HotKeyAction.NewQuote: w = Workorder.NewItem(WorkorderTypes.Quote); break; case HotKeyAction.NewPreventiveMaintenance: w = Workorder.NewItem(WorkorderTypes.PreventiveMaintenance); break; } } catch (TrialException ex) { ex.ToString();//Just to suppress the compiler warning Util.PromptRestricted(); return true; } w.ClientID = mUnit.ClientID; w.WorkorderItems[0].UnitID = mUnit.ID; WorkorderForm wf = new WorkorderForm(); wf.WorkorderToEdit = w; //Case 677 wf.Show(); //wf.Dispose(); } return true; } return base.ProcessCmdKey(ref msg, keyData); } #endregion //Case 421 private void edSerial_AfterExitEditMode(object sender, EventArgs e) { if (mUnit.IsNew) { if (Unit.Exists(Guid.Empty, edSerial.Text)) { Util.PromptWithIconOKOnlyFromLocaleKey("Error.Object.DuplicateSerialWarning", MessageBoxIcon.Warning); } } } } }