1870 lines
82 KiB
C#
1870 lines
82 KiB
C#
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>
|
|
/// Summary description for PartInfoForm.
|
|
/// </summary>
|
|
public class PartInfoForm : 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 lblDescription;
|
|
private Infragistics.Win.Misc.UltraLabel lblName;
|
|
private Infragistics.Win.UltraWinEditors.UltraTextEditor edPartNumber;
|
|
private Infragistics.Win.UltraWinEditors.UltraTextEditor edName;
|
|
private Infragistics.Win.Misc.UltraLabel lblNotes;
|
|
private GZTW.WinForm.Controls.GZUltraComboEditor cbUnitOfMeasureID;
|
|
private Infragistics.Win.UltraWinEditors.UltraCurrencyEditor edCost;
|
|
private Infragistics.Win.Misc.UltraLabel lblCost;
|
|
private Infragistics.Win.UltraWinEditors.UltraCurrencyEditor edRetail;
|
|
private Infragistics.Win.Misc.UltraLabel lblRetail;
|
|
private Infragistics.Win.UltraWinEditors.UltraTextEditor edUPC;
|
|
private Infragistics.Win.Misc.UltraLabel lblUPC;
|
|
private GZTW.WinForm.Controls.GZUltraComboEditor cbWholesalerID;
|
|
private Infragistics.Win.Misc.UltraLabel lblWholesalerNumber;
|
|
private Infragistics.Win.UltraWinEditors.UltraTextEditor edWholesalerNumber;
|
|
private Infragistics.Win.Misc.UltraLabel lblAlternativeWholesalerNumber;
|
|
private GZTW.WinForm.Controls.GZUltraComboEditor cbAlternativeWholesalerID;
|
|
private Infragistics.Win.UltraWinEditors.UltraTextEditor edAlternativeWholesalerNumber;
|
|
private Infragistics.Win.Misc.UltraLabel lblManufacturerNumber;
|
|
private GZTW.WinForm.Controls.GZUltraComboEditor cbManufacturerID;
|
|
private Infragistics.Win.UltraWinEditors.UltraTextEditor edManufacturerNumber;
|
|
private GZTW.WinForm.Controls.GZUltraComboEditor cbPartCategoryID;
|
|
private GZTW.WinForm.Controls.GZUltraComboEditor cbPartAssemblyID;
|
|
private Infragistics.Win.UltraWinEditors.UltraCheckEditor ckTrackSerialNumber;
|
|
private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _PartInfoForm_Toolbars_Dock_Area_Left;
|
|
private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _PartInfoForm_Toolbars_Dock_Area_Right;
|
|
private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _PartInfoForm_Toolbars_Dock_Area_Top;
|
|
private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _PartInfoForm_Toolbars_Dock_Area_Bottom;
|
|
private Infragistics.Win.Misc.UltraButton btnUnitOfMeasureID;
|
|
private Infragistics.Win.Misc.UltraButton btnPartCategoryID;
|
|
private Infragistics.Win.Misc.UltraButton btnPartAssemblyID;
|
|
private Infragistics.Win.Misc.UltraButton btnWholesalerID;
|
|
private Infragistics.Win.Misc.UltraButton btnAlternativeWholesalerID;
|
|
private Infragistics.Win.Misc.UltraButton btnManufacturerID;
|
|
private System.Windows.Forms.HelpProvider helpProvider1;
|
|
private System.ComponentModel.IContainer components;
|
|
|
|
|
|
public PartInfoForm()
|
|
{
|
|
//
|
|
// Required for Windows Form Designer support
|
|
//
|
|
InitializeComponent();
|
|
|
|
|
|
}
|
|
|
|
/// <summary>
|
|
/// Clean up any resources being used.
|
|
/// </summary>
|
|
protected override void Dispose( bool disposing )
|
|
{
|
|
if( disposing )
|
|
{
|
|
if(components != null)
|
|
{
|
|
components.Dispose();
|
|
}
|
|
}
|
|
base.Dispose( disposing );
|
|
}
|
|
|
|
#region Windows Form Designer generated code
|
|
/// <summary>
|
|
/// Required method for Designer support - do not modify
|
|
/// the contents of this method with the code editor.
|
|
/// </summary>
|
|
private void InitializeComponent()
|
|
{
|
|
this.components = new System.ComponentModel.Container();
|
|
Infragistics.Win.UltraWinToolbars.UltraToolbar ultraToolbar1 = new Infragistics.Win.UltraWinToolbars.UltraToolbar("PartEntryMenuBar");
|
|
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 buttonTool19 = 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 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 buttonTool6 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:PartByWarehouseInventory.Label.List");
|
|
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool17 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UI.Command.Delete");
|
|
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool7 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UI.Command.Close");
|
|
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool15 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UI.Command.Duplicate");
|
|
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool8 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UI.Command.SaveClose");
|
|
Infragistics.Win.Appearance appearance7 = new Infragistics.Win.Appearance();
|
|
Infragistics.Win.Appearance appearance8 = new Infragistics.Win.Appearance();
|
|
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool9 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:AssignedDoc.Label.List");
|
|
Infragistics.Win.Appearance appearance9 = new Infragistics.Win.Appearance();
|
|
Infragistics.Win.Appearance appearance10 = new Infragistics.Win.Appearance();
|
|
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool10 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UI.Command.RecordHistory");
|
|
Infragistics.Win.Appearance appearance11 = new Infragistics.Win.Appearance();
|
|
Infragistics.Win.Appearance appearance12 = new Infragistics.Win.Appearance();
|
|
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool11 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UI.Command.Save");
|
|
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool12 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UI.Command.SaveNew");
|
|
Infragistics.Win.Appearance appearance13 = new Infragistics.Win.Appearance();
|
|
Infragistics.Win.Appearance appearance14 = new Infragistics.Win.Appearance();
|
|
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool13 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UI.Command.Close");
|
|
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool14 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:PartByWarehouseInventory.Label.List");
|
|
Infragistics.Win.Appearance appearance15 = new Infragistics.Win.Appearance();
|
|
Infragistics.Win.Appearance appearance16 = 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 appearance17 = new Infragistics.Win.Appearance();
|
|
Infragistics.Win.Appearance appearance18 = 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:UI.Command.Duplicate");
|
|
Infragistics.Win.Appearance appearance19 = new Infragistics.Win.Appearance();
|
|
Infragistics.Win.Appearance appearance20 = new Infragistics.Win.Appearance();
|
|
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool18 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UI.Command.Delete");
|
|
Infragistics.Win.Appearance appearance21 = new Infragistics.Win.Appearance();
|
|
Infragistics.Win.Appearance appearance22 = new Infragistics.Win.Appearance();
|
|
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool20 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:O.WikiPage");
|
|
Infragistics.Win.Appearance appearance23 = new Infragistics.Win.Appearance();
|
|
Infragistics.Win.Appearance appearance24 = new Infragistics.Win.Appearance();
|
|
Infragistics.Win.Appearance appearance4 = new Infragistics.Win.Appearance();
|
|
Infragistics.Win.Appearance appearance5 = new Infragistics.Win.Appearance();
|
|
Infragistics.Win.Appearance appearance6 = new Infragistics.Win.Appearance();
|
|
Infragistics.Win.Appearance appearance1 = new Infragistics.Win.Appearance();
|
|
Infragistics.Win.Appearance appearance2 = new Infragistics.Win.Appearance();
|
|
Infragistics.Win.Appearance appearance3 = new Infragistics.Win.Appearance();
|
|
this.ckIsDirty = new System.Windows.Forms.CheckBox();
|
|
this.tbManager = new Infragistics.Win.UltraWinToolbars.UltraToolbarsManager(this.components);
|
|
this.panelLeft = new System.Windows.Forms.Panel();
|
|
this.btnPartAssemblyID = new Infragistics.Win.Misc.UltraButton();
|
|
this.edUPC = new Infragistics.Win.UltraWinEditors.UltraTextEditor();
|
|
this.lblUPC = new Infragistics.Win.Misc.UltraLabel();
|
|
this.edRetail = new Infragistics.Win.UltraWinEditors.UltraCurrencyEditor();
|
|
this.lblRetail = new Infragistics.Win.Misc.UltraLabel();
|
|
this.edCost = new Infragistics.Win.UltraWinEditors.UltraCurrencyEditor();
|
|
this.cbPartCategoryID = new GZTW.WinForm.Controls.GZUltraComboEditor();
|
|
this.cbUnitOfMeasureID = new GZTW.WinForm.Controls.GZUltraComboEditor();
|
|
this.edPartNumber = new Infragistics.Win.UltraWinEditors.UltraTextEditor();
|
|
this.lblDescription = new Infragistics.Win.Misc.UltraLabel();
|
|
this.edName = new Infragistics.Win.UltraWinEditors.UltraTextEditor();
|
|
this.lblName = new Infragistics.Win.Misc.UltraLabel();
|
|
this.lblCost = new Infragistics.Win.Misc.UltraLabel();
|
|
this.ckActive = new Infragistics.Win.UltraWinEditors.UltraCheckEditor();
|
|
this.cbPartAssemblyID = new GZTW.WinForm.Controls.GZUltraComboEditor();
|
|
this.btnUnitOfMeasureID = new Infragistics.Win.Misc.UltraButton();
|
|
this.btnPartCategoryID = new Infragistics.Win.Misc.UltraButton();
|
|
this.ErrorProvider = new System.Windows.Forms.ErrorProvider(this.components);
|
|
this.panelRight = new System.Windows.Forms.Panel();
|
|
this.btnManufacturerID = new Infragistics.Win.Misc.UltraButton();
|
|
this.btnAlternativeWholesalerID = new Infragistics.Win.Misc.UltraButton();
|
|
this.btnWholesalerID = new Infragistics.Win.Misc.UltraButton();
|
|
this.cbManufacturerID = new GZTW.WinForm.Controls.GZUltraComboEditor();
|
|
this.edManufacturerNumber = new Infragistics.Win.UltraWinEditors.UltraTextEditor();
|
|
this.lblManufacturerNumber = new Infragistics.Win.Misc.UltraLabel();
|
|
this.cbAlternativeWholesalerID = new GZTW.WinForm.Controls.GZUltraComboEditor();
|
|
this.edAlternativeWholesalerNumber = new Infragistics.Win.UltraWinEditors.UltraTextEditor();
|
|
this.lblAlternativeWholesalerNumber = new Infragistics.Win.Misc.UltraLabel();
|
|
this.cbWholesalerID = new GZTW.WinForm.Controls.GZUltraComboEditor();
|
|
this.edWholesalerNumber = new Infragistics.Win.UltraWinEditors.UltraTextEditor();
|
|
this.lblWholesalerNumber = new Infragistics.Win.Misc.UltraLabel();
|
|
this.lblNotes = new Infragistics.Win.Misc.UltraLabel();
|
|
this.edNotes = new Infragistics.Win.UltraWinEditors.UltraTextEditor();
|
|
this.ckTrackSerialNumber = new Infragistics.Win.UltraWinEditors.UltraCheckEditor();
|
|
this.panelCustom = new System.Windows.Forms.Panel();
|
|
this.gridCustom = new Infragistics.Win.UltraWinGrid.UltraGrid();
|
|
this._PartInfoForm_Toolbars_Dock_Area_Left = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea();
|
|
this._PartInfoForm_Toolbars_Dock_Area_Right = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea();
|
|
this._PartInfoForm_Toolbars_Dock_Area_Top = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea();
|
|
this._PartInfoForm_Toolbars_Dock_Area_Bottom = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea();
|
|
this.helpProvider1 = new System.Windows.Forms.HelpProvider();
|
|
((System.ComponentModel.ISupportInitialize)(this.tbManager)).BeginInit();
|
|
this.panelLeft.SuspendLayout();
|
|
((System.ComponentModel.ISupportInitialize)(this.edUPC)).BeginInit();
|
|
((System.ComponentModel.ISupportInitialize)(this.edRetail)).BeginInit();
|
|
((System.ComponentModel.ISupportInitialize)(this.edCost)).BeginInit();
|
|
((System.ComponentModel.ISupportInitialize)(this.cbPartCategoryID)).BeginInit();
|
|
((System.ComponentModel.ISupportInitialize)(this.cbUnitOfMeasureID)).BeginInit();
|
|
((System.ComponentModel.ISupportInitialize)(this.edPartNumber)).BeginInit();
|
|
((System.ComponentModel.ISupportInitialize)(this.edName)).BeginInit();
|
|
((System.ComponentModel.ISupportInitialize)(this.ckActive)).BeginInit();
|
|
((System.ComponentModel.ISupportInitialize)(this.cbPartAssemblyID)).BeginInit();
|
|
((System.ComponentModel.ISupportInitialize)(this.ErrorProvider)).BeginInit();
|
|
this.panelRight.SuspendLayout();
|
|
((System.ComponentModel.ISupportInitialize)(this.cbManufacturerID)).BeginInit();
|
|
((System.ComponentModel.ISupportInitialize)(this.edManufacturerNumber)).BeginInit();
|
|
((System.ComponentModel.ISupportInitialize)(this.cbAlternativeWholesalerID)).BeginInit();
|
|
((System.ComponentModel.ISupportInitialize)(this.edAlternativeWholesalerNumber)).BeginInit();
|
|
((System.ComponentModel.ISupportInitialize)(this.cbWholesalerID)).BeginInit();
|
|
((System.ComponentModel.ISupportInitialize)(this.edWholesalerNumber)).BeginInit();
|
|
((System.ComponentModel.ISupportInitialize)(this.edNotes)).BeginInit();
|
|
((System.ComponentModel.ISupportInitialize)(this.ckTrackSerialNumber)).BeginInit();
|
|
this.panelCustom.SuspendLayout();
|
|
((System.ComponentModel.ISupportInitialize)(this.gridCustom)).BeginInit();
|
|
this.SuspendLayout();
|
|
//
|
|
// ckIsDirty
|
|
//
|
|
this.ckIsDirty.Location = new System.Drawing.Point(-336, 28);
|
|
this.ckIsDirty.Name = "ckIsDirty";
|
|
this.ckIsDirty.Size = new System.Drawing.Size(190, 27);
|
|
this.ckIsDirty.TabIndex = 5;
|
|
//
|
|
// tbManager
|
|
//
|
|
this.tbManager.DesignerFlags = 1;
|
|
this.tbManager.DockWithinContainer = this;
|
|
this.tbManager.DockWithinContainerBaseType = typeof(System.Windows.Forms.Form);
|
|
this.tbManager.ShowFullMenusDelay = 500;
|
|
ultraToolbar1.DockedColumn = 0;
|
|
ultraToolbar1.DockedRow = 0;
|
|
ultraToolbar1.NonInheritedTools.AddRange(new Infragistics.Win.UltraWinToolbars.ToolBase[] {
|
|
popupMenuTool1,
|
|
buttonTool1,
|
|
buttonTool2,
|
|
buttonTool19,
|
|
buttonTool3,
|
|
buttonTool4,
|
|
buttonTool5,
|
|
buttonTool6,
|
|
buttonTool17,
|
|
buttonTool7,
|
|
buttonTool15});
|
|
ultraToolbar1.Text = "PartEntryMenuBar";
|
|
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;
|
|
buttonTool8.SharedPropsInternal.AccessibleDescription = "recorddd";
|
|
appearance7.Image = global::AyaNova.Resource1.SaveExit32;
|
|
buttonTool8.SharedPropsInternal.AppearancesLarge.Appearance = appearance7;
|
|
appearance8.Image = global::AyaNova.Resource1.SaveExit16;
|
|
buttonTool8.SharedPropsInternal.AppearancesSmall.Appearance = appearance8;
|
|
buttonTool8.SharedPropsInternal.Caption = "LT:UI.Command.SaveClose";
|
|
appearance9.Image = global::AyaNova.Resource1.Documents32;
|
|
buttonTool9.SharedPropsInternal.AppearancesLarge.Appearance = appearance9;
|
|
appearance10.Image = global::AyaNova.Resource1.Documents16;
|
|
buttonTool9.SharedPropsInternal.AppearancesSmall.Appearance = appearance10;
|
|
buttonTool9.SharedPropsInternal.Caption = "LT:AssignedDoc.Label.List";
|
|
appearance11.Image = global::AyaNova.Resource1.RecordHistory32;
|
|
buttonTool10.SharedPropsInternal.AppearancesLarge.Appearance = appearance11;
|
|
appearance12.Image = global::AyaNova.Resource1.RecordHistory16;
|
|
buttonTool10.SharedPropsInternal.AppearancesSmall.Appearance = appearance12;
|
|
buttonTool10.SharedPropsInternal.Caption = "LT:UI.Command.RecordHistory";
|
|
buttonTool11.SharedPropsInternal.Caption = "LT:UI.Command.Save";
|
|
buttonTool11.SharedPropsInternal.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.TextOnlyAlways;
|
|
appearance13.Image = global::AyaNova.Resource1.SaveNew32;
|
|
buttonTool12.SharedPropsInternal.AppearancesLarge.Appearance = appearance13;
|
|
appearance14.Image = global::AyaNova.Resource1.SaveNew16;
|
|
buttonTool12.SharedPropsInternal.AppearancesSmall.Appearance = appearance14;
|
|
buttonTool12.SharedPropsInternal.Caption = "LT:UI.Command.SaveNew";
|
|
buttonTool13.SharedPropsInternal.Caption = "LT:UI.Command.Close";
|
|
buttonTool13.SharedPropsInternal.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.TextOnlyAlways;
|
|
appearance15.Image = global::AyaNova.Resource1.PartInventory32;
|
|
buttonTool14.SharedPropsInternal.AppearancesLarge.Appearance = appearance15;
|
|
appearance16.Image = global::AyaNova.Resource1.PartInventory16;
|
|
buttonTool14.SharedPropsInternal.AppearancesSmall.Appearance = appearance16;
|
|
buttonTool14.SharedPropsInternal.Caption = "LT:PartByWarehouseInventory.Label.List";
|
|
appearance17.Image = global::AyaNova.Resource1.Print32;
|
|
popupMenuTool2.SharedPropsInternal.AppearancesLarge.Appearance = appearance17;
|
|
appearance18.Image = global::AyaNova.Resource1.Print16;
|
|
popupMenuTool2.SharedPropsInternal.AppearancesSmall.Appearance = appearance18;
|
|
popupMenuTool2.SharedPropsInternal.Caption = "LT:UI.Toolbar.Print";
|
|
popupMenuTool2.SharedPropsInternal.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageOnlyOnToolbars;
|
|
popupMenuTool2.Tools.AddRange(new Infragistics.Win.UltraWinToolbars.ToolBase[] {
|
|
listTool2});
|
|
appearance19.Image = global::AyaNova.Resource1.Duplicate32;
|
|
buttonTool16.SharedPropsInternal.AppearancesLarge.Appearance = appearance19;
|
|
appearance20.Image = global::AyaNova.Resource1.Duplicate16;
|
|
buttonTool16.SharedPropsInternal.AppearancesSmall.Appearance = appearance20;
|
|
buttonTool16.SharedPropsInternal.Caption = "LT:UI.Command.Duplicate";
|
|
appearance21.Image = global::AyaNova.Resource1.Delete32;
|
|
buttonTool18.SharedPropsInternal.AppearancesLarge.Appearance = appearance21;
|
|
appearance22.Image = global::AyaNova.Resource1.Delete16;
|
|
buttonTool18.SharedPropsInternal.AppearancesSmall.Appearance = appearance22;
|
|
buttonTool18.SharedPropsInternal.Caption = "LT:UI.Command.Delete";
|
|
appearance23.Image = global::AyaNova.Resource1.Wiki32;
|
|
buttonTool20.SharedPropsInternal.AppearancesLarge.Appearance = appearance23;
|
|
appearance24.Image = global::AyaNova.Resource1.Wiki16;
|
|
buttonTool20.SharedPropsInternal.AppearancesSmall.Appearance = appearance24;
|
|
buttonTool20.SharedPropsInternal.Caption = "LT:O.WikiPage";
|
|
this.tbManager.Tools.AddRange(new Infragistics.Win.UltraWinToolbars.ToolBase[] {
|
|
buttonTool8,
|
|
buttonTool9,
|
|
buttonTool10,
|
|
buttonTool11,
|
|
buttonTool12,
|
|
buttonTool13,
|
|
buttonTool14,
|
|
listTool1,
|
|
popupMenuTool2,
|
|
buttonTool16,
|
|
buttonTool18,
|
|
buttonTool20});
|
|
this.tbManager.UseLargeImagesOnToolbar = true;
|
|
this.tbManager.ToolClick += new Infragistics.Win.UltraWinToolbars.ToolClickEventHandler(this.tbManager_ToolClick);
|
|
//
|
|
// panelLeft
|
|
//
|
|
this.panelLeft.Controls.Add(this.btnPartAssemblyID);
|
|
this.panelLeft.Controls.Add(this.edUPC);
|
|
this.panelLeft.Controls.Add(this.lblUPC);
|
|
this.panelLeft.Controls.Add(this.edRetail);
|
|
this.panelLeft.Controls.Add(this.lblRetail);
|
|
this.panelLeft.Controls.Add(this.edCost);
|
|
this.panelLeft.Controls.Add(this.cbPartCategoryID);
|
|
this.panelLeft.Controls.Add(this.cbUnitOfMeasureID);
|
|
this.panelLeft.Controls.Add(this.edPartNumber);
|
|
this.panelLeft.Controls.Add(this.lblDescription);
|
|
this.panelLeft.Controls.Add(this.edName);
|
|
this.panelLeft.Controls.Add(this.lblName);
|
|
this.panelLeft.Controls.Add(this.lblCost);
|
|
this.panelLeft.Controls.Add(this.ckActive);
|
|
this.panelLeft.Controls.Add(this.cbPartAssemblyID);
|
|
this.panelLeft.Controls.Add(this.btnUnitOfMeasureID);
|
|
this.panelLeft.Controls.Add(this.btnPartCategoryID);
|
|
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, 382);
|
|
this.panelLeft.TabIndex = 0;
|
|
//
|
|
// btnPartAssemblyID
|
|
//
|
|
appearance4.TextHAlignAsString = "Left";
|
|
this.btnPartAssemblyID.Appearance = appearance4;
|
|
this.btnPartAssemblyID.Location = new System.Drawing.Point(10, 304);
|
|
this.btnPartAssemblyID.Name = "btnPartAssemblyID";
|
|
this.btnPartAssemblyID.Size = new System.Drawing.Size(158, 25);
|
|
this.btnPartAssemblyID.TabIndex = 11;
|
|
this.btnPartAssemblyID.Tag = "";
|
|
this.btnPartAssemblyID.Text = "LT:O.PartAssembly";
|
|
this.btnPartAssemblyID.UseHotTracking = Infragistics.Win.DefaultableBoolean.True;
|
|
this.btnPartAssemblyID.WrapText = false;
|
|
this.btnPartAssemblyID.Click += new System.EventHandler(this.btnPartAssemblyID_Click);
|
|
//
|
|
// edUPC
|
|
//
|
|
this.edUPC.Location = new System.Drawing.Point(192, 267);
|
|
this.edUPC.Name = "edUPC";
|
|
this.edUPC.Size = new System.Drawing.Size(106, 24);
|
|
this.edUPC.TabIndex = 9;
|
|
//
|
|
// lblUPC
|
|
//
|
|
this.lblUPC.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
|
| System.Windows.Forms.AnchorStyles.Right)));
|
|
this.lblUPC.Location = new System.Drawing.Point(10, 267);
|
|
this.lblUPC.Name = "lblUPC";
|
|
this.lblUPC.Size = new System.Drawing.Size(96, 19);
|
|
this.lblUPC.TabIndex = 138;
|
|
this.lblUPC.Tag = "";
|
|
this.lblUPC.Text = "LT:Part.Label.UPC";
|
|
this.lblUPC.WrapText = false;
|
|
//
|
|
// edRetail
|
|
//
|
|
this.edRetail.Location = new System.Drawing.Point(192, 185);
|
|
this.edRetail.MaskInput = "";
|
|
this.edRetail.Name = "edRetail";
|
|
this.edRetail.Size = new System.Drawing.Size(102, 24);
|
|
this.edRetail.TabIndex = 6;
|
|
//
|
|
// lblRetail
|
|
//
|
|
this.lblRetail.Location = new System.Drawing.Point(10, 185);
|
|
this.lblRetail.Name = "lblRetail";
|
|
this.lblRetail.Size = new System.Drawing.Size(96, 18);
|
|
this.lblRetail.TabIndex = 136;
|
|
this.lblRetail.Tag = "";
|
|
this.lblRetail.Text = "LT:Part.Label.Retail";
|
|
this.lblRetail.WrapText = false;
|
|
//
|
|
// edCost
|
|
//
|
|
this.edCost.Location = new System.Drawing.Point(192, 148);
|
|
this.edCost.MaskInput = "";
|
|
this.edCost.Name = "edCost";
|
|
this.edCost.Size = new System.Drawing.Size(102, 24);
|
|
this.edCost.TabIndex = 5;
|
|
//
|
|
// cbPartCategoryID
|
|
//
|
|
this.cbPartCategoryID.Location = new System.Drawing.Point(192, 222);
|
|
this.cbPartCategoryID.Name = "cbPartCategoryID";
|
|
this.cbPartCategoryID.Size = new System.Drawing.Size(102, 24);
|
|
this.cbPartCategoryID.TabIndex = 7;
|
|
this.cbPartCategoryID.NeedMoreData += new GZTW.WinForm.Controls.NeedMoreDataHandler(this.cbPartCategoryID_NeedMoreData);
|
|
//
|
|
// cbUnitOfMeasureID
|
|
//
|
|
this.cbUnitOfMeasureID.Location = new System.Drawing.Point(192, 111);
|
|
this.cbUnitOfMeasureID.Name = "cbUnitOfMeasureID";
|
|
this.cbUnitOfMeasureID.Size = new System.Drawing.Size(102, 24);
|
|
this.cbUnitOfMeasureID.TabIndex = 3;
|
|
this.cbUnitOfMeasureID.NeedMoreData += new GZTW.WinForm.Controls.NeedMoreDataHandler(this.cbUnitOfMeasureID_NeedMoreData);
|
|
//
|
|
// edPartNumber
|
|
//
|
|
this.edPartNumber.Location = new System.Drawing.Point(192, 74);
|
|
this.edPartNumber.Name = "edPartNumber";
|
|
this.edPartNumber.Size = new System.Drawing.Size(102, 24);
|
|
this.edPartNumber.TabIndex = 1;
|
|
this.edPartNumber.AfterExitEditMode += new System.EventHandler(this.edPartNumber_AfterExitEditMode);
|
|
//
|
|
// lblDescription
|
|
//
|
|
this.lblDescription.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
|
| System.Windows.Forms.AnchorStyles.Right)));
|
|
this.lblDescription.Location = new System.Drawing.Point(10, 74);
|
|
this.lblDescription.Name = "lblDescription";
|
|
this.lblDescription.Size = new System.Drawing.Size(105, 18);
|
|
this.lblDescription.TabIndex = 94;
|
|
this.lblDescription.Tag = "";
|
|
this.lblDescription.Text = "LT:Part.Label.PartNumber";
|
|
this.lblDescription.WrapText = false;
|
|
//
|
|
// edName
|
|
//
|
|
this.edName.Location = new System.Drawing.Point(192, 37);
|
|
this.edName.Name = "edName";
|
|
this.edName.Size = new System.Drawing.Size(102, 24);
|
|
this.edName.TabIndex = 0;
|
|
//
|
|
// lblName
|
|
//
|
|
this.lblName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
|
| System.Windows.Forms.AnchorStyles.Right)));
|
|
this.lblName.Location = new System.Drawing.Point(10, 37);
|
|
this.lblName.Name = "lblName";
|
|
this.lblName.Size = new System.Drawing.Size(96, 18);
|
|
this.lblName.TabIndex = 92;
|
|
this.lblName.Tag = "";
|
|
this.lblName.Text = "LT:Part.Label.Name";
|
|
this.lblName.WrapText = false;
|
|
//
|
|
// lblCost
|
|
//
|
|
this.lblCost.Location = new System.Drawing.Point(10, 148);
|
|
this.lblCost.Name = "lblCost";
|
|
this.lblCost.Size = new System.Drawing.Size(96, 18);
|
|
this.lblCost.TabIndex = 131;
|
|
this.lblCost.Tag = "";
|
|
this.lblCost.Text = "LT:Common.Label.Cost";
|
|
this.lblCost.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(259, 19);
|
|
this.ckActive.TabIndex = 2;
|
|
this.ckActive.Tag = "";
|
|
this.ckActive.Text = "LT:Common.Label.Active";
|
|
//
|
|
// cbPartAssemblyID
|
|
//
|
|
this.cbPartAssemblyID.Location = new System.Drawing.Point(192, 304);
|
|
this.cbPartAssemblyID.Name = "cbPartAssemblyID";
|
|
this.cbPartAssemblyID.Size = new System.Drawing.Size(106, 24);
|
|
this.cbPartAssemblyID.TabIndex = 10;
|
|
this.cbPartAssemblyID.NeedMoreData += new GZTW.WinForm.Controls.NeedMoreDataHandler(this.cbPartAssemblyID_NeedMoreData);
|
|
//
|
|
// btnUnitOfMeasureID
|
|
//
|
|
appearance5.TextHAlignAsString = "Left";
|
|
this.btnUnitOfMeasureID.Appearance = appearance5;
|
|
this.btnUnitOfMeasureID.Location = new System.Drawing.Point(10, 111);
|
|
this.btnUnitOfMeasureID.Name = "btnUnitOfMeasureID";
|
|
this.btnUnitOfMeasureID.Size = new System.Drawing.Size(158, 24);
|
|
this.btnUnitOfMeasureID.TabIndex = 4;
|
|
this.btnUnitOfMeasureID.Tag = "";
|
|
this.btnUnitOfMeasureID.Text = "LT:O.UnitOfMeasure";
|
|
this.btnUnitOfMeasureID.UseHotTracking = Infragistics.Win.DefaultableBoolean.True;
|
|
this.btnUnitOfMeasureID.WrapText = false;
|
|
this.btnUnitOfMeasureID.Click += new System.EventHandler(this.btnUnitOfMeasureID_Click);
|
|
//
|
|
// btnPartCategoryID
|
|
//
|
|
appearance6.TextHAlignAsString = "Left";
|
|
this.btnPartCategoryID.Appearance = appearance6;
|
|
this.btnPartCategoryID.Location = new System.Drawing.Point(10, 222);
|
|
this.btnPartCategoryID.Name = "btnPartCategoryID";
|
|
this.btnPartCategoryID.Size = new System.Drawing.Size(158, 24);
|
|
this.btnPartCategoryID.TabIndex = 8;
|
|
this.btnPartCategoryID.Tag = "";
|
|
this.btnPartCategoryID.Text = "LT:O.PartCategory";
|
|
this.btnPartCategoryID.UseHotTracking = Infragistics.Win.DefaultableBoolean.True;
|
|
this.btnPartCategoryID.WrapText = false;
|
|
this.btnPartCategoryID.Click += new System.EventHandler(this.btnPartCategoryID_Click);
|
|
//
|
|
// ErrorProvider
|
|
//
|
|
this.ErrorProvider.ContainerControl = this;
|
|
//
|
|
// panelRight
|
|
//
|
|
this.panelRight.Controls.Add(this.btnManufacturerID);
|
|
this.panelRight.Controls.Add(this.btnAlternativeWholesalerID);
|
|
this.panelRight.Controls.Add(this.btnWholesalerID);
|
|
this.panelRight.Controls.Add(this.cbManufacturerID);
|
|
this.panelRight.Controls.Add(this.edManufacturerNumber);
|
|
this.panelRight.Controls.Add(this.lblManufacturerNumber);
|
|
this.panelRight.Controls.Add(this.cbAlternativeWholesalerID);
|
|
this.panelRight.Controls.Add(this.edAlternativeWholesalerNumber);
|
|
this.panelRight.Controls.Add(this.lblAlternativeWholesalerNumber);
|
|
this.panelRight.Controls.Add(this.cbWholesalerID);
|
|
this.panelRight.Controls.Add(this.edWholesalerNumber);
|
|
this.panelRight.Controls.Add(this.lblWholesalerNumber);
|
|
this.panelRight.Controls.Add(this.lblNotes);
|
|
this.panelRight.Controls.Add(this.edNotes);
|
|
this.panelRight.Controls.Add(this.ckTrackSerialNumber);
|
|
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(300, 382);
|
|
this.panelRight.TabIndex = 101;
|
|
//
|
|
// btnManufacturerID
|
|
//
|
|
appearance1.TextHAlignAsString = "Left";
|
|
this.btnManufacturerID.Appearance = appearance1;
|
|
this.btnManufacturerID.Location = new System.Drawing.Point(10, 185);
|
|
this.btnManufacturerID.Name = "btnManufacturerID";
|
|
this.btnManufacturerID.Size = new System.Drawing.Size(168, 24);
|
|
this.btnManufacturerID.TabIndex = 8;
|
|
this.btnManufacturerID.Tag = "";
|
|
this.btnManufacturerID.Text = "LT:Part.Label.ManufacturerID";
|
|
this.btnManufacturerID.UseHotTracking = Infragistics.Win.DefaultableBoolean.True;
|
|
this.btnManufacturerID.WrapText = false;
|
|
this.btnManufacturerID.Click += new System.EventHandler(this.btnManufacturerID_Click);
|
|
//
|
|
// btnAlternativeWholesalerID
|
|
//
|
|
appearance2.TextHAlignAsString = "Left";
|
|
this.btnAlternativeWholesalerID.Appearance = appearance2;
|
|
this.btnAlternativeWholesalerID.Location = new System.Drawing.Point(10, 111);
|
|
this.btnAlternativeWholesalerID.Name = "btnAlternativeWholesalerID";
|
|
this.btnAlternativeWholesalerID.Size = new System.Drawing.Size(168, 24);
|
|
this.btnAlternativeWholesalerID.TabIndex = 5;
|
|
this.btnAlternativeWholesalerID.Tag = "";
|
|
this.btnAlternativeWholesalerID.Text = "LT:Part.Label.AlternativeWholesalerID";
|
|
this.btnAlternativeWholesalerID.UseHotTracking = Infragistics.Win.DefaultableBoolean.True;
|
|
this.btnAlternativeWholesalerID.WrapText = false;
|
|
this.btnAlternativeWholesalerID.Click += new System.EventHandler(this.btnAlternativeWholesalerID_Click);
|
|
//
|
|
// btnWholesalerID
|
|
//
|
|
appearance3.TextHAlignAsString = "Left";
|
|
this.btnWholesalerID.Appearance = appearance3;
|
|
this.btnWholesalerID.Location = new System.Drawing.Point(10, 37);
|
|
this.btnWholesalerID.Name = "btnWholesalerID";
|
|
this.btnWholesalerID.Size = new System.Drawing.Size(168, 24);
|
|
this.btnWholesalerID.TabIndex = 2;
|
|
this.btnWholesalerID.Tag = "";
|
|
this.btnWholesalerID.Text = "LT:Part.Label.WholesalerID";
|
|
this.btnWholesalerID.UseHotTracking = Infragistics.Win.DefaultableBoolean.True;
|
|
this.btnWholesalerID.WrapText = false;
|
|
this.btnWholesalerID.Click += new System.EventHandler(this.btnWholesalerID_Click);
|
|
//
|
|
// cbManufacturerID
|
|
//
|
|
this.cbManufacturerID.Location = new System.Drawing.Point(192, 185);
|
|
this.cbManufacturerID.Name = "cbManufacturerID";
|
|
this.cbManufacturerID.Size = new System.Drawing.Size(86, 24);
|
|
this.cbManufacturerID.TabIndex = 7;
|
|
this.cbManufacturerID.NeedMoreData += new GZTW.WinForm.Controls.NeedMoreDataHandler(this.cbManufacturerID_NeedMoreData);
|
|
//
|
|
// edManufacturerNumber
|
|
//
|
|
this.edManufacturerNumber.Location = new System.Drawing.Point(192, 222);
|
|
this.edManufacturerNumber.Name = "edManufacturerNumber";
|
|
this.edManufacturerNumber.Size = new System.Drawing.Size(86, 24);
|
|
this.edManufacturerNumber.TabIndex = 9;
|
|
//
|
|
// lblManufacturerNumber
|
|
//
|
|
this.lblManufacturerNumber.Location = new System.Drawing.Point(10, 222);
|
|
this.lblManufacturerNumber.Name = "lblManufacturerNumber";
|
|
this.lblManufacturerNumber.Size = new System.Drawing.Size(105, 18);
|
|
this.lblManufacturerNumber.TabIndex = 137;
|
|
this.lblManufacturerNumber.Tag = "";
|
|
this.lblManufacturerNumber.Text = "LT:Part.Label.ManufacturerNumber";
|
|
this.lblManufacturerNumber.WrapText = false;
|
|
//
|
|
// cbAlternativeWholesalerID
|
|
//
|
|
this.cbAlternativeWholesalerID.Location = new System.Drawing.Point(192, 111);
|
|
this.cbAlternativeWholesalerID.Name = "cbAlternativeWholesalerID";
|
|
this.cbAlternativeWholesalerID.Size = new System.Drawing.Size(86, 24);
|
|
this.cbAlternativeWholesalerID.TabIndex = 4;
|
|
this.cbAlternativeWholesalerID.NeedMoreData += new GZTW.WinForm.Controls.NeedMoreDataHandler(this.cbAlternativeWholesalerID_NeedMoreData);
|
|
//
|
|
// edAlternativeWholesalerNumber
|
|
//
|
|
this.edAlternativeWholesalerNumber.Location = new System.Drawing.Point(192, 148);
|
|
this.edAlternativeWholesalerNumber.Name = "edAlternativeWholesalerNumber";
|
|
this.edAlternativeWholesalerNumber.Size = new System.Drawing.Size(86, 24);
|
|
this.edAlternativeWholesalerNumber.TabIndex = 6;
|
|
//
|
|
// lblAlternativeWholesalerNumber
|
|
//
|
|
this.lblAlternativeWholesalerNumber.Location = new System.Drawing.Point(10, 148);
|
|
this.lblAlternativeWholesalerNumber.Name = "lblAlternativeWholesalerNumber";
|
|
this.lblAlternativeWholesalerNumber.Size = new System.Drawing.Size(105, 18);
|
|
this.lblAlternativeWholesalerNumber.TabIndex = 133;
|
|
this.lblAlternativeWholesalerNumber.Tag = "";
|
|
this.lblAlternativeWholesalerNumber.Text = "LT:Part.Label.AlternativeWholesalerNumber";
|
|
this.lblAlternativeWholesalerNumber.WrapText = false;
|
|
//
|
|
// cbWholesalerID
|
|
//
|
|
this.cbWholesalerID.Location = new System.Drawing.Point(192, 37);
|
|
this.cbWholesalerID.Name = "cbWholesalerID";
|
|
this.cbWholesalerID.Size = new System.Drawing.Size(86, 24);
|
|
this.cbWholesalerID.TabIndex = 1;
|
|
this.cbWholesalerID.NeedMoreData += new GZTW.WinForm.Controls.NeedMoreDataHandler(this.cbWholesalerID_NeedMoreData);
|
|
//
|
|
// edWholesalerNumber
|
|
//
|
|
this.edWholesalerNumber.Location = new System.Drawing.Point(192, 74);
|
|
this.edWholesalerNumber.Name = "edWholesalerNumber";
|
|
this.edWholesalerNumber.Size = new System.Drawing.Size(86, 24);
|
|
this.edWholesalerNumber.TabIndex = 3;
|
|
//
|
|
// lblWholesalerNumber
|
|
//
|
|
this.lblWholesalerNumber.Location = new System.Drawing.Point(10, 74);
|
|
this.lblWholesalerNumber.Name = "lblWholesalerNumber";
|
|
this.lblWholesalerNumber.Size = new System.Drawing.Size(105, 18);
|
|
this.lblWholesalerNumber.TabIndex = 129;
|
|
this.lblWholesalerNumber.Tag = "";
|
|
this.lblWholesalerNumber.Text = "LT:Part.Label.WholesalerNumber";
|
|
this.lblWholesalerNumber.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, 258);
|
|
this.lblNotes.Name = "lblNotes";
|
|
this.lblNotes.Size = new System.Drawing.Size(259, 19);
|
|
this.lblNotes.TabIndex = 127;
|
|
this.lblNotes.Tag = "";
|
|
this.lblNotes.Text = "LT:Part.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, 277);
|
|
this.edNotes.Multiline = true;
|
|
this.edNotes.Name = "edNotes";
|
|
this.edNotes.Size = new System.Drawing.Size(268, 82);
|
|
this.edNotes.TabIndex = 10;
|
|
//
|
|
// ckTrackSerialNumber
|
|
//
|
|
this.ckTrackSerialNumber.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
|
| System.Windows.Forms.AnchorStyles.Right)));
|
|
this.ckTrackSerialNumber.Location = new System.Drawing.Point(10, 9);
|
|
this.ckTrackSerialNumber.Name = "ckTrackSerialNumber";
|
|
this.ckTrackSerialNumber.Size = new System.Drawing.Size(268, 19);
|
|
this.ckTrackSerialNumber.TabIndex = 0;
|
|
this.ckTrackSerialNumber.Tag = "";
|
|
this.ckTrackSerialNumber.Text = "LT:Part.Label.TrackSerialNumber";
|
|
//
|
|
// panelCustom
|
|
//
|
|
this.panelCustom.Controls.Add(this.gridCustom);
|
|
this.panelCustom.Dock = System.Windows.Forms.DockStyle.Right;
|
|
this.panelCustom.Location = new System.Drawing.Point(610, 43);
|
|
this.panelCustom.Name = "panelCustom";
|
|
this.panelCustom.Size = new System.Drawing.Size(269, 382);
|
|
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, 382);
|
|
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);
|
|
//
|
|
// _PartInfoForm_Toolbars_Dock_Area_Left
|
|
//
|
|
this._PartInfoForm_Toolbars_Dock_Area_Left.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
|
|
this._PartInfoForm_Toolbars_Dock_Area_Left.BackColor = System.Drawing.SystemColors.Control;
|
|
this._PartInfoForm_Toolbars_Dock_Area_Left.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Left;
|
|
this._PartInfoForm_Toolbars_Dock_Area_Left.ForeColor = System.Drawing.SystemColors.ControlText;
|
|
this._PartInfoForm_Toolbars_Dock_Area_Left.Location = new System.Drawing.Point(0, 43);
|
|
this._PartInfoForm_Toolbars_Dock_Area_Left.Name = "_PartInfoForm_Toolbars_Dock_Area_Left";
|
|
this._PartInfoForm_Toolbars_Dock_Area_Left.Size = new System.Drawing.Size(0, 382);
|
|
this._PartInfoForm_Toolbars_Dock_Area_Left.ToolbarsManager = this.tbManager;
|
|
//
|
|
// _PartInfoForm_Toolbars_Dock_Area_Right
|
|
//
|
|
this._PartInfoForm_Toolbars_Dock_Area_Right.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
|
|
this._PartInfoForm_Toolbars_Dock_Area_Right.BackColor = System.Drawing.SystemColors.Control;
|
|
this._PartInfoForm_Toolbars_Dock_Area_Right.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Right;
|
|
this._PartInfoForm_Toolbars_Dock_Area_Right.ForeColor = System.Drawing.SystemColors.ControlText;
|
|
this._PartInfoForm_Toolbars_Dock_Area_Right.Location = new System.Drawing.Point(879, 43);
|
|
this._PartInfoForm_Toolbars_Dock_Area_Right.Name = "_PartInfoForm_Toolbars_Dock_Area_Right";
|
|
this._PartInfoForm_Toolbars_Dock_Area_Right.Size = new System.Drawing.Size(0, 382);
|
|
this._PartInfoForm_Toolbars_Dock_Area_Right.ToolbarsManager = this.tbManager;
|
|
//
|
|
// _PartInfoForm_Toolbars_Dock_Area_Top
|
|
//
|
|
this._PartInfoForm_Toolbars_Dock_Area_Top.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
|
|
this._PartInfoForm_Toolbars_Dock_Area_Top.BackColor = System.Drawing.SystemColors.Control;
|
|
this._PartInfoForm_Toolbars_Dock_Area_Top.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Top;
|
|
this._PartInfoForm_Toolbars_Dock_Area_Top.ForeColor = System.Drawing.SystemColors.ControlText;
|
|
this._PartInfoForm_Toolbars_Dock_Area_Top.Location = new System.Drawing.Point(0, 0);
|
|
this._PartInfoForm_Toolbars_Dock_Area_Top.Name = "_PartInfoForm_Toolbars_Dock_Area_Top";
|
|
this._PartInfoForm_Toolbars_Dock_Area_Top.Size = new System.Drawing.Size(879, 43);
|
|
this._PartInfoForm_Toolbars_Dock_Area_Top.ToolbarsManager = this.tbManager;
|
|
//
|
|
// _PartInfoForm_Toolbars_Dock_Area_Bottom
|
|
//
|
|
this._PartInfoForm_Toolbars_Dock_Area_Bottom.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
|
|
this._PartInfoForm_Toolbars_Dock_Area_Bottom.BackColor = System.Drawing.SystemColors.Control;
|
|
this._PartInfoForm_Toolbars_Dock_Area_Bottom.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Bottom;
|
|
this._PartInfoForm_Toolbars_Dock_Area_Bottom.ForeColor = System.Drawing.SystemColors.ControlText;
|
|
this._PartInfoForm_Toolbars_Dock_Area_Bottom.Location = new System.Drawing.Point(0, 425);
|
|
this._PartInfoForm_Toolbars_Dock_Area_Bottom.Name = "_PartInfoForm_Toolbars_Dock_Area_Bottom";
|
|
this._PartInfoForm_Toolbars_Dock_Area_Bottom.Size = new System.Drawing.Size(879, 0);
|
|
this._PartInfoForm_Toolbars_Dock_Area_Bottom.ToolbarsManager = this.tbManager;
|
|
//
|
|
// PartInfoForm
|
|
//
|
|
this.AllowDrop = true;
|
|
this.AutoScaleBaseSize = new System.Drawing.Size(6, 15);
|
|
this.ClientSize = new System.Drawing.Size(879, 425);
|
|
this.Controls.Add(this.panelCustom);
|
|
this.Controls.Add(this.panelRight);
|
|
this.Controls.Add(this.panelLeft);
|
|
this.Controls.Add(this.ckIsDirty);
|
|
this.Controls.Add(this._PartInfoForm_Toolbars_Dock_Area_Left);
|
|
this.Controls.Add(this._PartInfoForm_Toolbars_Dock_Area_Right);
|
|
this.Controls.Add(this._PartInfoForm_Toolbars_Dock_Area_Bottom);
|
|
this.Controls.Add(this._PartInfoForm_Toolbars_Dock_Area_Top);
|
|
this.helpProvider1.SetHelpKeyword(this, "");
|
|
this.helpProvider1.SetHelpNavigator(this, System.Windows.Forms.HelpNavigator.Topic);
|
|
this.MinimumSize = new System.Drawing.Size(614, 462);
|
|
this.Name = "PartInfoForm";
|
|
this.helpProvider1.SetShowHelp(this, true);
|
|
this.ShowInTaskbar = false;
|
|
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Show;
|
|
this.Closing += new System.ComponentModel.CancelEventHandler(this.PartInfoForm_Closing);
|
|
this.Load += new System.EventHandler(this.PartInfoForm_Load);
|
|
this.SizeChanged += new System.EventHandler(this.PartInfoForm_SizeChanged);
|
|
this.DragDrop += new System.Windows.Forms.DragEventHandler(this.Form_DragDrop);
|
|
this.DragEnter += new System.Windows.Forms.DragEventHandler(this.Form_DragEnter);
|
|
((System.ComponentModel.ISupportInitialize)(this.tbManager)).EndInit();
|
|
this.panelLeft.ResumeLayout(false);
|
|
this.panelLeft.PerformLayout();
|
|
((System.ComponentModel.ISupportInitialize)(this.edUPC)).EndInit();
|
|
((System.ComponentModel.ISupportInitialize)(this.edRetail)).EndInit();
|
|
((System.ComponentModel.ISupportInitialize)(this.edCost)).EndInit();
|
|
((System.ComponentModel.ISupportInitialize)(this.cbPartCategoryID)).EndInit();
|
|
((System.ComponentModel.ISupportInitialize)(this.cbUnitOfMeasureID)).EndInit();
|
|
((System.ComponentModel.ISupportInitialize)(this.edPartNumber)).EndInit();
|
|
((System.ComponentModel.ISupportInitialize)(this.edName)).EndInit();
|
|
((System.ComponentModel.ISupportInitialize)(this.ckActive)).EndInit();
|
|
((System.ComponentModel.ISupportInitialize)(this.cbPartAssemblyID)).EndInit();
|
|
((System.ComponentModel.ISupportInitialize)(this.ErrorProvider)).EndInit();
|
|
this.panelRight.ResumeLayout(false);
|
|
this.panelRight.PerformLayout();
|
|
((System.ComponentModel.ISupportInitialize)(this.cbManufacturerID)).EndInit();
|
|
((System.ComponentModel.ISupportInitialize)(this.edManufacturerNumber)).EndInit();
|
|
((System.ComponentModel.ISupportInitialize)(this.cbAlternativeWholesalerID)).EndInit();
|
|
((System.ComponentModel.ISupportInitialize)(this.edAlternativeWholesalerNumber)).EndInit();
|
|
((System.ComponentModel.ISupportInitialize)(this.cbWholesalerID)).EndInit();
|
|
((System.ComponentModel.ISupportInitialize)(this.edWholesalerNumber)).EndInit();
|
|
((System.ComponentModel.ISupportInitialize)(this.edNotes)).EndInit();
|
|
((System.ComponentModel.ISupportInitialize)(this.ckTrackSerialNumber)).EndInit();
|
|
this.panelCustom.ResumeLayout(false);
|
|
((System.ComponentModel.ISupportInitialize)(this.gridCustom)).EndInit();
|
|
this.ResumeLayout(false);
|
|
|
|
}
|
|
#endregion
|
|
|
|
|
|
// __ _ _ ___ ____ __ __ __ __ __ ___ ___
|
|
// / _)( )( )/ __)(_ _)/ \( \/ ) / _)/ \( \( _)
|
|
// ( (_ )()( \__ \ )( ( () )) ( ( (_( () )) ) )) _)
|
|
// \__) \__/ (___/ (__) \__/(_/\/\_) \__)\__/(___/(___)
|
|
//
|
|
|
|
#region Form Load / Close
|
|
//variable to hold user form settings
|
|
//UIUserFormSetting mFormSetting;
|
|
|
|
|
|
/// <summary>
|
|
/// Prepare the form
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
private void PartInfoForm_Load(object sender, System.EventArgs e)
|
|
{
|
|
//case 1039 //log.Debug("PartInfoForm_Load");
|
|
//
|
|
// helpProvider1
|
|
//
|
|
this.helpProvider1.HelpNamespace = Util.BaseHelpUrl + "parts.htm";
|
|
|
|
Cursor.Current = Cursors.WaitCursor;
|
|
this.Visible=false;
|
|
this.Icon = Resource1.Part16icon;
|
|
|
|
//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.Part")< (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.Part")));
|
|
|
|
this.Close();
|
|
return;
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
InitializeComboBoxes();
|
|
DataBind();
|
|
Util.LoadFormCustomization("PartInfo", this, tbManager, false);
|
|
Util.PluginInsertMenu(tbManager, new Util.PluginMenuOptionData(true, RootObjectTypes.Part, mPart, null));//case 941
|
|
Util.LocalizeHelperInsertMenu(tbManager, this); //case 1810
|
|
Util.Localize(this);
|
|
|
|
//restrict UI based on security settings
|
|
RestrictUI();
|
|
|
|
|
|
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"], PartList.ReportKey, PartList.DetailedReportKey);
|
|
}
|
|
|
|
Cursor.Current = Cursors.Default;
|
|
|
|
//Case 152
|
|
(new TabOrderManager(this)).SetTabOrder(TabOrderManager.TabScheme.AcrossFirst);
|
|
|
|
|
|
Application.Idle+= new EventHandler(Application_Idle);
|
|
this.Visible=true;
|
|
|
|
|
|
|
|
}
|
|
|
|
/// <summary>
|
|
/// Used to track whether the close was done by the program
|
|
/// or done by the user clicking on the upper left corner X control
|
|
/// </summary>
|
|
bool bClosingHandled=false;
|
|
/// <summary>
|
|
/// Save form layout and grid layout for next time
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
private void PartInfoForm_Closing(object sender, System.ComponentModel.CancelEventArgs e)
|
|
{
|
|
//case 1039 //log.Debug("PartInfoForm_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("PartInfo", this, tbManager, false);
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Form Sizing
|
|
/// <summary>
|
|
/// Adjust the layout proportionately as it's sized by user
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
private void PartInfoForm_SizeChanged(object sender, System.EventArgs e)
|
|
{
|
|
//case 1039 //log.Debug("PartInfoForm_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? Not enough room on left so unless sent to back overwrites rigth control
|
|
int nGap = 16;
|
|
|
|
//Size and align controls in Left panel
|
|
lblName.Width = nLeftWidth - nGap;
|
|
edName.Left=nLeftWidth;
|
|
edName.Width=nRightWidth;
|
|
|
|
lblDescription.Width = nLeftWidth - nGap;
|
|
edPartNumber.Left=nLeftWidth;
|
|
edPartNumber.Width=nRightWidth;
|
|
|
|
btnUnitOfMeasureID.Width = nLeftWidth - nGap;
|
|
cbUnitOfMeasureID.Left=nLeftWidth;
|
|
cbUnitOfMeasureID.Width=nRightWidth;
|
|
|
|
lblCost.Width = nLeftWidth - nGap;
|
|
edCost.Left=nLeftWidth;
|
|
edCost.Width=nRightWidth;
|
|
|
|
lblRetail.Width = nLeftWidth - nGap;
|
|
edRetail.Left=nLeftWidth;
|
|
edRetail.Width=nRightWidth;
|
|
|
|
btnPartCategoryID.Width = nLeftWidth - nGap;
|
|
cbPartCategoryID.Left=nLeftWidth;
|
|
cbPartCategoryID.Width=nRightWidth;
|
|
|
|
|
|
|
|
lblUPC.Width = nLeftWidth - nGap;
|
|
edUPC.Left=nLeftWidth;
|
|
edUPC.Width=nRightWidth;
|
|
|
|
btnPartAssemblyID.Width = nLeftWidth - nGap;
|
|
cbPartAssemblyID.Left=nLeftWidth;
|
|
cbPartAssemblyID.Width=nRightWidth;
|
|
|
|
|
|
//Size and align controls in right panel
|
|
nRightWidth=nRightWidth-8;
|
|
|
|
btnWholesalerID.Width = nLeftWidth - nGap;
|
|
cbWholesalerID.Left=nLeftWidth+8;
|
|
cbWholesalerID.Width=nRightWidth;
|
|
|
|
lblWholesalerNumber.Width = nLeftWidth - nGap;
|
|
edWholesalerNumber.Left=nLeftWidth+8;
|
|
edWholesalerNumber.Width=nRightWidth;
|
|
|
|
btnAlternativeWholesalerID.Width = nLeftWidth - nGap;
|
|
cbAlternativeWholesalerID.Left=nLeftWidth+8;
|
|
cbAlternativeWholesalerID.Width=nRightWidth;
|
|
|
|
lblAlternativeWholesalerNumber.Width = nLeftWidth - nGap;
|
|
edAlternativeWholesalerNumber.Left=nLeftWidth+8;
|
|
edAlternativeWholesalerNumber.Width=nRightWidth;
|
|
|
|
btnManufacturerID.Width = nLeftWidth - nGap;
|
|
cbManufacturerID.Left=nLeftWidth+8;
|
|
cbManufacturerID.Width=nRightWidth;
|
|
|
|
lblManufacturerNumber.Width = nLeftWidth - nGap;
|
|
edManufacturerNumber.Left=nLeftWidth+8;
|
|
edManufacturerNumber.Width=nRightWidth;
|
|
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Form UI commands
|
|
|
|
#region Toolbar menu items
|
|
|
|
/// <summary>
|
|
/// Respond to a click on a toolbar menu item
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
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=mPart.Docs;
|
|
d.RootObjectID=mPart.ID;
|
|
d.ExactObjectType = d.RootObjectType = RootObjectTypes.Part;
|
|
d.ShowDialog();
|
|
break;
|
|
|
|
case "LT:UI.Command.RecordHistory": // ButtonTool
|
|
RecordHistoryForm RH=new RecordHistoryForm(mPart.Creator,mPart.Modifier,mPart.Created,mPart.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 "LT:PartByWarehouseInventory.Label.List": // ButtonTool
|
|
{
|
|
PartByWarehouseInventories p = PartByWarehouseInventories.GetItems(mPart.ID);
|
|
PartByWarehouseInventoryForm f = new PartByWarehouseInventoryForm();
|
|
f.PartInventoriesToEdit = p;
|
|
f.PartNameToDisplay = this.Text;
|
|
f.ShowDialog();
|
|
}
|
|
break;
|
|
|
|
case "REPORTLIST":
|
|
{
|
|
//case 3736
|
|
RecordUpdate(RecordActionType.PromptToSave);
|
|
|
|
if (Util.ReportHandleToolClickIsSummary(e.Tool))
|
|
Util.ReportHandleToolClick(e.Tool, PartList.ReportKey,
|
|
PartList.GetListForSingleItem(mPart.ID));
|
|
//else
|
|
//{
|
|
// Util.ReportHandleToolClick(e.Tool, MemoListDetailed.ReportKey,
|
|
// MemoListDetailed.GetListForSingleItem(mMemo.ID));
|
|
//}
|
|
Util.ReportFillList(this.tbManager.Tools["REPORTLIST"], PartList.ReportKey,
|
|
PartList.DetailedReportKey);
|
|
break;
|
|
}
|
|
case "LT:O.WikiPage":
|
|
{
|
|
Util.OpenWikiPage(RootObjectTypes.Part, mPart.ID, false);
|
|
break;
|
|
}
|
|
case "LT:UI.Command.Duplicate": // ButtonTool
|
|
{
|
|
PartInfoForm f = new PartInfoForm();
|
|
f.PartToEdit = mPart.Duplicate();
|
|
this.Visible = false;
|
|
f.ShowDialog();
|
|
f.Dispose();
|
|
Close();
|
|
}
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
#endregion Toolbar menu items
|
|
|
|
#region hyperButtons
|
|
|
|
private void btnUnitOfMeasureID_Click(object sender, System.EventArgs e)
|
|
{
|
|
|
|
//case 1039 //log.Debug("btnUnitOfMeasureID_Click");
|
|
|
|
GenericListForm g = new GenericListForm();
|
|
UnitOfMeasures o = UnitOfMeasures.GetItems();
|
|
g.SelectedRecordID=cbUnitOfMeasureID.Value;
|
|
g.GridDataSource=o;
|
|
|
|
g.ShowDialog();
|
|
if(g.ChangesMade)
|
|
{
|
|
mPart.UnitOfMeasureID=Guid.Empty;
|
|
Util.FillGZComboBoxWithNameIDList("UnitOfMeasure",cbUnitOfMeasureID,false,Guid.Empty,false);
|
|
mPart.UnitOfMeasureID=(Guid)g.SelectedRecordID;
|
|
}
|
|
}
|
|
|
|
private void btnPartCategoryID_Click(object sender, System.EventArgs e)
|
|
{
|
|
|
|
//case 1039 //log.Debug("btnPartCategoryID_Click");
|
|
|
|
GenericListForm g = new GenericListForm();
|
|
PartCategories o = PartCategories.GetItems();
|
|
g.SelectedRecordID=cbPartCategoryID.Value;
|
|
g.GridDataSource=o;
|
|
|
|
g.ShowDialog();
|
|
if(g.ChangesMade)
|
|
{
|
|
mPart.PartCategoryID=Guid.Empty;
|
|
Util.FillGZComboBoxWithNameIDList("PartCategory",cbPartCategoryID,false,Guid.Empty,false);
|
|
mPart.PartCategoryID=(Guid)g.SelectedRecordID;
|
|
}
|
|
}
|
|
|
|
|
|
private void btnPartAssemblyID_Click(object sender, System.EventArgs e)
|
|
{
|
|
|
|
//case 1039 //log.Debug("btnPartAssemblyID_Click");
|
|
|
|
GenericListForm g = new GenericListForm();
|
|
PartAssemblies o = PartAssemblies.GetItems();
|
|
g.SelectedRecordID=cbPartAssemblyID.Value;
|
|
g.GridDataSource=o;
|
|
|
|
g.ShowDialog();
|
|
if(g.ChangesMade)
|
|
{
|
|
mPart.PartAssemblyID=Guid.Empty;
|
|
Util.FillGZComboBoxWithNameIDList("PartAssembly",cbPartAssemblyID,false,Guid.Empty,false);
|
|
mPart.PartAssemblyID=(Guid)g.SelectedRecordID;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
private void btnWholesalerID_Click(object sender, System.EventArgs e)
|
|
{
|
|
//case 1039 //log.Debug("btnWholesalerID_Click");
|
|
|
|
VendorInfoForm cf=new VendorInfoForm(VendorTypes.Wholesaler);
|
|
if(cbWholesalerID.Value!=null && (Guid)cbWholesalerID.Value!=Guid.Empty)
|
|
{
|
|
cf.VendorToEdit=Vendor.GetItem((Guid)cbWholesalerID.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)
|
|
{
|
|
mPart.WholesalerID=Guid.Empty;
|
|
Util.FillGZComboBoxWithNameIDList("Vendor:Wholesaler", cbWholesalerID, false, Guid.Empty, false);
|
|
mPart.WholesalerID=cf.VendorToEdit.ID;
|
|
}
|
|
}
|
|
|
|
private void btnAlternativeWholesalerID_Click(object sender, System.EventArgs e)
|
|
{
|
|
|
|
//case 1039 //log.Debug("btnAlternativeWholesalerID_Click");
|
|
|
|
VendorInfoForm cf=new VendorInfoForm(VendorTypes.Wholesaler);
|
|
if(cbAlternativeWholesalerID.Value!=null && (Guid)cbAlternativeWholesalerID.Value!=Guid.Empty)
|
|
{
|
|
cf.VendorToEdit=Vendor.GetItem((Guid)cbAlternativeWholesalerID.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)
|
|
{
|
|
mPart.AlternativeWholesalerID=Guid.Empty;
|
|
Util.FillGZComboBoxWithNameIDList("Vendor:Wholesaler", cbAlternativeWholesalerID, false, Guid.Empty, false);
|
|
mPart.AlternativeWholesalerID = cf.VendorToEdit.ID;
|
|
}
|
|
}
|
|
|
|
private void btnManufacturerID_Click(object sender, System.EventArgs e)
|
|
{
|
|
|
|
//case 1039 //log.Debug("btnManufacturerID_Click");
|
|
|
|
VendorInfoForm cf=new VendorInfoForm(VendorTypes.Manufacturer);
|
|
if(cbManufacturerID.Value!=null && (Guid)cbManufacturerID.Value!=Guid.Empty)
|
|
{
|
|
cf.VendorToEdit=Vendor.GetItem((Guid)cbManufacturerID.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)
|
|
{
|
|
mPart.ManufacturerID=Guid.Empty;
|
|
Util.FillGZComboBoxWithNameIDList("Vendor:Manufacturer", cbManufacturerID, false, Guid.Empty, false);
|
|
mPart.ManufacturerID=cf.VendorToEdit.ID;
|
|
}
|
|
}
|
|
|
|
#endregion hyperButtons
|
|
|
|
#endregion
|
|
|
|
#region Form UI / Business object synchronization
|
|
|
|
private int mLastDocsCount=-1;
|
|
|
|
/// <summary>
|
|
/// Synchronize the state of the UI to the BO's
|
|
/// </summary>
|
|
private void SyncUI()
|
|
{
|
|
|
|
|
|
//display part name and number in title bar
|
|
this.Text=mPart.PartNumber + " - " + mPart.Name;
|
|
|
|
//Indicate if any docs in icon
|
|
//case 918
|
|
if (this.mLastDocsCount != mPart.Docs.Count)
|
|
{
|
|
this.mLastDocsCount = mPart.Docs.Count;
|
|
Util.AssignedDocsSetImage(tbManager, (mLastDocsCount > 0));
|
|
}
|
|
|
|
tbManager.Tools["LT:PartByWarehouseInventory.Label.List"].SharedProps.Enabled=!mPart.IsNew;
|
|
|
|
tbManager.Tools["LT:UI.Command.Duplicate"].SharedProps.Visible = mPart.CanDuplicate;
|
|
|
|
|
|
}
|
|
/// <summary>
|
|
/// 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)
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
private void Application_Idle(object sender, EventArgs e)
|
|
{
|
|
SyncUI();
|
|
|
|
}
|
|
|
|
/// <summary>
|
|
/// Adapt UI to accomodate users security access level
|
|
/// by default form is set with full rights in mind
|
|
/// so this code just needs to restrict them as required
|
|
/// </summary>
|
|
private void RestrictUI()
|
|
{
|
|
|
|
//case 1039 //if(log.IsDebugEnabled) //case 1039 //log.Debug("RestrictUI: " + ((SecurityLevelTypes)AyaBizUtils.Right("Object.Part")).ToString());
|
|
|
|
//first show them in case they were previously hidden
|
|
tbManager.Tools["LT:UI.Command.Save"].SharedProps.Visible=true;
|
|
tbManager.Tools["LT:UI.Command.SaveClose"].SharedProps.Visible=true;
|
|
tbManager.Tools["LT:UI.Command.SaveNew"].SharedProps.Visible=true;
|
|
|
|
//Ensure close tool is always visible in case user hid it or something
|
|
tbManager.Tools["LT:UI.Command.Close"].SharedProps.Visible=true;
|
|
tbManager.Tools["LT:O.WikiPage"].SharedProps.Visible = mPart.CanWiki;
|
|
|
|
//case 1172
|
|
tbManager.Tools["LT:AssignedDoc.Label.List"].SharedProps.Visible = !AyaBizUtils.Lite;
|
|
|
|
|
|
//Part - Read only
|
|
if(AyaBizUtils.Right("Object.Part")== (int)SecurityLevelTypes.ReadOnly)
|
|
{
|
|
//DISABLE TOOLBAR TOOLS
|
|
tbManager.Tools["LT:UI.Command.Save"].SharedProps.Visible=false;
|
|
tbManager.Tools["LT:UI.Command.SaveClose"].SharedProps.Visible=false;
|
|
tbManager.Tools["LT:UI.Command.SaveNew"].SharedProps.Visible=false;
|
|
|
|
//DISABLE EDITABLE CONTROLS
|
|
|
|
//Text editors
|
|
edName.ReadOnly=true;
|
|
edPartNumber.ReadOnly=true;
|
|
edNotes.ReadOnly=true;
|
|
edUPC.ReadOnly=true;
|
|
edWholesalerNumber.ReadOnly=true;
|
|
edAlternativeWholesalerNumber.ReadOnly=true;
|
|
edManufacturerNumber.ReadOnly=true;
|
|
edCost.ReadOnly=true;
|
|
edRetail.ReadOnly=true;
|
|
|
|
|
|
//Combo boxes
|
|
cbManufacturerID.ReadOnly=true;
|
|
cbAlternativeWholesalerID.ReadOnly=true;
|
|
cbWholesalerID.ReadOnly=true;
|
|
cbPartAssemblyID.ReadOnly=true;
|
|
|
|
cbPartCategoryID.ReadOnly=true;
|
|
cbUnitOfMeasureID.ReadOnly=true;
|
|
|
|
|
|
//Check boxes
|
|
ckActive.Enabled=false;
|
|
ckTrackSerialNumber.Enabled=false;
|
|
|
|
//Buttons
|
|
btnUnitOfMeasureID.Enabled=false;
|
|
btnUnitOfMeasureID.Appearance.ForeColorDisabled=System.Drawing.SystemColors.ControlText;
|
|
btnPartCategoryID.Enabled=false;
|
|
btnPartCategoryID.Appearance.ForeColorDisabled=System.Drawing.SystemColors.ControlText;
|
|
btnPartAssemblyID.Enabled=false;
|
|
btnPartAssemblyID.Appearance.ForeColorDisabled=System.Drawing.SystemColors.ControlText;
|
|
btnWholesalerID.Enabled=false;
|
|
btnWholesalerID.Appearance.ForeColorDisabled=System.Drawing.SystemColors.ControlText;
|
|
btnAlternativeWholesalerID.Enabled=false;
|
|
btnAlternativeWholesalerID.Appearance.ForeColorDisabled=System.Drawing.SystemColors.ControlText;
|
|
btnManufacturerID.Enabled=false;
|
|
btnManufacturerID.Appearance.ForeColorDisabled=System.Drawing.SystemColors.ControlText;
|
|
|
|
|
|
}
|
|
|
|
|
|
//inventory?
|
|
tbManager.Tools["LT:PartByWarehouseInventory.Label.List"].SharedProps.Visible=Util.GlobalSettings.UseInventory;
|
|
|
|
//case 1011
|
|
|
|
|
|
//case 1172 restrictions
|
|
if (AyaBizUtils.Lite)
|
|
{
|
|
ckTrackSerialNumber.Visible = false;
|
|
|
|
}
|
|
|
|
}
|
|
#endregion
|
|
|
|
#region Form DataBinding and BrokenRules handling
|
|
|
|
bool bShowCustomFields=false;
|
|
/// <summary>
|
|
/// Bind controls to business objects
|
|
/// </summary>
|
|
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
|
|
mPart.GetBrokenRulesCollection().ListChanged += new System.ComponentModel.ListChangedEventHandler(OnBrokenRulesChanged);
|
|
|
|
|
|
//=-=-=-=-=-=- Form Field bindings =-=-=-=-=-=-=-=-=-=-=-=
|
|
|
|
//Text editors
|
|
Util.BindField(edName,"Text",mPart,"Name");
|
|
Util.BindField(edPartNumber,"Text",mPart,"PartNumber");
|
|
Util.BindField(edNotes,"Text",mPart,"Notes");
|
|
Util.BindField(edUPC,"Text",mPart,"UPC");
|
|
Util.BindField(edWholesalerNumber,"Text",mPart,"WholesalerNumber");
|
|
Util.BindField(edAlternativeWholesalerNumber,"Text",mPart,"AlternativeWholesalerNumber");
|
|
Util.BindField(edManufacturerNumber,"Text",mPart,"ManufacturerNumber");
|
|
Util.BindField(edCost,"Value",mPart,"Cost");
|
|
Util.BindField(edRetail,"Value",mPart,"Retail");
|
|
|
|
|
|
//Combo boxes
|
|
Util.BindField(cbManufacturerID,"Value",mPart,"ManufacturerID");
|
|
Util.BindField(cbAlternativeWholesalerID,"Value",mPart,"AlternativeWholesalerID");
|
|
Util.BindField(cbWholesalerID,"Value",mPart,"WholesalerID");
|
|
Util.BindField(cbPartAssemblyID,"Value",mPart,"PartAssemblyID");
|
|
Util.BindField(cbPartCategoryID, "Value", mPart, "PartCategoryID");
|
|
Util.BindField(cbUnitOfMeasureID, "Value", mPart, "UnitOfMeasureID");
|
|
|
|
|
|
|
|
//Check boxes
|
|
Util.BindField(ckActive,"Checked",mPart,"Active");
|
|
Util.BindField(ckTrackSerialNumber,"Checked",mPart,"TrackSerialNumber");
|
|
|
|
|
|
|
|
|
|
|
|
//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
|
|
|
|
|
|
//Bind IsDirty property to hidden checkbox to
|
|
//ensure isdirtychanged event is available
|
|
//to data binding infrastructure
|
|
Util.BindField(ckIsDirty,"Checked",mPart,"IsDirty");
|
|
|
|
//Setup initial link to broken rules
|
|
OnBrokenRulesChanged(null,null);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Handle a change in broken rules
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
private void OnBrokenRulesChanged(object sender, System.ComponentModel.ListChangedEventArgs e)
|
|
{
|
|
Util.BrokenRuleFeedback(this,mPart,ErrorProvider);
|
|
|
|
}
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
#region Business object editing / adding / deletion related code
|
|
|
|
|
|
private Part mPart;
|
|
/// <summary>
|
|
/// Part record to display
|
|
/// set by caller
|
|
/// </summary>
|
|
public Part PartToEdit
|
|
{
|
|
get
|
|
{
|
|
return mPart;
|
|
}
|
|
set
|
|
{
|
|
mPart=value;
|
|
//mPart.BeginEdit();
|
|
|
|
}
|
|
}
|
|
|
|
|
|
//Used to signal to main form that there are changes
|
|
//which could affect it if true
|
|
private bool mbChangesMade=false;
|
|
public bool ChangesMade
|
|
{
|
|
get
|
|
{
|
|
return mbChangesMade;
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Update record and quit if requested
|
|
///
|
|
/// </summary>
|
|
/// <returns>True if handled, false if not handled</returns>
|
|
private bool RecordUpdate(RecordActionType SaveType)
|
|
{
|
|
//case 1039 //if(log.IsDebugEnabled) //case 1039 //log.Debug("SaveHandler(Action="+SaveType.ToString()+")");
|
|
|
|
//switch the focus to a non-editable control
|
|
//so that any changes in the current editable control
|
|
//will get updated before attempting to save
|
|
btnUnitOfMeasureID.Focus();
|
|
|
|
switch(SaveType)
|
|
{
|
|
case RecordActionType.DeleteAndExit:
|
|
if (Util.PromptForDelete() == DialogResult.Yes)
|
|
{
|
|
//Delete, then exit
|
|
try
|
|
{
|
|
Part.DeleteItem(mPart.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(mPart.IsSavable)
|
|
{
|
|
mPart.ApplyEdit();
|
|
mPart.Save();
|
|
bClosingHandled=true;
|
|
mbChangesMade=true;
|
|
this.Close();
|
|
return true;
|
|
}
|
|
if(mPart.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(mPart.IsSavable)
|
|
{
|
|
mPart.ApplyEdit();
|
|
mPart.Save();
|
|
AddNewPart();
|
|
mbChangesMade=true;
|
|
return true;
|
|
|
|
}
|
|
if(mPart.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
|
|
AddNewPart();
|
|
return true;
|
|
}
|
|
else return false;
|
|
|
|
}
|
|
|
|
//Current record isn't dirty so just add a new Part
|
|
AddNewPart();
|
|
return true;
|
|
|
|
case RecordActionType.SaveOnly:
|
|
if(mPart.IsSavable)
|
|
{
|
|
mPart.ApplyEdit();
|
|
mPart=(Part)mPart.Save();
|
|
DataBind();
|
|
mbChangesMade=true;
|
|
return true;
|
|
|
|
}
|
|
return true;
|
|
|
|
case RecordActionType.PromptToSave:
|
|
//Prompt to save and save if
|
|
//required
|
|
if(mPart.IsDirty)
|
|
{
|
|
DialogResult dr=Util.PromptForSave();
|
|
if(dr==DialogResult.Cancel)
|
|
{
|
|
//Cancel
|
|
return false;
|
|
}
|
|
if(dr==DialogResult.Yes)
|
|
{
|
|
//Save before exit
|
|
|
|
if(mPart.IsSavable)
|
|
{
|
|
mPart.ApplyEdit();
|
|
mPart.Save();
|
|
mbChangesMade=true;
|
|
return true;
|
|
}
|
|
if(mPart.IsDirty)//dirty and unsaveable due to broken rules
|
|
{
|
|
if(Util.PromptForBrokenRulesCancelSave()==DialogResult.Yes)
|
|
{
|
|
return true;
|
|
}
|
|
else
|
|
return false;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
}
|
|
|
|
/// <summary>
|
|
///
|
|
///Creates a new Part record and opens it for editing
|
|
/// </summary>
|
|
private void AddNewPart()
|
|
{
|
|
//case 1039 //log.Debug("AddNewPart");
|
|
try
|
|
{
|
|
mPart=Part.NewItem();
|
|
//mPart.BeginEdit();
|
|
DataBind();
|
|
}
|
|
catch(Exception ex)
|
|
{
|
|
//log.Error("AddNewPart",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("Vendor", cbManufacturerID, true, mPart.ManufacturerID, false);
|
|
Util.FillGZComboBoxWithNameIDList("Vendor", cbAlternativeWholesalerID, true, mPart.AlternativeWholesalerID, false);
|
|
Util.FillGZComboBoxWithNameIDList("Vendor", cbWholesalerID, true, mPart.WholesalerID, false);
|
|
Util.FillGZComboBoxWithNameIDList("PartAssembly", cbPartAssemblyID, true, mPart.PartAssemblyID, false);
|
|
Util.FillGZComboBoxWithNameIDList("PartCategory", cbPartCategoryID, true, mPart.PartCategoryID, false);
|
|
Util.FillGZComboBoxWithNameIDList("UnitOfMeasure", cbUnitOfMeasureID, true, mPart.UnitOfMeasureID, false);
|
|
|
|
|
|
|
|
}
|
|
|
|
private void cbUnitOfMeasureID_NeedMoreData()
|
|
{
|
|
Util.FillGZComboBoxWithNameIDList("UnitOfMeasure", cbUnitOfMeasureID, false, Guid.Empty, false);
|
|
}
|
|
|
|
private void cbPartCategoryID_NeedMoreData()
|
|
{
|
|
Util.FillGZComboBoxWithNameIDList("PartCategory", cbPartCategoryID, false, Guid.Empty, false);
|
|
}
|
|
|
|
|
|
|
|
private void cbPartAssemblyID_NeedMoreData()
|
|
{
|
|
Util.FillGZComboBoxWithNameIDList("PartAssembly", cbPartAssemblyID, false, Guid.Empty, false);
|
|
}
|
|
|
|
private void cbWholesalerID_NeedMoreData()
|
|
{
|
|
Util.FillGZComboBoxWithNameIDList("Vendor:Wholesaler", cbWholesalerID, false, Guid.Empty, false);
|
|
}
|
|
|
|
private void cbAlternativeWholesalerID_NeedMoreData()
|
|
{
|
|
Util.FillGZComboBoxWithNameIDList("Vendor:Wholesaler", cbAlternativeWholesalerID, false, Guid.Empty, false);
|
|
}
|
|
|
|
private void cbManufacturerID_NeedMoreData()
|
|
{
|
|
Util.FillGZComboBoxWithNameIDList("Vendor:Manufacturer", cbManufacturerID, false, Guid.Empty, false);
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
#region Custom fields
|
|
|
|
/// <summary>
|
|
/// put custom field data into custom grid and show it if applicable
|
|
/// </summary>
|
|
private void FillCustomFieldGrid()
|
|
{
|
|
//case 1039 //log.Debug("FillCustomFieldGrid");
|
|
|
|
bShowCustomFields=Util.PrepareCustomFieldsGrid("Part",gridCustom);
|
|
|
|
if(bShowCustomFields)
|
|
{
|
|
this.panelCustom.Visible=true;
|
|
|
|
Util.GridFromCustomFields(mPart,gridCustom);
|
|
|
|
}
|
|
else
|
|
{
|
|
this.panelCustom.Visible=false;
|
|
}
|
|
|
|
}
|
|
private void gridCustom_AfterCellUpdate(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e)
|
|
{
|
|
|
|
Util.GridToCustomFields(mPart,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, mPart.Docs, RootObjectTypes.Part, mPart.ID, RootObjectTypes.Part);
|
|
|
|
}
|
|
#endregion
|
|
|
|
|
|
|
|
//Case 254
|
|
//Check part isn't already in the db
|
|
private void edPartNumber_AfterExitEditMode(object sender, EventArgs e)
|
|
{
|
|
if (mPart.IsNew)
|
|
{
|
|
if (Part.Exists(Guid.Empty, edPartNumber.Text))
|
|
{
|
|
Util.PromptWithIconOKOnlyFromLocaleKey("Error.Object.DuplicateNameWarning", MessageBoxIcon.Warning);
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region Accelerator keys
|
|
/// <summary>
|
|
/// Case 37
|
|
/// </summary>
|
|
/// <param name="msg"></param>
|
|
/// <param name="keyData"></param>
|
|
/// <returns></returns>
|
|
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|