using System; using System.Drawing; using System.Collections; using System.ComponentModel; using System.Windows.Forms; //to get the image resources from the //assembly: using System.Reflection; using GZTW.AyaNova.BLL; using Infragistics.Win; using Infragistics.Win.UltraWinGrid; using Infragistics.Win.UltraWinToolbars; using System.Text; using System.Drawing.Drawing2D; using log4net; namespace AyaNova { //Case 697 //public delegate void WorkorderUpdated(object sender, EventArgs e); /// /// Summary description for WorkorderFormLite. /// public class WorkorderFormLite : 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 Watermark Water; #region Control variables / constructor / dispose private System.Windows.Forms.Panel pnlHeader; private System.Windows.Forms.Panel pnlService; private System.Windows.Forms.Panel pnlItem; private System.Windows.Forms.Panel pnlHeaderLeft; private System.Windows.Forms.Panel pnlHeaderCenter; private System.Windows.Forms.Panel pnlHeaderRight; private Infragistics.Win.UltraWinEditors.UltraTextEditor edClientID; private Infragistics.Win.Misc.UltraButton btnClientID; private Infragistics.Win.UltraWinEditors.UltraTextEditor edCustomerContactName; private Infragistics.Win.Misc.UltraLabel lblCustomerContactName; private Infragistics.Win.Misc.UltraLabel lblSummary; private Infragistics.Win.UltraWinEditors.UltraTextEditor edSummary; private Infragistics.Win.UltraWinEditors.UltraTextEditor edCustomerReferenceNumber; private Infragistics.Win.Misc.UltraLabel lblCustomerReferenceNumber; private GZTW.WinForm.Controls.GZUltraComboEditor cbWorkorderCategoryID; private Infragistics.Win.Misc.UltraButton btnWorkorderCategoryID; private Infragistics.Win.UltraWinEditors.UltraCheckEditor ckOnsite; private System.Windows.Forms.Panel pnlServiceLeft; private System.Windows.Forms.Panel pnlServiceCenter; private System.Windows.Forms.Panel pnlServiceRight; private GZTW.WinForm.Controls.GZUltraComboEditor cbWorkorderStatusID; private Infragistics.Win.Misc.UltraButton btnWorkorderStatusID; private Infragistics.Win.UltraWinEditors.UltraTextEditor edInvoiceNumber; private Infragistics.Win.Misc.UltraLabel lblInvoiceNumber; private Infragistics.Win.UltraWinGrid.UltraGrid gridWorkorderItems; private System.Windows.Forms.Panel WorkorderFormLite_Fill_Panel; private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _WorkorderFormLite_Toolbars_Dock_Area_Left; private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _WorkorderFormLite_Toolbars_Dock_Area_Right; private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _WorkorderFormLite_Toolbars_Dock_Area_Top; private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _WorkorderFormLite_Toolbars_Dock_Area_Bottom; private Infragistics.Win.UltraWinToolbars.UltraToolbarsManager tbManager; private System.Windows.Forms.ErrorProvider epWO; private System.Windows.Forms.CheckBox ckIsDirty; private GZTW.WinForm.Controls.GZDateTimePicker GridCalendar; private Infragistics.Win.UltraWinEditors.UltraCheckEditor ckServiceCompleted; private Infragistics.Win.UltraWinEditors.UltraCheckEditor ckClosed; private Infragistics.Win.UltraWinEditors.UltraTextEditor edInternalReferenceNumber; private Infragistics.Win.Misc.UltraLabel lblInternalReferenceNumber; private System.Windows.Forms.HelpProvider helpProvider1; private Infragistics.Win.UltraWinToolTip.UltraToolTipManager tt; private Infragistics.Win.UltraWinEditors.UltraTextEditor edTemplateDescription; private Infragistics.Win.Misc.UltraLabel lblTemplateDescription; private Infragistics.Win.Misc.UltraLabel lblTemplate; private GZTW.WinForm.Controls.GZUltraComboEditor cbRegion; private Infragistics.Win.Misc.UltraLabel lblRegionID; private Infragistics.Win.UltraWinEditors.UltraCheckEditor ckReOpen; private Panel pnlParts; private UltraGrid gridParts; private Panel pnlWoItemPartGridControlPanel; private Label lblPartGridCaption; private Button btnWOItemPartRefreshList; private Button btWoItemPartAddNew; private UltraGrid gridLabor; private UltraGrid gridScheduledUsers; private Infragistics.Win.Misc.UltraLabel lblServiceDate; private GZTW.WinForm.Controls.GZDateTimePicker dtServiceDate; private System.ComponentModel.IContainer components; public WorkorderFormLite() { // // 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(); } } //case 1092 //All I can determine is this might be a bug with the infragistics grid component //but in some workorders under some conditions if you open them //select parts grid then go to unit and drop down unit list (without making a selection) //then save and exit you get an exception on dispose try { base.Dispose(disposing); } catch { }; } #endregion #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 appearance2 = new Infragistics.Win.Appearance(); Infragistics.Win.Appearance appearance66 = new Infragistics.Win.Appearance(); Infragistics.Win.Appearance appearance3 = new Infragistics.Win.Appearance(); Infragistics.Win.Appearance appearance4 = new Infragistics.Win.Appearance(); Infragistics.Win.Appearance appearance5 = new Infragistics.Win.Appearance(); Infragistics.Win.Appearance appearance8 = new Infragistics.Win.Appearance(); Infragistics.Win.Appearance appearance11 = new Infragistics.Win.Appearance(); Infragistics.Win.Appearance appearance9 = new Infragistics.Win.Appearance(); Infragistics.Win.Appearance appearance20 = new Infragistics.Win.Appearance(); Infragistics.Win.UltraWinToolbars.UltraToolbar ultraToolbar1 = new Infragistics.Win.UltraWinToolbars.UltraToolbar("WorkorderEntryMenuBar"); 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 buttonTool3 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UI.Command.RecordHistory"); Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool39 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:ScheduleMarker.Label.FollowUp"); Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool4 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:ClientNote.Label.List"); Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool6 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UI.Command.Save"); Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool7 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UI.Command.CurrentDateAndTime"); 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.UltraToolbar ultraToolbar2 = new Infragistics.Win.UltraWinToolbars.UltraToolbar("WorkorderItemToolBar"); Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool10 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:WorkorderItemType.Label.List"); Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool11 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:WorkorderStatus.Label.List"); Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool12 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:Priority.Label.List"); Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool16 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UI.Command.RecordHistory"); Infragistics.Win.UltraWinToolbars.UltraToolbar ultraToolbar3 = new Infragistics.Win.UltraWinToolbars.UltraToolbar("WorkorderItemLaborToolBar"); Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool17 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:Rate.Label.List"); Infragistics.Win.UltraWinToolbars.UltraToolbar ultraToolbar4 = new Infragistics.Win.UltraWinToolbars.UltraToolbar("WorkorderItemPartToolBar"); Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool18 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UI.Toolbar.WorkorderForm.SetAllPartsUsedInService"); Infragistics.Win.UltraWinToolbars.UltraToolbar ultraToolbar5 = new Infragistics.Win.UltraWinToolbars.UltraToolbar("WorkorderItemTravelToolBar"); Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool19 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:Rate.Label.List"); Infragistics.Win.UltraWinToolbars.UltraToolbar ultraToolbar6 = new Infragistics.Win.UltraWinToolbars.UltraToolbar("WorkorderItemScheduledUserToolBar"); Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool20 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:Workorder.Label.Command.ConvertScheduledUserToLabor"); Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool21 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UI.Command.SaveClose"); Infragistics.Win.Appearance appearance34 = new Infragistics.Win.Appearance(); Infragistics.Win.Appearance appearance35 = new Infragistics.Win.Appearance(); Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool23 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UI.Command.RecordHistory"); Infragistics.Win.Appearance appearance38 = new Infragistics.Win.Appearance(); Infragistics.Win.Appearance appearance39 = new Infragistics.Win.Appearance(); Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool24 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UI.Command.Save"); Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool25 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UI.Command.Close"); Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool26 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:ClientNote.Label.List"); Infragistics.Win.Appearance appearance40 = new Infragistics.Win.Appearance(); Infragistics.Win.Appearance appearance41 = new Infragistics.Win.Appearance(); Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool28 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UI.Command.Delete"); Infragistics.Win.Appearance appearance44 = new Infragistics.Win.Appearance(); Infragistics.Win.Appearance appearance45 = new Infragistics.Win.Appearance(); Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool29 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UI.Command.CurrentDateAndTime"); Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool30 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UI.Toolbar.WorkorderForm.SetAllPartsUsedInService"); Infragistics.Win.Appearance appearance46 = new Infragistics.Win.Appearance(); Infragistics.Win.Appearance appearance47 = new Infragistics.Win.Appearance(); Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool31 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:WorkorderItemType.Label.List"); Infragistics.Win.Appearance appearance48 = new Infragistics.Win.Appearance(); Infragistics.Win.Appearance appearance49 = new Infragistics.Win.Appearance(); Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool32 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:WorkorderStatus.Label.List"); Infragistics.Win.Appearance appearance50 = new Infragistics.Win.Appearance(); Infragistics.Win.Appearance appearance51 = new Infragistics.Win.Appearance(); Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool33 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:Priority.Label.List"); Infragistics.Win.Appearance appearance52 = new Infragistics.Win.Appearance(); Infragistics.Win.Appearance appearance53 = new Infragistics.Win.Appearance(); Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool34 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:Rate.Label.List"); Infragistics.Win.Appearance appearance54 = new Infragistics.Win.Appearance(); Infragistics.Win.Appearance appearance55 = new Infragistics.Win.Appearance(); Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool37 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:Workorder.Label.Command.ConvertScheduledUserToLabor"); Infragistics.Win.Appearance appearance60 = new Infragistics.Win.Appearance(); Infragistics.Win.Appearance appearance61 = new Infragistics.Win.Appearance(); Infragistics.Win.UltraWinToolbars.PopupMenuTool popupMenuTool2 = new Infragistics.Win.UltraWinToolbars.PopupMenuTool("LT:UI.Toolbar.Print"); Infragistics.Win.Appearance appearance64 = new Infragistics.Win.Appearance(); Infragistics.Win.Appearance appearance65 = new Infragistics.Win.Appearance(); Infragistics.Win.UltraWinToolbars.ListTool listTool1 = new Infragistics.Win.UltraWinToolbars.ListTool("REPORTLIST"); Infragistics.Win.UltraWinToolbars.ListTool listTool2 = new Infragistics.Win.UltraWinToolbars.ListTool("REPORTLIST"); Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool40 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:ScheduleMarker.Label.FollowUp"); Infragistics.Win.Appearance appearance78 = new Infragistics.Win.Appearance(); Infragistics.Win.Appearance appearance77 = new Infragistics.Win.Appearance(); this.pnlHeader = new System.Windows.Forms.Panel(); this.pnlHeaderRight = new System.Windows.Forms.Panel(); this.edInternalReferenceNumber = new Infragistics.Win.UltraWinEditors.UltraTextEditor(); this.lblInternalReferenceNumber = new Infragistics.Win.Misc.UltraLabel(); this.edCustomerReferenceNumber = new Infragistics.Win.UltraWinEditors.UltraTextEditor(); this.edCustomerContactName = new Infragistics.Win.UltraWinEditors.UltraTextEditor(); this.lblCustomerContactName = new Infragistics.Win.Misc.UltraLabel(); this.lblCustomerReferenceNumber = new Infragistics.Win.Misc.UltraLabel(); this.ckOnsite = new Infragistics.Win.UltraWinEditors.UltraCheckEditor(); this.GridCalendar = new GZTW.WinForm.Controls.GZDateTimePicker(); this.pnlHeaderCenter = new System.Windows.Forms.Panel(); this.cbWorkorderCategoryID = new GZTW.WinForm.Controls.GZUltraComboEditor(); this.btnWorkorderCategoryID = new Infragistics.Win.Misc.UltraButton(); this.edSummary = new Infragistics.Win.UltraWinEditors.UltraTextEditor(); this.lblSummary = new Infragistics.Win.Misc.UltraLabel(); this.pnlHeaderLeft = new System.Windows.Forms.Panel(); this.cbRegion = new GZTW.WinForm.Controls.GZUltraComboEditor(); this.lblRegionID = new Infragistics.Win.Misc.UltraLabel(); this.edTemplateDescription = new Infragistics.Win.UltraWinEditors.UltraTextEditor(); this.lblTemplate = new Infragistics.Win.Misc.UltraLabel(); this.lblTemplateDescription = new Infragistics.Win.Misc.UltraLabel(); this.ckIsDirty = new System.Windows.Forms.CheckBox(); this.edClientID = new Infragistics.Win.UltraWinEditors.UltraTextEditor(); this.btnClientID = new Infragistics.Win.Misc.UltraButton(); this.pnlService = new System.Windows.Forms.Panel(); this.pnlServiceRight = new System.Windows.Forms.Panel(); this.ckReOpen = new Infragistics.Win.UltraWinEditors.UltraCheckEditor(); this.ckClosed = new Infragistics.Win.UltraWinEditors.UltraCheckEditor(); this.ckServiceCompleted = new Infragistics.Win.UltraWinEditors.UltraCheckEditor(); this.pnlServiceCenter = new System.Windows.Forms.Panel(); this.lblServiceDate = new Infragistics.Win.Misc.UltraLabel(); this.dtServiceDate = new GZTW.WinForm.Controls.GZDateTimePicker(); this.edInvoiceNumber = new Infragistics.Win.UltraWinEditors.UltraTextEditor(); this.lblInvoiceNumber = new Infragistics.Win.Misc.UltraLabel(); this.pnlServiceLeft = new System.Windows.Forms.Panel(); this.cbWorkorderStatusID = new GZTW.WinForm.Controls.GZUltraComboEditor(); this.btnWorkorderStatusID = new Infragistics.Win.Misc.UltraButton(); this.pnlItem = new System.Windows.Forms.Panel(); this.gridWorkorderItems = new Infragistics.Win.UltraWinGrid.UltraGrid(); this.WorkorderFormLite_Fill_Panel = new System.Windows.Forms.Panel(); this.pnlParts = new System.Windows.Forms.Panel(); this.gridParts = new Infragistics.Win.UltraWinGrid.UltraGrid(); this.pnlWoItemPartGridControlPanel = new System.Windows.Forms.Panel(); this.lblPartGridCaption = new System.Windows.Forms.Label(); this.btnWOItemPartRefreshList = new System.Windows.Forms.Button(); this.btWoItemPartAddNew = new System.Windows.Forms.Button(); this.gridLabor = new Infragistics.Win.UltraWinGrid.UltraGrid(); this.gridScheduledUsers = new Infragistics.Win.UltraWinGrid.UltraGrid(); this.epWO = new System.Windows.Forms.ErrorProvider(this.components); this.helpProvider1 = new System.Windows.Forms.HelpProvider(); this.tt = new Infragistics.Win.UltraWinToolTip.UltraToolTipManager(this.components); this._WorkorderFormLite_Toolbars_Dock_Area_Left = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea(); this.tbManager = new Infragistics.Win.UltraWinToolbars.UltraToolbarsManager(this.components); this._WorkorderFormLite_Toolbars_Dock_Area_Right = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea(); this._WorkorderFormLite_Toolbars_Dock_Area_Top = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea(); this._WorkorderFormLite_Toolbars_Dock_Area_Bottom = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea(); this.pnlHeader.SuspendLayout(); this.pnlHeaderRight.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.edInternalReferenceNumber)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.edCustomerReferenceNumber)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.edCustomerContactName)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.ckOnsite)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.GridCalendar)).BeginInit(); this.pnlHeaderCenter.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.cbWorkorderCategoryID)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.edSummary)).BeginInit(); this.pnlHeaderLeft.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.cbRegion)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.edTemplateDescription)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.edClientID)).BeginInit(); this.pnlService.SuspendLayout(); this.pnlServiceRight.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.ckReOpen)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.ckClosed)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.ckServiceCompleted)).BeginInit(); this.pnlServiceCenter.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.dtServiceDate)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.edInvoiceNumber)).BeginInit(); this.pnlServiceLeft.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.cbWorkorderStatusID)).BeginInit(); this.pnlItem.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.gridWorkorderItems)).BeginInit(); this.WorkorderFormLite_Fill_Panel.SuspendLayout(); this.pnlParts.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.gridParts)).BeginInit(); this.pnlWoItemPartGridControlPanel.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.gridLabor)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.gridScheduledUsers)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.epWO)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.tbManager)).BeginInit(); this.SuspendLayout(); // // pnlHeader // this.pnlHeader.Controls.Add(this.pnlHeaderRight); this.pnlHeader.Controls.Add(this.pnlHeaderCenter); this.pnlHeader.Controls.Add(this.pnlHeaderLeft); this.pnlHeader.Dock = System.Windows.Forms.DockStyle.Top; this.pnlHeader.Location = new System.Drawing.Point(0, 0); this.pnlHeader.Name = "pnlHeader"; this.pnlHeader.Size = new System.Drawing.Size(1016, 111); this.pnlHeader.TabIndex = 0; this.pnlHeader.SizeChanged += new System.EventHandler(this.pnlHeader_SizeChanged); // // pnlHeaderRight // this.pnlHeaderRight.Controls.Add(this.edInternalReferenceNumber); this.pnlHeaderRight.Controls.Add(this.lblInternalReferenceNumber); this.pnlHeaderRight.Controls.Add(this.edCustomerReferenceNumber); this.pnlHeaderRight.Controls.Add(this.edCustomerContactName); this.pnlHeaderRight.Controls.Add(this.lblCustomerContactName); this.pnlHeaderRight.Controls.Add(this.lblCustomerReferenceNumber); this.pnlHeaderRight.Controls.Add(this.ckOnsite); this.pnlHeaderRight.Controls.Add(this.GridCalendar); this.pnlHeaderRight.Dock = System.Windows.Forms.DockStyle.Fill; this.pnlHeaderRight.Location = new System.Drawing.Point(586, 0); this.pnlHeaderRight.Name = "pnlHeaderRight"; this.pnlHeaderRight.Size = new System.Drawing.Size(430, 111); this.pnlHeaderRight.TabIndex = 2; // // edInternalReferenceNumber // this.edInternalReferenceNumber.Anchor = System.Windows.Forms.AnchorStyles.Top; this.edInternalReferenceNumber.Location = new System.Drawing.Point(325, 65); this.edInternalReferenceNumber.Name = "edInternalReferenceNumber"; this.edInternalReferenceNumber.Size = new System.Drawing.Size(48, 21); this.edInternalReferenceNumber.TabIndex = 153; // // lblInternalReferenceNumber // this.lblInternalReferenceNumber.Location = new System.Drawing.Point(0, 65); this.lblInternalReferenceNumber.Name = "lblInternalReferenceNumber"; this.lblInternalReferenceNumber.Size = new System.Drawing.Size(69, 19); this.lblInternalReferenceNumber.TabIndex = 154; this.lblInternalReferenceNumber.Tag = ""; this.lblInternalReferenceNumber.Text = "LT:Workorder.Label.InternalReferenceNumber"; this.lblInternalReferenceNumber.WrapText = false; // // edCustomerReferenceNumber // this.edCustomerReferenceNumber.Anchor = System.Windows.Forms.AnchorStyles.Top; this.edCustomerReferenceNumber.Location = new System.Drawing.Point(325, 45); this.edCustomerReferenceNumber.Name = "edCustomerReferenceNumber"; this.edCustomerReferenceNumber.Size = new System.Drawing.Size(48, 21); this.edCustomerReferenceNumber.TabIndex = 1; // // edCustomerContactName // this.edCustomerContactName.Anchor = System.Windows.Forms.AnchorStyles.Top; this.edCustomerContactName.Location = new System.Drawing.Point(325, 26); this.edCustomerContactName.Name = "edCustomerContactName"; this.edCustomerContactName.Size = new System.Drawing.Size(48, 21); this.edCustomerContactName.TabIndex = 2; // // lblCustomerContactName // this.lblCustomerContactName.Location = new System.Drawing.Point(0, 26); this.lblCustomerContactName.Name = "lblCustomerContactName"; this.lblCustomerContactName.Size = new System.Drawing.Size(69, 19); this.lblCustomerContactName.TabIndex = 149; this.lblCustomerContactName.Tag = ""; this.lblCustomerContactName.Text = "LT:Workorder.Label.CustomerContactName"; this.lblCustomerContactName.WrapText = false; // // lblCustomerReferenceNumber // this.lblCustomerReferenceNumber.Location = new System.Drawing.Point(0, 45); this.lblCustomerReferenceNumber.Name = "lblCustomerReferenceNumber"; this.lblCustomerReferenceNumber.Size = new System.Drawing.Size(69, 19); this.lblCustomerReferenceNumber.TabIndex = 152; this.lblCustomerReferenceNumber.Tag = ""; this.lblCustomerReferenceNumber.Text = "LT:Workorder.Label.CustomerReferenceNumber"; this.lblCustomerReferenceNumber.WrapText = false; // // ckOnsite // this.ckOnsite.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.ckOnsite.Checked = true; this.ckOnsite.CheckState = System.Windows.Forms.CheckState.Checked; this.ckOnsite.Location = new System.Drawing.Point(0, 83); this.ckOnsite.Name = "ckOnsite"; this.ckOnsite.Size = new System.Drawing.Size(423, 19); this.ckOnsite.TabIndex = 0; this.ckOnsite.Tag = ""; this.ckOnsite.Text = "LT:Workorder.Label.Onsite"; // // GridCalendar // this.GridCalendar.GZEnabled = true; this.GridCalendar.GZReadOnly = false; this.GridCalendar.Location = new System.Drawing.Point(230, 0); this.GridCalendar.Name = "GridCalendar"; this.GridCalendar.Size = new System.Drawing.Size(39, 21); this.GridCalendar.TabIndex = 150; this.GridCalendar.Visible = false; // // pnlHeaderCenter // this.pnlHeaderCenter.BackColor = System.Drawing.SystemColors.Control; this.pnlHeaderCenter.Controls.Add(this.cbWorkorderCategoryID); this.pnlHeaderCenter.Controls.Add(this.btnWorkorderCategoryID); this.pnlHeaderCenter.Controls.Add(this.edSummary); this.pnlHeaderCenter.Controls.Add(this.lblSummary); this.pnlHeaderCenter.Dock = System.Windows.Forms.DockStyle.Left; this.pnlHeaderCenter.Location = new System.Drawing.Point(278, 0); this.pnlHeaderCenter.Name = "pnlHeaderCenter"; this.pnlHeaderCenter.Size = new System.Drawing.Size(308, 111); this.pnlHeaderCenter.TabIndex = 1; // // cbWorkorderCategoryID // this.cbWorkorderCategoryID.Anchor = System.Windows.Forms.AnchorStyles.Top; this.cbWorkorderCategoryID.Location = new System.Drawing.Point(202, 81); this.cbWorkorderCategoryID.Name = "cbWorkorderCategoryID"; this.cbWorkorderCategoryID.Size = new System.Drawing.Size(105, 21); this.cbWorkorderCategoryID.TabIndex = 3; this.cbWorkorderCategoryID.NeedMoreData += new GZTW.WinForm.Controls.NeedMoreDataHandler(this.cbWorkorderCategoryID_NeedMoreData); // // btnWorkorderCategoryID // appearance2.TextHAlignAsString = "Left"; this.btnWorkorderCategoryID.Appearance = appearance2; this.btnWorkorderCategoryID.Location = new System.Drawing.Point(0, 77); this.btnWorkorderCategoryID.Name = "btnWorkorderCategoryID"; this.btnWorkorderCategoryID.Size = new System.Drawing.Size(106, 25); this.btnWorkorderCategoryID.TabIndex = 4; this.btnWorkorderCategoryID.Tag = ""; this.btnWorkorderCategoryID.Text = "LT:O.WorkorderCategory"; this.btnWorkorderCategoryID.UseHotTracking = Infragistics.Win.DefaultableBoolean.True; this.btnWorkorderCategoryID.WrapText = false; this.btnWorkorderCategoryID.Click += new System.EventHandler(this.btnWorkorderCategoryID_Click); // // edSummary // this.edSummary.Anchor = System.Windows.Forms.AnchorStyles.Top; appearance66.BackGradientStyle = Infragistics.Win.GradientStyle.None; this.edSummary.Appearance = appearance66; this.edSummary.Location = new System.Drawing.Point(202, 28); this.edSummary.Name = "edSummary"; this.edSummary.Size = new System.Drawing.Size(105, 21); this.edSummary.TabIndex = 0; // // lblSummary // this.lblSummary.Location = new System.Drawing.Point(0, 28); this.lblSummary.Name = "lblSummary"; this.lblSummary.Size = new System.Drawing.Size(202, 18); this.lblSummary.TabIndex = 153; this.lblSummary.Tag = ""; this.lblSummary.Text = "LT:Workorder.Label.Summary"; this.lblSummary.WrapText = false; // // pnlHeaderLeft // this.pnlHeaderLeft.AutoScroll = true; this.pnlHeaderLeft.Controls.Add(this.cbRegion); this.pnlHeaderLeft.Controls.Add(this.lblRegionID); this.pnlHeaderLeft.Controls.Add(this.edTemplateDescription); this.pnlHeaderLeft.Controls.Add(this.lblTemplate); this.pnlHeaderLeft.Controls.Add(this.lblTemplateDescription); this.pnlHeaderLeft.Controls.Add(this.ckIsDirty); this.pnlHeaderLeft.Controls.Add(this.edClientID); this.pnlHeaderLeft.Controls.Add(this.btnClientID); this.pnlHeaderLeft.Dock = System.Windows.Forms.DockStyle.Left; this.pnlHeaderLeft.Location = new System.Drawing.Point(0, 0); this.pnlHeaderLeft.Name = "pnlHeaderLeft"; this.pnlHeaderLeft.Size = new System.Drawing.Size(278, 111); this.pnlHeaderLeft.TabIndex = 0; // // cbRegion // this.cbRegion.AllowEmptySelection = false; this.cbRegion.Anchor = System.Windows.Forms.AnchorStyles.Top; this.cbRegion.Location = new System.Drawing.Point(195, 80); this.cbRegion.Name = "cbRegion"; this.cbRegion.Size = new System.Drawing.Size(80, 21); this.cbRegion.TabIndex = 156; this.cbRegion.Visible = false; this.cbRegion.NeedMoreData += new GZTW.WinForm.Controls.NeedMoreDataHandler(this.cbRegion_NeedMoreData); // // lblRegionID // this.lblRegionID.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.lblRegionID.Location = new System.Drawing.Point(3, 80); this.lblRegionID.Name = "lblRegionID"; this.lblRegionID.Size = new System.Drawing.Size(120, 16); this.lblRegionID.TabIndex = 157; this.lblRegionID.Tag = ""; this.lblRegionID.Text = "LT:O.Region"; this.lblRegionID.Visible = false; this.lblRegionID.WrapText = false; // // edTemplateDescription // this.edTemplateDescription.Anchor = System.Windows.Forms.AnchorStyles.Top; appearance3.BackGradientStyle = Infragistics.Win.GradientStyle.None; this.edTemplateDescription.Appearance = appearance3; this.edTemplateDescription.Location = new System.Drawing.Point(201, 56); this.edTemplateDescription.Name = "edTemplateDescription"; this.edTemplateDescription.Size = new System.Drawing.Size(74, 21); this.edTemplateDescription.TabIndex = 154; this.edTemplateDescription.Visible = false; // // lblTemplate // this.lblTemplate.Font = new System.Drawing.Font("Microsoft Sans Serif", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.lblTemplate.Location = new System.Drawing.Point(3, 12); this.lblTemplate.Name = "lblTemplate"; this.lblTemplate.Size = new System.Drawing.Size(250, 45); this.lblTemplate.TabIndex = 151; this.lblTemplate.Tag = ""; this.lblTemplate.Text = "Workorder preventive maintenance template"; this.lblTemplate.Visible = false; // // lblTemplateDescription // this.lblTemplateDescription.Location = new System.Drawing.Point(3, 56); this.lblTemplateDescription.Name = "lblTemplateDescription"; this.lblTemplateDescription.Size = new System.Drawing.Size(168, 18); this.lblTemplateDescription.TabIndex = 155; this.lblTemplateDescription.Tag = ""; this.lblTemplateDescription.Text = "LT:Workorder.Label.TemplateDescription"; this.lblTemplateDescription.Visible = false; this.lblTemplateDescription.WrapText = false; // // ckIsDirty // this.ckIsDirty.Location = new System.Drawing.Point(-67, -120); this.ckIsDirty.Name = "ckIsDirty"; this.ckIsDirty.Size = new System.Drawing.Size(67, 120); this.ckIsDirty.TabIndex = 148; // // edClientID // this.edClientID.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.edClientID.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.edClientID.Location = new System.Drawing.Point(0, 28); this.edClientID.Multiline = true; this.edClientID.Name = "edClientID"; this.edClientID.ReadOnly = true; this.edClientID.Scrollbars = System.Windows.Forms.ScrollBars.Vertical; this.edClientID.Size = new System.Drawing.Size(276, 74); this.edClientID.TabIndex = 147; this.edClientID.Enter += new System.EventHandler(this.edClientID_Enter); this.edClientID.Leave += new System.EventHandler(this.edClientID_Leave); // // btnClientID // this.btnClientID.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); appearance4.TextHAlignAsString = "Left"; this.btnClientID.Appearance = appearance4; this.btnClientID.ButtonStyle = Infragistics.Win.UIElementButtonStyle.PopupBorderless; this.btnClientID.Location = new System.Drawing.Point(0, 0); this.btnClientID.Name = "btnClientID"; this.btnClientID.Size = new System.Drawing.Size(276, 24); this.btnClientID.TabIndex = 146; 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); // // pnlService // this.pnlService.Controls.Add(this.pnlServiceRight); this.pnlService.Controls.Add(this.pnlServiceCenter); this.pnlService.Controls.Add(this.pnlServiceLeft); this.pnlService.Dock = System.Windows.Forms.DockStyle.Top; this.pnlService.Location = new System.Drawing.Point(0, 111); this.pnlService.Name = "pnlService"; this.pnlService.Size = new System.Drawing.Size(1016, 65); this.pnlService.TabIndex = 2; this.pnlService.Visible = false; this.pnlService.SizeChanged += new System.EventHandler(this.pnlService_SizeChanged); // // pnlServiceRight // this.pnlServiceRight.BackColor = System.Drawing.SystemColors.Control; this.pnlServiceRight.Controls.Add(this.ckReOpen); this.pnlServiceRight.Controls.Add(this.ckClosed); this.pnlServiceRight.Controls.Add(this.ckServiceCompleted); this.pnlServiceRight.Dock = System.Windows.Forms.DockStyle.Fill; this.pnlServiceRight.Location = new System.Drawing.Point(586, 0); this.pnlServiceRight.Name = "pnlServiceRight"; this.pnlServiceRight.Size = new System.Drawing.Size(430, 65); this.pnlServiceRight.TabIndex = 2; // // ckReOpen // this.ckReOpen.BackColor = System.Drawing.SystemColors.Control; this.ckReOpen.BackColorInternal = System.Drawing.SystemColors.Control; this.ckReOpen.Checked = true; this.ckReOpen.CheckState = System.Windows.Forms.CheckState.Checked; this.ckReOpen.Location = new System.Drawing.Point(0, 22); this.ckReOpen.Name = "ckReOpen"; this.ckReOpen.Size = new System.Drawing.Size(154, 18); this.ckReOpen.TabIndex = 155; this.ckReOpen.TabStop = false; this.ckReOpen.Tag = ""; this.ckReOpen.Text = "LT:Workorder.Label.Closed"; this.ckReOpen.Visible = false; this.ckReOpen.CheckedChanged += new System.EventHandler(this.ckReOpen_CheckedChanged); // // ckClosed // this.ckClosed.Checked = true; this.ckClosed.CheckState = System.Windows.Forms.CheckState.Checked; this.ckClosed.Location = new System.Drawing.Point(0, 23); this.ckClosed.Name = "ckClosed"; this.ckClosed.Size = new System.Drawing.Size(154, 18); this.ckClosed.TabIndex = 154; this.ckClosed.TabStop = false; this.ckClosed.Tag = ""; this.ckClosed.Text = "LT:Workorder.Label.Closed"; this.ckClosed.CheckedChanged += new System.EventHandler(this.ckClosed_CheckedChanged); // // ckServiceCompleted // this.ckServiceCompleted.Checked = true; this.ckServiceCompleted.CheckState = System.Windows.Forms.CheckState.Checked; this.ckServiceCompleted.Location = new System.Drawing.Point(0, 0); this.ckServiceCompleted.Name = "ckServiceCompleted"; this.ckServiceCompleted.Size = new System.Drawing.Size(154, 18); this.ckServiceCompleted.TabIndex = 153; this.ckServiceCompleted.Tag = ""; this.ckServiceCompleted.Text = "LT:Workorder.Label.ServiceCompleted"; this.ckServiceCompleted.CheckedChanged += new System.EventHandler(this.ckServiceCompleted_CheckedChanged); // // pnlServiceCenter // this.pnlServiceCenter.BackColor = System.Drawing.SystemColors.Control; this.pnlServiceCenter.Controls.Add(this.lblServiceDate); this.pnlServiceCenter.Controls.Add(this.dtServiceDate); this.pnlServiceCenter.Controls.Add(this.edInvoiceNumber); this.pnlServiceCenter.Controls.Add(this.lblInvoiceNumber); this.pnlServiceCenter.Dock = System.Windows.Forms.DockStyle.Left; this.pnlServiceCenter.Location = new System.Drawing.Point(278, 0); this.pnlServiceCenter.Name = "pnlServiceCenter"; this.pnlServiceCenter.Size = new System.Drawing.Size(308, 65); this.pnlServiceCenter.TabIndex = 1; // // lblServiceDate // this.lblServiceDate.Location = new System.Drawing.Point(3, 32); this.lblServiceDate.Name = "lblServiceDate"; this.lblServiceDate.Size = new System.Drawing.Size(211, 18); this.lblServiceDate.TabIndex = 146; this.lblServiceDate.Tag = ""; this.lblServiceDate.Text = "LT:WorkorderService.Label.ServiceDate"; this.lblServiceDate.WrapText = false; // // dtServiceDate // this.dtServiceDate.Anchor = System.Windows.Forms.AnchorStyles.Top; this.dtServiceDate.DateTime = new System.DateTime(2009, 10, 19, 0, 0, 0, 0); this.dtServiceDate.GZEnabled = true; this.dtServiceDate.GZReadOnly = false; this.dtServiceDate.Location = new System.Drawing.Point(243, 32); this.dtServiceDate.Name = "dtServiceDate"; this.dtServiceDate.Size = new System.Drawing.Size(67, 21); this.dtServiceDate.TabIndex = 145; this.dtServiceDate.Value = new System.DateTime(2009, 10, 19, 0, 0, 0, 0); // // edInvoiceNumber // this.edInvoiceNumber.Anchor = System.Windows.Forms.AnchorStyles.Top; this.edInvoiceNumber.Location = new System.Drawing.Point(240, 0); this.edInvoiceNumber.Name = "edInvoiceNumber"; this.edInvoiceNumber.Size = new System.Drawing.Size(67, 21); this.edInvoiceNumber.TabIndex = 0; // // lblInvoiceNumber // this.lblInvoiceNumber.Location = new System.Drawing.Point(0, 0); this.lblInvoiceNumber.Name = "lblInvoiceNumber"; this.lblInvoiceNumber.Size = new System.Drawing.Size(221, 18); this.lblInvoiceNumber.TabIndex = 143; this.lblInvoiceNumber.Tag = ""; this.lblInvoiceNumber.Text = "LT:WorkorderService.Label.InvoiceNumber"; this.lblInvoiceNumber.WrapText = false; // // pnlServiceLeft // this.pnlServiceLeft.BackColor = System.Drawing.SystemColors.Control; this.pnlServiceLeft.Controls.Add(this.cbWorkorderStatusID); this.pnlServiceLeft.Controls.Add(this.btnWorkorderStatusID); this.pnlServiceLeft.Dock = System.Windows.Forms.DockStyle.Left; this.pnlServiceLeft.Location = new System.Drawing.Point(0, 0); this.pnlServiceLeft.Name = "pnlServiceLeft"; this.pnlServiceLeft.Size = new System.Drawing.Size(278, 65); this.pnlServiceLeft.TabIndex = 0; // // cbWorkorderStatusID // this.cbWorkorderStatusID.Anchor = System.Windows.Forms.AnchorStyles.Top; this.cbWorkorderStatusID.AutoCompleteMode = Infragistics.Win.AutoCompleteMode.SuggestAppend; this.cbWorkorderStatusID.Location = new System.Drawing.Point(173, 0); this.cbWorkorderStatusID.Name = "cbWorkorderStatusID"; this.cbWorkorderStatusID.Size = new System.Drawing.Size(105, 21); this.cbWorkorderStatusID.TabIndex = 0; // // btnWorkorderStatusID // appearance5.TextHAlignAsString = "Left"; this.btnWorkorderStatusID.Appearance = appearance5; this.btnWorkorderStatusID.Location = new System.Drawing.Point(0, 0); this.btnWorkorderStatusID.Name = "btnWorkorderStatusID"; this.btnWorkorderStatusID.Size = new System.Drawing.Size(106, 24); this.btnWorkorderStatusID.TabIndex = 1; this.btnWorkorderStatusID.Tag = ""; this.btnWorkorderStatusID.Text = "LT:O.WorkorderStatus"; this.btnWorkorderStatusID.UseHotTracking = Infragistics.Win.DefaultableBoolean.True; this.btnWorkorderStatusID.WrapText = false; this.btnWorkorderStatusID.Click += new System.EventHandler(this.btnWorkorderStatusID_Click); // // pnlItem // this.pnlItem.Controls.Add(this.gridWorkorderItems); this.pnlItem.Dock = System.Windows.Forms.DockStyle.Top; this.pnlItem.Location = new System.Drawing.Point(0, 176); this.pnlItem.Name = "pnlItem"; this.pnlItem.Size = new System.Drawing.Size(1016, 100); this.pnlItem.TabIndex = 5; // // gridWorkorderItems // this.gridWorkorderItems.Cursor = System.Windows.Forms.Cursors.Hand; appearance8.FontData.BoldAsString = "True"; appearance8.TextHAlignAsString = "Left"; this.gridWorkorderItems.DisplayLayout.CaptionAppearance = appearance8; this.gridWorkorderItems.DisplayLayout.Override.SelectTypeRow = Infragistics.Win.UltraWinGrid.SelectType.Single; this.gridWorkorderItems.Dock = System.Windows.Forms.DockStyle.Fill; this.gridWorkorderItems.Location = new System.Drawing.Point(0, 0); this.gridWorkorderItems.Name = "gridWorkorderItems"; this.gridWorkorderItems.Size = new System.Drawing.Size(1016, 100); this.gridWorkorderItems.TabIndex = 0; this.gridWorkorderItems.Text = "LT:O.WorkorderItem"; this.gridWorkorderItems.InitializeRow += new Infragistics.Win.UltraWinGrid.InitializeRowEventHandler(this.gridWorkorderItems_InitializeRow); this.gridWorkorderItems.AfterRowResize += new Infragistics.Win.UltraWinGrid.RowEventHandler(this.gridWorkorderItems_AfterRowResize); this.gridWorkorderItems.BeforeRowActivate += new Infragistics.Win.UltraWinGrid.RowEventHandler(this.gridWorkorderItems_BeforeRowActivate); this.gridWorkorderItems.ClickCellButton += new Infragistics.Win.UltraWinGrid.CellEventHandler(this.gridWorkorderItems_ClickCellButton); this.gridWorkorderItems.BeforeAutoSizeEdit += new Infragistics.Win.UltraWinGrid.CancelableAutoSizeEditEventHandler(this.gridWorkorderItems_BeforeAutoSizeEdit); this.gridWorkorderItems.BeforeRowInsert += new Infragistics.Win.UltraWinGrid.BeforeRowInsertEventHandler(this.gridWorkorderItems_BeforeRowInsert); this.gridWorkorderItems.BeforeRowsDeleted += new Infragistics.Win.UltraWinGrid.BeforeRowsDeletedEventHandler(this.gridWorkorderItems_BeforeRowsDeleted); this.gridWorkorderItems.MouseEnterElement += new Infragistics.Win.UIElementEventHandler(this.gridWorkorderItems_MouseEnterElement); this.gridWorkorderItems.Enter += new System.EventHandler(this.gridWorkorderItems_Enter); this.gridWorkorderItems.MouseDown += new System.Windows.Forms.MouseEventHandler(this.gridWorkorderItems_MouseDown); // // WorkorderFormLite_Fill_Panel // this.WorkorderFormLite_Fill_Panel.Controls.Add(this.pnlParts); this.WorkorderFormLite_Fill_Panel.Controls.Add(this.gridLabor); this.WorkorderFormLite_Fill_Panel.Controls.Add(this.gridScheduledUsers); this.WorkorderFormLite_Fill_Panel.Controls.Add(this.pnlItem); this.WorkorderFormLite_Fill_Panel.Controls.Add(this.pnlService); this.WorkorderFormLite_Fill_Panel.Controls.Add(this.pnlHeader); this.WorkorderFormLite_Fill_Panel.Cursor = System.Windows.Forms.Cursors.Default; this.WorkorderFormLite_Fill_Panel.Dock = System.Windows.Forms.DockStyle.Fill; this.WorkorderFormLite_Fill_Panel.Location = new System.Drawing.Point(0, 0); this.WorkorderFormLite_Fill_Panel.Name = "WorkorderFormLite_Fill_Panel"; this.WorkorderFormLite_Fill_Panel.Size = new System.Drawing.Size(1016, 885); this.WorkorderFormLite_Fill_Panel.TabIndex = 0; // // pnlParts // this.pnlParts.Controls.Add(this.gridParts); this.pnlParts.Controls.Add(this.pnlWoItemPartGridControlPanel); this.pnlParts.Dock = System.Windows.Forms.DockStyle.Fill; this.pnlParts.Location = new System.Drawing.Point(0, 446); this.pnlParts.Name = "pnlParts"; this.pnlParts.Size = new System.Drawing.Size(1016, 439); this.pnlParts.TabIndex = 18; // // gridParts // this.gridParts.Cursor = System.Windows.Forms.Cursors.Default; appearance11.FontData.BoldAsString = "True"; appearance11.TextHAlignAsString = "Left"; this.gridParts.DisplayLayout.CaptionAppearance = appearance11; this.gridParts.DisplayLayout.CaptionVisible = Infragistics.Win.DefaultableBoolean.False; this.gridParts.Dock = System.Windows.Forms.DockStyle.Fill; this.gridParts.Location = new System.Drawing.Point(0, 20); this.gridParts.Name = "gridParts"; this.gridParts.Size = new System.Drawing.Size(1016, 419); this.gridParts.TabIndex = 2; this.gridParts.Text = "LT:WorkorderItem.Label.Parts"; this.gridParts.AfterCellUpdate += new Infragistics.Win.UltraWinGrid.CellEventHandler(this.gridParts_AfterCellUpdate); this.gridParts.InitializeLayout += new Infragistics.Win.UltraWinGrid.InitializeLayoutEventHandler(this.gridParts_InitializeLayout); this.gridParts.InitializeRow += new Infragistics.Win.UltraWinGrid.InitializeRowEventHandler(this.gridParts_InitializeRow); this.gridParts.AfterRowsDeleted += new System.EventHandler(this.gridParts_AfterRowsDeleted); this.gridParts.ClickCellButton += new Infragistics.Win.UltraWinGrid.CellEventHandler(this.gridParts_ClickCellButton); this.gridParts.BeforeRowInsert += new Infragistics.Win.UltraWinGrid.BeforeRowInsertEventHandler(this.gridParts_BeforeRowInsert); this.gridParts.MouseEnterElement += new Infragistics.Win.UIElementEventHandler(this.gridParts_MouseEnterElement); this.gridParts.Enter += new System.EventHandler(this.gridParts_Enter); // // pnlWoItemPartGridControlPanel // this.pnlWoItemPartGridControlPanel.Controls.Add(this.lblPartGridCaption); this.pnlWoItemPartGridControlPanel.Controls.Add(this.btnWOItemPartRefreshList); this.pnlWoItemPartGridControlPanel.Controls.Add(this.btWoItemPartAddNew); this.pnlWoItemPartGridControlPanel.Dock = System.Windows.Forms.DockStyle.Top; this.pnlWoItemPartGridControlPanel.Location = new System.Drawing.Point(0, 0); this.pnlWoItemPartGridControlPanel.Name = "pnlWoItemPartGridControlPanel"; this.pnlWoItemPartGridControlPanel.Size = new System.Drawing.Size(1016, 20); this.pnlWoItemPartGridControlPanel.TabIndex = 7; // // lblPartGridCaption // this.lblPartGridCaption.AutoSize = true; this.lblPartGridCaption.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.lblPartGridCaption.Location = new System.Drawing.Point(44, 4); this.lblPartGridCaption.Name = "lblPartGridCaption"; this.lblPartGridCaption.Size = new System.Drawing.Size(177, 13); this.lblPartGridCaption.TabIndex = 4; this.lblPartGridCaption.Text = "LT:WorkorderItem.Label.Parts"; // // btnWOItemPartRefreshList // this.btnWOItemPartRefreshList.FlatAppearance.BorderSize = 0; this.btnWOItemPartRefreshList.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnWOItemPartRefreshList.Image = global::AyaNova.Resource1.Refresh16; this.btnWOItemPartRefreshList.Location = new System.Drawing.Point(22, 0); this.btnWOItemPartRefreshList.Name = "btnWOItemPartRefreshList"; this.btnWOItemPartRefreshList.Size = new System.Drawing.Size(17, 17); this.btnWOItemPartRefreshList.TabIndex = 6; this.btnWOItemPartRefreshList.UseVisualStyleBackColor = true; this.btnWOItemPartRefreshList.Click += new System.EventHandler(this.btnWOItemPartRefreshList_Click); // // btWoItemPartAddNew // this.btWoItemPartAddNew.FlatAppearance.BorderSize = 0; this.btWoItemPartAddNew.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btWoItemPartAddNew.Image = global::AyaNova.Resource1.New16; this.btWoItemPartAddNew.Location = new System.Drawing.Point(0, 0); this.btWoItemPartAddNew.Name = "btWoItemPartAddNew"; this.btWoItemPartAddNew.Size = new System.Drawing.Size(17, 17); this.btWoItemPartAddNew.TabIndex = 5; this.btWoItemPartAddNew.UseVisualStyleBackColor = true; this.btWoItemPartAddNew.Click += new System.EventHandler(this.btWoItemPartAddNew_Click); // // gridLabor // this.gridLabor.Cursor = System.Windows.Forms.Cursors.Default; appearance9.FontData.BoldAsString = "True"; appearance9.TextHAlignAsString = "Left"; this.gridLabor.DisplayLayout.CaptionAppearance = appearance9; this.gridLabor.Dock = System.Windows.Forms.DockStyle.Top; this.gridLabor.Location = new System.Drawing.Point(0, 360); this.gridLabor.Name = "gridLabor"; this.gridLabor.Size = new System.Drawing.Size(1016, 86); this.gridLabor.TabIndex = 17; this.gridLabor.Text = "LT:WorkorderItem.Label.Labors"; this.gridLabor.AfterCellUpdate += new Infragistics.Win.UltraWinGrid.CellEventHandler(this.gridLabor_AfterCellUpdate); this.gridLabor.InitializeLayout += new Infragistics.Win.UltraWinGrid.InitializeLayoutEventHandler(this.gridLabor_InitializeLayout); this.gridLabor.InitializeRow += new Infragistics.Win.UltraWinGrid.InitializeRowEventHandler(this.gridLabor_InitializeRow); this.gridLabor.BeforeRowActivate += new Infragistics.Win.UltraWinGrid.RowEventHandler(this.gridLabor_BeforeRowActivate); this.gridLabor.BeforeAutoSizeEdit += new Infragistics.Win.UltraWinGrid.CancelableAutoSizeEditEventHandler(this.gridLabor_BeforeAutoSizeEdit); this.gridLabor.MouseEnterElement += new Infragistics.Win.UIElementEventHandler(this.gridLabor_MouseEnterElement); this.gridLabor.Enter += new System.EventHandler(this.gridLabor_Enter); // // gridScheduledUsers // this.gridScheduledUsers.Cursor = System.Windows.Forms.Cursors.Default; appearance20.FontData.BoldAsString = "True"; appearance20.TextHAlignAsString = "Left"; this.gridScheduledUsers.DisplayLayout.CaptionAppearance = appearance20; this.gridScheduledUsers.Dock = System.Windows.Forms.DockStyle.Top; this.gridScheduledUsers.Location = new System.Drawing.Point(0, 276); this.gridScheduledUsers.Name = "gridScheduledUsers"; this.gridScheduledUsers.Size = new System.Drawing.Size(1016, 84); this.gridScheduledUsers.TabIndex = 16; this.gridScheduledUsers.Text = "LT:UI.Go.Schedule"; this.gridScheduledUsers.AfterCellUpdate += new Infragistics.Win.UltraWinGrid.CellEventHandler(this.gridScheduledUsers_AfterCellUpdate); this.gridScheduledUsers.InitializeLayout += new Infragistics.Win.UltraWinGrid.InitializeLayoutEventHandler(this.gridScheduledUsers_InitializeLayout); this.gridScheduledUsers.InitializeRow += new Infragistics.Win.UltraWinGrid.InitializeRowEventHandler(this.gridScheduledUsers_InitializeRow); this.gridScheduledUsers.ClickCellButton += new Infragistics.Win.UltraWinGrid.CellEventHandler(this.gridScheduledUsers_ClickCellButton); this.gridScheduledUsers.MouseEnterElement += new Infragistics.Win.UIElementEventHandler(this.gridScheduledUsers_MouseEnterElement); this.gridScheduledUsers.Enter += new System.EventHandler(this.gridScheduledUsers_Enter); // // epWO // this.epWO.ContainerControl = this; // // tt // this.tt.ContainingControl = this; this.tt.DisplayStyle = Infragistics.Win.ToolTipDisplayStyle.BalloonTip; // // _WorkorderFormLite_Toolbars_Dock_Area_Left // this._WorkorderFormLite_Toolbars_Dock_Area_Left.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping; this._WorkorderFormLite_Toolbars_Dock_Area_Left.BackColor = System.Drawing.SystemColors.Control; this._WorkorderFormLite_Toolbars_Dock_Area_Left.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Left; this._WorkorderFormLite_Toolbars_Dock_Area_Left.ForeColor = System.Drawing.SystemColors.ControlText; this._WorkorderFormLite_Toolbars_Dock_Area_Left.Location = new System.Drawing.Point(0, 0); this._WorkorderFormLite_Toolbars_Dock_Area_Left.Name = "_WorkorderFormLite_Toolbars_Dock_Area_Left"; this._WorkorderFormLite_Toolbars_Dock_Area_Left.Size = new System.Drawing.Size(0, 885); this._WorkorderFormLite_Toolbars_Dock_Area_Left.ToolbarsManager = this.tbManager; // // tbManager // this.tbManager.DesignerFlags = 1; this.tbManager.DockWithinContainer = this; this.tbManager.DockWithinContainerBaseType = typeof(System.Windows.Forms.Form); this.tbManager.HideToolbars = true; this.tbManager.ShowFullMenusDelay = 500; ultraToolbar1.DockedColumn = 0; ultraToolbar1.DockedRow = 2; ultraToolbar1.NonInheritedTools.AddRange(new Infragistics.Win.UltraWinToolbars.ToolBase[] { popupMenuTool1, buttonTool1, buttonTool3, buttonTool39, buttonTool4, buttonTool6, buttonTool7, buttonTool8, buttonTool9}); ultraToolbar1.Settings.AllowCustomize = Infragistics.Win.DefaultableBoolean.False; ultraToolbar1.Settings.AllowFloating = Infragistics.Win.DefaultableBoolean.False; ultraToolbar1.Settings.AllowHiding = Infragistics.Win.DefaultableBoolean.False; ultraToolbar1.Text = "WorkorderEntryMenuBar"; ultraToolbar2.DockedColumn = 0; ultraToolbar2.DockedRow = 1; buttonTool16.InstanceProps.RecentlyUsed = false; ultraToolbar2.NonInheritedTools.AddRange(new Infragistics.Win.UltraWinToolbars.ToolBase[] { buttonTool10, buttonTool11, buttonTool12, buttonTool16}); ultraToolbar2.Settings.AllowCustomize = Infragistics.Win.DefaultableBoolean.False; ultraToolbar2.Settings.AllowFloating = Infragistics.Win.DefaultableBoolean.False; ultraToolbar2.Settings.AllowHiding = Infragistics.Win.DefaultableBoolean.False; ultraToolbar2.Text = "WorkorderItemToolBar"; ultraToolbar3.DockedColumn = 1; ultraToolbar3.DockedRow = 1; ultraToolbar3.NonInheritedTools.AddRange(new Infragistics.Win.UltraWinToolbars.ToolBase[] { buttonTool17}); ultraToolbar3.Settings.AllowCustomize = Infragistics.Win.DefaultableBoolean.False; ultraToolbar3.Settings.AllowFloating = Infragistics.Win.DefaultableBoolean.False; ultraToolbar3.Settings.AllowHiding = Infragistics.Win.DefaultableBoolean.False; ultraToolbar3.Text = "WorkorderItemLaborToolBar"; ultraToolbar4.DockedColumn = 2; ultraToolbar4.DockedRow = 1; ultraToolbar4.FloatingSize = new System.Drawing.Size(135, 38); ultraToolbar4.NonInheritedTools.AddRange(new Infragistics.Win.UltraWinToolbars.ToolBase[] { buttonTool18}); ultraToolbar4.Text = "WorkorderItemPartToolBar"; ultraToolbar5.DockedColumn = 1; ultraToolbar5.DockedRow = 0; ultraToolbar5.FloatingSize = new System.Drawing.Size(97, 20); ultraToolbar5.NonInheritedTools.AddRange(new Infragistics.Win.UltraWinToolbars.ToolBase[] { buttonTool19}); ultraToolbar5.Text = "WorkorderItemTravelToolBar"; ultraToolbar6.DockedColumn = 0; ultraToolbar6.DockedRow = 0; ultraToolbar6.NonInheritedTools.AddRange(new Infragistics.Win.UltraWinToolbars.ToolBase[] { buttonTool20}); ultraToolbar6.Text = "WorkorderItemScheduledUserToolBar"; this.tbManager.Toolbars.AddRange(new Infragistics.Win.UltraWinToolbars.UltraToolbar[] { ultraToolbar1, ultraToolbar2, ultraToolbar3, ultraToolbar4, ultraToolbar5, ultraToolbar6}); this.tbManager.ToolbarSettings.AllowCustomize = Infragistics.Win.DefaultableBoolean.False; buttonTool21.SharedPropsInternal.AccessibleDescription = "recorddd"; appearance34.Image = global::AyaNova.Resource1.SaveExit32; buttonTool21.SharedPropsInternal.AppearancesLarge.Appearance = appearance34; appearance35.Image = global::AyaNova.Resource1.SaveExit16; buttonTool21.SharedPropsInternal.AppearancesSmall.Appearance = appearance35; buttonTool21.SharedPropsInternal.Caption = "LT:UI.Command.SaveClose"; appearance38.Image = global::AyaNova.Resource1.RecordHistory32; buttonTool23.SharedPropsInternal.AppearancesLarge.Appearance = appearance38; appearance39.Image = global::AyaNova.Resource1.RecordHistory16; buttonTool23.SharedPropsInternal.AppearancesSmall.Appearance = appearance39; buttonTool23.SharedPropsInternal.Caption = "LT:UI.Command.RecordHistory"; buttonTool24.SharedPropsInternal.Caption = "LT:UI.Command.Save"; buttonTool24.SharedPropsInternal.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.TextOnlyAlways; buttonTool25.SharedPropsInternal.Caption = "LT:UI.Command.Close"; buttonTool25.SharedPropsInternal.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.TextOnlyAlways; appearance40.Image = global::AyaNova.Resource1.ClientNotes32; buttonTool26.SharedPropsInternal.AppearancesLarge.Appearance = appearance40; appearance41.Image = global::AyaNova.Resource1.ClientNotes16; buttonTool26.SharedPropsInternal.AppearancesSmall.Appearance = appearance41; buttonTool26.SharedPropsInternal.Caption = "LT:ClientNote.Label.List"; appearance44.Image = global::AyaNova.Resource1.Delete32; buttonTool28.SharedPropsInternal.AppearancesLarge.Appearance = appearance44; appearance45.Image = global::AyaNova.Resource1.Delete16; buttonTool28.SharedPropsInternal.AppearancesSmall.Appearance = appearance45; buttonTool28.SharedPropsInternal.Caption = "LT:UI.Command.Delete"; buttonTool29.SharedPropsInternal.Caption = "LT:UI.Command.CurrentDateAndTime"; buttonTool29.SharedPropsInternal.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.TextOnlyAlways; appearance46.Image = global::AyaNova.Resource1.PartToUsed32; buttonTool30.SharedPropsInternal.AppearancesLarge.Appearance = appearance46; appearance47.Image = global::AyaNova.Resource1.PartToUsed16; buttonTool30.SharedPropsInternal.AppearancesSmall.Appearance = appearance47; buttonTool30.SharedPropsInternal.Caption = "LT:UI.Toolbar.WorkorderForm.SetAllPartsUsedInService"; buttonTool30.SharedPropsInternal.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.DefaultForToolType; appearance48.Image = global::AyaNova.Resource1.WorkorderTypes32; buttonTool31.SharedPropsInternal.AppearancesLarge.Appearance = appearance48; appearance49.Image = global::AyaNova.Resource1.WorkorderTypes16; buttonTool31.SharedPropsInternal.AppearancesSmall.Appearance = appearance49; buttonTool31.SharedPropsInternal.Caption = "LT:WorkorderItemType.Label.List"; appearance50.Image = global::AyaNova.Resource1.WorkorderStatuses32; buttonTool32.SharedPropsInternal.AppearancesLarge.Appearance = appearance50; appearance51.Image = global::AyaNova.Resource1.WorkorderStatuses16; buttonTool32.SharedPropsInternal.AppearancesSmall.Appearance = appearance51; buttonTool32.SharedPropsInternal.Caption = "LT:WorkorderStatus.Label.List"; appearance52.Image = global::AyaNova.Resource1.Priorities32; buttonTool33.SharedPropsInternal.AppearancesLarge.Appearance = appearance52; appearance53.Image = global::AyaNova.Resource1.Priorities16; buttonTool33.SharedPropsInternal.AppearancesSmall.Appearance = appearance53; buttonTool33.SharedPropsInternal.Caption = "LT:Priority.Label.List"; appearance54.Image = global::AyaNova.Resource1.Rates32; buttonTool34.SharedPropsInternal.AppearancesLarge.Appearance = appearance54; appearance55.Image = global::AyaNova.Resource1.Rates16; buttonTool34.SharedPropsInternal.AppearancesSmall.Appearance = appearance55; buttonTool34.SharedPropsInternal.Caption = "LT:Rate.Label.List"; appearance60.Image = global::AyaNova.Resource1.ConvertScheduledUserToLabor32; buttonTool37.SharedPropsInternal.AppearancesLarge.Appearance = appearance60; appearance61.Image = global::AyaNova.Resource1.ConvertScheduledUserToLabor16; buttonTool37.SharedPropsInternal.AppearancesSmall.Appearance = appearance61; buttonTool37.SharedPropsInternal.Caption = "LT:Workorder.Label.Command.ConvertScheduledUserToLabor"; appearance64.Image = global::AyaNova.Resource1.Print32; popupMenuTool2.SharedPropsInternal.AppearancesLarge.Appearance = appearance64; appearance65.Image = global::AyaNova.Resource1.Print16; popupMenuTool2.SharedPropsInternal.AppearancesSmall.Appearance = appearance65; popupMenuTool2.SharedPropsInternal.Caption = "LT:UI.Toolbar.Print"; popupMenuTool2.SharedPropsInternal.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageOnlyOnToolbars; popupMenuTool2.Tools.AddRange(new Infragistics.Win.UltraWinToolbars.ToolBase[] { listTool1}); listTool2.DisplayCheckmark = false; listTool2.SharedPropsInternal.Caption = "REPORTLIST"; appearance78.Image = global::AyaNova.Resource1.FollowUp32; buttonTool40.SharedPropsInternal.AppearancesLarge.Appearance = appearance78; appearance77.Image = global::AyaNova.Resource1.FollowUp16; buttonTool40.SharedPropsInternal.AppearancesSmall.Appearance = appearance77; buttonTool40.SharedPropsInternal.Caption = "LT:ScheduleMarker.Label.FollowUp"; buttonTool40.SharedPropsInternal.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageOnlyOnToolbars; this.tbManager.Tools.AddRange(new Infragistics.Win.UltraWinToolbars.ToolBase[] { buttonTool21, buttonTool23, buttonTool24, buttonTool25, buttonTool26, buttonTool28, buttonTool29, buttonTool30, buttonTool31, buttonTool32, buttonTool33, buttonTool34, buttonTool37, popupMenuTool2, listTool2, buttonTool40}); this.tbManager.UseLargeImagesOnToolbar = true; this.tbManager.ToolClick += new Infragistics.Win.UltraWinToolbars.ToolClickEventHandler(this.tbManager_ToolClick); // // _WorkorderFormLite_Toolbars_Dock_Area_Right // this._WorkorderFormLite_Toolbars_Dock_Area_Right.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping; this._WorkorderFormLite_Toolbars_Dock_Area_Right.BackColor = System.Drawing.SystemColors.Control; this._WorkorderFormLite_Toolbars_Dock_Area_Right.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Right; this._WorkorderFormLite_Toolbars_Dock_Area_Right.ForeColor = System.Drawing.SystemColors.ControlText; this._WorkorderFormLite_Toolbars_Dock_Area_Right.Location = new System.Drawing.Point(1016, 0); this._WorkorderFormLite_Toolbars_Dock_Area_Right.Name = "_WorkorderFormLite_Toolbars_Dock_Area_Right"; this._WorkorderFormLite_Toolbars_Dock_Area_Right.Size = new System.Drawing.Size(0, 885); this._WorkorderFormLite_Toolbars_Dock_Area_Right.ToolbarsManager = this.tbManager; // // _WorkorderFormLite_Toolbars_Dock_Area_Top // this._WorkorderFormLite_Toolbars_Dock_Area_Top.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping; this._WorkorderFormLite_Toolbars_Dock_Area_Top.BackColor = System.Drawing.SystemColors.Control; this._WorkorderFormLite_Toolbars_Dock_Area_Top.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Top; this._WorkorderFormLite_Toolbars_Dock_Area_Top.ForeColor = System.Drawing.SystemColors.ControlText; this._WorkorderFormLite_Toolbars_Dock_Area_Top.Location = new System.Drawing.Point(0, 0); this._WorkorderFormLite_Toolbars_Dock_Area_Top.Name = "_WorkorderFormLite_Toolbars_Dock_Area_Top"; this._WorkorderFormLite_Toolbars_Dock_Area_Top.Size = new System.Drawing.Size(1016, 0); this._WorkorderFormLite_Toolbars_Dock_Area_Top.ToolbarsManager = this.tbManager; // // _WorkorderFormLite_Toolbars_Dock_Area_Bottom // this._WorkorderFormLite_Toolbars_Dock_Area_Bottom.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping; this._WorkorderFormLite_Toolbars_Dock_Area_Bottom.BackColor = System.Drawing.SystemColors.Control; this._WorkorderFormLite_Toolbars_Dock_Area_Bottom.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Bottom; this._WorkorderFormLite_Toolbars_Dock_Area_Bottom.ForeColor = System.Drawing.SystemColors.ControlText; this._WorkorderFormLite_Toolbars_Dock_Area_Bottom.Location = new System.Drawing.Point(0, 885); this._WorkorderFormLite_Toolbars_Dock_Area_Bottom.Name = "_WorkorderFormLite_Toolbars_Dock_Area_Bottom"; this._WorkorderFormLite_Toolbars_Dock_Area_Bottom.Size = new System.Drawing.Size(1016, 0); this._WorkorderFormLite_Toolbars_Dock_Area_Bottom.ToolbarsManager = this.tbManager; // // WorkorderFormLite // this.AllowDrop = true; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit; this.AutoScroll = true; this.ClientSize = new System.Drawing.Size(1016, 885); this.Controls.Add(this.WorkorderFormLite_Fill_Panel); this.Controls.Add(this._WorkorderFormLite_Toolbars_Dock_Area_Left); this.Controls.Add(this._WorkorderFormLite_Toolbars_Dock_Area_Right); this.Controls.Add(this._WorkorderFormLite_Toolbars_Dock_Area_Top); this.Controls.Add(this._WorkorderFormLite_Toolbars_Dock_Area_Bottom); this.helpProvider1.SetHelpKeyword(this, ""); this.helpProvider1.SetHelpNavigator(this, System.Windows.Forms.HelpNavigator.Topic); this.MinimumSize = new System.Drawing.Size(614, 591); this.Name = "WorkorderFormLite"; this.helpProvider1.SetShowHelp(this, true); this.Closing += new System.ComponentModel.CancelEventHandler(this.WorkorderFormLite_Closing); this.Load += new System.EventHandler(this.WorkorderFormLite_Load); this.SizeChanged += new System.EventHandler(this.WorkorderFormLite_SizeChanged); this.DragDrop += new System.Windows.Forms.DragEventHandler(this.Form_DragDrop); this.DragEnter += new System.Windows.Forms.DragEventHandler(this.Form_DragEnter); this.pnlHeader.ResumeLayout(false); this.pnlHeaderRight.ResumeLayout(false); this.pnlHeaderRight.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.edInternalReferenceNumber)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.edCustomerReferenceNumber)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.edCustomerContactName)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.ckOnsite)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.GridCalendar)).EndInit(); this.pnlHeaderCenter.ResumeLayout(false); this.pnlHeaderCenter.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.cbWorkorderCategoryID)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.edSummary)).EndInit(); this.pnlHeaderLeft.ResumeLayout(false); this.pnlHeaderLeft.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.cbRegion)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.edTemplateDescription)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.edClientID)).EndInit(); this.pnlService.ResumeLayout(false); this.pnlServiceRight.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.ckReOpen)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.ckClosed)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.ckServiceCompleted)).EndInit(); this.pnlServiceCenter.ResumeLayout(false); this.pnlServiceCenter.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.dtServiceDate)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.edInvoiceNumber)).EndInit(); this.pnlServiceLeft.ResumeLayout(false); this.pnlServiceLeft.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.cbWorkorderStatusID)).EndInit(); this.pnlItem.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.gridWorkorderItems)).EndInit(); this.WorkorderFormLite_Fill_Panel.ResumeLayout(false); this.pnlParts.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.gridParts)).EndInit(); this.pnlWoItemPartGridControlPanel.ResumeLayout(false); this.pnlWoItemPartGridControlPanel.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.gridLabor)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.gridScheduledUsers)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.epWO)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.tbManager)).EndInit(); this.ResumeLayout(false); } #endregion // __ _ _ ___ ____ __ __ __ __ __ ___ ___ // / _)( )( )/ __)(_ _)/ \( \/ ) / _)/ \( \( _) // ( (_ )()( \__ \ )( ( () )) ( ( (_( () )) ) )) _) // \__) \__/ (___/ (__) \__/(_/\/\_) \__)\__/(___/(___) // #region Custom Events //custom delegate for main grid to know when a workorder has been updated so it //can refresh if necessary. Required as part of the change to modeless workorder editing dialog //i.e. editing multiple wo at once. //Case 697 public event WorkorderUpdated WorkorderUpdated; #endregion #region Global variables / items to be filled in later from preferences //If the client or head office are bankable then this //variable will contain that info private TypeAndID mWorkorderBankableObject=null; //applicable contract //private Contract mContract=null; //Tool tip to use for displaying broken rules in grids private System.Windows.Forms.ToolTip tipError = new System.Windows.Forms.ToolTip(); /// /// 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; //variable to hold user form settings //UIUserFormSetting mFormSetting; //Flag to save time setting to read only if has been done already bool bCurrentStateIsReadOnly=false; //used to indicate to the syncui idle event that the focus needs to be set back to the //UPC field in the gridParts Template add row because it just can't be done from //within any event handled by the grid itself //this is set to true in the AfterCellUpdate event then cleared by the //SyncUI event private bool bScanningParts=false; //used to track a potential change in state of the workorder //i.e. one of it's child items has changed //this is used by the SyncUI code to determine if it //should redraw the nav buttons or not private bool bWorkorderChildrenStateChanged=false; #endregion #region Form load and close private ControlContainerEditor ccGridDateTimeEditor = null; //private bool bLoading=true; private bool bSuspendAppIdleHandler=false; private void WorkorderFormLite_Load(object sender, System.EventArgs e) { //case 1039 //log.Debug("WorkorderFormLite_Load"); // // helpProvider1 // this.helpProvider1.HelpNamespace = Util.BaseHelpUrl + "the_order_header.htm"; Cursor.Current = Cursors.WaitCursor; this.Visible=false; //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 User edit screen from elsewhere in the program) if(mWorkorder.Rights < 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("User.Label.Workorder"))); this.Close(); return; } if (!mWorkorder.Closed && mWorkorder.WorkorderItems[0].Labors.Count == 0) { WorkorderItemLabor wil=mWorkorder.WorkorderItems[0].Labors.Add(mWorkorder.WorkorderItems[0]); wil.UserID = User.LiteUserID; wil.ServiceRateQuantity = 0; wil.ServiceStartDate = null; wil.ServiceStopDate = null; } if (!mWorkorder.Closed && mWorkorder.WorkorderItems[0].ScheduledUsers.Count == 0) { WorkorderItemScheduledUser wis = mWorkorder.WorkorderItems[0].ScheduledUsers.Add(mWorkorder.WorkorderItems[0]); wis.UserID = User.LiteUserID; } //Get contract and bankable status of client / head office mWorkorderBankableObject=mWorkorder.BankableResolved(); //mContract=mWorkorder.ContractResolved(); //-------------------------------------- ccGridDateTimeEditor = new ControlContainerEditor(); ccGridDateTimeEditor.EditingControl = GridCalendar; //------------------------------------------- if(mWorkorder.WorkorderItems.Count>0) mCurrentWorkorderItem=mWorkorder.WorkorderItems[0]; else mCurrentWorkorderItem=null; LoadReadOnlyLists(); int Split1 = 0; Util.LoadFormCustomization("WorkorderLiteInfo", this, tbManager, false, ref Split1 ); //splitter1.SplitPosition = Split1; Util.PluginInsertMenu(tbManager, new Util.PluginMenuOptionData(true, mWorkorder.RootObjectType, mWorkorder, null));//case 941 //case 1122 Util.ShowAllInsertMenu(tbManager, new TypeAndID(RootObjectTypes.Client, mWorkorder.ClientID), this); //case 1810 Util.LocalizeHelperInsertMenu(tbManager, this); Util.Localize(this); //case 1537 foreach (UltraToolbar tb in tbManager.Toolbars) { if (tb.Key == "WorkorderEntryMenuBar") { tb.DockedColumn = 0; tb.DockedRow = 0; } else { tb.DockedColumn = 1; tb.DockedRow = 0; } } //bLoading=false; InitializeComboBoxes(); DataBind(); InitializeGrid(); //Initial panel to show //todo: replace this with appropriate selection code //ShowPanel(pnlUnit); Cursor.Current = Cursors.Default; HideAllChildToolBars(); RestrictUI(); this.Visible=true; //Adjust display to show //all of the workorder item or 1/4 the //form height, whichever is smaller SizeWorkorderItemsArea(); //Hack! Required or else //workorderitem grid won't scroll to top as it should //no idea why, have spent hours on it now to no avail, can't //reproduce, but this fixes the problem //ScrollTemplateRowIntoView(); //Take user directly to preselected item if applicable GoToSelectedItem(); WorkorderFormLite_SizeChanged(null,null); //Show popup notes if applicable and not internal workorder if(mWorkorder.ClientID!=Guid.Empty) { string sPop=ClientPopUpNotesFetcher.GetNotes(mWorkorder.ClientID); if(sPop!="") MessageBox.Show(sPop,Util.LocaleText.GetLocalizedText("Client.Label.PopUpNotes"),MessageBoxButtons.OK,MessageBoxIcon.Information); } //Case 152 (new TabOrderManager(this)).SetTabOrder(TabOrderManager.TabScheme.AcrossFirst); ////Case 697 refresh maingrid form if (Util.frmMain != null && Util.frmMain.frmMainGrid != null) WorkorderUpdated += new WorkorderUpdated(Util.frmMain.frmMainGrid.w_WorkorderUpdated); ////Case 702 refresh schedule form if (this.mWorkorder.IsServiceWorkorder && Util.frmMain != null && Util.frmMain.frmMainSchedule != null) WorkorderUpdated += new WorkorderUpdated(Util.frmMain.frmMainSchedule.w_WorkorderUpdated); Application.Idle+= new EventHandler(Application_Idle); } private void WorkorderFormLite_Closing(object sender, System.ComponentModel.CancelEventArgs e) { //case 1039 //log.Debug("WorkorderFormLite_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); HideAllChildToolBars(); SaveGridLayouts(); Util.SaveFormCustomization("WorkorderLiteInfo", this, tbManager, false); } /// /// Save the user's pref's for grid layouts /// private void SaveGridLayouts() { //case 1039 //log.Debug("SaveGridLayouts"); Util.SaveGridLayout("WorkorderItemsLite","","",gridWorkorderItems); if(this.bLaborGridIntialized) Util.SaveGridLayout("WorkorderItemLabor","","",gridLabor); if(this.bPartsGridIntialized) Util.SaveGridLayout("WorkorderItemParts","","",gridParts); if(this.bScheduledUsersGridIntialized) Util.SaveGridLayout("WorkorderItemScheduledUsers","","",gridScheduledUsers); } #endregion #region Read only list objects initialization //Read only lists used for quick lookup private PriorityPickList mPriorityList; private UnitPickList mClientUnitList; private RatePickList mRateList; private PartPickList mPartList; private UserListScheduleable mUserList; private UserPickList mAllUsers; private TaxCodeList mTaxList; private VendorPickList mVendors; private TaskPickList mTaskList; private LoanItemPickList mLoanItemList; //Case 640 private PartWarehousePickList mWarehouseList; //case 1121 private WorkorderItemTypePickList mTypeList; /// /// /// private void LoadReadOnlyLists() { //case 1039 //log.Debug("LoadReadOnlyLists"); mPriorityList = PriorityPickList.GetList(); mClientUnitList = UnitPickList.GetListByClient(mWorkorder.ClientID); if (mWorkorder.IsTemplate) mRateList = RatePickList.GetListAllActiveRates(); else { mRateList = RatePickList.GetList(true); } //case 1160 //mPartList=PartPickList.GetAllParts(); FetchParts(); mUserList = UserListScheduleable.GetList(); mAllUsers=UserPickList.GetList(false);//case 58 not regional mTaxList=TaxCodeList.GetList(mWorkorder.ListOfTaxCodesSelected()); mVendors=VendorPickList.GetList(); mTaskList=TaskPickList.GetList(); mLoanItemList=LoanItemPickList.GetList(true); //Case 640 mWarehouseList = PartWarehousePickList.GetActiveOnlyListWithExceptions(mWorkorder.ListOfPartWarehousesSelected()); //case 1121 mTypeList = WorkorderItemTypePickList.GetList(); } #endregion #region Form sizing and view button setup related private void WorkorderFormLite_SizeChanged(object sender, System.EventArgs e) { if(this.WindowState==FormWindowState.Minimized) return; //always three panels since removing custom fields //from workorder header //int nThreePanelWidth=this.DisplayRectangle.Width/3; //case 1039 //log.Debug("WorkorderFormLite_SizeChanged"); //***************************************** //DEVELOPMENT ONLY - These are minimum required sizes //check this later to see if maybe they should grow //this.pnlHeader.Height=96; //this.pnlService.Height=56; //this.pnlQuote.Height=104; this.pnlHeader.Height = 106; this.pnlService.Height = 66; //**************************************** //Height is rowheight times number of rows plus one extra row for the //add new record row and one extra row for the scrollbar. //maximum one quarter of form space allowed for workorder items SizeWorkorderItemsArea(); } /// /// Optimally size the workorder items area /// giving maximum room to child area beneath it /// private void SizeWorkorderItemsArea() { //if(this.gridWorkorderItems.Visible==true && this.gridWorkorderItems.Rows.Count>0) //{ // //case 1039 //log.Debug("SizeWorkorderItemsArea"); // int nMaxHeight=this.DisplayRectangle.Height/4; // int nCalcHeight=gridWorkorderItems.Rows[0].Height*(gridWorkorderItems.Rows.Count+2); // nCalcHeight+=gridWorkorderItems.DisplayLayout.Bands[0].Header.Height; // if(nCalcHeight>nMaxHeight) nCalcHeight=nMaxHeight; // this.pnlItem.Height=nCalcHeight; //} } /// /// case 918 /// /// /// /// /// private Image NavButtonImage(string sImage, int nSize, bool bIncomplete) { Image i = null; switch (sImage) { case "WorkorderLabor": { switch (nSize) { case 16: i = Resource1.Labor16; break; case 24: i = Resource1.Labor24; break; case 32: i = Resource1.Labor32; break; } break; } case "Unit": { switch (nSize) { case 16: i = Resource1.Unit16; break; case 24: i = Resource1.Unit24; break; case 32: i = Resource1.Unit32; break; } break; } case "Part": { switch (nSize) { case 16: i = Resource1.Part16; break; case 24: i = Resource1.Part24; break; case 32: i = Resource1.Part32; break; } break; } case "WorkorderTravel": { switch (nSize) { case 16: i = Resource1.Travel16; break; case 24: i = Resource1.Travel24; break; case 32: i = Resource1.Travel32; break; } break; } case "WorkorderScheduled": { switch (nSize) { case 16: i = Resource1.ScheduledUser16; break; case 24: i = Resource1.ScheduledUser24; break; case 32: i = Resource1.ScheduledUser32; break; } break; } case "WorkorderTask": { switch (nSize) { case 16: i = Resource1.Task16; break; case 24: i = Resource1.Task24; break; case 32: i = Resource1.Task32; break; } break; } case "WorkorderExpenses": { switch (nSize) { case 16: i = Resource1.MiscExpense16; break; case 24: i = Resource1.MiscExpense24; break; case 32: i = Resource1.MiscExpense32; break; } break; } case "WorkorderLoanItem": { switch (nSize) { case 16: i = Resource1.Loan16; break; case 24: i = Resource1.Loan24; break; case 32: i = Resource1.Loan32; break; } break; } case "WorkorderOutside": { switch (nSize) { case 16: i = Resource1.OutsideService16; break; case 24: i = Resource1.OutsideService24; break; case 32: i = Resource1.OutsideService32; break; } break; } case "WorkorderCustom": { switch (nSize) { case 16: i = Resource1.CustomFields16; break; case 24: i = Resource1.CustomFields24; break; case 32: i = Resource1.CustomFields32; break; } break; } }//end of outer switch statement if (!bIncomplete) return i; return Util.ImageIncomplete(i); } #endregion #region Panel management //Variable to keep track of active panel Panel ActivePanel=null; private void ShowPanel(Panel DisplayPanel) { //case 1039 //if(log.IsDebugEnabled) //case 1039 //log.Debug("ShowPanel(panel="+DisplayPanel.Name+")"); //Do nothing of already selected if(ActivePanel!=null && ActivePanel==DisplayPanel) return; //Hide any visible child toolbars if(mActiveChildToolBarKey!="") { tbManager.Toolbars[mActiveChildToolBarKey].Visible=false; mActiveChildToolBarKey=""; } //Invis prior if not null if(ActivePanel!=null) ActivePanel.Visible=false; //Make this panel take up all availble space //by sizing it to the height of the nav panel //which is left docked so adjusts to height automatically //DisplayPanel.Height=pnlNavigation.Height; //Case 18 commented out above and added the following: DisplayPanel.Dock = DockStyle.Fill; DisplayPanel.Visible=true; ActivePanel=DisplayPanel; } #endregion #region Form DataBinding and BrokenRules handling #region --- Header related --- private bool AmBinding=false; /// /// Bind controls to business objects /// private void DataBind() { //case 1039 //if(log.IsDebugEnabled) //case 1039 //log.Debug("DataBind:type="+mWorkorder.WorkorderType.ToString()); AmBinding=true; //Subscribe to broken rules changed event OnBrokenRulesChanged mWorkorder.GetBrokenRulesCollection().ListChanged += new System.ComponentModel.ListChangedEventHandler(OnBrokenRulesChanged); DisplayFullerAddressForClientSelected(); //=-=-=-=-=-=- Form Field bindings =-=-=-=-=-=-=-=-=-=-=-= //Text editors Util.BindField(edSummary,"Text",mWorkorder,"Summary"); Util.BindField(edCustomerReferenceNumber,"Text",mWorkorder,"CustomerReferenceNumber"); Util.BindField(edInternalReferenceNumber,"Text",mWorkorder,"InternalReferenceNumber"); Util.BindField(edCustomerContactName,"Text",mWorkorder,"CustomerContactName"); //Combo boxes Util.BindField(cbWorkorderCategoryID,"Value",mWorkorder,"WorkorderCategoryID"); //Util.BindField(cbProjectID,"Value",mWorkorder,"ProjectID"); // //Check boxes Util.BindField(ckOnsite,"Checked",mWorkorder,"Onsite"); ckServiceCompleted.Checked=mWorkorder.ServiceCompleted; ckClosed.Checked=mWorkorder.Closed; //Added: 2-Oct-2006 this.edSummary.MaxLength = 255; this.edCustomerContactName.MaxLength = 255; this.edCustomerReferenceNumber.MaxLength = 255; this.edInternalReferenceNumber.MaxLength = 255; this.edTemplateDescription.MaxLength = 255; if (mWorkorder.IsTemplate) { Util.BindField(edTemplateDescription, "Text", mWorkorder, "TemplateDescription"); Util.BindField(cbRegion, "Value", mWorkorder, "RegionID"); } //Workorder type specific bindings switch(mWorkorder.WorkorderType) { case WorkorderTypes.Service: if (AyaBizUtils.Right("Object.Report") < (int)SecurityLevelTypes.ReadOnly) { tbManager.Tools["LT:UI.Toolbar.Print"].SharedProps.Visible = false; } else { tbManager.Tools["LT:UI.Toolbar.Print"].SharedProps.Visible = true; Util.ReportFillList(this.tbManager.Tools["REPORTLIST"], WorkorderServiceList.ReportKey, WorkorderServiceDetailedReportData.ReportKey); } //Show panel and set icon for form pnlService.Visible = true; this.Icon = Resource1.ServiceWorkorder16icon; //Field bindings Util.BindField(dtServiceDate, "Value", mWorkorder.WorkorderService, "ServiceDate"); //Util.BindField(dtCloseByDate, "Value", mWorkorder.WorkorderService, "CloseByDate"); Util.BindField(edInvoiceNumber, "Text", mWorkorder.WorkorderService, "InvoiceNumber"); Util.BindField(cbWorkorderStatusID, "Value", mWorkorder.WorkorderService, "WorkorderStatusID"); break; } // // // //Grids //Maxband depth=1 prevents child collections from //branching out under the grid rows //(i.e. otherwise under each workorder item you would see all the labor, parts etc) gridWorkorderItems.DisplayLayout.MaxBandDepth=1;//<--Is this the best way to do it or is there a more performant way? gridLabor.DisplayLayout.MaxBandDepth=1; Util.BindField(gridWorkorderItems,"DataSource",mWorkorder,"WorkorderItems"); //=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- //Bind IsDirty property to hidden checkbox to //ensure isdirtychanged event is available //to data binding infrastructure Util.BindField(ckIsDirty,"Checked",mWorkorder,"IsDirty"); //Setup initial link to broken rules OnBrokenRulesChanged(null,null); AmBinding=false; } /// /// Handle a change in broken rules /// /// /// private void OnBrokenRulesChanged(object sender, System.ComponentModel.ListChangedEventArgs e) { Util.BrokenRuleFeedback(this,mWorkorder,epWO); } /// /// retrieve and display address /// and contact info for selected Client /// private void DisplayFullerAddressForClientSelected() { if (mWorkorder.IsTemplate) lblTemplate.Text=mWorkorder.NameAndAddress ; else edClientID.Text = mWorkorder.NameAndAddress; } #endregion #region --- Workorder Item related --- private WorkorderItem mCurrentWorkorderItem=null; /// /// Binds workorder item related controls to workorder item selected /// /// private void DataBindWorkorderItem(string strWorkorderItemID) { //case 1039 //log.Debug("DataBindWorkorderItem"); mCurrentWorkorderItem=mWorkorder.WorkorderItems[strWorkorderItemID]; //Grid only items Util.BindField(this.gridLabor,"DataSource",mCurrentWorkorderItem,"Labors"); Util.BindField(this.gridParts,"DataSource",mCurrentWorkorderItem,"Parts"); Util.BindField(this.gridScheduledUsers,"DataSource",mCurrentWorkorderItem,"ScheduledUsers"); //Show part requests if appropriate AdjustPartsDisplay(); } #endregion #endregion #region QuickAccess /// /// Take user to part that needs to be edited directly /// private void GoToSelectedItem() { //case 1039 //log.Debug("GoToSelectedItem"); //If nothing specific selected then just activate first (and only in lite) woitem if (mGoTo == RootObjectTypes.Workorder) { gridWorkorderItems.Rows[0].Activate(); return; } //Step 1: Go anywhere at all or just be normal? if(mGoTo!=RootObjectTypes.Workorder) { bool bItemSelected=false; //Step 2: Select workorder item? if(mGoToWorkorderItemID!=Guid.Empty) { //case 1039 //log.Debug("GoToSelectedItem:WorkorderItem:SPECIFIC"); foreach(UltraGridRow r in gridWorkorderItems.Rows) { if((Guid)r.Cells["ID"].Value==mGoToWorkorderItemID) { r.Activate(); bItemSelected=true; break; } } } if(!bItemSelected) { gridWorkorderItems.Rows[0].Activate(); } //STEP 3: Hone in on a specific item? switch(mGoTo) { //case RootObjectTypes.WorkorderItemLabor: // //case 1039 //log.Debug("GoToSelectedItem:LabourPanel"); // ShowPanel(pnlLabour); // gridLabor.Focus(); // //STEP 4: Select a specific record? // bItemSelected=false; // if(mGoToWorkorderItemSubItemID!=Guid.Empty) // { // //case 1039 //log.Debug("GoToSelectedItem:LabourPanel:SPECIFIC"); // foreach(UltraGridRow r in gridLabor.Rows) // { // if((Guid)r.Cells["ID"].Value==mGoToWorkorderItemSubItemID) // { // r.Activate(); // bItemSelected=true; // break; // } // } // } // if(!bItemSelected) // { // if(gridLabor.Rows.Count>0) // gridLabor.Rows[0].Activate(); // } // break; //case RootObjectTypes.WorkorderItemScheduledUser: // //case 1039 //log.Debug("GoToSelectedItem:SchedUser"); // ShowPanel(pnlScheduledUser); // this.gridScheduledUsers.Focus(); // //STEP 4: Select a specific record? // bItemSelected=false; // if(mGoToWorkorderItemSubItemID!=Guid.Empty) // { // //case 1039 //log.Debug("GoToSelectedItem:SchedUser:SPECIFIC"); // foreach(UltraGridRow r in gridScheduledUsers.Rows) // { // if((Guid)r.Cells["ID"].Value==mGoToWorkorderItemSubItemID) // { // r.Activate(); // bItemSelected=true; // break; // } // } // } // if(!bItemSelected) // { // if(gridScheduledUsers.Rows.Count>0) // gridScheduledUsers.Rows[0].Activate(); // } // break; //Changed: June-16-2006 Added support for going to a part case RootObjectTypes.WorkorderItemPart: //case 1039 //log.Debug("GoToSelectedItem:PartsPanel"); ShowPanel(pnlParts); gridParts.Focus(); //STEP 4: Select a specific record? bItemSelected = false; if (mGoToWorkorderItemSubItemID != Guid.Empty) { //case 1039 //log.Debug("GoToSelectedItem:PartsPanel:SPECIFIC"); foreach (UltraGridRow r in gridParts.Rows) { if ((Guid)r.Cells["ID"].Value == mGoToWorkorderItemSubItemID) { r.Activate(); bItemSelected = true; break; } } } if (!bItemSelected) { if (gridParts.Rows.Count > 0) gridParts.Rows[0].Activate(); } break; } } } #region Quick Access properties private RootObjectTypes mGoTo=RootObjectTypes.Workorder; /// /// Part of workorder to focus on when opened for quicker access by user /// public RootObjectTypes GoTo { get { return mGoTo; } set { mGoTo=value; } } private Guid mGoToWorkorderItemID=Guid.Empty; /// /// ID of specific Workorder item to intially select or if /// guid empty then only goes to intiial workorder item /// and area specified in GOTO /// public Guid GoToWorkorderItemID { get { return mGoToWorkorderItemID; } set { mGoToWorkorderItemID=value; } } private Guid mGoToWorkorderItemSubItemID=Guid.Empty; /// ///ID of child item of workorderitem to focus on ///if applicable otherwise Guid.Empty signifies no selection ///of child item necessary /// public Guid GoToWorkorderItemSubItemID { get { return mGoToWorkorderItemSubItemID; } set { mGoToWorkorderItemSubItemID=value; } } #endregion #endregion #region Business object editing / adding / deletion related code private Workorder mWorkorder; /// /// Workorder record to display /// set by caller /// public Workorder WorkorderToEdit { get { return mWorkorder; } set { mWorkorder=value; //mWorkorder.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 btnWorkorderCategoryID.Focus(); try//case 1450 { gridWorkorderItems.UpdateData(); gridLabor.UpdateData(); gridParts.UpdateData(); gridScheduledUsers.UpdateData(); } catch { return false; } //Added: 17-Nov-2006 to handle concurrency errors more gracefully try { #region Process savetype switch (SaveType) { case RecordActionType.DeleteAndExit: if (Util.PromptForDeleteWorkorder() == DialogResult.Yes) { //Delete, then exit try { mWorkorder.ApplyEdit(); mWorkorder.Delete(); mWorkorder.Save(); //case 697 WorkorderUpdated(this,null); } 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 (mWorkorder.IsSavable) { mWorkorder.ApplyEdit(); mWorkorder.Save(); //case 697 WorkorderUpdated(this, null); bClosingHandled = true; mbChangesMade = true; this.Close(); return true; } if (mWorkorder.IsDirty)//dirty and unsaveable due to broken rules { if (Util.PromptForBrokenRulesCancelSave() == DialogResult.Yes) { bClosingHandled = true; this.Close(); return true; } else return false; } //not dirty so just exit bClosingHandled = true; this.Close(); return true; case RecordActionType.SaveOnly: if (mWorkorder.IsSavable) { mWorkorder.ApplyEdit(); mWorkorder = (Workorder)mWorkorder.Save(); //case 1040 DataBind(); //Case 697 WorkorderUpdated(this, null); //lock parts grid rows that have inventory affected //(this would be done on a load normally, but this particular //save will occur without closing the wo form so need to do this here) foreach (UltraGridRow r in gridParts.Rows) { if (r.Activation == Activation.AllowEdit) { if ((bool)r.Cells["HasAffectedInventory"].Value == true) { //case 481 //r.Activation = Activation.NoEdit; r.Activation = Activation.ActivateOnly; r.Appearance.ForeColor = System.Drawing.SystemColors.GrayText; } else { r.Activation = Activation.AllowEdit; r.Appearance.ForeColor = System.Drawing.SystemColors.ControlText; } } } //Update the bank button in the labor grid //so that it's state is changed now that hte object has //been saved if (gridLabor.DisplayLayout.Bands[0].Columns.Exists("BANK")) { foreach (UltraGridRow r in gridLabor.Rows) { if ((Guid)r.Cells["ServiceBankID"].Value == Guid.Empty) { //e.Row.Cells["BANK"].Appearance.Image=Util.Image("ServiceBankNew16.png"); //If the underlying record is new or dirty (not saved) then //user can not click on button if (!((CSLA.BusinessBase)r.ListObject).IsDirty && !((CSLA.BusinessBase)r.ListObject).IsNew) r.Cells["BANK"].Activation = Activation.ActivateOnly; else r.Cells["BANK"].Activation = Activation.Disabled; } } } mbChangesMade = true; return true; } return true; case RecordActionType.PromptToSave: //Prompt to save and save if //required if (mWorkorder.IsDirty) { DialogResult dr = Util.PromptForSave(); if (dr == DialogResult.Cancel) { //Cancel return false; } if (dr == DialogResult.Yes) { //Save before exit if (mWorkorder.IsSavable) { mWorkorder.ApplyEdit(); mWorkorder.Save(); //case 697 WorkorderUpdated(this, null); mbChangesMade = true; return true; } if (mWorkorder.IsDirty)//dirty and unsaveable due to broken rules { if (Util.PromptForBrokenRulesCancelSave() == DialogResult.Yes) { return true; } else return false; } } } return true; } #endregion process savetype } catch (Exception ex) { //crack the exception if (ex.InnerException != null) ex = ex.InnerException; if (ex is AyConcurrencyException) { MessageBox.Show(ex.Message, "", MessageBoxButtons.OK, MessageBoxIcon.Information); //if (log.IsDebugEnabled) //case 1039 //log.Debug("Save record concurrency exception", ex); bClosingHandled = true; this.Close(); return false; } else throw; } return false; } #endregion #region Comboboxes (setup/events) //HEADER ITEMS private void cbWorkorderCategoryID_NeedMoreData() { Util.FillGZComboBoxWithNameIDList("WorkorderCategory",cbWorkorderCategoryID,false,Guid.Empty, false); } //case 58 private void cbRegion_NeedMoreData() { Util.FillGZComboBoxWithNameIDList("Region", cbRegion, false, Guid.Empty, true); } private void InitializeComboBoxes() { //case 1039 //log.Debug("InitializeComboBoxes"); //Load combo boxes with initial values Util.FillGZComboBoxWithNameIDList("WorkorderCategory",cbWorkorderCategoryID,true,mWorkorder.WorkorderCategoryID, false); //Util.FillGZComboBoxWithNameIDList("Project",cbProjectID,true,mWorkorder.ProjectID, true); //case 58 if(mWorkorder.IsTemplate) Util.FillGZComboBoxWithNameIDList("Region", cbRegion, true, mWorkorder.RegionID, true); //Workorder type specific switch(mWorkorder.WorkorderType) { case WorkorderTypes.Service: Util.FillGZComboBoxWithNameIDList("WorkorderStatus", cbWorkorderStatusID, false, mWorkorder.WorkorderService.WorkorderStatusID, false); break; } } #endregion #region Main header hyperButtons private void btnClientID_Click(object sender, System.EventArgs e) { //case 1039 //log.Debug("btnClientID_Click"); if(mWorkorder.ClientID==Guid.Empty) return; ClientInfoForm cf=new ClientInfoForm(); cf.ClientToEdit=Client.GetItem(mWorkorder.ClientID); cf.Visible=false; cf.ShowDialog(); if(cf.ChangesMade) { //TODO: if change made to client, it should update the display shown } } private void btnWorkorderCategoryID_Click(object sender, System.EventArgs e) { //case 1039 //log.Debug("btnWorkorderCategoryID_Click"); GenericListForm g = new GenericListForm(); WorkorderCategories o = WorkorderCategories.GetItems(); g.SelectedRecordID=cbWorkorderCategoryID.Value; g.GridDataSource=o; g.ShowDialog(); if(g.ChangesMade) { mWorkorder.WorkorderCategoryID=Guid.Empty; Util.FillGZComboBoxWithNameIDList("WorkorderCategory",cbWorkorderCategoryID,false,Guid.Empty, false); mWorkorder.WorkorderCategoryID=(Guid)g.SelectedRecordID; } } private void btnWorkorderStatusID_Click(object sender, System.EventArgs e) { //case 1039 //log.Debug("btnWorkorderStatusID_Click"); GenericListForm g = new GenericListForm(); WorkorderStatuses o = WorkorderStatuses.GetItems(); g.SelectedRecordID=cbWorkorderStatusID.Value; g.GridDataSource=o; g.ShowDialog(); if(g.ChangesMade) { mWorkorder.WorkorderService.WorkorderStatusID=Guid.Empty; Util.FillGZComboBoxWithNameIDList("WorkorderStatus",cbWorkorderStatusID,false,Guid.Empty, false); mWorkorder.WorkorderService.WorkorderStatusID=(Guid)g.SelectedRecordID; } } #endregion Main header hyperButtons #region Header panel Control sizing private void edClientID_Enter(object sender, System.EventArgs e) { if (mWorkorder.IsTemplate) return; edClientID.Height+=80; pnlHeader.Height+=80; } private void edClientID_Leave(object sender, System.EventArgs e) { if (mWorkorder.IsTemplate) return; edClientID.Height-=80; pnlHeader.Height-=80; } private void pnlHeader_SizeChanged(object sender, System.EventArgs e) { //case 1039 //log.Debug("pnlHeader_SizeChanged"); if(this.WindowState==FormWindowState.Minimized) return; int nPanelWidth=pnlHeader.Width/3; this.pnlHeaderLeft.Width=nPanelWidth; this.pnlHeaderCenter.Width=nPanelWidth; this.pnlHeaderRight.Width=nPanelWidth; //Size of controls in panel //One third int nLeftWidth=(nPanelWidth/3); //two thirds int nRightWidth=nPanelWidth-nLeftWidth; //make room for error icons etc nRightWidth-=16; //Left panel lblTemplate.Width = nLeftWidth + nRightWidth; this.lblTemplateDescription.Width = nLeftWidth; edTemplateDescription.Left = nLeftWidth; edTemplateDescription.Width = nRightWidth; //case 58 lblRegionID.Width = nLeftWidth + nRightWidth; cbRegion.Left = nLeftWidth; cbRegion.Width = nRightWidth; //center panel lblSummary.Width=nLeftWidth; edSummary.Left=nLeftWidth; edSummary.Width=nRightWidth; btnWorkorderCategoryID.Width=nLeftWidth; cbWorkorderCategoryID.Left=nLeftWidth; cbWorkorderCategoryID.Width=nRightWidth; //Right panel //turn off Offset nRightWidth=nRightWidth+8; lblCustomerReferenceNumber.Width=nLeftWidth; edCustomerReferenceNumber.Left=nLeftWidth; edCustomerReferenceNumber.Width=nRightWidth; lblInternalReferenceNumber.Width=nLeftWidth; edInternalReferenceNumber.Left=nLeftWidth; edInternalReferenceNumber.Width=nRightWidth; lblCustomerContactName.Width=nLeftWidth; edCustomerContactName.Left=nLeftWidth; edCustomerContactName.Width=nRightWidth; } #endregion #region Service panel control sizing private void pnlService_SizeChanged(object sender, System.EventArgs e) { if(this.WindowState==FormWindowState.Minimized) return; //case 1039 //log.Debug("pnlService_SizeChanged"); int nPanelWidth=pnlService.Width/3; pnlServiceLeft.Width=nPanelWidth; pnlServiceCenter.Width=nPanelWidth; pnlServiceRight.Width=nPanelWidth; //Size of controls in panel //One third int nLeftWidth=(nPanelWidth/3); //two thirds - 8 to give some spacing and allow for possible scroll bar int nRightWidth=nPanelWidth-nLeftWidth; //make room for error icons nRightWidth-=16; //Size and align controls in Left panel btnWorkorderStatusID.Width=nLeftWidth; cbWorkorderStatusID.Left=nLeftWidth; cbWorkorderStatusID.Width=nRightWidth; //lblCloseByDate.Width=nLeftWidth; //dtCloseByDate.Left=nLeftWidth; //dtCloseByDate.Width=nRightWidth; //center panel lblInvoiceNumber.Width=nLeftWidth; edInvoiceNumber.Left=nLeftWidth; edInvoiceNumber.Width=nRightWidth; lblServiceDate.Width=nLeftWidth; dtServiceDate.Left=nLeftWidth; dtServiceDate.Width=nRightWidth; } #endregion #region Form UI / Business object synchronization and Restrictions //private int mLastDocsCount=-1; /// /// Synchronize the state of the UI to the BO's /// private void SyncUI() { if(bScanningParts) { bScanningParts=false; gridParts.Rows.TemplateAddRow.Cells["UPC"].Activate(); gridParts.PerformAction(UltraGridAction.EnterEditMode); return; } tbManager.Tools["LT:UI.Command.CurrentDateAndTime"].SharedProps.Caption = DBUtil.CurrentWorkingDateTime.ToString(); //draw nav button images //if the state of the children has been changed at all if(bWorkorderChildrenStateChanged) { bWorkorderChildrenStateChanged=false; //NavButtonHop(); } //Case 655 tbManager.Tools["LT:ScheduleMarker.Label.FollowUp"].SharedProps.Visible = !mWorkorder.IsTemplate; //Workorder type specific switch(mWorkorder.WorkorderType) { case WorkorderTypes.Service: if(mWorkorder.WorkorderService.ServiceNumber!=0) this.Text=Util.LocaleText.GetLocalizedText("O.WorkorderService")+" "+mWorkorder.WorkorderService.ServiceNumber.ToString(); else this.Text=Util.LocaleText.GetLocalizedText("O.WorkorderService"); break; case WorkorderTypes.PreventiveMaintenance: if(mWorkorder.WorkorderPreventiveMaintenance.PreventiveMaintenanceNumber!=0) this.Text=Util.LocaleText.GetLocalizedText("O.WorkorderPreventiveMaintenance")+" "+mWorkorder.WorkorderPreventiveMaintenance.PreventiveMaintenanceNumber.ToString(); else this.Text=Util.LocaleText.GetLocalizedText("O.WorkorderPreventiveMaintenance"); break; case WorkorderTypes.Quote: if(mWorkorder.WorkorderQuote.QuoteNumber!=0) this.Text=Util.LocaleText.GetLocalizedText("O.WorkorderQuote")+" "+mWorkorder.WorkorderQuote.QuoteNumber.ToString(); else this.Text=Util.LocaleText.GetLocalizedText("O.WorkorderQuote"); break; case WorkorderTypes.TemplateService: if (mWorkorder.WorkorderService.ServiceNumber != 0) this.Text = Util.LocaleText.GetLocalizedText("O.WorkorderServiceTemplate") + " " + mWorkorder.WorkorderService.ServiceNumber.ToString(); else this.Text = Util.LocaleText.GetLocalizedText("O.WorkorderServiceTemplate"); break; case WorkorderTypes.TemplatePreventiveMaintenance: if (mWorkorder.WorkorderPreventiveMaintenance.PreventiveMaintenanceNumber != 0) this.Text = Util.LocaleText.GetLocalizedText("O.WorkorderPreventiveMaintenanceTemplate") + " " + mWorkorder.WorkorderPreventiveMaintenance.PreventiveMaintenanceNumber.ToString(); else this.Text = Util.LocaleText.GetLocalizedText("O.WorkorderPreventiveMaintenanceTemplate"); break; case WorkorderTypes.TemplateQuote: if (mWorkorder.WorkorderQuote.QuoteNumber != 0) this.Text = Util.LocaleText.GetLocalizedText("O.WorkorderQuoteTemplate") + " " + mWorkorder.WorkorderQuote.QuoteNumber.ToString(); else this.Text = Util.LocaleText.GetLocalizedText("O.WorkorderQuoteTemplate"); break; } tbManager.Tools["LT:UI.Toolbar.WorkorderForm.SetAllPartsUsedInService"].SharedProps.Visible= mWorkorder.IsServiceWorkorder && !AyaBizUtils.Lite; tbManager.Tools["LT:Workorder.Label.Command.ConvertScheduledUserToLabor"].SharedProps.Visible= mWorkorder.IsServiceWorkorder || mWorkorder.IsServiceTemplateWorkorder; //Case 43 tt.GetUltraToolTip(edSummary).ToolTipText = edSummary.Text; tt.GetUltraToolTip(edCustomerContactName).ToolTipText = edCustomerContactName.Text; tt.GetUltraToolTip(edCustomerReferenceNumber).ToolTipText = edCustomerReferenceNumber.Text; tt.GetUltraToolTip(edInternalReferenceNumber).ToolTipText = edInternalReferenceNumber.Text; tt.GetUltraToolTip(edTemplateDescription).ToolTipText = edTemplateDescription.Text; } /// /// When the application enters an idle state /// update the UI to reflect changs in BO status /// (required because grids don't tell the UI to update when they are /// bound to a business object and are edited) /// /// /// private void Application_Idle(object sender, EventArgs e) { if(!bSuspendAppIdleHandler) SyncUI(); } /// /// Adapt UI to accomodate users security access level /// private void RestrictUI() { //case 1039 //if(log.IsDebugEnabled) //case 1039 //log.Debug("RestrictUI: " + ((SecurityLevelTypes)AyaBizUtils.Right("Object.xWorkorder")).ToString()); //Workorder - Read only if(mWorkorder.ServiceCompleted || mWorkorder.Closed || mWorkorder.Rights == SecurityLevelTypes.ReadOnly) SetAccess(true,true); else SetAccess(false,true); tbManager.Tools["LT:ScheduleMarker.Label.FollowUp"].SharedProps.Visible = AyaBizUtils.Right("Object.ScheduleMarker") > (int)SecurityLevelTypes.NoAccess; } /// /// Set everything to Read only or editable state /// used to set access rights and or /// if Workorder is locked after entry /// safe to call repeatedly from anywhere, takes into account /// security rights /// /// Set access rights to read only if true /// Make settings regardless if already set that way, used to initialize first time private void SetAccess(bool ReadOnly, bool ForceSetting) { //Already set this way? if(!ForceSetting && bCurrentStateIsReadOnly==ReadOnly) return; //case 1039 //if(log.IsDebugEnabled) //case 1039 //log.Debug("SetAccess(ReadOnly="+ReadOnly.ToString()+", Force=" + ForceSetting.ToString()+")"); #region Toolbar security access tbManager.BeginUpdate(); //Show 'em all first then hide them later foreach(ToolBase tb in tbManager.Tools) { tb.SharedProps.Visible=true; } //Changed: 2-Oct-2006 //remove exit button so users can't accidentally click on delete button beside it tbManager.Tools["LT:UI.Command.Close"].SharedProps.Visible = false; //******************************* //Save? (separate from straight read only setting) bool bCanSave=true; if(mWorkorder.Rights < SecurityLevelTypes.ReadWrite)//case 986 bCanSave=false; //Saving tbManager.Tools["LT:UI.Command.SaveClose"].SharedProps.Visible=bCanSave; tbManager.Tools["LT:UI.Command.Save"].SharedProps.Visible=bCanSave; //*********************************** //******** RATES TOOL ********* tbManager.Tools["LT:Rate.Label.List"].SharedProps.Visible=(AyaBizUtils.Right("Object.Rate")> (int)SecurityLevelTypes.NoAccess); //***************************** //user needs a method to close the form if read only //because can't use usual save and close etc //so make sure that the close tool is there if(ReadOnly) { //Ensure that close tool won't appear twice when //it's added if it was there previously tbManager.Tools["LT:UI.Command.Close"].SharedProps.AllowMultipleInstances=false; //Ensure Close tool is visible so user has a method to close the form //besides the form control box (normally this is not visible) tbManager.Toolbars[0].Tools.AddTool("LT:UI.Command.Close"); } //Disable deletion? bool bNoDelete=(ReadOnly || mWorkorder.Closed || mWorkorder.Rights != SecurityLevelTypes.ReadWriteDelete); tbManager.Tools["LT:UI.Command.Delete"].SharedProps.Visible=!bNoDelete; tbManager.EndUpdate(); #endregion toolbars //DISABLE / ENABLE EDITABLE CONTROLS Util.SetAccess(ReadOnly,this,mWorkorder.Rights==SecurityLevelTypes.ReadWrite); edClientID.ReadOnly=true; //disallow editing of invoice number and //only allow in special circs. below edInvoiceNumber.ReadOnly=true; //Special circumstances... if(!mWorkorder.Closed)//closed is always read only no matter what. { //Enabled / disabled service completed checkbox //And selected header items (two) //differs slightly from explicit read only or read write setting used elsewhere here //because only a user with full access can set it back to false if it's true already //But a user with only read write access *can* set it to true if it's false already switch(mWorkorder.Rights) { case SecurityLevelTypes.NoAccess: //Case 413 ckServiceCompleted.Enabled=false; break; case SecurityLevelTypes.ReadOnly: //Case 413 ckServiceCompleted.Enabled=false; break; case SecurityLevelTypes.ReadWrite: //Not closed if here and have some rights so enabled the selected header items this.cbWorkorderStatusID.ReadOnly=false; //Removed Case 405 //ckClosed.Enabled=true; //enabled only if it's not set to true already if(mWorkorder.ServiceCompleted==true) { //Case 413 ckServiceCompleted.Enabled=false; //Only enter an invoice when service completed edInvoiceNumber.ReadOnly=false; } else { //Case 413 ckServiceCompleted.Enabled=true; edInvoiceNumber.ReadOnly=true; } break; case SecurityLevelTypes.ReadWriteDelete: //Not closed if here and have some rights so enabled the selected header items if(mWorkorder.ServiceCompleted==true) edInvoiceNumber.ReadOnly=false; else edInvoiceNumber.ReadOnly=true; this.cbWorkorderStatusID.ReadOnly=false; //Case 413 ckServiceCompleted.Enabled=true; //removed case 405 //ckClosed.Enabled=true; break; } } ////Don't show warranty info for closed or s.c. workorders ////because it's calced using current date and so if viewing ////old workorders it might show somethign being warranty expired ////when in fact it was under warranty at the time (causing mass confusion) //if(mWorkorder.Closed||mWorkorder.ServiceCompleted || mWorkorder.IsTemplate) // edWarrantyInfo.Visible=false; //else // edWarrantyInfo.Visible=true; //Case 405 ckClosed.Enabled = mWorkorder.IsCloseAllowed; //Case 413 ckServiceCompleted.Enabled = mWorkorder.IsServiceCompletedEditable; bCurrentStateIsReadOnly=ReadOnly; ckClosed.Visible = true; ckReOpen.Visible = false; //case 833 if (mWorkorder.IsServiceWorkorder && mWorkorder.IsReopenAllowed) { //hide the closed checkbox, show the reopen checkbox ckClosed.Visible = false; ckReOpen.Enabled = true; ckReOpen.Visible = true; } if (AyaBizUtils.Lite) { int nDefaultGridHeight=(gridWorkorderItems.Rows[0].Height * 4); gridWorkorderItems.DisplayLayout.Override.AllowAddNew = AllowAddNew.No; //gridWorkorderItems.DisplayLayout.Override.FixedRowsLimit = 1; gridWorkorderItems.DisplayLayout.Override.RowSelectors = DefaultableBoolean.False; gridWorkorderItems.DisplayLayout.BorderStyle = UIElementBorderStyle.None; gridWorkorderItems.DisplayLayout.Override.BorderStyleHeader = UIElementBorderStyle.Etched; gridWorkorderItems.DisplayLayout.Override.HeaderAppearance.TextHAlign = HAlign.Left; // gridWorkorderItems.DisplayLayout.CaptionVisible = DefaultableBoolean.False; gridWorkorderItems.DisplayLayout.Override.HeaderClickAction = HeaderClickAction.Default; pnlItem.Height = nDefaultGridHeight; gridLabor.DisplayLayout.Override.AllowAddNew = AllowAddNew.No; //gridLabor.DisplayLayout.Override.FixedRowsLimit = 1; gridLabor.DisplayLayout.Override.RowSelectors = DefaultableBoolean.False; gridLabor.DisplayLayout.BorderStyle = UIElementBorderStyle.None; gridLabor.DisplayLayout.Override.BorderStyleHeader = UIElementBorderStyle.Etched; gridLabor.DisplayLayout.Override.HeaderAppearance.TextHAlign = HAlign.Left; // gridLabor.DisplayLayout.CaptionVisible = DefaultableBoolean.False; gridLabor.DisplayLayout.Override.HeaderClickAction = HeaderClickAction.Default; gridLabor.Height = nDefaultGridHeight; gridScheduledUsers.DisplayLayout.Override.AllowAddNew = AllowAddNew.No; //gridScheduledUsers.DisplayLayout.Override.FixedRowsLimit = 1; gridScheduledUsers.DisplayLayout.Override.RowSelectors = DefaultableBoolean.False; gridScheduledUsers.DisplayLayout.BorderStyle = UIElementBorderStyle.None; gridScheduledUsers.DisplayLayout.Override.BorderStyleHeader = UIElementBorderStyle.Etched; gridScheduledUsers.DisplayLayout.Override.HeaderAppearance.TextHAlign = HAlign.Left; // gridScheduledUsers.DisplayLayout.CaptionVisible = DefaultableBoolean.False; gridScheduledUsers.DisplayLayout.Override.HeaderClickAction = HeaderClickAction.Default; gridScheduledUsers.Height = nDefaultGridHeight; } } #endregion #region Workorder Items Grid Initialization /// /// Get grid ready /// private void InitializeGrid() { //case 1039 //log.Debug("InitializeGrid (workorderitems)"); //gridWorkorderItems.DisplayLayout.Override.HeaderClickAction=HeaderClickAction.SortSingle; //gridWorkorderItems.DisplayLayout.Override.SelectTypeRow=SelectType.Single; //gridWorkorderItems.DisplayLayout.Override.AllowAddNew=AllowAddNew.TemplateOnBottom; Util.GridPreLocalize("WorkorderItem",gridWorkorderItems.DisplayLayout.Bands[0]); Util.LocalizeHelperSuckOutKeys(this.Name, gridWorkorderItems);//case 1810 Util.FetchGridLayout("WorkorderItemsLite","",gridWorkorderItems); #region case 1252 Hide internal columns if no grid layout currently available //hide standard stuff always Util.GridHideEditableBizObjectInternalFields(gridWorkorderItems); //case 1332 //if (gridWorkorderItems.DisplayLayout.Bands[0].Columns["OutsideService"].Hidden == false) //{ gridWorkorderItems.DisplayLayout.Bands[0].Columns["OutsideService"].Hidden = true; gridWorkorderItems.DisplayLayout.Bands[0].Columns["WorkorderItemUnitServiceTypeID"].Hidden = true; gridWorkorderItems.DisplayLayout.Bands[0].Columns["UnitID"].Hidden = true; gridWorkorderItems.DisplayLayout.Bands[0].Columns["HasLabor"].Hidden = true; gridWorkorderItems.DisplayLayout.Bands[0].Columns["HasUnit"].Hidden = true; gridWorkorderItems.DisplayLayout.Bands[0].Columns["HasParts"].Hidden = true; gridWorkorderItems.DisplayLayout.Bands[0].Columns["HasTravel"].Hidden = true; gridWorkorderItems.DisplayLayout.Bands[0].Columns["HasScheduledUsers"].Hidden = true; gridWorkorderItems.DisplayLayout.Bands[0].Columns["HasTasks"].Hidden = true; gridWorkorderItems.DisplayLayout.Bands[0].Columns["HasExpenses"].Hidden = true; gridWorkorderItems.DisplayLayout.Bands[0].Columns["HasLoans"].Hidden = true; gridWorkorderItems.DisplayLayout.Bands[0].Columns["HasOutsideService"].Hidden = true; gridWorkorderItems.DisplayLayout.Bands[0].Columns["HasMeteredUnit"].Hidden = true; gridWorkorderItems.DisplayLayout.Bands[0].Columns["Custom0"].Hidden = true; gridWorkorderItems.DisplayLayout.Bands[0].Columns["Custom1"].Hidden = true; gridWorkorderItems.DisplayLayout.Bands[0].Columns["Custom2"].Hidden = true; gridWorkorderItems.DisplayLayout.Bands[0].Columns["Custom3"].Hidden = true; gridWorkorderItems.DisplayLayout.Bands[0].Columns["Custom4"].Hidden = true; gridWorkorderItems.DisplayLayout.Bands[0].Columns["Custom5"].Hidden = true; gridWorkorderItems.DisplayLayout.Bands[0].Columns["Custom6"].Hidden = true; gridWorkorderItems.DisplayLayout.Bands[0].Columns["Custom7"].Hidden = true; gridWorkorderItems.DisplayLayout.Bands[0].Columns["Custom8"].Hidden = true; gridWorkorderItems.DisplayLayout.Bands[0].Columns["Custom9"].Hidden = true; gridWorkorderItems.DisplayLayout.Bands[0].Columns["HasPartRequestsOnOrder"].Hidden = true; gridWorkorderItems.DisplayLayout.Bands[0].Columns["HasPartRequestsUnOrdered"].Hidden = true; //} #endregion hide internal columns //Hide most workorder item fields //foreach(UltraGridColumn c in gridWorkorderItems.DisplayLayout.Bands[0].Columns) //{ // c.Hidden=true; // c.SortIndicator = SortIndicator.Disabled; //} //gridWorkorderItems.DisplayLayout.Bands[0].Columns["Summary"].Hidden=false; //Added 2-Oct-2006 gridWorkorderItems.DisplayLayout.Bands[0].Columns["Summary"].MaxLength = 255; //Case 485 gridWorkorderItems.DisplayLayout.Bands[0].Columns["Summary"].CellMultiLine = DefaultableBoolean.True; gridWorkorderItems.DisplayLayout.Bands[0].Columns["Summary"].AutoSizeEdit = DefaultableBoolean.True; gridWorkorderItems.DisplayLayout.Bands[0].Columns["Summary"].VertScrollBar = true; //gridWorkorderItems.DisplayLayout.Bands[0].Columns["TechNotes"].Hidden=false; gridWorkorderItems.DisplayLayout.Bands[0].Columns["TechNotes"].CellMultiLine=DefaultableBoolean.True; gridWorkorderItems.DisplayLayout.Bands[0].Columns["TechNotes"].AutoSizeEdit=DefaultableBoolean.True; gridWorkorderItems.DisplayLayout.Bands[0].Columns["TechNotes"].VertScrollBar=true; //gridWorkorderItems.DisplayLayout.Bands[0].Columns["WorkorderStatusID"].Hidden=false; //gridWorkorderItems.DisplayLayout.Bands[0].Columns["PriorityID"].Hidden=false; //gridWorkorderItems.DisplayLayout.Bands[0].Columns["RequestDate"].Hidden=mWorkorder.IsTemplate; //gridWorkorderItems.DisplayLayout.Bands[0].Columns["TypeID"].Hidden=false; gridWorkorderItems.DisplayLayout.Bands[0].Columns["RequestDate"].Editor = ccGridDateTimeEditor; //case 726 //gridWorkorderItems.DisplayLayout.Bands[0].Columns["WarrantyService"].Hidden = false; Util.LocalizeGrid(gridWorkorderItems); PopulateGridValueLists(); //Allow empty string entry on grid Util.SetTextColumnsNullable(gridWorkorderItems); if (mWorkorder.IsEditable) Util.GridAddDeleteButton(gridWorkorderItems); else Util.GridRemoveDeleteButton(gridWorkorderItems); } /// /// Populate the drop down lists inside the grid /// so they display and can select the correct underlying /// value /// private void PopulateGridValueLists() { //case 1039 //log.Debug("PopulateGridValueLists (workorderitems grid)"); gridWorkorderItems.DisplayLayout.ValueLists.Clear(); //Populate value lists //Called separately in separate functions //because they are also called to refresh them if user edits //the objects they are based on FillWorkorderItemTypesList(); FillWorkorderItemStatusList(); FillWorkorderItemPriorityList(); } private void FillWorkorderItemPriorityList() { //case 1039 //log.Debug("FillWorkorderItemPriorityList"); if(gridWorkorderItems.DisplayLayout.ValueLists.Exists("Priorities")) gridWorkorderItems.DisplayLayout.ValueLists.Remove("Priorities"); //PriorityID ValueList vl=gridWorkorderItems.DisplayLayout.ValueLists.Add("Priorities"); //Add initial emtpy guid value //so that records with no value yet entered in the //field will be shown as an empty string vl.ValueListItems.Add(Guid.Empty, Util.NoSelectionString);//Case 318 //case 1121 System.Collections.Generic.List lWorkorderItemPrioritiesSelected = mWorkorder.ListOfWorkorderItemPrioritiesSelected(); //Loop through the items in the list and put them //into the valuelist foreach (PriorityPickList.PriorityPickListInfo i in mPriorityList) { if (i.Active) { vl.ValueListItems.Add(i.ID, i.Name); } else { if (lWorkorderItemPrioritiesSelected.Count > 0) { if (lWorkorderItemPrioritiesSelected.Contains(i.ID)) { ValueListItem vi = vl.ValueListItems.Add(i.ID, i.Name); vi.Appearance.ForeColor = System.Drawing.SystemColors.GrayText; } } } } vl.SortStyle = ValueListSortStyle.Ascending; //Bind value lists to correct columns in grid gridWorkorderItems.DisplayLayout.Bands[0].Columns["PriorityID"].ValueList=gridWorkorderItems.DisplayLayout.ValueLists["Priorities"]; //Set column to dropdownlist style so that user can not type an invalid value in a cell //but must select from the list only gridWorkorderItems.DisplayLayout.Bands[0].Columns["PriorityID"].Style=Infragistics.Win.UltraWinGrid.ColumnStyle.DropDownValidate;//Case 96 for autocomplete (was DropDownList) gridWorkorderItems.DisplayLayout.Bands[0].Columns["PriorityID"].AutoCompleteMode = Infragistics.Win.AutoCompleteMode.SuggestAppend; } private void FillWorkorderItemStatusList() { //case 1039 //log.Debug("FillWorkorderItemStatusList"); if(gridWorkorderItems.DisplayLayout.ValueLists.Exists("WorkorderStatusTypes")) gridWorkorderItems.DisplayLayout.ValueLists.Remove("WorkorderStatusTypes"); //WorkorderStatusID ValueList vl=gridWorkorderItems.DisplayLayout.ValueLists.Add("WorkorderStatusTypes"); //Various changes for case 11 to refine and show only active statuses wherever //possible //NVCHANGED //GenericNVList l=GenericNVList.GetList("aWorkorderStatus","aID","aName",true,false); WorkorderStatusPickList pl = WorkorderStatusPickList.GetList(); System.Collections.Generic.List lWorkorderItemStatusesSelected = mWorkorder.ListOfWorkorderItemStatusSelected(); //Add initial emtpy guid value //so that records with no value yet entered in the contacttitle //field will be shown as an empty string vl.ValueListItems.Add(Guid.Empty, Util.NoSelectionString);//Case 318 //Loop through the items in the list and put them //into the valuelist foreach (WorkorderStatusPickList.WorkorderStatusPickListInfo i in pl) { if (i.Active) { vl.ValueListItems.Add(i.ID, i.Name); } else { if (lWorkorderItemStatusesSelected.Count > 0) { if (lWorkorderItemStatusesSelected.Contains(i.ID)) { ValueListItem vi = vl.ValueListItems.Add(i.ID, i.Name); vi.Appearance.ForeColor = System.Drawing.SystemColors.GrayText; } } } } //for(int x=0;x lWorkorderItemTypesSelected = mWorkorder.ListOfWorkorderItemTypesSelected(); //Loop through the items in the list and put them //into the valuelist foreach (WorkorderItemTypePickList.WorkorderItemTypePickListInfo i in mTypeList) { if (i.Active) { vl.ValueListItems.Add(i.ID, i.Name); } else { if (lWorkorderItemTypesSelected.Count > 0) { if (lWorkorderItemTypesSelected.Contains(i.ID)) { ValueListItem vi = vl.ValueListItems.Add(i.ID, i.Name); vi.Appearance.ForeColor = System.Drawing.SystemColors.GrayText; } } } } //Show sorted alphabetically vl.SortStyle = ValueListSortStyle.Ascending; //Bind value lists to correct columns in grid gridWorkorderItems.DisplayLayout.Bands[0].Columns["TypeID"].ValueList=gridWorkorderItems.DisplayLayout.ValueLists["WorkorderItemTypes"]; //Set column to dropdownlist style so that user can not type an invalid value in a cell //but must select from the list only gridWorkorderItems.DisplayLayout.Bands[0].Columns["TypeID"].Style=Infragistics.Win.UltraWinGrid.ColumnStyle.DropDownValidate;//Case 96 for autocomplete (was DropDownList) gridWorkorderItems.DisplayLayout.Bands[0].Columns["TypeID"].AutoCompleteMode = Infragistics.Win.AutoCompleteMode.SuggestAppend; //------------------------------------------------------------------- } #endregion #region Workorder Items grid events private void gridWorkorderItems_InitializeRow(object sender, Infragistics.Win.UltraWinGrid.InitializeRowEventArgs e) { //show broken rule icon if any Util.GridShowBrokenRulesErrorIcons(e); //set the priority colour if((Guid)e.Row.Cells["PriorityID"].Value!=Guid.Empty) { PriorityPickList.PriorityPickListInfo p = mPriorityList[(Guid)e.Row.Cells["PriorityID"].Value]; e.Row.Cells["PriorityID"].Appearance.Image=Util.Flag(p.Color); } else { e.Row.Cells["PriorityID"].Appearance.Image=null; } } /// /// Selection of workorder item... /// this triggers change of which workorderitem is bound to the parts / labour etc etc fields at the bottom /// /// /// /// private void gridWorkorderItems_BeforeRowActivate(object sender, Infragistics.Win.UltraWinGrid.RowEventArgs e) { Cursor.Current = Cursors.WaitCursor; DataBindWorkorderItem(e.Row.Cells["ID"].Value.ToString()); Cursor.Current = Cursors.Default; } /// /// Set the size of popout edit boxes to huge /// /// /// private void gridWorkorderItems_BeforeAutoSizeEdit(object sender, Infragistics.Win.UltraWinGrid.CancelableAutoSizeEditEventArgs e) { //e.StartWidth=pnlItem.Width-5; //e.StartHeight=pnlItem.Height-20; //e.MaxHeight=pnlItem.Height-20; //e.MaxWidth=pnlItem.Width-5; //Case 180 //modified so that edit box is within screen boundaries so //no matter what column order the details column is in //it will not cut off any text but wrap instead System.Drawing.Point p = gridWorkorderItems.ActiveCell.GetUIElement().Rect.Location; e.StartWidth = pnlItem.Width - 5 - p.X; //e.StartHeight = pnlItem.Height - 20 - p.Y; //e.MaxHeight = e.StartHeight; e.MaxWidth = e.StartWidth; } private void gridWorkorderItems_BeforeRowInsert(object sender, Infragistics.Win.UltraWinGrid.BeforeRowInsertEventArgs e) { if(mWorkorder.Closed || mWorkorder.ServiceCompleted) return; //case 1039 //log.Debug("gridWorkorderItems_BeforeRowInsert"); mWorkorder.WorkorderItems.Add(mWorkorder); e.Cancel=true; SizeWorkorderItemsArea(); } /// /// Prevent user from deleting last workorder item if they /// attempt to do so.. /// /// /// private void gridWorkorderItems_BeforeRowsDeleted(object sender, Infragistics.Win.UltraWinGrid.BeforeRowsDeletedEventArgs e) { //case 1039 //log.Debug("gridWorkorderItems_BeforeRowsDeleted"); if(((WorkorderItem)e.Rows[0].ListObject).HasPartRequestsOnOrder) { MessageBox.Show(Util.LocaleText.GetLocalizedText("Workorder.Label.Error.PartRequestsOnOrder"),"",MessageBoxButtons.OK,MessageBoxIcon.Stop); e.Cancel=true; return; } if(gridWorkorderItems.Rows.Count<2) { string swarntemp=Util.LocaleText.GetLocalizedText("Workorder.Label.Error.DeleteLastWorkorderItem"); //log.Warn(swarntemp); MessageBox.Show(swarntemp,"",MessageBoxButtons.OK,MessageBoxIcon.Stop); e.Cancel=true; } else { SizeWorkorderItemsArea(); } } private void gridWorkorderItems_AfterRowResize(object sender, Infragistics.Win.UltraWinGrid.RowEventArgs e) { SizeWorkorderItemsArea(); } private void gridWorkorderItems_MouseEnterElement(object sender, Infragistics.Win.UIElementEventArgs e) {Util.GridShowBrokenRulesToolTip(e,tipError);} private void gridWorkorderItems_ClickCellButton(object sender, CellEventArgs e) { if (e.Cell.Column.Key == "REMOVE") gridWorkorderItems.DisplayLayout.ActiveRow.Delete(); } //case 1252 private void gridWorkorderItems_MouseDown(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Right) { UltraGridBand b = Util.BandRightClicked(gridWorkorderItems, e); if (b != null) { UtilGridColumnSelector c = new UtilGridColumnSelector(); //c.HideColumns.Add("Summary", 0);//minimum required field //These rest are all ones that are internal only c.HideColumns.Add("OutsideService", 0); c.HideColumns.Add("WorkorderItemUnitServiceTypeID", 0); c.HideColumns.Add("UnitID", 0); c.HideColumns.Add("HasLabor", 0); c.HideColumns.Add("HasUnit", 0); c.HideColumns.Add("HasParts", 0); c.HideColumns.Add("HasTravel", 0); c.HideColumns.Add("HasScheduledUsers", 0); c.HideColumns.Add("HasTasks", 0); c.HideColumns.Add("HasExpenses", 0); c.HideColumns.Add("HasLoans", 0); c.HideColumns.Add("HasOutsideService", 0); c.HideColumns.Add("HasMeteredUnit", 0); c.HideColumns.Add("Custom0", 0); c.HideColumns.Add("Custom1", 0); c.HideColumns.Add("Custom2", 0); c.HideColumns.Add("Custom3", 0); c.HideColumns.Add("Custom4", 0); c.HideColumns.Add("Custom5", 0); c.HideColumns.Add("Custom6", 0); c.HideColumns.Add("Custom7", 0); c.HideColumns.Add("Custom8", 0); c.HideColumns.Add("Custom9", 0); c.HideColumns.Add("HasPartRequestsOnOrder", 0); c.HideColumns.Add("HasPartRequestsUnOrdered", 0); c.BandToEdit = b; c.ShowDialog(this); } } } #endregion #region Labor items grid events / Initialization private bool bLaborGridIntialized=false; private void gridLabor_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e) { if(bLaborGridIntialized || gridLabor.DisplayLayout.Bands[0].Columns.Count==0) return; //case 1039 //log.Debug("gridLabor_InitializeLayout"); //gridLabor.DisplayLayout.Override.HeaderClickAction=HeaderClickAction.SortSingle; //gridLabor.DisplayLayout.Override.AllowAddNew=AllowAddNew.TemplateOnBottom; Util.GridPreLocalize("WorkorderItemLabor",this.gridLabor.DisplayLayout.Bands[0]); Util.LocalizeHelperSuckOutKeys(this.Name, gridLabor);//case 1810 Util.FetchGridLayout("WorkorderItemLabor","",gridLabor); if(gridLabor.DisplayLayout.Bands[0].Columns.Exists("BANK")) gridLabor.DisplayLayout.Bands[0].Columns.Remove("BANK"); //Hide unwanted workorder item labor fields in that grid foreach(UltraGridColumn c in gridLabor.DisplayLayout.Bands[0].Columns) { c.Hidden=true; c.SortIndicator = SortIndicator.Disabled; } gridLabor.DisplayLayout.Bands[0].Columns["UserID"].Hidden=true; gridLabor.DisplayLayout.Bands[0].Columns["TaxRateSaleID"].Hidden=false; gridLabor.DisplayLayout.Bands[0].Columns["ServiceStartDate"].Hidden=mWorkorder.IsTemplate; gridLabor.DisplayLayout.Bands[0].Columns["ServiceStartDate"].Editor = ccGridDateTimeEditor; gridLabor.DisplayLayout.Bands[0].Columns["ServiceStopDate"].Hidden = mWorkorder.IsTemplate; gridLabor.DisplayLayout.Bands[0].Columns["ServiceStopDate"].Editor = ccGridDateTimeEditor; gridLabor.DisplayLayout.Bands[0].Columns["ServiceRateID"].Hidden=false; gridLabor.DisplayLayout.Bands[0].Columns["ServiceDetails"].Hidden=false; gridLabor.DisplayLayout.Bands[0].Columns["ServiceDetails"].CellMultiLine=DefaultableBoolean.True; gridLabor.DisplayLayout.Bands[0].Columns["ServiceDetails"].AutoSizeEdit=DefaultableBoolean.True; gridLabor.DisplayLayout.Bands[0].Columns["ServiceDetails"].VertScrollBar=true; gridLabor.DisplayLayout.Bands[0].Columns["ServiceRateQuantity"].Hidden=false; gridLabor.DisplayLayout.Bands[0].Columns["NoChargeQuantity"].Hidden=false; gridLabor.DisplayLayout.Bands[0].Columns["ServiceRateQuantity"].Format = "g29"; gridLabor.DisplayLayout.Bands[0].Columns["NoChargeQuantity"].Format = "g29"; Util.LocalizeGrid(gridLabor); gridLabor.DisplayLayout.ValueLists.Clear(); //************************************************** //Populate value lists FillLaborRatesList(); #region ======== Sheduleable users value list ======== //Clear any previous value list from this column gridLabor.DisplayLayout.Bands[0].Columns["UserID"].ValueList=null; //Add all potential active items ValueList vlTechs=new ValueList(); //Empty not valid but looks better this way when new record is added //biz object's broken rules will catch any invalide entry anyway vlTechs.ValueListItems.Add(Guid.Empty, Util.NoSelectionString);//Case 318 foreach(UserListScheduleable.UserListScheduleableInfo ui in mUserList) { if(ui.Active==true) vlTechs.ValueListItems.Add(ui.ID,ui.Name(Util.GlobalSettings.DefaultScheduleableUserNameDisplayFormat)); } //Show sorted alphabetically vlTechs.SortStyle=ValueListSortStyle.Ascending; // //Add manual items that are inactive but need to be displayed to list foreach(WorkorderItem wi in mWorkorder.WorkorderItems) { foreach(WorkorderItemLabor wl in wi.Labors) { //Is this labor item's User ID in the list already? if(vlTechs.FindByDataValue(wl.UserID)!=null) continue;//17-April-2006 was a break; causing the loop to end prematurely else { //Nope, add it to the list manually foreach(UserListScheduleable.UserListScheduleableInfo ui in mUserList) { if(ui.ID==wl.UserID) { ValueListItem vi=vlTechs.ValueListItems.Add(ui.ID,ui.Name(Util.GlobalSettings.DefaultScheduleableUserNameDisplayFormat)); vi.Appearance.ForeColor=System.Drawing.SystemColors.GrayText; } } } } } //Bind value lists to correct columns in grid gridLabor.DisplayLayout.Bands[0].Columns["UserID"].ValueList=vlTechs; //Set column to dropdownlist style so that user can not type an invalid value in a cell //but must select from the list only gridLabor.DisplayLayout.Bands[0].Columns["UserID"].Style=Infragistics.Win.UltraWinGrid.ColumnStyle.DropDownValidate;//Case 96 for autocomplete (was DropDownList) gridLabor.DisplayLayout.Bands[0].Columns["UserID"].AutoCompleteMode = Infragistics.Win.AutoCompleteMode.SuggestAppend; #endregion #region ======== Tax Code list ======== //Clear any previous value list from this column gridLabor.DisplayLayout.Bands[0].Columns["TaxRateSaleID"].ValueList=null; //Add all potential active items ValueList vl=new ValueList(); //Empty is valid choice here vl.ValueListItems.Add(Guid.Empty, Util.NoSelectionString);//Case 318 //there are not such thing as inactive //tax codes so this is much easier here... foreach(TaxCodeList.TaxCodeListInfo ui in mTaxList) { //Case 360 slight modification ValueListItem vi = vl.ValueListItems.Add(ui.ID, ui.Name); if(!ui.Active) vi.Appearance.ForeColor = System.Drawing.SystemColors.GrayText; } //Show sorted alphabetically vl.SortStyle=ValueListSortStyle.Ascending; //Bind value lists to correct columns in grid gridLabor.DisplayLayout.Bands[0].Columns["TaxRateSaleID"].ValueList=vl; //Set column to dropdownlist style so that user can not type an invalid value in a cell //but must select from the list only gridLabor.DisplayLayout.Bands[0].Columns["TaxRateSaleID"].Style=Infragistics.Win.UltraWinGrid.ColumnStyle.DropDownValidate;//Case 96 for autocomplete (was DropDownList) gridLabor.DisplayLayout.Bands[0].Columns["TaxRateSaleID"].AutoCompleteMode = Infragistics.Win.AutoCompleteMode.SuggestAppend; #endregion //Allow empty string entry on grid Util.SetTextColumnsNullable(gridLabor); //case 1105 if (mWorkorder.IsEditable) Util.GridAddDeleteButton(gridLabor); else Util.GridRemoveDeleteButton(gridLabor); //=========DONE============== bLaborGridIntialized=true; } private void FillLaborRatesList() { //case 1039 //log.Debug("FillLaborRatesList"); #region ======== Rates value list ======== //Clear any previous value list from this column gridLabor.DisplayLayout.Bands[0].Columns["ServiceRateID"].ValueList=null; //Add all potential active items ValueList vlRates=new ValueList(); //Empty not valid but looks better this way when new record is added //biz object's broken rules will catch any invalide entry anyway vlRates.ValueListItems.Add(Guid.Empty, Util.NoSelectionString);//Case 318 //fill list with active labor (service) rates foreach(RatePickList.RatePickListInfo ui in mRateList) { if((ui.Selectable==true) && ui.RateType==RateTypes.Service) { vlRates.ValueListItems.Add(ui.ID,ui.Name); } } vlRates.SortStyle=ValueListSortStyle.Ascending; //Add manual items that are inactive but need to be displayed to list //from the AllRates foreach(WorkorderItem wi in mWorkorder.WorkorderItems) { foreach(WorkorderItemLabor wl in wi.Labors) { //Is this labor item's service rate ID in the list already? if(vlRates.FindByDataValue(wl.ServiceRateID)!=null) continue;//17-April-2006 was a break; causing the loop to end prematurely else { //Nope, add it to the list manually ValueListItem vi=vlRates.ValueListItems.Add(wl.ServiceRateID,mRateList[wl.ServiceRateID].Name); vi.Appearance.ForeColor=System.Drawing.SystemColors.GrayText; } } } //Bind value lists to correct columns in grid gridLabor.DisplayLayout.Bands[0].Columns["ServiceRateID"].ValueList=vlRates; //Set column to dropdownlist style so that user can not type an invalid value in a cell //but must select from the list only gridLabor.DisplayLayout.Bands[0].Columns["ServiceRateID"].Style=Infragistics.Win.UltraWinGrid.ColumnStyle.DropDownValidate;//Case 96 for autocomplete (was DropDownList) gridLabor.DisplayLayout.Bands[0].Columns["ServiceRateID"].AutoCompleteMode = Infragistics.Win.AutoCompleteMode.SuggestAppend; #endregion } private void gridLabor_BeforeAutoSizeEdit(object sender, Infragistics.Win.UltraWinGrid.CancelableAutoSizeEditEventArgs e) { ////Changed:15-March-2005 ////modified so that edit box is within screen boundaries so ////no matter what column order the details column is in ////it will not cut off any text but wrap instead //System.Drawing.Point p =gridLabor.ActiveCell.GetUIElement().Rect.Location; //e.StartWidth=pnlLabour.Width-5-p.X; //e.StartHeight=pnlLabour.Height-20-p.Y; //e.MaxHeight=e.StartHeight; //e.MaxWidth=e.StartWidth; } private void gridLabor_BeforeRowInsert(object sender, Infragistics.Win.UltraWinGrid.BeforeRowInsertEventArgs e) { if(mWorkorder.Closed || mWorkorder.ServiceCompleted) return; //case 1039 //log.Debug("gridLabor_BeforeRowInsert"); mCurrentWorkorderItem.Labors.Add(mCurrentWorkorderItem); e.Cancel=true; bWorkorderChildrenStateChanged=true; } private void gridLabor_AfterRowsDeleted(object sender, System.EventArgs e) { //case 1039 //log.Debug("gridLabor_AfterRowsDeleted"); bWorkorderChildrenStateChanged=true; } private void gridLabor_InitializeRow(object sender, Infragistics.Win.UltraWinGrid.InitializeRowEventArgs e) { //show broken rule icon if any Util.GridShowBrokenRulesErrorIcons(e); } private void gridLabor_MouseEnterElement(object sender, Infragistics.Win.UIElementEventArgs e) {Util.GridShowBrokenRulesToolTip(e,tipError);} private void gridLabor_BeforeRowActivate(object sender, Infragistics.Win.UltraWinGrid.RowEventArgs e) { } private void gridLabor_AfterCellUpdate(object sender, CellEventArgs e) { if ("ServiceStartDate" == e.Cell.Column.Key || "ServiceStopDate" == e.Cell.Column.Key) { //case 1251 if (!(e.Cell.Row.Cells["ServiceStopDate"].Value is DateTime)) return; if (!(e.Cell.Row.Cells["ServiceStartDate"].Value is DateTime)) return; DateTime dtStart = (DateTime)e.Cell.Row.Cells["ServiceStartDate"].Value; DateTime dtStop = (DateTime)e.Cell.Row.Cells["ServiceStopDate"].Value; // if (dtStart == dtStop) return; TimeSpan ts = dtStop.Subtract(dtStart); e.Cell.Row.Cells["ServiceRateQuantity"].Value = decimal.Round( (decimal)ts.TotalHours, 2, MidpointRounding.AwayFromZero); } } #endregion #region Parts items grid events / Initialization private bool bPartsGridIntialized=false; private void gridParts_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e) { if(bPartsGridIntialized || gridParts.DisplayLayout.Bands[0].Columns.Count==0) return; //case 1039 //log.Debug("gridParts_InitializeLayout"); gridParts.DisplayLayout.Override.HeaderClickAction=HeaderClickAction.SortSingle; gridParts.DisplayLayout.Override.AllowAddNew=AllowAddNew.TemplateOnBottom; Util.GridPreLocalize("WorkorderItemPart",this.gridParts.DisplayLayout.Bands[0]); Util.LocalizeHelperSuckOutKeys(this.Name, gridParts);//case 1810 Util.FetchGridLayout("WorkorderItemParts","",gridParts); //Hide unwanted workorder item Parts fields in that grid foreach(UltraGridColumn c in gridParts.DisplayLayout.Bands[0].Columns) { c.Hidden=true; } //Show the ones we want to... if(Util.GlobalSettings.UseInventory && mWorkorder.IsServiceWorkorder) { gridParts.DisplayLayout.Bands[0].Columns["PartWarehouseID"].Hidden=false; gridParts.DisplayLayout.Bands[0].Columns["PartSerialID"].Hidden=false; gridParts.DisplayLayout.Bands[0].Columns["PartSerialID"].Style=Infragistics.Win.UltraWinGrid.ColumnStyle.DropDownValidate;//Case 96 for autocomplete (was DropDownList) gridParts.DisplayLayout.Bands[0].Columns["PartSerialID"].AutoCompleteMode = Infragistics.Win.AutoCompleteMode.SuggestAppend; gridParts.DisplayLayout.Bands[0].Columns["PartSerialID"].CellActivation=Activation.AllowEdit; } //Selectively display reserve quantities column if appropriate //if(mWorkorder.HasReservedParts) //{ // gridParts.DisplayLayout.Bands[0].Columns["QuantityReserved"].Hidden=false; // gridParts.DisplayLayout.Bands[0].Columns["QuantityReserved"].Format = "g29"; // gridParts.DisplayLayout.Bands[0].Columns["QuantityReserved"].CellActivation=Activation.NoEdit; // //if(mWorkorder.FromQuoteID!=Guid.Empty) // // gridParts.DisplayLayout.Bands[0].Columns["QuantityReserved"].Header.Caption= // // Util.LocaleText.GetLocalizedText("WorkorderItemPart.Label.UI.QuantityReservedQuote"); // //else // // gridParts.DisplayLayout.Bands[0].Columns["QuantityReserved"].Header.Caption= // // Util.LocaleText.GetLocalizedText("WorkorderItemPart.Label.UI.QuantityReservedPM"); //} //Always show text field for entering serial numbers or what have you //defaults to serial number in a track inventory situation gridParts.DisplayLayout.Bands[0].Columns["Description"].Hidden=false; //Added 2-Oct-2006 gridParts.DisplayLayout.Bands[0].Columns["Description"].MaxLength = 255; gridParts.DisplayLayout.Bands[0].Columns["PartID"].Hidden=false; gridParts.DisplayLayout.Bands[0].Columns["TaxPartSaleID"].Hidden=false; gridParts.DisplayLayout.Bands[0].Columns["Quantity"].Hidden=false; gridParts.DisplayLayout.Bands[0].Columns["Quantity"].Format = "g29"; //if( mWorkorder.IsServiceWorkorder) //gridParts.DisplayLayout.Bands[0].Columns["Used"].Hidden=false; gridParts.DisplayLayout.Bands[0].Columns["Price"].Hidden=false; gridParts.DisplayLayout.Bands[0].Columns["Price"].Format="c"; gridParts.DisplayLayout.Bands[0].Columns["Price"].CellAppearance.TextHAlign=HAlign.Right; //gridParts.DisplayLayout.Bands[0].Columns["Discount"].Hidden=false; //gridParts.DisplayLayout.Bands[0].Columns["Discount"].Format="P"; //gridParts.DisplayLayout.Bands[0].Columns["Discount"].CellAppearance.TextHAlign=HAlign.Right; //___UNBOUND UPC COLUMN___ if(gridParts.DisplayLayout.Bands[0].Columns.Exists("UPC")) { gridParts.DisplayLayout.Bands[0].Columns["UPC"].Header.Caption=Util.LocaleText.GetLocalizedText("Part.Label.UPC"); } else { gridParts.DisplayLayout.Bands[0].Columns.Add("UPC",Util.LocaleText.GetLocalizedText("Part.Label.UPC")); } gridParts.DisplayLayout.Bands[0].Columns["UPC"].DataType=typeof(string); gridParts.DisplayLayout.Bands[0].Columns["UPC"].Hidden=false; gridParts.DisplayLayout.Bands[0].Columns["UPC"].CellAppearance.TextHAlign=HAlign.Left; gridParts.DisplayLayout.Bands[0].Columns["UPC"].CellActivation=Activation.AllowEdit; GridKeyActionMapping km= new GridKeyActionMapping(Keys.Enter,UltraGridAction.NextCellByTab,0,UltraGridState.Cell,0,0); gridParts.KeyActionMappings.Add(km); Util.LocalizeGrid(gridParts); gridParts.DisplayLayout.ValueLists.Clear(); //************************************************** //Populate value lists #region ======= Warehouses value list ======= ////------------------------------------------------------------------------------------------------- ////Warehouses //ValueList vl=gridParts.DisplayLayout.ValueLists.Add("Warehouses"); ////NVCHANGED ////case 640 GenericNVList l=GenericNVList.GetList("aPartWarehouse","aID","aName",true,false); ////Add initial empty guid value ////so that records with no value yet entered in the ////field will be shown as an empty string //vl.ValueListItems.Add(Guid.Empty, Util.NoSelectionString);//Case 318 ////Loop through the items in the list and put them ////into the valuelist ////case 640 ////for(int x=0;x /// Handle users changes and update grid as appropriate /// /// /// private void gridParts_AfterCellUpdate(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e) { //case 1039 //log.Debug("gridParts_AfterCellUpdate"); #region UPC changed //Select part based on upc entered...? if("UPC"==e.Cell.Column.Key) { if(e.Cell.Value!=null) { bool bMatchfound=false; foreach(PartPickList.PartPickListInfo ui in mPartList) { if(ui.UPC==e.Cell.Value.ToString()) { #region Match bMatchfound=true; if(e.Cell.Row.IsAddRow) { //Turn off cell update event because code below is going to fire it //causing an exception because this isn't a real row yet gridParts.EventManager.SetEnabled(GridEventIds.AfterCellUpdate,false); e.Cell.Row.Cells["PartID"].Value=ui.ID; e.Cell.Row.Cells["Quantity"].Value=1.0m; //Set the retail price from the part list record e.Cell.Row.Cells["Price"].Value=ui.Retail; //Do we need to populate serial number list? if(this. mWorkorder.IsServiceWorkorder && Util.GlobalSettings.UseInventory && ui.TrackSerialNumber) { e.Cell.Row.Cells["PartSerialID"].Hidden=false; //Set the serial numbers to display in the serial number column for serialized part ValueList vl=new ValueList(); // PartSerialPickList ps=PartSerialPickList.GetList(ui.ID,(Guid)e.Cell.Row.Cells["PartWarehouseID"].Value); //fill list foreach(PartSerialPickList.PartSerialPickListInfo i in ps) { vl.ValueListItems.Add(i.ID,i.SerialNumber); } vl.SortStyle=ValueListSortStyle.Ascending; e.Cell.Row.Cells["PartSerialID"].ValueList=vl; } else e.Cell.Row.Cells["PartSerialID"].Hidden=true; //Now check to see if there are enough in stock... if(this. mWorkorder.IsServiceWorkorder && Util.GlobalSettings.UseInventory) { try { if(PartByWarehouseInventoryValuesFetcher.GetItem(ui.ID,(Guid)e.Cell.Row.Cells["PartWarehouseID"].Value).QuantityOnHand<1)//<----different here than in code below because quant is always 1 here { //Out of stock, prompt if they want to put on request list if(OrderPartsPrompt(0,1)) {//Yes, put balance out of stock on restock list mCurrentWorkorderItem.MovePartToRequest((Guid)e.Cell.Row.Cells["ID"].Value,1); AdjustPartsDisplay(); } else {//No, so set quantity to zero e.Cell.Row.Cells["Quantity"].Value=0.0m; } } } catch { //probably failed due to none in stock at all //Need to order more //Out of stock, prompt if they want to put on request list if(OrderPartsPrompt(0,1)) {//Yes, put balance out of stock on restock list mCurrentWorkorderItem.MovePartToRequest((Guid)e.Cell.Row.Cells["ID"].Value,1); AdjustPartsDisplay(); } else {//No, so set quantity to zero e.Cell.Row.Cells["Quantity"].Value=0.0m; } } } //Turn normal event back on again gridParts.EventManager.SetEnabled(GridEventIds.AfterCellUpdate,true); //The following will be caught by the sync UI app idle event handler and //cause the focus to go back to the template row to prepare to accept the next barcode bScanningParts=true; //Has to be done this way because apparently no grid event can use perform action break; } else { //go ahead and just change the part ID //and let the code below handle the rest e.Cell.Row.Cells["PartID"].Value=ui.ID; break; } #endregion } } if(bMatchfound==false) MessageBox.Show(Util.LocaleText.GetLocalizedText("WorkorderItemPart.Label.Warning.PartNotFound")); } return; } #endregion #region PartID changed //------------------------------------------------------------------ //Part selection has changed.... if("PartID"==e.Cell.Column.Key) { //As a time saver, if user hasn't set a quantity yet //default it to one if((decimal)e.Cell.Row.Cells["Quantity"].Value==0) e.Cell.Row.Cells["Quantity"].Value=1.0m; //insert the contract discount if it applies if(mWorkorder.ContractResolved()!=null) { e.Cell.Row.Cells["Discount"].Value=mWorkorder.ContractResolved().DiscountParts; } //make sure there are no old serial numbers around //then we can either add them or bail as required below e.Cell.Row.Cells["PartSerialID"].ValueList=null; e.Cell.Row.Cells["PartSerialID"].Value=Guid.Empty; e.Cell.Row.Cells["PartSerialID"].Hidden=true; //Set the retail price from the part list record e.Cell.Row.Cells["Price"].Value=mPartList[(Guid)e.Cell.Value].Retail; //Do we need to populate serial number list? if(this. mWorkorder.IsServiceWorkorder && Util.GlobalSettings.UseInventory && mPartList[(Guid)e.Cell.Value].TrackSerialNumber) { e.Cell.Row.Cells["PartSerialID"].Hidden=false; //Set the serial numbers to display in the serial number column for serialized part ValueList vl=new ValueList(); // PartSerialPickList ps=PartSerialPickList.GetList((Guid)e.Cell.Value,(Guid)e.Cell.Row.Cells["PartWarehouseID"].Value); //fill list with active labor (service) parts foreach(PartSerialPickList.PartSerialPickListInfo i in ps) { //changed 25-April-2006 to ensure a serial number can't be selected twice if(!this.mWorkorder.HasSerialNumberSelected(i.ID)) vl.ValueListItems.Add(i.ID,i.SerialNumber); } vl.SortStyle=ValueListSortStyle.Ascending; e.Cell.Row.Cells["PartSerialID"].ValueList=vl; e.Cell.Row.Cells["PartSerialID"].Activation=Activation.AllowEdit; e.Cell.Row.Cells["PartSerialID"].Style=Infragistics.Win.UltraWinGrid.ColumnStyle.DropDownValidate;//Case 96 for autocomplete (was DropDownList) e.Cell.Row.Cells["PartSerialID"].Column.AutoCompleteMode = Infragistics.Win.AutoCompleteMode.SuggestAppend; //done, bail out... return; } } #endregion #region Serial number changed //---------------------------------------------------------------------- //change in serial number? if(Util.GlobalSettings.UseInventory && "PartSerialID"==e.Cell.Column.Key) { //copy serial number to text serial number field e.Cell.Row.Cells["Description"].Value=e.Cell.Row.Cells["PartSerialID"].Text; } #endregion #region Warehouse changed //---------------------------------------------------------------------- //change in quantity selected? if(this. mWorkorder.IsServiceWorkorder && Util.GlobalSettings.UseInventory && "PartWarehouseID"==e.Cell.Column.Key && (Guid)e.Cell.Row.Cells["PartID"].Value != Guid.Empty) { //get the user's selected amount decimal dCurrentQuantity=(decimal)e.Cell.Row.Cells["Quantity"].Value; try { //Now check to see if there are enough in stock... decimal dOnHand=PartByWarehouseInventoryValuesFetcher.GetItem((Guid)e.Cell.Row.Cells["PartID"].Value,(Guid)e.Cell.Row.Cells["PartWarehouseID"].Value).QuantityOnHand; if(dOnHand /// Prompt if user want's to order parts that are not in stock /// /// true if they do private bool OrderPartsPrompt(decimal StockAmount, decimal TotalAmount) { //case 1039 //log.Debug("OrderPartsPrompt"); decimal RequestAmount=TotalAmount-StockAmount; if(MessageBox.Show( string.Format(Util.LocaleText.GetLocalizedText("WorkorderItemPart.Label.Warning.InsufficientStock"),StockAmount,RequestAmount), "", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button2) ==DialogResult.Yes) { //case 1039 //log.Debug("OrderPartsPrompt:User selected YES"); return true; } //case 1039 //log.Debug("OrderPartsPrompt:User selected NO"); return false; } private void gridParts_InitializeRow(object sender, Infragistics.Win.UltraWinGrid.InitializeRowEventArgs e) { Util.GridShowBrokenRulesErrorIcons(e); //See if a serial number list needs to be populated for this row Guid Serial=(Guid)e.Row.Cells["PartSerialID"].Value; if(e.Row.Activation==Activation.AllowEdit) { //how can a has affected inventory row be set to allowedit? if((bool)e.Row.Cells["HasAffectedInventory"].Value==true) { //case 481 e.Row.Activation = Activation.ActivateOnly; e.Row.Appearance.ForeColor=System.Drawing.SystemColors.GrayText; //Populate serial number field if required if(Serial!=Guid.Empty) { NameFetcher nf = NameFetcher.GetItem("PartSerial","SerialNumber",Serial); ValueList vl=new ValueList(); vl.ValueListItems.Add(Serial,nf.RecordName); e.Row.Cells["PartSerialID"].ValueList=vl; } else e.Row.Cells["PartSerialID"].Hidden=true; } else { //It's fully editable... e.Row.Activation=Activation.AllowEdit; e.Row.Appearance.ForeColor=System.Drawing.SystemColors.ControlText; //Has a serial number but no list? if(Serial!=Guid.Empty && e.Row.Cells["PartSerialID"].ValueList==null) { //Populate the list... e.Row.Cells["PartSerialID"].Hidden=false; ValueList vl=new ValueList(); PartSerialPickList ps=PartSerialPickList.GetList((Guid)e.Row.Cells["PartID"].Value,(Guid)e.Row.Cells["PartWarehouseID"].Value); foreach(PartSerialPickList.PartSerialPickListInfo i in ps) { vl.ValueListItems.Add(i.ID,i.SerialNumber); } vl.SortStyle=ValueListSortStyle.Ascending; e.Row.Cells["PartSerialID"].ValueList=vl; e.Row.Cells["PartSerialID"].Activation=Activation.AllowEdit; e.Row.Cells["PartSerialID"].Style=Infragistics.Win.UltraWinGrid.ColumnStyle.DropDownValidate;//Case 96 for autocomplete (was DropDownList) e.Row.Cells["PartSerialID"].Column.AutoCompleteMode = Infragistics.Win.AutoCompleteMode.SuggestAppend; } else//Has no serial number selected and no list to select from { if(Serial==Guid.Empty && e.Row.Cells["PartSerialID"].ValueList==null) { e.Row.Cells["PartSerialID"].ValueList=null; e.Row.Cells["PartSerialID"].Value=Guid.Empty; e.Row.Cells["PartSerialID"].Hidden=true; } } } } } private void gridParts_MouseEnterElement(object sender, Infragistics.Win.UIElementEventArgs e) {Util.GridShowBrokenRulesToolTip(e,tipError);} private void gridParts_ClickCellButton(object sender, CellEventArgs e) { if (e.Cell.Column.Key == "REMOVE") gridParts.DisplayLayout.ActiveRow.Delete(); } #endregion #region ScheduledUsers items grid events / Initialization private bool bScheduledUsersGridIntialized=false; private void gridScheduledUsers_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e) { if(bScheduledUsersGridIntialized || gridScheduledUsers.DisplayLayout.Bands[0].Columns.Count==0) return; //case 1039 //log.Debug("gridScheduledUsers_InitializeLayout"); //gridScheduledUsers.DisplayLayout.Override.HeaderClickAction=HeaderClickAction.SortSingle; //gridScheduledUsers.DisplayLayout.Override.AllowAddNew=AllowAddNew.TemplateOnBottom; Util.GridPreLocalize("WorkorderItemScheduledUser",this.gridScheduledUsers.DisplayLayout.Bands[0]); Util.LocalizeHelperSuckOutKeys(this.Name, gridScheduledUsers);//case 1810 Util.FetchGridLayout("WorkorderItemScheduledUsers","",gridScheduledUsers); //Hide unwanted workorder item ScheduledUsers fields in that grid foreach(UltraGridColumn c in gridScheduledUsers.DisplayLayout.Bands[0].Columns) { c.Hidden=true; c.SortIndicator = SortIndicator.Disabled; } //Show the ones we want to... gridScheduledUsers.DisplayLayout.Bands[0].Columns["UserID"].Hidden=true; gridScheduledUsers.DisplayLayout.Bands[0].Columns["ServiceRateID"].Hidden=false; gridScheduledUsers.DisplayLayout.Bands[0].Columns["StartDate"].Hidden=mWorkorder.IsTemplate; gridScheduledUsers.DisplayLayout.Bands[0].Columns["StartDate"].Editor = ccGridDateTimeEditor; gridScheduledUsers.DisplayLayout.Bands[0].Columns["StopDate"].Hidden=mWorkorder.IsTemplate; gridScheduledUsers.DisplayLayout.Bands[0].Columns["StopDate"].Editor = ccGridDateTimeEditor; gridScheduledUsers.DisplayLayout.Bands[0].Columns["EstimatedQuantity"].Hidden=false; gridScheduledUsers.DisplayLayout.Bands[0].Columns["EstimatedQuantity"].Format = "g29"; Util.LocalizeGrid(gridScheduledUsers); gridScheduledUsers.DisplayLayout.ValueLists.Clear(); //************************************************** //Populate value lists FillScheduledUserRatesList(); #region ======== Sheduleable users value list ======== //Clear any previous value list from this column gridScheduledUsers.DisplayLayout.Bands[0].Columns["UserID"].ValueList=null; //Add all potential active items ValueList vlTechs=new ValueList(); //Empty is valid choice here vlTechs.ValueListItems.Add(Guid.Empty, Util.NoSelectionString);//Case 318 foreach(UserListScheduleable.UserListScheduleableInfo ui in mUserList) { if(ui.Active==true) vlTechs.ValueListItems.Add(ui.ID,ui.Name(Util.GlobalSettings.DefaultScheduleableUserNameDisplayFormat)); } //Show sorted alphabetically vlTechs.SortStyle=ValueListSortStyle.Ascending; //Add manual items that are inactive but need to be displayed to list foreach(WorkorderItem wi in mWorkorder.WorkorderItems) { foreach(WorkorderItemScheduledUser wl in wi.ScheduledUsers) { //Is this schedtechs item's User ID in the list already? if(vlTechs.FindByDataValue(wl.UserID)!=null) continue;//17-April-2006 was a break; causing the loop to end prematurely else { //Nope, add it to the list manually foreach(UserListScheduleable.UserListScheduleableInfo ui in mUserList) { if(ui.ID==wl.UserID) { ValueListItem vi=vlTechs.ValueListItems.Add(ui.ID,ui.Name(Util.GlobalSettings.DefaultScheduleableUserNameDisplayFormat)); vi.Appearance.ForeColor=System.Drawing.SystemColors.GrayText; } } } } } //Bind value lists to correct columns in grid gridScheduledUsers.DisplayLayout.Bands[0].Columns["UserID"].ValueList=vlTechs; //Set column to dropdownlist style so that user can not type an invalid value in a cell //but must select from the list only gridScheduledUsers.DisplayLayout.Bands[0].Columns["UserID"].Style=Infragistics.Win.UltraWinGrid.ColumnStyle.DropDownValidate;//Case 96 for autocomplete (was DropDownList) gridScheduledUsers.DisplayLayout.Bands[0].Columns["UserID"].AutoCompleteMode = Infragistics.Win.AutoCompleteMode.SuggestAppend; #endregion //Allow empty string entry on grid Util.SetTextColumnsNullable(gridScheduledUsers); //case 1105 if (mWorkorder.IsEditable) Util.GridAddDeleteButton(gridScheduledUsers); else Util.GridRemoveDeleteButton(gridScheduledUsers); //=========DONE============== bScheduledUsersGridIntialized=true; } private void FillScheduledUserRatesList() { //case 1039 //log.Debug("FillScheduledUserRatesList"); #region ======== Rates value list ======== //Clear any previous value list from this column gridScheduledUsers.DisplayLayout.Bands[0].Columns["ServiceRateID"].ValueList=null; //Add all potential active items ValueList vlRates=new ValueList(); //Empty not valid but looks better this way when new record is added //biz object's broken rules will catch any invalide entry anyway vlRates.ValueListItems.Add(Guid.Empty, Util.NoSelectionString);//Case 318 //fill list with active labor (service) rates foreach(RatePickList.RatePickListInfo ui in mRateList) { if((ui.Selectable==true) && ui.RateType==RateTypes.Service) { vlRates.ValueListItems.Add(ui.ID,ui.Name); } } vlRates.SortStyle=ValueListSortStyle.Ascending; //Add manual items that are inactive but need to be displayed to list foreach(WorkorderItem wi in mWorkorder.WorkorderItems) { foreach(WorkorderItemScheduledUser wl in wi.ScheduledUsers) { //Is this labor item's service rate ID in the list already? if(vlRates.FindByDataValue(wl.ServiceRateID)!=null) continue;//17-April-2006 was a break; causing the loop to end prematurely else { //Nope, add it to the list manually ValueListItem vi=vlRates.ValueListItems.Add(wl.ServiceRateID,mRateList[wl.ServiceRateID].Name); vi.Appearance.ForeColor=System.Drawing.SystemColors.GrayText; } } } //Bind value lists to correct columns in grid gridScheduledUsers.DisplayLayout.Bands[0].Columns["ServiceRateID"].ValueList=vlRates; //Set column to dropdownlist style so that user can not type an invalid value in a cell //but must select from the list only gridScheduledUsers.DisplayLayout.Bands[0].Columns["ServiceRateID"].Style=Infragistics.Win.UltraWinGrid.ColumnStyle.DropDownValidate;//Case 96 for autocomplete (was DropDownList) gridScheduledUsers.DisplayLayout.Bands[0].Columns["ServiceRateID"].AutoCompleteMode = Infragistics.Win.AutoCompleteMode.SuggestAppend; #endregion } /// /// /// /// /// private void gridScheduledUsers_BeforeRowInsert(object sender, Infragistics.Win.UltraWinGrid.BeforeRowInsertEventArgs e) { //case 1039 //log.Debug("gridScheduledUsers_BeforeRowInsert"); if(mWorkorder.Closed || mWorkorder.ServiceCompleted) return; mCurrentWorkorderItem.ScheduledUsers.Add(mCurrentWorkorderItem); e.Cancel=true; } /// /// Handle users changes and update grid as appropriate /// /// /// private void gridScheduledUsers_AfterCellUpdate(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e) { if ("StartDate" == e.Cell.Column.Key || "StopDate" == e.Cell.Column.Key) { //case 1251 if (!(e.Cell.Row.Cells["StopDate"].Value is DateTime)) return; if (!(e.Cell.Row.Cells["StartDate"].Value is DateTime)) return; DateTime dtStart = (DateTime)e.Cell.Row.Cells["StartDate"].Value; DateTime dtStop = (DateTime)e.Cell.Row.Cells["StopDate"].Value; if (dtStart == dtStop) return; TimeSpan ts=dtStop.Subtract(dtStart); e.Cell.Row.Cells["EstimatedQuantity"].Value = decimal.Round( (decimal)ts.TotalHours, 2, MidpointRounding.AwayFromZero); } } private void gridScheduledUsers_InitializeRow(object sender, Infragistics.Win.UltraWinGrid.InitializeRowEventArgs e) { Util.GridShowBrokenRulesErrorIcons(e); } private void gridScheduledUsers_MouseEnterElement(object sender, Infragistics.Win.UIElementEventArgs e) {Util.GridShowBrokenRulesToolTip(e,tipError);} private void gridScheduledUsers_ClickCellButton(object sender, CellEventArgs e) { if (e.Cell.Column.Key == "REMOVE") gridScheduledUsers.DisplayLayout.ActiveRow.Delete(); } #endregion #region Toolbar menu items 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 "REPORTLIST": { //Case 64 //switch the focus to a non-editable control //so that any changes in the current editable control //will get updated before attempting to save btnClientID.Focus(); //Is the workorder clean (all changes saved)? //(this is necessary because reporting is done from the stored record, not the one in memory here) if(mWorkorder.IsDirty ) { MessageBox.Show(Util.LocaleText.GetLocalizedText("Workorder.Label.Error.DirtyOrBrokenRules"),"",MessageBoxButtons.OK,MessageBoxIcon.Stop); return; } Cursor.Current = Cursors.WaitCursor; switch(mWorkorder.WorkorderType) { case WorkorderTypes.Service: { if(Util.ReportHandleToolClickIsSummary(e.Tool)) { Util.ReportHandleToolClick(e.Tool,WorkorderServiceList.ReportKey,WorkorderServiceList.GetListForSingleItem(this.mWorkorder.ID)); } else { Util.ReportHandleToolClick(e.Tool,WorkorderServiceDetailedReportData.ReportKey, WorkorderServiceDetailedReportData.GetItem(this.mWorkorder.ID)); } Util.ReportFillList(this.tbManager.Tools["REPORTLIST"],WorkorderServiceList.ReportKey,WorkorderServiceDetailedReportData.ReportKey); } break; case WorkorderTypes.PreventiveMaintenance: if(Util.ReportHandleToolClickIsSummary(e.Tool)) { Util.ReportHandleToolClick(e.Tool,WorkorderPMList.ReportKey,WorkorderPMList.GetListForSingleItem(this.mWorkorder.ID)); } else { Util.ReportHandleToolClick(e.Tool,WorkorderPMDetailedReportData.ReportKey, WorkorderPMDetailedReportData.GetItem(this.mWorkorder.ID)); } Util.ReportFillList(this.tbManager.Tools["REPORTLIST"],WorkorderPMList.ReportKey,WorkorderPMDetailedReportData.ReportKey); break; case WorkorderTypes.Quote: if(Util.ReportHandleToolClickIsSummary(e.Tool)) { Util.ReportHandleToolClick(e.Tool,WorkorderQuoteList.ReportKey,WorkorderQuoteList.GetListForSingleItem(this.mWorkorder.ID)); } else { Util.ReportHandleToolClick(e.Tool,WorkorderQuoteDetailedReportData.ReportKey, WorkorderQuoteDetailedReportData.GetItem(this.mWorkorder.ID)); } Util.ReportFillList(this.tbManager.Tools["REPORTLIST"],WorkorderQuoteList.ReportKey,WorkorderQuoteDetailedReportData.ReportKey); break; } break; } case "LT:AssignedDoc.Label.List": // ButtonTool DocsForm d=new DocsForm(); d.DocsToEdit=mWorkorder.Docs; d.RootObjectID=mWorkorder.ID; d.ExactObjectType = mWorkorder.RootObjectType;//case 1584 d.RootObjectType=RootObjectTypes.Workorder; d.ShowDialog(); break; case "LT:UI.Command.RecordHistory": // ButtonTool { string sObject=((Infragistics.Win.UltraWinToolbars.UltraToolbar)e.Tool.Owner).Key; switch(sObject) { case "WorkorderEntryMenuBar": RecordHistoryForm RH=new RecordHistoryForm(mWorkorder.Creator,mWorkorder.Modifier,mWorkorder.Created,mWorkorder.Modified); RH.ShowDialog(); RH.Dispose(); break; case "WorkorderItemToolBar": RecordHistoryForm RH2=new RecordHistoryForm(mCurrentWorkorderItem.Creator,mCurrentWorkorderItem.Modifier,mCurrentWorkorderItem.Created,mCurrentWorkorderItem.Modified); RH2.ShowDialog(); break; } } break; case "LT:UI.Command.Save": // ButtonTool RecordUpdate(RecordActionType.SaveOnly); //case 1040 if (AyaBizUtils.AyaNovaConnectionSetting.UsingDataPortal) { this.Update(); Util.FlipFlopSort(gridLabor); Util.FlipFlopSort(gridScheduledUsers); } break; case "LT:UI.Command.Close": // ButtonTool this.Close(); break; case "LT:ClientNote.Label.List": // ButtonTool if(mWorkorder.ClientID==Guid.Empty) return; ClientNotesForm CN=new ClientNotesForm(); CN.ClientID=mWorkorder.ClientID; CN.ShowDialog(); break; case "LT:UI.Command.Delete": // ButtonTool if(mWorkorder.HasPartRequestsOnOrder) { MessageBox.Show(Util.LocaleText.GetLocalizedText("Workorder.Label.Error.PartRequestsOnOrder"),"",MessageBoxButtons.OK,MessageBoxIcon.Stop); return; } RecordUpdate(RecordActionType.DeleteAndExit); break; case "LT:UI.Command.CurrentDateAndTime": if(this.ActiveControl is Infragistics.Win.UltraWinEditors.UltraTextEditor) { Clipboard.SetDataObject(DBUtil.CurrentWorkingDateTime.ToString()); ((Infragistics.Win.UltraWinEditors.UltraTextEditor)this.ActiveControl).Paste(); return; } if(this.ActiveControl is Infragistics.Win.EmbeddableTextBoxWithUIPermissions) { Clipboard.SetDataObject(DBUtil.CurrentWorkingDateTime.ToString()); ((Infragistics.Win.EmbeddableTextBoxWithUIPermissions)this.ActiveControl).Paste(); return; } if(this.ActiveControl is Infragistics.Win.UltraWinGrid.UltraGrid) { Infragistics.Win.UltraWinGrid.UltraGrid g = (Infragistics.Win.UltraWinGrid.UltraGrid) this.ActiveControl; if(g.ActiveCell!=null) { if(g.ActiveCell.EditorResolved is Infragistics.Win.DateTimeEditor) { g.ActiveCell.Value = DBUtil.CurrentWorkingDateTime; return; } } } if(this.ActiveControl is GZTW.WinForm.Controls.GZDateTimePicker) { ((GZTW.WinForm.Controls.GZDateTimePicker)this.ActiveControl).Value = DBUtil.CurrentWorkingDateTime; return; } //case 1583 if (this.ActiveControl.GetType().Name == "ControlContainerEditorHostWithUIPermissions") ((GZTW.WinForm.Controls.GZDateTimePicker)ccGridDateTimeEditor.EditingControl).Value = DBUtil.CurrentWorkingDateTime; break; case "LT:UI.Toolbar.WorkorderForm.SetAllPartsUsedInService": // ButtonTool //Set all parts in current workorder item to used in service if(mWorkorder.WorkorderType==WorkorderTypes.Service) mCurrentWorkorderItem.SetAllPartsToUsedInService(); break; case "LT:Rate.Label.List": // ButtonTool RatesForm f=new RatesForm(); f.ShowDialog(); if(f.ChangesMade) { //refill rates lists if (mWorkorder.IsTemplate) mRateList = RatePickList.GetListAllActiveRates(); else { if (mWorkorder.ContractResolved() == null) mRateList = RatePickList.GetList(true); else mRateList = RatePickList.GetListWithContract(mWorkorder.ContractIDResolved()); } FillLaborRatesList(); } break; case "LT:WorkorderItemType.Label.List": // ButtonTool { GenericListForm glf = new GenericListForm(); WorkorderItemTypes wit= WorkorderItemTypes.GetItems(); glf.GridDataSource=wit; glf.ShowDialog(); if(glf.ChangesMade) { FillWorkorderItemTypesList(); } } break; case "LT:WorkorderStatus.Label.List": // ButtonTool { GenericListForm glf=new GenericListForm(); WorkorderStatuses o=WorkorderStatuses.GetItems(); //f.SelectedRecordID=ID; glf.GridDataSource=o; glf.Visible=false; glf.ShowDialog(); if(glf.ChangesMade) { FillWorkorderItemStatusList(); } } break; case "LT:Priority.Label.List": // ButtonTool { GenericListForm glf=new GenericListForm(); Priorities o=Priorities.GetItems(); //f.SelectedRecordID=ID; glf.GridDataSource=o; glf.Visible=false; glf.ShowDialog(); if(glf.ChangesMade) { mPriorityList = PriorityPickList.GetList(); FillWorkorderItemPriorityList(); } } break; case "LT:Workorder.Label.Command.ConvertScheduledUserToLabor": // ButtonTool { //case 1010 gridScheduledUsers.UpdateData(); //convert scheduled user to labor UltraGridRow r = gridScheduledUsers.ActiveRow; if (r == null) return; Guid mNewWorkorderItemLabor = mWorkorder.CreateLaborFromScheduledUser(mCurrentWorkorderItem.ID, (Guid)r.Cells["ID"].Value); if (mNewWorkorderItemLabor == Guid.Empty) return; //remove the zeroth labor item here because we were sucessful if(mCurrentWorkorderItem.Labors.Count>1) mCurrentWorkorderItem.Labors.RemoveAt(0); //Ok, have a new labor item, let's display it and ready for edit mGoTo = RootObjectTypes.WorkorderItemLabor; this.mGoToWorkorderItemID = mCurrentWorkorderItem.ID; this.mGoToWorkorderItemSubItemID = mNewWorkorderItemLabor; GoToSelectedItem(); } break; case "LT:ScheduleMarker.Label.FollowUp": { FollowUpSelector f1 = new FollowUpSelector(mWorkorder.FollowTypeAndID); f1.ShowDialog(); f1.Dispose(); break; } } } #endregion #region Child ToolBar display private void gridWorkorderItems_Enter(object sender, System.EventArgs e) { ShowChildToolBar("WorkorderItemToolBar"); } private void gridLabor_Enter(object sender, System.EventArgs e) { ShowChildToolBar("WorkorderItemLaborToolBar"); } private void gridParts_Enter(object sender, System.EventArgs e) { //ShowChildToolBar("WorkorderItemPartToolBar"); } private void gridScheduledUsers_Enter(object sender, System.EventArgs e) { ShowChildToolBar("WorkorderItemScheduledUserToolBar"); } private string mActiveChildToolBarKey=""; /// /// Show the requested child item toolbar and hide all other toolbars /// /// private void ShowChildToolBar(string sToolBarKey) { if(sToolBarKey==mActiveChildToolBarKey) return; //case 1039 //if(log.IsDebugEnabled) //case 1039 //log.Debug("ShowChildToolBar: "+sToolBarKey); if(mActiveChildToolBarKey!="") tbManager.Toolbars[mActiveChildToolBarKey].Visible=false; mActiveChildToolBarKey=sToolBarKey; tbManager.Toolbars[mActiveChildToolBarKey].Visible=true; } private void HideAllChildToolBars() { //case 1039 //log.Debug("HideAllChildToolBars"); foreach(UltraToolbar tb in tbManager.Toolbars) { if(tb.Key!="WorkorderEntryMenuBar") tb.Visible=false; } } #endregion #region Service completed / Closed handler private void ckServiceCompleted_CheckedChanged(object sender, System.EventArgs e) { if(AmBinding) return; //case 1039 //log.Debug("ckServiceCompleted_CheckedChanged"); if(mWorkorder.HasPartRequestsOnOrder && ckServiceCompleted.Checked) { AmBinding=true; ckServiceCompleted.Checked=!ckServiceCompleted.Checked; AmBinding=false; MessageBox.Show(Util.LocaleText.GetLocalizedText("Workorder.Label.Error.PartRequestsOnOrder"),"",MessageBoxButtons.OK,MessageBoxIcon.Stop); return; } //Case 398 if (mWorkorder.HasPartRequestsUnOrdered && ckServiceCompleted.Checked) { AmBinding = true; ckServiceCompleted.Checked = !ckServiceCompleted.Checked; AmBinding = false; MessageBox.Show(Util.LocaleText.GetLocalizedText("Workorder.Label.Error.PartRequestsUnOrdered"), "", MessageBoxButtons.OK, MessageBoxIcon.Stop); return; } if(mWorkorder.HasOutstandingLoanItems && ckServiceCompleted.Checked) { AmBinding=true; ckServiceCompleted.Checked=!ckServiceCompleted.Checked; AmBinding=false; MessageBox.Show(Util.LocaleText.GetLocalizedText("Workorder.Label.Error.LoanItemsNotReturned"),"",MessageBoxButtons.OK,MessageBoxIcon.Stop); return; } if(mWorkorder.IsValid) { //save and close //warn user save is semi-permanent and will close screen //case 986 //if(Util.PromptYesNoCancelFromLocaleKey("Workorder.Label.Warning.ServiceCompletedChanged")!=DialogResult.Yes) //{ // AmBinding=true; // ckServiceCompleted.Checked=!ckServiceCompleted.Checked; // AmBinding=false; // return; //} if(!mWorkorder.AllPartsUsed) { if(Util.PromptYesNoCancelFromLocaleKey("Workorder.Label.Warning.NotAllPartsUsed")!=DialogResult.Yes) { AmBinding=true; ckServiceCompleted.Checked=!ckServiceCompleted.Checked; AmBinding=false; return; } else { mWorkorder.SetAllPartsUsed(); } } Cursor.Current=Cursors.WaitCursor; mWorkorder.ServiceCompleted=ckServiceCompleted.Checked; edInvoiceNumber.ReadOnly=!mWorkorder.ServiceCompleted; //RecordUpdate(RecordActionType.SaveAndExit); //case 986 RecordUpdate(RecordActionType.SaveOnly); RestrictUI(); } //TODO: need warning here if workorder is not valid so that they know why they can't change status } //Reopen a closed workorder private void ckReOpen_CheckedChanged(object sender, EventArgs e) { if (AmBinding) return; if (!ckReOpen.Checked) { AmBinding = true; Workorder.Reopen(mWorkorder.ID); mWorkorder.Closed = false; ckClosed.Checked = false; ckReOpen.Visible = false; ckClosed.Visible = true; AmBinding = false; RestrictUI(); } } private void ckClosed_CheckedChanged(object sender, System.EventArgs e) { if(AmBinding) return; //case 1039 //log.Debug("ckClosed_CheckedChanged"); if(mWorkorder.HasOutstandingLoanItems) { AmBinding=true; ckClosed.Checked=!ckClosed.Checked; AmBinding=false; MessageBox.Show(Util.LocaleText.GetLocalizedText("Workorder.Label.Error.LoanItemsNotReturned"),"",MessageBoxButtons.OK,MessageBoxIcon.Stop); return; } if(mWorkorder.HasPartRequestsOnOrder) { AmBinding=true; ckClosed.Checked=!ckClosed.Checked; AmBinding=false; MessageBox.Show(Util.LocaleText.GetLocalizedText("Workorder.Label.Error.PartRequestsOnOrder"),"",MessageBoxButtons.OK,MessageBoxIcon.Stop); return; } if (mWorkorder.HasPartRequestsUnOrdered) { AmBinding = true; ckClosed.Checked = !ckClosed.Checked; AmBinding = false; MessageBox.Show(Util.LocaleText.GetLocalizedText("Workorder.Label.Error.PartRequestsUnOrdered"), "", MessageBoxButtons.OK, MessageBoxIcon.Stop); return; } if(mWorkorder.IsValid && mWorkorder.Closed==false) { //save and close //warn user save is permanent, no going back... //commented out per case 833 reopen closed workorder //if(Util.PromptYesNoCancelFromLocaleKey("Workorder.Label.Warning.ClosedChanged")!=DialogResult.Yes) //{ // AmBinding=true; // ckClosed.Checked=!ckClosed.Checked; // AmBinding=false; // return; //} if(!mWorkorder.AllPartsUsed) { if(Util.PromptYesNoCancelFromLocaleKey("Workorder.Label.Warning.NotAllPartsUsed")!=DialogResult.Yes) { AmBinding=true; ckClosed.Checked=!ckClosed.Checked; AmBinding=false; return; } else { mWorkorder.SetAllPartsUsed(); } } Cursor.Current = Cursors.WaitCursor; mWorkorder.ServiceCompleted = true; mWorkorder.Closed = ckClosed.Checked; AmBinding=true; this.ckReOpen.Checked=ckClosed.Checked; AmBinding=false; //RecordUpdate(RecordActionType.SaveAndExit); //case 986 RecordUpdate(RecordActionType.SaveOnly); RestrictUI(); } } #endregion #region Parts panel sizing and display adjustment private void pnlParts_SizeChanged(object sender, System.EventArgs e) { } /// /// Ensures that the parts and partrequests are displayed as /// appropriate /// private void AdjustPartsDisplay() { //case 1039 //log.Debug("AdjustPartsDisplay"); this.gridParts.Dock=DockStyle.Fill; } #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,mWorkorder.Docs,RootObjectTypes.Workorder,mWorkorder.ID, mWorkorder.RootObjectType); } #endregion #region Accelerator keys /// /// Case 37 /// /// /// /// protected override bool ProcessCmdKey(ref Message msg, Keys keyData) { //Short circuit: //Only process modified keystrokes (i.e. when a modifier like ctrl-alt-or shift is also //being held down if (ModifierKeys == Keys.None) return base.ProcessCmdKey(ref msg, keyData); switch (Util.HotKeys(keyData)) { //Close form case HotKeyAction.CloseForm: this.Close(); return true; } return base.ProcessCmdKey(ref msg, keyData); } #endregion //******************************************************************************************** } }