Files
ayanova7/source/WinFormApp/WorkorderForm.cs
2019-02-14 18:45:01 +00:00

11251 lines
538 KiB
C#

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>
/// Summary description for WorkorderForm.
/// </summary>
public class WorkorderForm : 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 pnlQuote;
private System.Windows.Forms.Panel pnlPM;
private System.Windows.Forms.Panel pnlItem;
private System.Windows.Forms.Panel pnlLabour;
private System.Windows.Forms.Panel pnlParts;
private System.Windows.Forms.Panel pnlExpense;
private System.Windows.Forms.Panel pnlOutsideService;
private System.Windows.Forms.Panel pnlScheduledUser;
private System.Windows.Forms.Panel pnlTask;
private System.Windows.Forms.Panel pnlTravel;
private System.Windows.Forms.Panel pnlUnit;
private System.Windows.Forms.Panel pnlNavigation;
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 cbProjectID;
private Infragistics.Win.Misc.UltraButton btnProjectID;
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.Misc.UltraLabel lblServiceDate;
private GZTW.WinForm.Controls.GZDateTimePicker dtServiceDate;
private Infragistics.Win.UltraWinEditors.UltraTextEditor edInvoiceNumber;
private Infragistics.Win.Misc.UltraLabel lblInvoiceNumber;
private System.Windows.Forms.Panel pnlWorkorderItemCustomFields;
private Infragistics.Win.UltraWinGrid.UltraGrid gridWorkorderItems;
private Infragistics.Win.Misc.UltraButton btnViewLabors;
private Infragistics.Win.Misc.UltraButton btnViewUnit;
private Infragistics.Win.Misc.UltraButton btnViewParts;
private Infragistics.Win.Misc.UltraButton btnViewTravels;
private Infragistics.Win.Misc.UltraButton btnViewScheduledUsers;
private Infragistics.Win.Misc.UltraButton btnViewTasks;
private Infragistics.Win.Misc.UltraButton btnViewExpenses;
private Infragistics.Win.Misc.UltraButton btnViewOutsideService;
private Infragistics.Win.Misc.UltraButton btnViewCustomFields;
private System.Windows.Forms.Splitter splitter1;
private System.Windows.Forms.Panel WorkorderForm_Fill_Panel;
private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _WorkorderForm_Toolbars_Dock_Area_Left;
private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _WorkorderForm_Toolbars_Dock_Area_Right;
private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _WorkorderForm_Toolbars_Dock_Area_Top;
private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _WorkorderForm_Toolbars_Dock_Area_Bottom;
private Infragistics.Win.UltraWinToolbars.UltraToolbarsManager tbManager;
private System.Windows.Forms.ErrorProvider epWO;
private System.Windows.Forms.CheckBox ckIsDirty;
private Infragistics.Win.UltraWinEditors.UltraTextEditor edIntroduction;
private System.Windows.Forms.Panel pnlQuoteLeft;
private System.Windows.Forms.Panel pnlQuoteMiddle;
private System.Windows.Forms.Panel pnlQuoteRight;
private GZTW.WinForm.Controls.GZDateTimePicker dtDateApproved;
private GZTW.WinForm.Controls.GZDateTimePicker dtDateSubmitted;
private GZTW.WinForm.Controls.GZDateTimePicker dtValidUntilDate;
private GZTW.WinForm.Controls.GZDateTimePicker dtQuoteRequestDate;
private GZTW.WinForm.Controls.GZUltraComboEditor cbPreparedByID;
private Infragistics.Win.UltraWinGrid.UltraGrid gridLabor;
private GZTW.WinForm.Controls.GZUltraComboEditor cbWorkorderItemUnitID;
private Infragistics.Win.Misc.UltraButton btnUnitID;
private GZTW.WinForm.Controls.GZUltraComboEditor cbWorkorderItemUnitServiceTypeID;
private Infragistics.Win.Misc.UltraButton btnWorkorderItemUnitServiceTypeID;
private Infragistics.Win.UltraWinGrid.UltraGrid gridTravel;
private GZTW.WinForm.Controls.GZDateTimePicker GridCalendar;
private Infragistics.Win.UltraWinGrid.UltraGrid gridParts;
private Infragistics.Win.UltraWinGrid.UltraGrid gridScheduledUsers;
private Infragistics.Win.UltraWinGrid.UltraGrid gridExpense;
private System.Windows.Forms.Panel pnlOutsideServiceLeft;
private System.Windows.Forms.Panel pnlOutsideServiceCenter;
private System.Windows.Forms.Panel pnlOutsideServiceRight;
private Infragistics.Win.Misc.UltraLabel lblWorkorderItemOutsideServiceNotes;
private Infragistics.Win.UltraWinEditors.UltraTextEditor edWorkorderItemOutsideServiceNotes;
private Infragistics.Win.UltraWinEditors.UltraTextEditor edWorkorderItemOutsideServiceRMANumber;
private Infragistics.Win.Misc.UltraLabel lblWorkorderItemOutsideServiceRMANumber;
private Infragistics.Win.UltraWinEditors.UltraTextEditor edWorkorderItemOutsideServiceTrackingNumber;
private Infragistics.Win.Misc.UltraLabel lblWorkorderItemOutsideServiceTrackingNumber;
private Infragistics.Win.UltraWinEditors.UltraCurrencyEditor edWorkorderItemOutsideServiceRepairCost;
private Infragistics.Win.Misc.UltraLabel lblWorkorderItemOutsideServiceRepairCost;
private Infragistics.Win.UltraWinEditors.UltraCurrencyEditor edWorkorderItemOutsideServiceRepairPrice;
private Infragistics.Win.Misc.UltraLabel lblWorkorderItemOutsideServiceRepairPrice;
private Infragistics.Win.UltraWinEditors.UltraCurrencyEditor edWorkorderItemOutsideServiceShippingPrice;
private Infragistics.Win.Misc.UltraLabel lblWorkorderItemOutsideServiceShippingPrice;
private Infragistics.Win.UltraWinEditors.UltraCurrencyEditor edWorkorderItemOutsideServiceShippingCost;
private Infragistics.Win.Misc.UltraLabel lblWorkorderItemOutsideServiceShippingCost;
private GZTW.WinForm.Controls.GZUltraComboEditor cbWorkorderItemOutsideServiceVendorSentToID;
private Infragistics.Win.Misc.UltraButton btnWorkorderItemOutsideServiceVendorSentToID;
private GZTW.WinForm.Controls.GZUltraComboEditor cbWorkorderItemOutsideServiceVendorSentViaID;
private Infragistics.Win.Misc.UltraButton btnWorkorderItemOutsideServiceVendorSentViaID;
private Infragistics.Win.Misc.UltraLabel lblWorkorderItemOutsideServiceDateSent;
private GZTW.WinForm.Controls.GZDateTimePicker dtWorkorderItemOutsideServiceDateSent;
private Infragistics.Win.Misc.UltraLabel lblWorkorderItemOutsideServiceDateETA;
private GZTW.WinForm.Controls.GZDateTimePicker dtWorkorderItemOutsideServiceDateETA;
private Infragistics.Win.Misc.UltraLabel lblWorkorderItemOutsideServiceDateReturned;
private GZTW.WinForm.Controls.GZDateTimePicker dtWorkorderItemOutsideServiceDateReturned;
private Infragistics.Win.UltraWinGrid.UltraGrid gridCustom;
private System.Windows.Forms.Panel pnlTaskTop;
private Infragistics.Win.UltraWinGrid.UltraGrid gridTasks;
private GZTW.WinForm.Controls.GZUltraComboEditor cbWorkorderItemTasks;
private Infragistics.Win.Misc.UltraButton btnWorkorderItemTask;
private Infragistics.Win.UltraWinEditors.UltraCheckEditor ckServiceCompleted;
private Infragistics.Win.UltraWinEditors.UltraCheckEditor ckClosed;
private Infragistics.Win.UltraWinEditors.UltraTextEditor edWarrantyInfo;
private Infragistics.Win.Misc.UltraLabel lblQuoteRequestDate;
private Infragistics.Win.Misc.UltraLabel lblValidUntilDate;
private Infragistics.Win.Misc.UltraLabel lblDateSubmitted;
private Infragistics.Win.Misc.UltraLabel lblDateApproved;
private Infragistics.Win.Misc.UltraLabel lblPreparedByID;
private Infragistics.Win.Misc.UltraLabel lblIntroduction;
private Infragistics.Win.UltraWinGrid.UltraGrid gridPartRequests;
private Infragistics.Win.Misc.UltraLabel lblCloseByDate;
private GZTW.WinForm.Controls.GZDateTimePicker dtCloseByDate;
private Infragistics.Win.Misc.UltraButton btnViewLoans;
private System.Windows.Forms.Panel pnlLoan;
private Infragistics.Win.UltraWinGrid.UltraGrid gridLoan;
private GZTW.WinForm.Controls.GZUltraComboEditor cbWorkorderQuoteStatusID;
private Infragistics.Win.Misc.UltraLabel lblWorkorderQuoteStatusID;
private System.Windows.Forms.Panel pnlPMLeft;
private System.Windows.Forms.Panel pnlPMRight;
private Infragistics.Win.Misc.UltraLabel lblPMGenerateSpan;
private Infragistics.Win.UltraWinEditors.UltraComboEditor cbPMGenerateSpanUnit;
private Infragistics.Win.UltraWinEditors.UltraNumericEditor edPMGenerateSpan;
private Infragistics.Win.Misc.UltraLabel lblPMThresholdSpan;
private Infragistics.Win.UltraWinEditors.UltraComboEditor cbPMThresholdSpanUnit;
private Infragistics.Win.UltraWinEditors.UltraNumericEditor edPMThresholdSpan;
private Infragistics.Win.UltraWinEditors.UltraCheckEditor ckPMActive;
private Infragistics.Win.UltraWinEditors.UltraComboEditor cbPMDayOfTheWeek;
private Infragistics.Win.Misc.UltraLabel lblPMDayOfTheWeek;
private GZTW.WinForm.Controls.GZDateTimePicker dtPMNextServiceDate;
private Infragistics.Win.Misc.UltraLabel lblPMStopGeneratingDate;
private GZTW.WinForm.Controls.GZDateTimePicker dtPMStopGeneratingDate;
private GZTW.WinForm.Controls.GZUltraComboEditor cbPMWorkorderStatusID;
private Infragistics.Win.Misc.UltraButton btnPMWorkorderStatusID;
private System.Windows.Forms.Panel pnlPMMiddle;
private Infragistics.Win.Misc.UltraLabel lblPMNextServiceDate;
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 Label lblPartGridCaption;
private Button btWoItemPartAddNew;
private Button btnWOItemPartRefreshList;
private Panel pnlWoItemPartGridControlPanel;
private Infragistics.Win.UltraWinEditors.UltraCheckEditor ckReOpen;
private Infragistics.Win.UltraWinEditors.UltraCheckEditor ckTemplateFreshPrice;
private System.ComponentModel.IContainer components;
public WorkorderForm()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
//
//
//
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose(bool disposing)
{
if (disposing)
{
if (components != null)
{
components.Dispose();
}
}
//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 { };
//System.Threading.Thread.Sleep(200);
base.Dispose(disposing);
}
#endregion
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
Infragistics.Win.Appearance appearance1 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance2 = 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 appearance6 = new Infragistics.Win.Appearance();
Infragistics.Win.ValueListItem valueListItem1 = new Infragistics.Win.ValueListItem();
Infragistics.Win.Appearance appearance7 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance8 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance9 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance10 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance11 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance12 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance13 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance14 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance15 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance16 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance17 = new Infragistics.Win.Appearance();
Infragistics.Win.UltraWinEditors.EditorButton editorButton1 = new Infragistics.Win.UltraWinEditors.EditorButton();
Infragistics.Win.Appearance appearance18 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance19 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance20 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance21 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance22 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance23 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance24 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance25 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance26 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance27 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance28 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance29 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance30 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance31 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance32 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance33 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance34 = 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 buttonTool2 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:AssignedDoc.Label.List");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool3 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:O.WikiPage");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool4 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UI.Command.RecordHistory");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool5 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:ScheduleMarker.Label.FollowUp");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool6 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:ClientNote.Label.List");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool7 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:O.Contract");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool8 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UI.Command.Save");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool9 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UI.Command.CurrentDateAndTime");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool10 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UI.Command.Delete");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool11 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UI.Command.Close");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool12 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UI.ToolBar.Customize");
Infragistics.Win.UltraWinToolbars.UltraToolbar ultraToolbar2 = new Infragistics.Win.UltraWinToolbars.UltraToolbar("WorkorderItemToolBar");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool13 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:WorkorderItemType.Label.List");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool14 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:WorkorderStatus.Label.List");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool15 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:Priority.Label.List");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool16 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:Workorder.Label.Command.MoveWorkorderItem");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool17 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:Workorder.Label.Command.CopyWorkorderItem");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool18 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UnitMeterReading.Label.List");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool19 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UI.Command.RecordHistory");
Infragistics.Win.UltraWinToolbars.UltraToolbar ultraToolbar3 = new Infragistics.Win.UltraWinToolbars.UltraToolbar("WorkorderItemLaborToolBar");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool20 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:Rate.Label.List");
Infragistics.Win.UltraWinToolbars.UltraToolbar ultraToolbar4 = new Infragistics.Win.UltraWinToolbars.UltraToolbar("WorkorderItemPartToolBar");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool21 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UI.Toolbar.WorkorderForm.SetAllPartsUsedInService");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool22 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:Workorder.Label.GenerateUnit");
Infragistics.Win.UltraWinToolbars.UltraToolbar ultraToolbar5 = new Infragistics.Win.UltraWinToolbars.UltraToolbar("WorkorderItemTravelToolBar");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool23 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:Rate.Label.List");
Infragistics.Win.UltraWinToolbars.UltraToolbar ultraToolbar6 = new Infragistics.Win.UltraWinToolbars.UltraToolbar("WorkorderItemScheduledUserToolBar");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool24 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:Workorder.Label.Command.ConvertScheduledUserToLabor");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool25 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UI.Command.SaveClose");
Infragistics.Win.Appearance appearance35 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance36 = new Infragistics.Win.Appearance();
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool26 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:AssignedDoc.Label.List");
Infragistics.Win.Appearance appearance37 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance38 = new Infragistics.Win.Appearance();
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool27 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UI.Command.RecordHistory");
Infragistics.Win.Appearance appearance39 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance40 = new Infragistics.Win.Appearance();
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool28 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UI.Command.Save");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool29 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UI.Command.Close");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool30 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:ClientNote.Label.List");
Infragistics.Win.Appearance appearance41 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance42 = new Infragistics.Win.Appearance();
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool31 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:O.Contract");
Infragistics.Win.Appearance appearance43 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance44 = new Infragistics.Win.Appearance();
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool32 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UI.Command.Delete");
Infragistics.Win.Appearance appearance45 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance46 = new Infragistics.Win.Appearance();
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool33 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UI.Command.CurrentDateAndTime");
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool34 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UI.Toolbar.WorkorderForm.SetAllPartsUsedInService");
Infragistics.Win.Appearance appearance47 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance48 = new Infragistics.Win.Appearance();
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool35 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:WorkorderItemType.Label.List");
Infragistics.Win.Appearance appearance49 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance50 = new Infragistics.Win.Appearance();
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool36 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:WorkorderStatus.Label.List");
Infragistics.Win.Appearance appearance51 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance52 = new Infragistics.Win.Appearance();
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool37 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:Priority.Label.List");
Infragistics.Win.Appearance appearance53 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance54 = new Infragistics.Win.Appearance();
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool38 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:Rate.Label.List");
Infragistics.Win.Appearance appearance55 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance56 = new Infragistics.Win.Appearance();
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool39 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:Workorder.Label.Command.MoveWorkorderItem");
Infragistics.Win.Appearance appearance57 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance58 = new Infragistics.Win.Appearance();
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool40 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UnitMeterReading.Label.List");
Infragistics.Win.Appearance appearance59 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance60 = new Infragistics.Win.Appearance();
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool41 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:Workorder.Label.Command.ConvertScheduledUserToLabor");
Infragistics.Win.Appearance appearance61 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance62 = new Infragistics.Win.Appearance();
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool42 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:Workorder.Label.Command.CopyWorkorderItem");
Infragistics.Win.Appearance appearance63 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance64 = new Infragistics.Win.Appearance();
Infragistics.Win.UltraWinToolbars.PopupMenuTool popupMenuTool2 = new Infragistics.Win.UltraWinToolbars.PopupMenuTool("LT:UI.Toolbar.Print");
Infragistics.Win.Appearance appearance65 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance66 = 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 buttonTool43 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:ScheduleMarker.Label.FollowUp");
Infragistics.Win.Appearance appearance67 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance68 = new Infragistics.Win.Appearance();
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool44 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:O.WikiPage");
Infragistics.Win.Appearance appearance69 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance70 = new Infragistics.Win.Appearance();
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool45 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:Workorder.Label.GenerateUnit");
Infragistics.Win.Appearance appearance71 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance72 = new Infragistics.Win.Appearance();
Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool46 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LT:UI.ToolBar.Customize");
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.cbProjectID = new GZTW.WinForm.Controls.GZUltraComboEditor();
this.btnProjectID = new Infragistics.Win.Misc.UltraButton();
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.ckTemplateFreshPrice = new Infragistics.Win.UltraWinEditors.UltraCheckEditor();
this.edTemplateDescription = new Infragistics.Win.UltraWinEditors.UltraTextEditor();
this.cbRegion = new GZTW.WinForm.Controls.GZUltraComboEditor();
this.lblRegionID = new Infragistics.Win.Misc.UltraLabel();
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.edInvoiceNumber = new Infragistics.Win.UltraWinEditors.UltraTextEditor();
this.lblInvoiceNumber = new Infragistics.Win.Misc.UltraLabel();
this.lblServiceDate = new Infragistics.Win.Misc.UltraLabel();
this.dtServiceDate = new GZTW.WinForm.Controls.GZDateTimePicker();
this.pnlServiceLeft = new System.Windows.Forms.Panel();
this.lblCloseByDate = new Infragistics.Win.Misc.UltraLabel();
this.dtCloseByDate = new GZTW.WinForm.Controls.GZDateTimePicker();
this.cbWorkorderStatusID = new GZTW.WinForm.Controls.GZUltraComboEditor();
this.btnWorkorderStatusID = new Infragistics.Win.Misc.UltraButton();
this.pnlQuote = new System.Windows.Forms.Panel();
this.pnlQuoteRight = new System.Windows.Forms.Panel();
this.lblQuoteRequestDate = new Infragistics.Win.Misc.UltraLabel();
this.dtQuoteRequestDate = new GZTW.WinForm.Controls.GZDateTimePicker();
this.lblValidUntilDate = new Infragistics.Win.Misc.UltraLabel();
this.dtValidUntilDate = new GZTW.WinForm.Controls.GZDateTimePicker();
this.pnlQuoteMiddle = new System.Windows.Forms.Panel();
this.lblWorkorderQuoteStatusID = new Infragistics.Win.Misc.UltraLabel();
this.lblDateSubmitted = new Infragistics.Win.Misc.UltraLabel();
this.dtDateSubmitted = new GZTW.WinForm.Controls.GZDateTimePicker();
this.lblDateApproved = new Infragistics.Win.Misc.UltraLabel();
this.dtDateApproved = new GZTW.WinForm.Controls.GZDateTimePicker();
this.cbWorkorderQuoteStatusID = new GZTW.WinForm.Controls.GZUltraComboEditor();
this.pnlQuoteLeft = new System.Windows.Forms.Panel();
this.lblPreparedByID = new Infragistics.Win.Misc.UltraLabel();
this.cbPreparedByID = new GZTW.WinForm.Controls.GZUltraComboEditor();
this.lblIntroduction = new Infragistics.Win.Misc.UltraLabel();
this.edIntroduction = new Infragistics.Win.UltraWinEditors.UltraTextEditor();
this.pnlPM = new System.Windows.Forms.Panel();
this.pnlPMRight = new System.Windows.Forms.Panel();
this.cbPMWorkorderStatusID = new GZTW.WinForm.Controls.GZUltraComboEditor();
this.btnPMWorkorderStatusID = new Infragistics.Win.Misc.UltraButton();
this.pnlPMMiddle = new System.Windows.Forms.Panel();
this.lblPMStopGeneratingDate = new Infragistics.Win.Misc.UltraLabel();
this.dtPMStopGeneratingDate = new GZTW.WinForm.Controls.GZDateTimePicker();
this.lblPMNextServiceDate = new Infragistics.Win.Misc.UltraLabel();
this.dtPMNextServiceDate = new GZTW.WinForm.Controls.GZDateTimePicker();
this.lblPMDayOfTheWeek = new Infragistics.Win.Misc.UltraLabel();
this.cbPMDayOfTheWeek = new Infragistics.Win.UltraWinEditors.UltraComboEditor();
this.pnlPMLeft = new System.Windows.Forms.Panel();
this.ckPMActive = new Infragistics.Win.UltraWinEditors.UltraCheckEditor();
this.lblPMThresholdSpan = new Infragistics.Win.Misc.UltraLabel();
this.cbPMThresholdSpanUnit = new Infragistics.Win.UltraWinEditors.UltraComboEditor();
this.edPMThresholdSpan = new Infragistics.Win.UltraWinEditors.UltraNumericEditor();
this.lblPMGenerateSpan = new Infragistics.Win.Misc.UltraLabel();
this.cbPMGenerateSpanUnit = new Infragistics.Win.UltraWinEditors.UltraComboEditor();
this.edPMGenerateSpan = new Infragistics.Win.UltraWinEditors.UltraNumericEditor();
this.pnlItem = new System.Windows.Forms.Panel();
this.gridWorkorderItems = new Infragistics.Win.UltraWinGrid.UltraGrid();
this.pnlLabour = new System.Windows.Forms.Panel();
this.gridLabor = new Infragistics.Win.UltraWinGrid.UltraGrid();
this.pnlParts = new System.Windows.Forms.Panel();
this.gridPartRequests = new Infragistics.Win.UltraWinGrid.UltraGrid();
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.pnlExpense = new System.Windows.Forms.Panel();
this.gridExpense = new Infragistics.Win.UltraWinGrid.UltraGrid();
this.pnlOutsideService = new System.Windows.Forms.Panel();
this.pnlOutsideServiceRight = new System.Windows.Forms.Panel();
this.lblWorkorderItemOutsideServiceDateReturned = new Infragistics.Win.Misc.UltraLabel();
this.dtWorkorderItemOutsideServiceDateReturned = new GZTW.WinForm.Controls.GZDateTimePicker();
this.lblWorkorderItemOutsideServiceDateETA = new Infragistics.Win.Misc.UltraLabel();
this.dtWorkorderItemOutsideServiceDateETA = new GZTW.WinForm.Controls.GZDateTimePicker();
this.lblWorkorderItemOutsideServiceDateSent = new Infragistics.Win.Misc.UltraLabel();
this.dtWorkorderItemOutsideServiceDateSent = new GZTW.WinForm.Controls.GZDateTimePicker();
this.pnlOutsideServiceCenter = new System.Windows.Forms.Panel();
this.edWorkorderItemOutsideServiceShippingPrice = new Infragistics.Win.UltraWinEditors.UltraCurrencyEditor();
this.lblWorkorderItemOutsideServiceShippingPrice = new Infragistics.Win.Misc.UltraLabel();
this.edWorkorderItemOutsideServiceShippingCost = new Infragistics.Win.UltraWinEditors.UltraCurrencyEditor();
this.lblWorkorderItemOutsideServiceShippingCost = new Infragistics.Win.Misc.UltraLabel();
this.lblWorkorderItemOutsideServiceTrackingNumber = new Infragistics.Win.Misc.UltraLabel();
this.edWorkorderItemOutsideServiceTrackingNumber = new Infragistics.Win.UltraWinEditors.UltraTextEditor();
this.btnWorkorderItemOutsideServiceVendorSentViaID = new Infragistics.Win.Misc.UltraButton();
this.cbWorkorderItemOutsideServiceVendorSentViaID = new GZTW.WinForm.Controls.GZUltraComboEditor();
this.pnlOutsideServiceLeft = new System.Windows.Forms.Panel();
this.edWorkorderItemOutsideServiceRepairPrice = new Infragistics.Win.UltraWinEditors.UltraCurrencyEditor();
this.lblWorkorderItemOutsideServiceRepairPrice = new Infragistics.Win.Misc.UltraLabel();
this.edWorkorderItemOutsideServiceRepairCost = new Infragistics.Win.UltraWinEditors.UltraCurrencyEditor();
this.lblWorkorderItemOutsideServiceRepairCost = new Infragistics.Win.Misc.UltraLabel();
this.edWorkorderItemOutsideServiceRMANumber = new Infragistics.Win.UltraWinEditors.UltraTextEditor();
this.lblWorkorderItemOutsideServiceRMANumber = new Infragistics.Win.Misc.UltraLabel();
this.cbWorkorderItemOutsideServiceVendorSentToID = new GZTW.WinForm.Controls.GZUltraComboEditor();
this.btnWorkorderItemOutsideServiceVendorSentToID = new Infragistics.Win.Misc.UltraButton();
this.edWorkorderItemOutsideServiceNotes = new Infragistics.Win.UltraWinEditors.UltraTextEditor();
this.lblWorkorderItemOutsideServiceNotes = new Infragistics.Win.Misc.UltraLabel();
this.pnlScheduledUser = new System.Windows.Forms.Panel();
this.gridScheduledUsers = new Infragistics.Win.UltraWinGrid.UltraGrid();
this.pnlTask = new System.Windows.Forms.Panel();
this.gridTasks = new Infragistics.Win.UltraWinGrid.UltraGrid();
this.pnlTaskTop = new System.Windows.Forms.Panel();
this.cbWorkorderItemTasks = new GZTW.WinForm.Controls.GZUltraComboEditor();
this.btnWorkorderItemTask = new Infragistics.Win.Misc.UltraButton();
this.pnlTravel = new System.Windows.Forms.Panel();
this.gridTravel = new Infragistics.Win.UltraWinGrid.UltraGrid();
this.pnlUnit = new System.Windows.Forms.Panel();
this.edWarrantyInfo = new Infragistics.Win.UltraWinEditors.UltraTextEditor();
this.cbWorkorderItemUnitServiceTypeID = new GZTW.WinForm.Controls.GZUltraComboEditor();
this.btnWorkorderItemUnitServiceTypeID = new Infragistics.Win.Misc.UltraButton();
this.cbWorkorderItemUnitID = new GZTW.WinForm.Controls.GZUltraComboEditor();
this.btnUnitID = new Infragistics.Win.Misc.UltraButton();
this.pnlNavigation = new System.Windows.Forms.Panel();
this.btnViewLoans = new Infragistics.Win.Misc.UltraButton();
this.btnViewCustomFields = new Infragistics.Win.Misc.UltraButton();
this.btnViewOutsideService = new Infragistics.Win.Misc.UltraButton();
this.btnViewExpenses = new Infragistics.Win.Misc.UltraButton();
this.btnViewTasks = new Infragistics.Win.Misc.UltraButton();
this.btnViewScheduledUsers = new Infragistics.Win.Misc.UltraButton();
this.btnViewTravels = new Infragistics.Win.Misc.UltraButton();
this.btnViewParts = new Infragistics.Win.Misc.UltraButton();
this.btnViewUnit = new Infragistics.Win.Misc.UltraButton();
this.btnViewLabors = new Infragistics.Win.Misc.UltraButton();
this.pnlWorkorderItemCustomFields = new System.Windows.Forms.Panel();
this.gridCustom = new Infragistics.Win.UltraWinGrid.UltraGrid();
this.splitter1 = new System.Windows.Forms.Splitter();
this.WorkorderForm_Fill_Panel = new System.Windows.Forms.Panel();
this.pnlLoan = new System.Windows.Forms.Panel();
this.gridLoan = 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._WorkorderForm_Toolbars_Dock_Area_Left = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea();
this._WorkorderForm_Toolbars_Dock_Area_Right = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea();
this._WorkorderForm_Toolbars_Dock_Area_Top = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea();
this._WorkorderForm_Toolbars_Dock_Area_Bottom = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea();
this.tbManager = new Infragistics.Win.UltraWinToolbars.UltraToolbarsManager(this.components);
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.cbProjectID)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.cbWorkorderCategoryID)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.edSummary)).BeginInit();
this.pnlHeaderLeft.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.ckTemplateFreshPrice)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.edTemplateDescription)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.cbRegion)).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.edInvoiceNumber)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dtServiceDate)).BeginInit();
this.pnlServiceLeft.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dtCloseByDate)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.cbWorkorderStatusID)).BeginInit();
this.pnlQuote.SuspendLayout();
this.pnlQuoteRight.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dtQuoteRequestDate)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dtValidUntilDate)).BeginInit();
this.pnlQuoteMiddle.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dtDateSubmitted)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dtDateApproved)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.cbWorkorderQuoteStatusID)).BeginInit();
this.pnlQuoteLeft.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.cbPreparedByID)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.edIntroduction)).BeginInit();
this.pnlPM.SuspendLayout();
this.pnlPMRight.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.cbPMWorkorderStatusID)).BeginInit();
this.pnlPMMiddle.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dtPMStopGeneratingDate)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dtPMNextServiceDate)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.cbPMDayOfTheWeek)).BeginInit();
this.pnlPMLeft.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.ckPMActive)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.cbPMThresholdSpanUnit)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.edPMThresholdSpan)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.cbPMGenerateSpanUnit)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.edPMGenerateSpan)).BeginInit();
this.pnlItem.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.gridWorkorderItems)).BeginInit();
this.pnlLabour.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.gridLabor)).BeginInit();
this.pnlParts.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.gridPartRequests)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.gridParts)).BeginInit();
this.pnlWoItemPartGridControlPanel.SuspendLayout();
this.pnlExpense.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.gridExpense)).BeginInit();
this.pnlOutsideService.SuspendLayout();
this.pnlOutsideServiceRight.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dtWorkorderItemOutsideServiceDateReturned)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dtWorkorderItemOutsideServiceDateETA)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dtWorkorderItemOutsideServiceDateSent)).BeginInit();
this.pnlOutsideServiceCenter.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.edWorkorderItemOutsideServiceShippingPrice)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.edWorkorderItemOutsideServiceShippingCost)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.edWorkorderItemOutsideServiceTrackingNumber)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.cbWorkorderItemOutsideServiceVendorSentViaID)).BeginInit();
this.pnlOutsideServiceLeft.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.edWorkorderItemOutsideServiceRepairPrice)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.edWorkorderItemOutsideServiceRepairCost)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.edWorkorderItemOutsideServiceRMANumber)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.cbWorkorderItemOutsideServiceVendorSentToID)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.edWorkorderItemOutsideServiceNotes)).BeginInit();
this.pnlScheduledUser.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.gridScheduledUsers)).BeginInit();
this.pnlTask.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.gridTasks)).BeginInit();
this.pnlTaskTop.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.cbWorkorderItemTasks)).BeginInit();
this.pnlTravel.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.gridTravel)).BeginInit();
this.pnlUnit.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.edWarrantyInfo)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.cbWorkorderItemUnitServiceTypeID)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.cbWorkorderItemUnitID)).BeginInit();
this.pnlNavigation.SuspendLayout();
this.pnlWorkorderItemCustomFields.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.gridCustom)).BeginInit();
this.WorkorderForm_Fill_Panel.SuspendLayout();
this.pnlLoan.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.gridLoan)).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(1014, 131);
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(428, 131);
this.pnlHeaderRight.TabIndex = 2;
//
// edInternalReferenceNumber
//
this.edInternalReferenceNumber.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.edInternalReferenceNumber.Location = new System.Drawing.Point(324, 65);
this.edInternalReferenceNumber.Name = "edInternalReferenceNumber";
this.edInternalReferenceNumber.Size = new System.Drawing.Size(48, 24);
this.edInternalReferenceNumber.TabIndex = 153;
this.edInternalReferenceNumber.Tag = "`";
//
// lblInternalReferenceNumber
//
this.lblInternalReferenceNumber.Location = new System.Drawing.Point(3, 65);
this.lblInternalReferenceNumber.Name = "lblInternalReferenceNumber";
this.lblInternalReferenceNumber.Size = new System.Drawing.Size(66, 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(324, 45);
this.edCustomerReferenceNumber.Name = "edCustomerReferenceNumber";
this.edCustomerReferenceNumber.Size = new System.Drawing.Size(48, 24);
this.edCustomerReferenceNumber.TabIndex = 1;
this.edCustomerReferenceNumber.Tag = "`";
//
// edCustomerContactName
//
this.edCustomerContactName.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.edCustomerContactName.Location = new System.Drawing.Point(324, 26);
this.edCustomerContactName.Name = "edCustomerContactName";
this.edCustomerContactName.Size = new System.Drawing.Size(48, 24);
this.edCustomerContactName.TabIndex = 2;
this.edCustomerContactName.Tag = "`";
//
// lblCustomerContactName
//
this.lblCustomerContactName.Location = new System.Drawing.Point(3, 26);
this.lblCustomerContactName.Name = "lblCustomerContactName";
this.lblCustomerContactName.Size = new System.Drawing.Size(109, 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(3, 45);
this.lblCustomerReferenceNumber.Name = "lblCustomerReferenceNumber";
this.lblCustomerReferenceNumber.Size = new System.Drawing.Size(66, 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(3, 83);
this.ckOnsite.Name = "ckOnsite";
this.ckOnsite.Size = new System.Drawing.Size(405, 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(120, 0);
this.GridCalendar.Name = "GridCalendar";
this.GridCalendar.Size = new System.Drawing.Size(149, 24);
this.GridCalendar.TabIndex = 150;
this.GridCalendar.Visible = false;
//
// pnlHeaderCenter
//
this.pnlHeaderCenter.BackColor = System.Drawing.SystemColors.Control;
this.pnlHeaderCenter.Controls.Add(this.cbProjectID);
this.pnlHeaderCenter.Controls.Add(this.btnProjectID);
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, 131);
this.pnlHeaderCenter.TabIndex = 1;
//
// cbProjectID
//
this.cbProjectID.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.cbProjectID.Location = new System.Drawing.Point(202, 53);
this.cbProjectID.MaxDropDownItems = 25;
this.cbProjectID.Name = "cbProjectID";
this.cbProjectID.Size = new System.Drawing.Size(105, 24);
this.cbProjectID.TabIndex = 1;
this.cbProjectID.Tag = "`";
this.cbProjectID.NeedMoreData += new GZTW.WinForm.Controls.NeedMoreDataHandler(this.cbProjectID_NeedMoreData);
//
// btnProjectID
//
appearance1.TextHAlignAsString = "Left";
this.btnProjectID.Appearance = appearance1;
this.btnProjectID.Location = new System.Drawing.Point(3, 53);
this.btnProjectID.Name = "btnProjectID";
this.btnProjectID.Size = new System.Drawing.Size(103, 24);
this.btnProjectID.TabIndex = 2;
this.btnProjectID.Tag = "`";
this.btnProjectID.Text = "LT:O.Project";
this.btnProjectID.UseHotTracking = Infragistics.Win.DefaultableBoolean.True;
this.btnProjectID.WrapText = false;
this.btnProjectID.Click += new System.EventHandler(this.btnProjectID_Click);
//
// 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, 24);
this.cbWorkorderCategoryID.TabIndex = 3;
this.cbWorkorderCategoryID.Tag = "`";
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(3, 77);
this.btnWorkorderCategoryID.Name = "btnWorkorderCategoryID";
this.btnWorkorderCategoryID.Size = new System.Drawing.Size(103, 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;
appearance3.BackGradientStyle = Infragistics.Win.GradientStyle.None;
this.edSummary.Appearance = appearance3;
this.edSummary.Location = new System.Drawing.Point(202, 28);
this.edSummary.Name = "edSummary";
this.edSummary.Size = new System.Drawing.Size(105, 24);
this.edSummary.TabIndex = 0;
this.edSummary.Tag = "\'";
//
// lblSummary
//
this.lblSummary.Location = new System.Drawing.Point(3, 28);
this.lblSummary.Name = "lblSummary";
this.lblSummary.Size = new System.Drawing.Size(199, 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.ckTemplateFreshPrice);
this.pnlHeaderLeft.Controls.Add(this.edTemplateDescription);
this.pnlHeaderLeft.Controls.Add(this.cbRegion);
this.pnlHeaderLeft.Controls.Add(this.lblRegionID);
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, 131);
this.pnlHeaderLeft.TabIndex = 0;
//
// ckTemplateFreshPrice
//
this.ckTemplateFreshPrice.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.ckTemplateFreshPrice.Checked = true;
this.ckTemplateFreshPrice.CheckState = System.Windows.Forms.CheckState.Checked;
this.ckTemplateFreshPrice.Location = new System.Drawing.Point(6, 84);
this.ckTemplateFreshPrice.Name = "ckTemplateFreshPrice";
this.ckTemplateFreshPrice.Size = new System.Drawing.Size(224, 19);
this.ckTemplateFreshPrice.TabIndex = 158;
this.ckTemplateFreshPrice.Tag = "\'";
this.ckTemplateFreshPrice.Text = "LT:Workorder.Label.TemplateFreshPrice";
this.ckTemplateFreshPrice.Visible = false;
//
// edTemplateDescription
//
this.edTemplateDescription.Anchor = System.Windows.Forms.AnchorStyles.Top;
appearance4.BackGradientStyle = Infragistics.Win.GradientStyle.None;
this.edTemplateDescription.Appearance = appearance4;
this.edTemplateDescription.Location = new System.Drawing.Point(201, 26);
this.edTemplateDescription.Name = "edTemplateDescription";
this.edTemplateDescription.Size = new System.Drawing.Size(74, 24);
this.edTemplateDescription.TabIndex = 154;
this.edTemplateDescription.Visible = false;
//
// cbRegion
//
this.cbRegion.AllowEmptySelection = false;
this.cbRegion.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.cbRegion.Location = new System.Drawing.Point(195, 53);
this.cbRegion.Name = "cbRegion";
this.cbRegion.Size = new System.Drawing.Size(80, 24);
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(6, 61);
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;
//
// 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(6, 3);
this.lblTemplate.Name = "lblTemplate";
this.lblTemplate.Size = new System.Drawing.Size(263, 21);
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(6, 26);
this.lblTemplateDescription.Name = "lblTemplateDescription";
this.lblTemplateDescription.Size = new System.Drawing.Size(165, 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(3, 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(273, 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)));
appearance5.TextHAlignAsString = "Left";
this.btnClientID.Appearance = appearance5;
this.btnClientID.ButtonStyle = Infragistics.Win.UIElementButtonStyle.PopupBorderless;
this.btnClientID.Location = new System.Drawing.Point(3, 0);
this.btnClientID.Name = "btnClientID";
this.btnClientID.Size = new System.Drawing.Size(273, 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, 131);
this.pnlService.Name = "pnlService";
this.pnlService.Size = new System.Drawing.Size(1014, 82);
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(428, 82);
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(6, 22);
this.ckReOpen.Name = "ckReOpen";
this.ckReOpen.Size = new System.Drawing.Size(148, 18);
this.ckReOpen.TabIndex = 155;
this.ckReOpen.TabStop = false;
this.ckReOpen.Tag = "\'";
this.ckReOpen.Text = "LT:Workorder.Label.Closed";
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(3, 23);
this.ckClosed.Name = "ckClosed";
this.ckClosed.Size = new System.Drawing.Size(151, 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(5, 0);
this.ckServiceCompleted.Name = "ckServiceCompleted";
this.ckServiceCompleted.Size = new System.Drawing.Size(149, 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.edInvoiceNumber);
this.pnlServiceCenter.Controls.Add(this.lblInvoiceNumber);
this.pnlServiceCenter.Controls.Add(this.lblServiceDate);
this.pnlServiceCenter.Controls.Add(this.dtServiceDate);
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, 82);
this.pnlServiceCenter.TabIndex = 1;
//
// 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, 24);
this.edInvoiceNumber.TabIndex = 0;
this.edInvoiceNumber.Tag = "`";
//
// lblInvoiceNumber
//
this.lblInvoiceNumber.Location = new System.Drawing.Point(3, 0);
this.lblInvoiceNumber.Name = "lblInvoiceNumber";
this.lblInvoiceNumber.Size = new System.Drawing.Size(218, 18);
this.lblInvoiceNumber.TabIndex = 143;
this.lblInvoiceNumber.Tag = "`";
this.lblInvoiceNumber.Text = "LT:WorkorderService.Label.InvoiceNumber";
this.lblInvoiceNumber.WrapText = false;
//
// lblServiceDate
//
this.lblServiceDate.Location = new System.Drawing.Point(3, 41);
this.lblServiceDate.Name = "lblServiceDate";
this.lblServiceDate.Size = new System.Drawing.Size(208, 18);
this.lblServiceDate.TabIndex = 144;
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.GZEnabled = true;
this.dtServiceDate.GZReadOnly = false;
this.dtServiceDate.Location = new System.Drawing.Point(240, 41);
this.dtServiceDate.Name = "dtServiceDate";
this.dtServiceDate.Size = new System.Drawing.Size(65, 24);
this.dtServiceDate.TabIndex = 1;
this.dtServiceDate.Tag = "`";
//
// pnlServiceLeft
//
this.pnlServiceLeft.BackColor = System.Drawing.SystemColors.Control;
this.pnlServiceLeft.Controls.Add(this.lblCloseByDate);
this.pnlServiceLeft.Controls.Add(this.dtCloseByDate);
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, 82);
this.pnlServiceLeft.TabIndex = 0;
//
// lblCloseByDate
//
this.lblCloseByDate.Location = new System.Drawing.Point(3, 41);
this.lblCloseByDate.Name = "lblCloseByDate";
this.lblCloseByDate.Size = new System.Drawing.Size(189, 18);
this.lblCloseByDate.TabIndex = 146;
this.lblCloseByDate.Tag = "`";
this.lblCloseByDate.Text = "LT:WorkorderService.Label.CloseByDate";
this.lblCloseByDate.WrapText = false;
//
// dtCloseByDate
//
this.dtCloseByDate.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.dtCloseByDate.GZEnabled = true;
this.dtCloseByDate.GZReadOnly = false;
this.dtCloseByDate.Location = new System.Drawing.Point(211, 41);
this.dtCloseByDate.Name = "dtCloseByDate";
this.dtCloseByDate.Size = new System.Drawing.Size(67, 24);
this.dtCloseByDate.TabIndex = 145;
this.dtCloseByDate.Tag = "`";
//
// 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, 24);
this.cbWorkorderStatusID.TabIndex = 0;
this.cbWorkorderStatusID.Tag = "`";
this.cbWorkorderStatusID.NeedMoreData += new GZTW.WinForm.Controls.NeedMoreDataHandler(this.cbWorkorderStatusID_NeedMoreData);
//
// btnWorkorderStatusID
//
appearance6.TextHAlignAsString = "Left";
this.btnWorkorderStatusID.Appearance = appearance6;
this.btnWorkorderStatusID.Location = new System.Drawing.Point(3, 0);
this.btnWorkorderStatusID.Name = "btnWorkorderStatusID";
this.btnWorkorderStatusID.Size = new System.Drawing.Size(103, 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);
//
// pnlQuote
//
this.pnlQuote.Controls.Add(this.pnlQuoteRight);
this.pnlQuote.Controls.Add(this.pnlQuoteMiddle);
this.pnlQuote.Controls.Add(this.pnlQuoteLeft);
this.pnlQuote.Dock = System.Windows.Forms.DockStyle.Top;
this.pnlQuote.Location = new System.Drawing.Point(0, 213);
this.pnlQuote.Name = "pnlQuote";
this.pnlQuote.Size = new System.Drawing.Size(1014, 136);
this.pnlQuote.TabIndex = 3;
this.pnlQuote.Visible = false;
this.pnlQuote.SizeChanged += new System.EventHandler(this.pnlQuote_SizeChanged);
//
// pnlQuoteRight
//
this.pnlQuoteRight.BackColor = System.Drawing.SystemColors.Control;
this.pnlQuoteRight.Controls.Add(this.lblQuoteRequestDate);
this.pnlQuoteRight.Controls.Add(this.dtQuoteRequestDate);
this.pnlQuoteRight.Controls.Add(this.lblValidUntilDate);
this.pnlQuoteRight.Controls.Add(this.dtValidUntilDate);
this.pnlQuoteRight.Dock = System.Windows.Forms.DockStyle.Fill;
this.pnlQuoteRight.Location = new System.Drawing.Point(586, 0);
this.pnlQuoteRight.Name = "pnlQuoteRight";
this.pnlQuoteRight.Size = new System.Drawing.Size(428, 136);
this.pnlQuoteRight.TabIndex = 148;
//
// lblQuoteRequestDate
//
this.lblQuoteRequestDate.Location = new System.Drawing.Point(5, 0);
this.lblQuoteRequestDate.Name = "lblQuoteRequestDate";
this.lblQuoteRequestDate.Size = new System.Drawing.Size(245, 18);
this.lblQuoteRequestDate.TabIndex = 150;
this.lblQuoteRequestDate.Tag = "`";
this.lblQuoteRequestDate.Text = "LT:WorkorderQuote.Label.QuoteRequestDate";
this.lblQuoteRequestDate.WrapText = false;
//
// dtQuoteRequestDate
//
this.dtQuoteRequestDate.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.dtQuoteRequestDate.GZEnabled = true;
this.dtQuoteRequestDate.GZReadOnly = false;
this.dtQuoteRequestDate.Location = new System.Drawing.Point(334, 0);
this.dtQuoteRequestDate.Name = "dtQuoteRequestDate";
this.dtQuoteRequestDate.Size = new System.Drawing.Size(48, 24);
this.dtQuoteRequestDate.TabIndex = 149;
this.dtQuoteRequestDate.Tag = "`";
//
// lblValidUntilDate
//
this.lblValidUntilDate.Location = new System.Drawing.Point(3, 28);
this.lblValidUntilDate.Name = "lblValidUntilDate";
this.lblValidUntilDate.Size = new System.Drawing.Size(256, 18);
this.lblValidUntilDate.TabIndex = 148;
this.lblValidUntilDate.Tag = "`";
this.lblValidUntilDate.Text = "LT:WorkorderQuote.Label.ValidUntilDate";
this.lblValidUntilDate.WrapText = false;
//
// dtValidUntilDate
//
this.dtValidUntilDate.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.dtValidUntilDate.GZEnabled = true;
this.dtValidUntilDate.GZReadOnly = false;
this.dtValidUntilDate.Location = new System.Drawing.Point(334, 28);
this.dtValidUntilDate.Name = "dtValidUntilDate";
this.dtValidUntilDate.Size = new System.Drawing.Size(48, 24);
this.dtValidUntilDate.TabIndex = 147;
this.dtValidUntilDate.Tag = "`";
//
// pnlQuoteMiddle
//
this.pnlQuoteMiddle.BackColor = System.Drawing.SystemColors.Control;
this.pnlQuoteMiddle.Controls.Add(this.lblWorkorderQuoteStatusID);
this.pnlQuoteMiddle.Controls.Add(this.lblDateSubmitted);
this.pnlQuoteMiddle.Controls.Add(this.dtDateSubmitted);
this.pnlQuoteMiddle.Controls.Add(this.lblDateApproved);
this.pnlQuoteMiddle.Controls.Add(this.dtDateApproved);
this.pnlQuoteMiddle.Controls.Add(this.cbWorkorderQuoteStatusID);
this.pnlQuoteMiddle.Dock = System.Windows.Forms.DockStyle.Left;
this.pnlQuoteMiddle.Location = new System.Drawing.Point(278, 0);
this.pnlQuoteMiddle.Name = "pnlQuoteMiddle";
this.pnlQuoteMiddle.Size = new System.Drawing.Size(308, 136);
this.pnlQuoteMiddle.TabIndex = 147;
//
// lblWorkorderQuoteStatusID
//
this.lblWorkorderQuoteStatusID.Location = new System.Drawing.Point(3, 74);
this.lblWorkorderQuoteStatusID.Name = "lblWorkorderQuoteStatusID";
this.lblWorkorderQuoteStatusID.Size = new System.Drawing.Size(229, 18);
this.lblWorkorderQuoteStatusID.TabIndex = 150;
this.lblWorkorderQuoteStatusID.Tag = "`";
this.lblWorkorderQuoteStatusID.Text = "LT:WorkorderQuote.Label.QuoteStatusType";
this.lblWorkorderQuoteStatusID.WrapText = false;
//
// lblDateSubmitted
//
this.lblDateSubmitted.Location = new System.Drawing.Point(3, 28);
this.lblDateSubmitted.Name = "lblDateSubmitted";
this.lblDateSubmitted.Size = new System.Drawing.Size(218, 18);
this.lblDateSubmitted.TabIndex = 148;
this.lblDateSubmitted.Tag = "`";
this.lblDateSubmitted.Text = "LT:WorkorderQuote.Label.DateSubmitted";
this.lblDateSubmitted.WrapText = false;
//
// dtDateSubmitted
//
this.dtDateSubmitted.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.dtDateSubmitted.GZEnabled = true;
this.dtDateSubmitted.GZReadOnly = false;
this.dtDateSubmitted.Location = new System.Drawing.Point(240, 28);
this.dtDateSubmitted.Name = "dtDateSubmitted";
this.dtDateSubmitted.Size = new System.Drawing.Size(67, 24);
this.dtDateSubmitted.TabIndex = 147;
this.dtDateSubmitted.Tag = "`";
//
// lblDateApproved
//
this.lblDateApproved.Location = new System.Drawing.Point(3, 0);
this.lblDateApproved.Name = "lblDateApproved";
this.lblDateApproved.Size = new System.Drawing.Size(205, 18);
this.lblDateApproved.TabIndex = 146;
this.lblDateApproved.Tag = "`";
this.lblDateApproved.Text = "LT:WorkorderQuote.Label.DateApproved";
this.lblDateApproved.WrapText = false;
//
// dtDateApproved
//
this.dtDateApproved.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.dtDateApproved.GZEnabled = true;
this.dtDateApproved.GZReadOnly = false;
this.dtDateApproved.Location = new System.Drawing.Point(240, 0);
this.dtDateApproved.Name = "dtDateApproved";
this.dtDateApproved.Size = new System.Drawing.Size(67, 24);
this.dtDateApproved.TabIndex = 145;
this.dtDateApproved.Tag = "`";
//
// cbWorkorderQuoteStatusID
//
this.cbWorkorderQuoteStatusID.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.cbWorkorderQuoteStatusID.AutoCompleteMode = Infragistics.Win.AutoCompleteMode.SuggestAppend;
this.cbWorkorderQuoteStatusID.LimitToList = true;
this.cbWorkorderQuoteStatusID.Location = new System.Drawing.Point(240, 74);
this.cbWorkorderQuoteStatusID.MaxDropDownItems = 25;
this.cbWorkorderQuoteStatusID.Name = "cbWorkorderQuoteStatusID";
this.cbWorkorderQuoteStatusID.Size = new System.Drawing.Size(67, 24);
this.cbWorkorderQuoteStatusID.SortStyle = Infragistics.Win.ValueListSortStyle.Ascending;
this.cbWorkorderQuoteStatusID.TabIndex = 149;
this.cbWorkorderQuoteStatusID.Tag = "`";
//
// pnlQuoteLeft
//
this.pnlQuoteLeft.AutoScroll = true;
this.pnlQuoteLeft.BackColor = System.Drawing.SystemColors.Control;
this.pnlQuoteLeft.Controls.Add(this.lblPreparedByID);
this.pnlQuoteLeft.Controls.Add(this.cbPreparedByID);
this.pnlQuoteLeft.Controls.Add(this.lblIntroduction);
this.pnlQuoteLeft.Controls.Add(this.edIntroduction);
this.pnlQuoteLeft.Dock = System.Windows.Forms.DockStyle.Left;
this.pnlQuoteLeft.Location = new System.Drawing.Point(0, 0);
this.pnlQuoteLeft.Name = "pnlQuoteLeft";
this.pnlQuoteLeft.Size = new System.Drawing.Size(278, 136);
this.pnlQuoteLeft.TabIndex = 146;
//
// lblPreparedByID
//
this.lblPreparedByID.Location = new System.Drawing.Point(3, 0);
this.lblPreparedByID.Name = "lblPreparedByID";
this.lblPreparedByID.Size = new System.Drawing.Size(208, 18);
this.lblPreparedByID.TabIndex = 150;
this.lblPreparedByID.Tag = "`";
this.lblPreparedByID.Text = "LT:WorkorderQuote.Label.PreparedByID";
this.lblPreparedByID.WrapText = false;
//
// cbPreparedByID
//
this.cbPreparedByID.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.cbPreparedByID.AutoCompleteMode = Infragistics.Win.AutoCompleteMode.SuggestAppend;
this.cbPreparedByID.LimitToList = true;
this.cbPreparedByID.Location = new System.Drawing.Point(230, 0);
this.cbPreparedByID.Name = "cbPreparedByID";
this.cbPreparedByID.Size = new System.Drawing.Size(48, 24);
this.cbPreparedByID.TabIndex = 149;
this.cbPreparedByID.Tag = "`";
this.cbPreparedByID.NeedMoreData += new GZTW.WinForm.Controls.NeedMoreDataHandler(this.cbPreparedByID_NeedMoreData);
//
// lblIntroduction
//
this.lblIntroduction.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.lblIntroduction.Location = new System.Drawing.Point(3, 28);
this.lblIntroduction.Name = "lblIntroduction";
this.lblIntroduction.Size = new System.Drawing.Size(273, 18);
this.lblIntroduction.TabIndex = 145;
this.lblIntroduction.Tag = "`";
this.lblIntroduction.Text = "LT:WorkorderQuote.Label.Introduction";
this.lblIntroduction.WrapText = false;
//
// edIntroduction
//
this.edIntroduction.AcceptsReturn = true;
this.edIntroduction.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.edIntroduction.Location = new System.Drawing.Point(3, 46);
this.edIntroduction.Multiline = true;
this.edIntroduction.Name = "edIntroduction";
this.edIntroduction.Scrollbars = System.Windows.Forms.ScrollBars.Vertical;
this.edIntroduction.Size = new System.Drawing.Size(273, 65);
this.edIntroduction.TabIndex = 144;
this.edIntroduction.Tag = "`";
//
// pnlPM
//
this.pnlPM.Controls.Add(this.pnlPMRight);
this.pnlPM.Controls.Add(this.pnlPMMiddle);
this.pnlPM.Controls.Add(this.pnlPMLeft);
this.pnlPM.Dock = System.Windows.Forms.DockStyle.Top;
this.pnlPM.Location = new System.Drawing.Point(0, 349);
this.pnlPM.Name = "pnlPM";
this.pnlPM.Size = new System.Drawing.Size(1014, 153);
this.pnlPM.TabIndex = 4;
this.pnlPM.Visible = false;
this.pnlPM.SizeChanged += new System.EventHandler(this.pnlPM_SizeChanged);
//
// pnlPMRight
//
this.pnlPMRight.Controls.Add(this.cbPMWorkorderStatusID);
this.pnlPMRight.Controls.Add(this.btnPMWorkorderStatusID);
this.pnlPMRight.Dock = System.Windows.Forms.DockStyle.Fill;
this.pnlPMRight.Location = new System.Drawing.Point(586, 0);
this.pnlPMRight.Name = "pnlPMRight";
this.pnlPMRight.Size = new System.Drawing.Size(428, 153);
this.pnlPMRight.TabIndex = 2;
//
// cbPMWorkorderStatusID
//
this.cbPMWorkorderStatusID.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.cbPMWorkorderStatusID.AutoCompleteMode = Infragistics.Win.AutoCompleteMode.SuggestAppend;
appearance7.BackColor = System.Drawing.SystemColors.GrayText;
valueListItem1.Appearance = appearance7;
valueListItem1.DataValue = new System.Guid("00000000-0000-0000-0000-000000000000");
valueListItem1.DisplayText = "";
this.cbPMWorkorderStatusID.Items.AddRange(new Infragistics.Win.ValueListItem[] {
valueListItem1});
this.cbPMWorkorderStatusID.LimitToList = true;
this.cbPMWorkorderStatusID.Location = new System.Drawing.Point(276, 9);
this.cbPMWorkorderStatusID.MaxDropDownItems = 25;
this.cbPMWorkorderStatusID.Name = "cbPMWorkorderStatusID";
this.cbPMWorkorderStatusID.Size = new System.Drawing.Size(106, 24);
this.cbPMWorkorderStatusID.SortStyle = Infragistics.Win.ValueListSortStyle.Ascending;
this.cbPMWorkorderStatusID.TabIndex = 2;
this.cbPMWorkorderStatusID.Tag = "`";
this.cbPMWorkorderStatusID.NeedMoreData += new GZTW.WinForm.Controls.NeedMoreDataHandler(this.cbPMWorkorderStatusID_NeedMoreData);
//
// btnPMWorkorderStatusID
//
appearance8.TextHAlignAsString = "Left";
this.btnPMWorkorderStatusID.Appearance = appearance8;
this.btnPMWorkorderStatusID.Location = new System.Drawing.Point(3, 9);
this.btnPMWorkorderStatusID.Name = "btnPMWorkorderStatusID";
this.btnPMWorkorderStatusID.Size = new System.Drawing.Size(103, 25);
this.btnPMWorkorderStatusID.TabIndex = 3;
this.btnPMWorkorderStatusID.Tag = "`";
this.btnPMWorkorderStatusID.Text = "LT:O.WorkorderStatus";
this.btnPMWorkorderStatusID.UseHotTracking = Infragistics.Win.DefaultableBoolean.True;
this.btnPMWorkorderStatusID.WrapText = false;
this.btnPMWorkorderStatusID.Click += new System.EventHandler(this.btnPMWorkorderStatusID_Click);
//
// pnlPMMiddle
//
this.pnlPMMiddle.Controls.Add(this.lblPMStopGeneratingDate);
this.pnlPMMiddle.Controls.Add(this.dtPMStopGeneratingDate);
this.pnlPMMiddle.Controls.Add(this.lblPMNextServiceDate);
this.pnlPMMiddle.Controls.Add(this.dtPMNextServiceDate);
this.pnlPMMiddle.Controls.Add(this.lblPMDayOfTheWeek);
this.pnlPMMiddle.Controls.Add(this.cbPMDayOfTheWeek);
this.pnlPMMiddle.Dock = System.Windows.Forms.DockStyle.Left;
this.pnlPMMiddle.Location = new System.Drawing.Point(278, 0);
this.pnlPMMiddle.Name = "pnlPMMiddle";
this.pnlPMMiddle.Size = new System.Drawing.Size(308, 153);
this.pnlPMMiddle.TabIndex = 1;
//
// lblPMStopGeneratingDate
//
this.lblPMStopGeneratingDate.Location = new System.Drawing.Point(3, 99);
this.lblPMStopGeneratingDate.Name = "lblPMStopGeneratingDate";
this.lblPMStopGeneratingDate.Size = new System.Drawing.Size(208, 19);
this.lblPMStopGeneratingDate.TabIndex = 160;
this.lblPMStopGeneratingDate.Tag = "`";
this.lblPMStopGeneratingDate.Text = "LT:WorkorderPreventiveMaintenance.Label.StopGeneratingDate";
this.lblPMStopGeneratingDate.WrapText = false;
//
// dtPMStopGeneratingDate
//
this.dtPMStopGeneratingDate.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.dtPMStopGeneratingDate.GZEnabled = true;
this.dtPMStopGeneratingDate.GZReadOnly = false;
this.dtPMStopGeneratingDate.Location = new System.Drawing.Point(240, 102);
this.dtPMStopGeneratingDate.Name = "dtPMStopGeneratingDate";
this.dtPMStopGeneratingDate.Size = new System.Drawing.Size(67, 24);
this.dtPMStopGeneratingDate.TabIndex = 159;
this.dtPMStopGeneratingDate.Tag = "`";
//
// lblPMNextServiceDate
//
this.lblPMNextServiceDate.Location = new System.Drawing.Point(3, 55);
this.lblPMNextServiceDate.Name = "lblPMNextServiceDate";
this.lblPMNextServiceDate.Size = new System.Drawing.Size(208, 19);
this.lblPMNextServiceDate.TabIndex = 158;
this.lblPMNextServiceDate.Tag = "`";
this.lblPMNextServiceDate.Text = "LT:WorkorderPreventiveMaintenance.Label.NextServiceDate";
this.lblPMNextServiceDate.WrapText = false;
//
// dtPMNextServiceDate
//
this.dtPMNextServiceDate.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.dtPMNextServiceDate.GZEnabled = true;
this.dtPMNextServiceDate.GZReadOnly = false;
this.dtPMNextServiceDate.Location = new System.Drawing.Point(240, 55);
this.dtPMNextServiceDate.Name = "dtPMNextServiceDate";
this.dtPMNextServiceDate.Size = new System.Drawing.Size(67, 24);
this.dtPMNextServiceDate.TabIndex = 157;
this.dtPMNextServiceDate.Tag = "`";
//
// lblPMDayOfTheWeek
//
this.lblPMDayOfTheWeek.Location = new System.Drawing.Point(3, 9);
this.lblPMDayOfTheWeek.Name = "lblPMDayOfTheWeek";
this.lblPMDayOfTheWeek.Size = new System.Drawing.Size(199, 19);
this.lblPMDayOfTheWeek.TabIndex = 156;
this.lblPMDayOfTheWeek.Tag = "`";
this.lblPMDayOfTheWeek.Text = "LT:WorkorderPreventiveMaintenance.Label.DayOfTheWeek";
this.lblPMDayOfTheWeek.WrapText = false;
//
// cbPMDayOfTheWeek
//
this.cbPMDayOfTheWeek.Location = new System.Drawing.Point(221, 9);
this.cbPMDayOfTheWeek.Name = "cbPMDayOfTheWeek";
this.cbPMDayOfTheWeek.Size = new System.Drawing.Size(86, 24);
this.cbPMDayOfTheWeek.TabIndex = 155;
this.cbPMDayOfTheWeek.Tag = "`";
//
// pnlPMLeft
//
this.pnlPMLeft.Controls.Add(this.ckPMActive);
this.pnlPMLeft.Controls.Add(this.lblPMThresholdSpan);
this.pnlPMLeft.Controls.Add(this.cbPMThresholdSpanUnit);
this.pnlPMLeft.Controls.Add(this.edPMThresholdSpan);
this.pnlPMLeft.Controls.Add(this.lblPMGenerateSpan);
this.pnlPMLeft.Controls.Add(this.cbPMGenerateSpanUnit);
this.pnlPMLeft.Controls.Add(this.edPMGenerateSpan);
this.pnlPMLeft.Dock = System.Windows.Forms.DockStyle.Left;
this.pnlPMLeft.Location = new System.Drawing.Point(0, 0);
this.pnlPMLeft.Name = "pnlPMLeft";
this.pnlPMLeft.Size = new System.Drawing.Size(278, 153);
this.pnlPMLeft.TabIndex = 0;
//
// ckPMActive
//
this.ckPMActive.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.ckPMActive.Checked = true;
this.ckPMActive.CheckState = System.Windows.Forms.CheckState.Checked;
this.ckPMActive.Location = new System.Drawing.Point(3, 9);
this.ckPMActive.Name = "ckPMActive";
this.ckPMActive.Size = new System.Drawing.Size(275, 19);
this.ckPMActive.TabIndex = 159;
this.ckPMActive.Tag = "`";
this.ckPMActive.Text = "LT:WorkorderPreventiveMaintenance.Label.Active";
//
// lblPMThresholdSpan
//
this.lblPMThresholdSpan.Location = new System.Drawing.Point(3, 83);
this.lblPMThresholdSpan.Name = "lblPMThresholdSpan";
this.lblPMThresholdSpan.Size = new System.Drawing.Size(266, 19);
this.lblPMThresholdSpan.TabIndex = 158;
this.lblPMThresholdSpan.Tag = "`";
this.lblPMThresholdSpan.Text = "LT:WorkorderPreventiveMaintenance.Label.ThresholdSpan";
this.lblPMThresholdSpan.WrapText = false;
//
// cbPMThresholdSpanUnit
//
this.cbPMThresholdSpanUnit.Location = new System.Drawing.Point(96, 102);
this.cbPMThresholdSpanUnit.Name = "cbPMThresholdSpanUnit";
this.cbPMThresholdSpanUnit.Size = new System.Drawing.Size(173, 24);
this.cbPMThresholdSpanUnit.TabIndex = 157;
this.cbPMThresholdSpanUnit.Tag = "`";
//
// edPMThresholdSpan
//
this.edPMThresholdSpan.Location = new System.Drawing.Point(3, 102);
this.edPMThresholdSpan.MinValue = 0;
this.edPMThresholdSpan.Name = "edPMThresholdSpan";
this.edPMThresholdSpan.PromptChar = ' ';
this.edPMThresholdSpan.Size = new System.Drawing.Size(83, 24);
this.edPMThresholdSpan.TabIndex = 156;
this.edPMThresholdSpan.Tag = "`";
//
// lblPMGenerateSpan
//
this.lblPMGenerateSpan.Location = new System.Drawing.Point(3, 37);
this.lblPMGenerateSpan.Name = "lblPMGenerateSpan";
this.lblPMGenerateSpan.Size = new System.Drawing.Size(266, 18);
this.lblPMGenerateSpan.TabIndex = 155;
this.lblPMGenerateSpan.Tag = "`";
this.lblPMGenerateSpan.Text = "LT:WorkorderPreventiveMaintenance.Label.GenerateSpan";
this.lblPMGenerateSpan.WrapText = false;
//
// cbPMGenerateSpanUnit
//
this.cbPMGenerateSpanUnit.Location = new System.Drawing.Point(96, 55);
this.cbPMGenerateSpanUnit.Name = "cbPMGenerateSpanUnit";
this.cbPMGenerateSpanUnit.Size = new System.Drawing.Size(173, 24);
this.cbPMGenerateSpanUnit.TabIndex = 154;
this.cbPMGenerateSpanUnit.Tag = "`";
//
// edPMGenerateSpan
//
this.edPMGenerateSpan.Location = new System.Drawing.Point(3, 55);
this.edPMGenerateSpan.MinValue = 0;
this.edPMGenerateSpan.Name = "edPMGenerateSpan";
this.edPMGenerateSpan.PromptChar = ' ';
this.edPMGenerateSpan.Size = new System.Drawing.Size(83, 24);
this.edPMGenerateSpan.TabIndex = 152;
this.edPMGenerateSpan.Tag = "`";
//
// pnlItem
//
this.pnlItem.Controls.Add(this.gridWorkorderItems);
this.pnlItem.Dock = System.Windows.Forms.DockStyle.Top;
this.pnlItem.Location = new System.Drawing.Point(0, 502);
this.pnlItem.Name = "pnlItem";
this.pnlItem.Size = new System.Drawing.Size(1014, 92);
this.pnlItem.TabIndex = 5;
//
// gridWorkorderItems
//
this.gridWorkorderItems.Cursor = System.Windows.Forms.Cursors.Hand;
appearance9.FontData.BoldAsString = "True";
appearance9.TextHAlignAsString = "Left";
this.gridWorkorderItems.DisplayLayout.CaptionAppearance = appearance9;
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(1014, 92);
this.gridWorkorderItems.TabIndex = 0;
this.gridWorkorderItems.Text = "LT:Workorder.Label.WorkorderItems";
this.gridWorkorderItems.InitializeLayout += new Infragistics.Win.UltraWinGrid.InitializeLayoutEventHandler(this.gridWorkorderItems_InitializeLayout);
this.gridWorkorderItems.InitializeRow += new Infragistics.Win.UltraWinGrid.InitializeRowEventHandler(this.gridWorkorderItems_InitializeRow);
this.gridWorkorderItems.AfterRowsDeleted += new System.EventHandler(this.gridWorkorderItems_AfterRowsDeleted);
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);
//
// pnlLabour
//
this.pnlLabour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.pnlLabour.Controls.Add(this.gridLabor);
this.pnlLabour.Dock = System.Windows.Forms.DockStyle.Top;
this.pnlLabour.Location = new System.Drawing.Point(212, 594);
this.pnlLabour.Name = "pnlLabour";
this.pnlLabour.Size = new System.Drawing.Size(802, 69);
this.pnlLabour.TabIndex = 6;
this.pnlLabour.Visible = false;
//
// gridLabor
//
this.gridLabor.Cursor = System.Windows.Forms.Cursors.Hand;
appearance10.FontData.BoldAsString = "True";
appearance10.TextHAlignAsString = "Left";
this.gridLabor.DisplayLayout.CaptionAppearance = appearance10;
this.gridLabor.Dock = System.Windows.Forms.DockStyle.Fill;
this.gridLabor.Location = new System.Drawing.Point(0, 0);
this.gridLabor.Name = "gridLabor";
this.gridLabor.Size = new System.Drawing.Size(800, 67);
this.gridLabor.TabIndex = 0;
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.AfterRowsDeleted += new System.EventHandler(this.gridLabor_AfterRowsDeleted);
this.gridLabor.BeforeRowActivate += new Infragistics.Win.UltraWinGrid.RowEventHandler(this.gridLabor_BeforeRowActivate);
this.gridLabor.ClickCellButton += new Infragistics.Win.UltraWinGrid.CellEventHandler(this.gridLabor_ClickCellButton);
this.gridLabor.BeforeAutoSizeEdit += new Infragistics.Win.UltraWinGrid.CancelableAutoSizeEditEventHandler(this.gridLabor_BeforeAutoSizeEdit);
this.gridLabor.BeforeRowInsert += new Infragistics.Win.UltraWinGrid.BeforeRowInsertEventHandler(this.gridLabor_BeforeRowInsert);
this.gridLabor.MouseEnterElement += new Infragistics.Win.UIElementEventHandler(this.gridLabor_MouseEnterElement);
this.gridLabor.Enter += new System.EventHandler(this.gridLabor_Enter);
//
// pnlParts
//
this.pnlParts.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.pnlParts.Controls.Add(this.gridPartRequests);
this.pnlParts.Controls.Add(this.gridParts);
this.pnlParts.Controls.Add(this.pnlWoItemPartGridControlPanel);
this.pnlParts.Dock = System.Windows.Forms.DockStyle.Top;
this.pnlParts.Location = new System.Drawing.Point(212, 663);
this.pnlParts.Name = "pnlParts";
this.pnlParts.Size = new System.Drawing.Size(802, 42);
this.pnlParts.TabIndex = 7;
this.pnlParts.Visible = false;
this.pnlParts.SizeChanged += new System.EventHandler(this.pnlParts_SizeChanged);
//
// gridPartRequests
//
this.gridPartRequests.Cursor = System.Windows.Forms.Cursors.Hand;
appearance11.FontData.BoldAsString = "True";
appearance11.TextHAlignAsString = "Left";
this.gridPartRequests.DisplayLayout.CaptionAppearance = appearance11;
this.gridPartRequests.DisplayLayout.Override.SelectTypeRow = Infragistics.Win.UltraWinGrid.SelectType.Single;
this.gridPartRequests.Dock = System.Windows.Forms.DockStyle.Top;
this.gridPartRequests.Location = new System.Drawing.Point(0, 134);
this.gridPartRequests.Name = "gridPartRequests";
this.gridPartRequests.Size = new System.Drawing.Size(800, 128);
this.gridPartRequests.TabIndex = 3;
this.gridPartRequests.Text = "LT:WorkorderItem.Label.PartRequests";
this.gridPartRequests.InitializeLayout += new Infragistics.Win.UltraWinGrid.InitializeLayoutEventHandler(this.gridPartRequests_InitializeLayout);
this.gridPartRequests.AfterRowsDeleted += new System.EventHandler(this.gridPartRequests_AfterRowsDeleted);
this.gridPartRequests.ClickCellButton += new Infragistics.Win.UltraWinGrid.CellEventHandler(this.gridPartRequests_ClickCellButton);
this.gridPartRequests.BeforeRowsDeleted += new Infragistics.Win.UltraWinGrid.BeforeRowsDeletedEventHandler(this.gridPartRequests_BeforeRowsDeleted);
//
// gridParts
//
this.gridParts.Cursor = System.Windows.Forms.Cursors.Default;
appearance12.FontData.BoldAsString = "True";
appearance12.TextHAlignAsString = "Left";
this.gridParts.DisplayLayout.CaptionAppearance = appearance12;
this.gridParts.DisplayLayout.CaptionVisible = Infragistics.Win.DefaultableBoolean.False;
this.gridParts.Dock = System.Windows.Forms.DockStyle.Top;
this.gridParts.Location = new System.Drawing.Point(0, 20);
this.gridParts.Name = "gridParts";
this.gridParts.Size = new System.Drawing.Size(800, 114);
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(800, 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(226, 17);
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);
//
// pnlExpense
//
this.pnlExpense.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.pnlExpense.Controls.Add(this.gridExpense);
this.pnlExpense.Dock = System.Windows.Forms.DockStyle.Top;
this.pnlExpense.Location = new System.Drawing.Point(212, 705);
this.pnlExpense.Name = "pnlExpense";
this.pnlExpense.Size = new System.Drawing.Size(802, 74);
this.pnlExpense.TabIndex = 8;
this.pnlExpense.Visible = false;
//
// gridExpense
//
this.gridExpense.Cursor = System.Windows.Forms.Cursors.Default;
appearance13.FontData.BoldAsString = "True";
appearance13.TextHAlignAsString = "Left";
this.gridExpense.DisplayLayout.CaptionAppearance = appearance13;
this.gridExpense.DisplayLayout.GroupByBox.Hidden = true;
this.gridExpense.Dock = System.Windows.Forms.DockStyle.Fill;
this.gridExpense.Location = new System.Drawing.Point(0, 0);
this.gridExpense.Name = "gridExpense";
this.gridExpense.Size = new System.Drawing.Size(800, 72);
this.gridExpense.TabIndex = 4;
this.gridExpense.Text = "LT:WorkorderItem.Label.Expenses";
this.gridExpense.InitializeLayout += new Infragistics.Win.UltraWinGrid.InitializeLayoutEventHandler(this.gridExpense_InitializeLayout);
this.gridExpense.InitializeRow += new Infragistics.Win.UltraWinGrid.InitializeRowEventHandler(this.gridExpense_InitializeRow);
this.gridExpense.AfterRowsDeleted += new System.EventHandler(this.gridExpense_AfterRowsDeleted);
this.gridExpense.ClickCellButton += new Infragistics.Win.UltraWinGrid.CellEventHandler(this.gridExpense_ClickCellButton);
this.gridExpense.BeforeAutoSizeEdit += new Infragistics.Win.UltraWinGrid.CancelableAutoSizeEditEventHandler(this.gridExpense_BeforeAutoSizeEdit);
this.gridExpense.BeforeRowInsert += new Infragistics.Win.UltraWinGrid.BeforeRowInsertEventHandler(this.gridExpense_BeforeRowInsert);
this.gridExpense.MouseEnterElement += new Infragistics.Win.UIElementEventHandler(this.gridExpense_MouseEnterElement);
//
// pnlOutsideService
//
this.pnlOutsideService.AutoScroll = true;
this.pnlOutsideService.Controls.Add(this.pnlOutsideServiceRight);
this.pnlOutsideService.Controls.Add(this.pnlOutsideServiceCenter);
this.pnlOutsideService.Controls.Add(this.pnlOutsideServiceLeft);
this.pnlOutsideService.Dock = System.Windows.Forms.DockStyle.Top;
this.pnlOutsideService.Location = new System.Drawing.Point(212, 779);
this.pnlOutsideService.Name = "pnlOutsideService";
this.pnlOutsideService.Size = new System.Drawing.Size(802, 312);
this.pnlOutsideService.TabIndex = 9;
this.pnlOutsideService.Visible = false;
this.pnlOutsideService.SizeChanged += new System.EventHandler(this.pnlOutsideService_SizeChanged);
//
// pnlOutsideServiceRight
//
this.pnlOutsideServiceRight.AutoScroll = true;
this.pnlOutsideServiceRight.BackColor = System.Drawing.SystemColors.Control;
this.pnlOutsideServiceRight.Controls.Add(this.lblWorkorderItemOutsideServiceDateReturned);
this.pnlOutsideServiceRight.Controls.Add(this.dtWorkorderItemOutsideServiceDateReturned);
this.pnlOutsideServiceRight.Controls.Add(this.lblWorkorderItemOutsideServiceDateETA);
this.pnlOutsideServiceRight.Controls.Add(this.dtWorkorderItemOutsideServiceDateETA);
this.pnlOutsideServiceRight.Controls.Add(this.lblWorkorderItemOutsideServiceDateSent);
this.pnlOutsideServiceRight.Controls.Add(this.dtWorkorderItemOutsideServiceDateSent);
this.pnlOutsideServiceRight.Dock = System.Windows.Forms.DockStyle.Fill;
this.pnlOutsideServiceRight.Location = new System.Drawing.Point(480, 0);
this.pnlOutsideServiceRight.Name = "pnlOutsideServiceRight";
this.pnlOutsideServiceRight.Size = new System.Drawing.Size(322, 312);
this.pnlOutsideServiceRight.TabIndex = 2;
//
// lblWorkorderItemOutsideServiceDateReturned
//
this.lblWorkorderItemOutsideServiceDateReturned.Location = new System.Drawing.Point(0, 92);
this.lblWorkorderItemOutsideServiceDateReturned.Name = "lblWorkorderItemOutsideServiceDateReturned";
this.lblWorkorderItemOutsideServiceDateReturned.Size = new System.Drawing.Size(44, 19);
this.lblWorkorderItemOutsideServiceDateReturned.TabIndex = 152;
this.lblWorkorderItemOutsideServiceDateReturned.Tag = "\'";
this.lblWorkorderItemOutsideServiceDateReturned.Text = "LT:WorkorderItemOutsideService.Label.DateReturned";
this.lblWorkorderItemOutsideServiceDateReturned.WrapText = false;
//
// dtWorkorderItemOutsideServiceDateReturned
//
this.dtWorkorderItemOutsideServiceDateReturned.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.dtWorkorderItemOutsideServiceDateReturned.GZEnabled = true;
this.dtWorkorderItemOutsideServiceDateReturned.GZReadOnly = false;
this.dtWorkorderItemOutsideServiceDateReturned.Location = new System.Drawing.Point(-343, 87);
this.dtWorkorderItemOutsideServiceDateReturned.Name = "dtWorkorderItemOutsideServiceDateReturned";
this.dtWorkorderItemOutsideServiceDateReturned.Size = new System.Drawing.Size(77, 24);
this.dtWorkorderItemOutsideServiceDateReturned.TabIndex = 151;
//
// lblWorkorderItemOutsideServiceDateETA
//
this.lblWorkorderItemOutsideServiceDateETA.Location = new System.Drawing.Point(0, 55);
this.lblWorkorderItemOutsideServiceDateETA.Name = "lblWorkorderItemOutsideServiceDateETA";
this.lblWorkorderItemOutsideServiceDateETA.Size = new System.Drawing.Size(44, 19);
this.lblWorkorderItemOutsideServiceDateETA.TabIndex = 150;
this.lblWorkorderItemOutsideServiceDateETA.Tag = "\'";
this.lblWorkorderItemOutsideServiceDateETA.Text = "LT:WorkorderItemOutsideService.Label.DateETA";
this.lblWorkorderItemOutsideServiceDateETA.WrapText = false;
//
// dtWorkorderItemOutsideServiceDateETA
//
this.dtWorkorderItemOutsideServiceDateETA.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.dtWorkorderItemOutsideServiceDateETA.GZEnabled = true;
this.dtWorkorderItemOutsideServiceDateETA.GZReadOnly = false;
this.dtWorkorderItemOutsideServiceDateETA.Location = new System.Drawing.Point(-324, 50);
this.dtWorkorderItemOutsideServiceDateETA.Name = "dtWorkorderItemOutsideServiceDateETA";
this.dtWorkorderItemOutsideServiceDateETA.Size = new System.Drawing.Size(58, 24);
this.dtWorkorderItemOutsideServiceDateETA.TabIndex = 149;
//
// lblWorkorderItemOutsideServiceDateSent
//
this.lblWorkorderItemOutsideServiceDateSent.Location = new System.Drawing.Point(0, 20);
this.lblWorkorderItemOutsideServiceDateSent.Name = "lblWorkorderItemOutsideServiceDateSent";
this.lblWorkorderItemOutsideServiceDateSent.Size = new System.Drawing.Size(77, 18);
this.lblWorkorderItemOutsideServiceDateSent.TabIndex = 148;
this.lblWorkorderItemOutsideServiceDateSent.Tag = "\'";
this.lblWorkorderItemOutsideServiceDateSent.Text = "LT:WorkorderItemOutsideService.Label.DateSent";
this.lblWorkorderItemOutsideServiceDateSent.WrapText = false;
//
// dtWorkorderItemOutsideServiceDateSent
//
this.dtWorkorderItemOutsideServiceDateSent.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.dtWorkorderItemOutsideServiceDateSent.GZEnabled = true;
this.dtWorkorderItemOutsideServiceDateSent.GZReadOnly = false;
this.dtWorkorderItemOutsideServiceDateSent.Location = new System.Drawing.Point(-324, 14);
this.dtWorkorderItemOutsideServiceDateSent.Name = "dtWorkorderItemOutsideServiceDateSent";
this.dtWorkorderItemOutsideServiceDateSent.Size = new System.Drawing.Size(68, 24);
this.dtWorkorderItemOutsideServiceDateSent.TabIndex = 147;
//
// pnlOutsideServiceCenter
//
this.pnlOutsideServiceCenter.AutoScroll = true;
this.pnlOutsideServiceCenter.BackColor = System.Drawing.SystemColors.Control;
this.pnlOutsideServiceCenter.Controls.Add(this.edWorkorderItemOutsideServiceShippingPrice);
this.pnlOutsideServiceCenter.Controls.Add(this.lblWorkorderItemOutsideServiceShippingPrice);
this.pnlOutsideServiceCenter.Controls.Add(this.edWorkorderItemOutsideServiceShippingCost);
this.pnlOutsideServiceCenter.Controls.Add(this.lblWorkorderItemOutsideServiceShippingCost);
this.pnlOutsideServiceCenter.Controls.Add(this.lblWorkorderItemOutsideServiceTrackingNumber);
this.pnlOutsideServiceCenter.Controls.Add(this.edWorkorderItemOutsideServiceTrackingNumber);
this.pnlOutsideServiceCenter.Controls.Add(this.btnWorkorderItemOutsideServiceVendorSentViaID);
this.pnlOutsideServiceCenter.Controls.Add(this.cbWorkorderItemOutsideServiceVendorSentViaID);
this.pnlOutsideServiceCenter.Dock = System.Windows.Forms.DockStyle.Left;
this.pnlOutsideServiceCenter.Location = new System.Drawing.Point(240, 0);
this.pnlOutsideServiceCenter.Name = "pnlOutsideServiceCenter";
this.pnlOutsideServiceCenter.Size = new System.Drawing.Size(240, 312);
this.pnlOutsideServiceCenter.TabIndex = 1;
//
// edWorkorderItemOutsideServiceShippingPrice
//
this.edWorkorderItemOutsideServiceShippingPrice.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.edWorkorderItemOutsideServiceShippingPrice.Location = new System.Drawing.Point(-342, 123);
this.edWorkorderItemOutsideServiceShippingPrice.MaskInput = "";
this.edWorkorderItemOutsideServiceShippingPrice.Name = "edWorkorderItemOutsideServiceShippingPrice";
this.edWorkorderItemOutsideServiceShippingPrice.Size = new System.Drawing.Size(58, 24);
this.edWorkorderItemOutsideServiceShippingPrice.TabIndex = 158;
this.edWorkorderItemOutsideServiceShippingPrice.Tag = "\'";
//
// lblWorkorderItemOutsideServiceShippingPrice
//
this.lblWorkorderItemOutsideServiceShippingPrice.Location = new System.Drawing.Point(0, 129);
this.lblWorkorderItemOutsideServiceShippingPrice.Name = "lblWorkorderItemOutsideServiceShippingPrice";
this.lblWorkorderItemOutsideServiceShippingPrice.Size = new System.Drawing.Size(48, 19);
this.lblWorkorderItemOutsideServiceShippingPrice.TabIndex = 159;
this.lblWorkorderItemOutsideServiceShippingPrice.Tag = "\'";
this.lblWorkorderItemOutsideServiceShippingPrice.Text = "LT:WorkorderItemOutsideService.Label.ShippingPrice";
this.lblWorkorderItemOutsideServiceShippingPrice.WrapText = false;
//
// edWorkorderItemOutsideServiceShippingCost
//
this.edWorkorderItemOutsideServiceShippingCost.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.edWorkorderItemOutsideServiceShippingCost.Location = new System.Drawing.Point(-342, 87);
this.edWorkorderItemOutsideServiceShippingCost.MaskInput = "";
this.edWorkorderItemOutsideServiceShippingCost.Name = "edWorkorderItemOutsideServiceShippingCost";
this.edWorkorderItemOutsideServiceShippingCost.Size = new System.Drawing.Size(58, 24);
this.edWorkorderItemOutsideServiceShippingCost.TabIndex = 156;
this.edWorkorderItemOutsideServiceShippingCost.Tag = "\'";
//
// lblWorkorderItemOutsideServiceShippingCost
//
this.lblWorkorderItemOutsideServiceShippingCost.Location = new System.Drawing.Point(0, 92);
this.lblWorkorderItemOutsideServiceShippingCost.Name = "lblWorkorderItemOutsideServiceShippingCost";
this.lblWorkorderItemOutsideServiceShippingCost.Size = new System.Drawing.Size(86, 19);
this.lblWorkorderItemOutsideServiceShippingCost.TabIndex = 157;
this.lblWorkorderItemOutsideServiceShippingCost.Tag = "\'";
this.lblWorkorderItemOutsideServiceShippingCost.Text = "LT:WorkorderItemOutsideService.Label.ShippingCost";
this.lblWorkorderItemOutsideServiceShippingCost.WrapText = false;
//
// lblWorkorderItemOutsideServiceTrackingNumber
//
this.lblWorkorderItemOutsideServiceTrackingNumber.Location = new System.Drawing.Point(0, 55);
this.lblWorkorderItemOutsideServiceTrackingNumber.Name = "lblWorkorderItemOutsideServiceTrackingNumber";
this.lblWorkorderItemOutsideServiceTrackingNumber.Size = new System.Drawing.Size(86, 19);
this.lblWorkorderItemOutsideServiceTrackingNumber.TabIndex = 153;
this.lblWorkorderItemOutsideServiceTrackingNumber.Tag = "\'";
this.lblWorkorderItemOutsideServiceTrackingNumber.Text = "LT:WorkorderItemOutsideService.Label.TrackingNumber";
this.lblWorkorderItemOutsideServiceTrackingNumber.WrapText = false;
//
// edWorkorderItemOutsideServiceTrackingNumber
//
this.edWorkorderItemOutsideServiceTrackingNumber.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.edWorkorderItemOutsideServiceTrackingNumber.Location = new System.Drawing.Point(-342, 50);
this.edWorkorderItemOutsideServiceTrackingNumber.Name = "edWorkorderItemOutsideServiceTrackingNumber";
this.edWorkorderItemOutsideServiceTrackingNumber.Size = new System.Drawing.Size(58, 24);
this.edWorkorderItemOutsideServiceTrackingNumber.TabIndex = 152;
this.edWorkorderItemOutsideServiceTrackingNumber.Tag = "\'";
//
// btnWorkorderItemOutsideServiceVendorSentViaID
//
appearance14.TextHAlignAsString = "Left";
this.btnWorkorderItemOutsideServiceVendorSentViaID.Appearance = appearance14;
this.btnWorkorderItemOutsideServiceVendorSentViaID.Location = new System.Drawing.Point(0, 14);
this.btnWorkorderItemOutsideServiceVendorSentViaID.Name = "btnWorkorderItemOutsideServiceVendorSentViaID";
this.btnWorkorderItemOutsideServiceVendorSentViaID.Size = new System.Drawing.Size(115, 24);
this.btnWorkorderItemOutsideServiceVendorSentViaID.TabIndex = 7;
this.btnWorkorderItemOutsideServiceVendorSentViaID.Tag = "\'";
this.btnWorkorderItemOutsideServiceVendorSentViaID.Text = "LT:WorkorderItemOutsideService.Label.VendorSentViaID";
this.btnWorkorderItemOutsideServiceVendorSentViaID.UseHotTracking = Infragistics.Win.DefaultableBoolean.True;
this.btnWorkorderItemOutsideServiceVendorSentViaID.Click += new System.EventHandler(this.btnWorkorderItemOutsideServiceVendorSentViaID_Click);
//
// cbWorkorderItemOutsideServiceVendorSentViaID
//
this.cbWorkorderItemOutsideServiceVendorSentViaID.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.cbWorkorderItemOutsideServiceVendorSentViaID.Location = new System.Drawing.Point(-342, 14);
this.cbWorkorderItemOutsideServiceVendorSentViaID.Name = "cbWorkorderItemOutsideServiceVendorSentViaID";
this.cbWorkorderItemOutsideServiceVendorSentViaID.Size = new System.Drawing.Size(58, 24);
this.cbWorkorderItemOutsideServiceVendorSentViaID.TabIndex = 8;
this.cbWorkorderItemOutsideServiceVendorSentViaID.NeedMoreData += new GZTW.WinForm.Controls.NeedMoreDataHandler(this.cbWorkorderItemOutsideServiceVendorSentViaID_NeedMoreData);
//
// pnlOutsideServiceLeft
//
this.pnlOutsideServiceLeft.AutoScroll = true;
this.pnlOutsideServiceLeft.BackColor = System.Drawing.SystemColors.Control;
this.pnlOutsideServiceLeft.Controls.Add(this.edWorkorderItemOutsideServiceRepairPrice);
this.pnlOutsideServiceLeft.Controls.Add(this.lblWorkorderItemOutsideServiceRepairPrice);
this.pnlOutsideServiceLeft.Controls.Add(this.edWorkorderItemOutsideServiceRepairCost);
this.pnlOutsideServiceLeft.Controls.Add(this.lblWorkorderItemOutsideServiceRepairCost);
this.pnlOutsideServiceLeft.Controls.Add(this.edWorkorderItemOutsideServiceRMANumber);
this.pnlOutsideServiceLeft.Controls.Add(this.lblWorkorderItemOutsideServiceRMANumber);
this.pnlOutsideServiceLeft.Controls.Add(this.cbWorkorderItemOutsideServiceVendorSentToID);
this.pnlOutsideServiceLeft.Controls.Add(this.btnWorkorderItemOutsideServiceVendorSentToID);
this.pnlOutsideServiceLeft.Controls.Add(this.edWorkorderItemOutsideServiceNotes);
this.pnlOutsideServiceLeft.Controls.Add(this.lblWorkorderItemOutsideServiceNotes);
this.pnlOutsideServiceLeft.Dock = System.Windows.Forms.DockStyle.Left;
this.pnlOutsideServiceLeft.Location = new System.Drawing.Point(0, 0);
this.pnlOutsideServiceLeft.Name = "pnlOutsideServiceLeft";
this.pnlOutsideServiceLeft.Size = new System.Drawing.Size(240, 312);
this.pnlOutsideServiceLeft.TabIndex = 0;
//
// edWorkorderItemOutsideServiceRepairPrice
//
this.edWorkorderItemOutsideServiceRepairPrice.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.edWorkorderItemOutsideServiceRepairPrice.Location = new System.Drawing.Point(-642, 123);
this.edWorkorderItemOutsideServiceRepairPrice.MaskInput = "";
this.edWorkorderItemOutsideServiceRepairPrice.Name = "edWorkorderItemOutsideServiceRepairPrice";
this.edWorkorderItemOutsideServiceRepairPrice.Size = new System.Drawing.Size(107, 24);
this.edWorkorderItemOutsideServiceRepairPrice.TabIndex = 154;
this.edWorkorderItemOutsideServiceRepairPrice.Tag = "\'";
//
// lblWorkorderItemOutsideServiceRepairPrice
//
this.lblWorkorderItemOutsideServiceRepairPrice.Location = new System.Drawing.Point(0, 129);
this.lblWorkorderItemOutsideServiceRepairPrice.Name = "lblWorkorderItemOutsideServiceRepairPrice";
this.lblWorkorderItemOutsideServiceRepairPrice.Size = new System.Drawing.Size(144, 19);
this.lblWorkorderItemOutsideServiceRepairPrice.TabIndex = 155;
this.lblWorkorderItemOutsideServiceRepairPrice.Tag = "\'";
this.lblWorkorderItemOutsideServiceRepairPrice.Text = "LT:WorkorderItemOutsideService.Label.RepairPrice";
this.lblWorkorderItemOutsideServiceRepairPrice.WrapText = false;
//
// edWorkorderItemOutsideServiceRepairCost
//
this.edWorkorderItemOutsideServiceRepairCost.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.edWorkorderItemOutsideServiceRepairCost.Location = new System.Drawing.Point(-642, 83);
this.edWorkorderItemOutsideServiceRepairCost.MaskInput = "";
this.edWorkorderItemOutsideServiceRepairCost.Name = "edWorkorderItemOutsideServiceRepairCost";
this.edWorkorderItemOutsideServiceRepairCost.Size = new System.Drawing.Size(107, 24);
this.edWorkorderItemOutsideServiceRepairCost.TabIndex = 152;
this.edWorkorderItemOutsideServiceRepairCost.Tag = "\'";
//
// lblWorkorderItemOutsideServiceRepairCost
//
this.lblWorkorderItemOutsideServiceRepairCost.Location = new System.Drawing.Point(0, 92);
this.lblWorkorderItemOutsideServiceRepairCost.Name = "lblWorkorderItemOutsideServiceRepairCost";
this.lblWorkorderItemOutsideServiceRepairCost.Size = new System.Drawing.Size(58, 19);
this.lblWorkorderItemOutsideServiceRepairCost.TabIndex = 153;
this.lblWorkorderItemOutsideServiceRepairCost.Tag = "\'";
this.lblWorkorderItemOutsideServiceRepairCost.Text = "LT:WorkorderItemOutsideService.Label.RepairCost";
this.lblWorkorderItemOutsideServiceRepairCost.WrapText = false;
//
// edWorkorderItemOutsideServiceRMANumber
//
this.edWorkorderItemOutsideServiceRMANumber.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.edWorkorderItemOutsideServiceRMANumber.Location = new System.Drawing.Point(-642, 50);
this.edWorkorderItemOutsideServiceRMANumber.Name = "edWorkorderItemOutsideServiceRMANumber";
this.edWorkorderItemOutsideServiceRMANumber.Size = new System.Drawing.Size(107, 24);
this.edWorkorderItemOutsideServiceRMANumber.TabIndex = 150;
this.edWorkorderItemOutsideServiceRMANumber.Tag = "\'";
//
// lblWorkorderItemOutsideServiceRMANumber
//
this.lblWorkorderItemOutsideServiceRMANumber.Location = new System.Drawing.Point(0, 55);
this.lblWorkorderItemOutsideServiceRMANumber.Name = "lblWorkorderItemOutsideServiceRMANumber";
this.lblWorkorderItemOutsideServiceRMANumber.Size = new System.Drawing.Size(58, 19);
this.lblWorkorderItemOutsideServiceRMANumber.TabIndex = 151;
this.lblWorkorderItemOutsideServiceRMANumber.Tag = "\'";
this.lblWorkorderItemOutsideServiceRMANumber.Text = "LT:WorkorderItemOutsideService.Label.RMANumber";
this.lblWorkorderItemOutsideServiceRMANumber.WrapText = false;
//
// cbWorkorderItemOutsideServiceVendorSentToID
//
this.cbWorkorderItemOutsideServiceVendorSentToID.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.cbWorkorderItemOutsideServiceVendorSentToID.Location = new System.Drawing.Point(-642, 14);
this.cbWorkorderItemOutsideServiceVendorSentToID.Name = "cbWorkorderItemOutsideServiceVendorSentToID";
this.cbWorkorderItemOutsideServiceVendorSentToID.Size = new System.Drawing.Size(115, 24);
this.cbWorkorderItemOutsideServiceVendorSentToID.TabIndex = 6;
this.cbWorkorderItemOutsideServiceVendorSentToID.NeedMoreData += new GZTW.WinForm.Controls.NeedMoreDataHandler(this.cbWorkorderItemOutsideServiceVendorSentToID_NeedMoreData);
this.cbWorkorderItemOutsideServiceVendorSentToID.ValueChanged += new System.EventHandler(this.cbWorkorderItemOutsideServiceVendorSentToID_ValueChanged);
//
// btnWorkorderItemOutsideServiceVendorSentToID
//
appearance15.TextHAlignAsString = "Left";
this.btnWorkorderItemOutsideServiceVendorSentToID.Appearance = appearance15;
this.btnWorkorderItemOutsideServiceVendorSentToID.Location = new System.Drawing.Point(0, 14);
this.btnWorkorderItemOutsideServiceVendorSentToID.Name = "btnWorkorderItemOutsideServiceVendorSentToID";
this.btnWorkorderItemOutsideServiceVendorSentToID.Size = new System.Drawing.Size(119, 24);
this.btnWorkorderItemOutsideServiceVendorSentToID.TabIndex = 5;
this.btnWorkorderItemOutsideServiceVendorSentToID.Tag = "\'";
this.btnWorkorderItemOutsideServiceVendorSentToID.Text = "LT:WorkorderItemOutsideService.Label.VendorSentToID";
this.btnWorkorderItemOutsideServiceVendorSentToID.UseHotTracking = Infragistics.Win.DefaultableBoolean.True;
this.btnWorkorderItemOutsideServiceVendorSentToID.Click += new System.EventHandler(this.btnWorkorderItemOutsideServiceVendorSentToID_Click);
//
// edWorkorderItemOutsideServiceNotes
//
this.edWorkorderItemOutsideServiceNotes.AcceptsReturn = true;
this.edWorkorderItemOutsideServiceNotes.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
this.edWorkorderItemOutsideServiceNotes.Location = new System.Drawing.Point(0, 186);
this.edWorkorderItemOutsideServiceNotes.Multiline = true;
this.edWorkorderItemOutsideServiceNotes.Name = "edWorkorderItemOutsideServiceNotes";
this.edWorkorderItemOutsideServiceNotes.Scrollbars = System.Windows.Forms.ScrollBars.Vertical;
this.edWorkorderItemOutsideServiceNotes.Size = new System.Drawing.Size(144, 120);
this.edWorkorderItemOutsideServiceNotes.TabIndex = 132;
this.edWorkorderItemOutsideServiceNotes.Tag = "\'";
//
// lblWorkorderItemOutsideServiceNotes
//
this.lblWorkorderItemOutsideServiceNotes.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.lblWorkorderItemOutsideServiceNotes.Location = new System.Drawing.Point(0, 166);
this.lblWorkorderItemOutsideServiceNotes.Name = "lblWorkorderItemOutsideServiceNotes";
this.lblWorkorderItemOutsideServiceNotes.Size = new System.Drawing.Size(0, 19);
this.lblWorkorderItemOutsideServiceNotes.TabIndex = 133;
this.lblWorkorderItemOutsideServiceNotes.Tag = "";
this.lblWorkorderItemOutsideServiceNotes.Text = "LT:WorkorderItemOutsideService.Label.Notes";
this.lblWorkorderItemOutsideServiceNotes.WrapText = false;
//
// pnlScheduledUser
//
this.pnlScheduledUser.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.pnlScheduledUser.Controls.Add(this.gridScheduledUsers);
this.pnlScheduledUser.Dock = System.Windows.Forms.DockStyle.Top;
this.pnlScheduledUser.Location = new System.Drawing.Point(212, 1091);
this.pnlScheduledUser.Name = "pnlScheduledUser";
this.pnlScheduledUser.Size = new System.Drawing.Size(802, 33);
this.pnlScheduledUser.TabIndex = 10;
this.pnlScheduledUser.Visible = false;
//
// gridScheduledUsers
//
this.gridScheduledUsers.Cursor = System.Windows.Forms.Cursors.Default;
appearance16.FontData.BoldAsString = "True";
appearance16.TextHAlignAsString = "Left";
this.gridScheduledUsers.DisplayLayout.CaptionAppearance = appearance16;
this.gridScheduledUsers.Dock = System.Windows.Forms.DockStyle.Fill;
this.gridScheduledUsers.Location = new System.Drawing.Point(0, 0);
this.gridScheduledUsers.Name = "gridScheduledUsers";
this.gridScheduledUsers.Size = new System.Drawing.Size(800, 31);
this.gridScheduledUsers.TabIndex = 3;
this.gridScheduledUsers.Text = "LT:WorkorderItem.Label.ScheduledUsers";
this.gridScheduledUsers.AfterCellUpdate += new Infragistics.Win.UltraWinGrid.CellEventHandler(this.gridScheduledUsers_AfterCellUpdate);
this.gridScheduledUsers.InitializeLayout += new Infragistics.Win.UltraWinGrid.InitializeLayoutEventHandler(this.gridScheduledUsers_InitializeLayout);
this.gridScheduledUsers.InitializeRow += new Infragistics.Win.UltraWinGrid.InitializeRowEventHandler(this.gridScheduledUsers_InitializeRow);
this.gridScheduledUsers.ClickCellButton += new Infragistics.Win.UltraWinGrid.CellEventHandler(this.gridScheduledUsers_ClickCellButton);
this.gridScheduledUsers.BeforeRowInsert += new Infragistics.Win.UltraWinGrid.BeforeRowInsertEventHandler(this.gridScheduledUsers_BeforeRowInsert);
this.gridScheduledUsers.MouseEnterElement += new Infragistics.Win.UIElementEventHandler(this.gridScheduledUsers_MouseEnterElement);
this.gridScheduledUsers.Enter += new System.EventHandler(this.gridScheduledUsers_Enter);
//
// pnlTask
//
this.pnlTask.Controls.Add(this.gridTasks);
this.pnlTask.Controls.Add(this.pnlTaskTop);
this.pnlTask.Dock = System.Windows.Forms.DockStyle.Top;
this.pnlTask.Location = new System.Drawing.Point(212, 1124);
this.pnlTask.Name = "pnlTask";
this.pnlTask.Size = new System.Drawing.Size(802, 24);
this.pnlTask.TabIndex = 11;
this.pnlTask.Visible = false;
//
// gridTasks
//
this.gridTasks.Cursor = System.Windows.Forms.Cursors.Default;
appearance17.FontData.BoldAsString = "True";
appearance17.TextHAlignAsString = "Left";
this.gridTasks.DisplayLayout.CaptionAppearance = appearance17;
this.gridTasks.Dock = System.Windows.Forms.DockStyle.Fill;
this.gridTasks.Location = new System.Drawing.Point(0, 83);
this.gridTasks.Name = "gridTasks";
this.gridTasks.Size = new System.Drawing.Size(802, 0);
this.gridTasks.TabIndex = 4;
this.gridTasks.Text = "LT:WorkorderItem.Label.Tasks";
this.gridTasks.InitializeLayout += new Infragistics.Win.UltraWinGrid.InitializeLayoutEventHandler(this.gridTasks_InitializeLayout);
this.gridTasks.InitializeRow += new Infragistics.Win.UltraWinGrid.InitializeRowEventHandler(this.gridTasks_InitializeRow);
this.gridTasks.AfterRowsDeleted += new System.EventHandler(this.gridTasks_AfterRowsDeleted);
this.gridTasks.ClickCellButton += new Infragistics.Win.UltraWinGrid.CellEventHandler(this.gridTasks_ClickCellButton);
this.gridTasks.MouseEnterElement += new Infragistics.Win.UIElementEventHandler(this.gridTasks_MouseEnterElement);
//
// pnlTaskTop
//
this.pnlTaskTop.Controls.Add(this.cbWorkorderItemTasks);
this.pnlTaskTop.Controls.Add(this.btnWorkorderItemTask);
this.pnlTaskTop.Dock = System.Windows.Forms.DockStyle.Top;
this.pnlTaskTop.Location = new System.Drawing.Point(0, 0);
this.pnlTaskTop.Name = "pnlTaskTop";
this.pnlTaskTop.Size = new System.Drawing.Size(802, 83);
this.pnlTaskTop.TabIndex = 0;
//
// cbWorkorderItemTasks
//
this.cbWorkorderItemTasks.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
appearance18.Image = global::AyaNova.Resource1.New16;
editorButton1.Appearance = appearance18;
this.cbWorkorderItemTasks.ButtonsLeft.Add(editorButton1);
this.cbWorkorderItemTasks.Location = new System.Drawing.Point(10, 28);
this.cbWorkorderItemTasks.Name = "cbWorkorderItemTasks";
this.cbWorkorderItemTasks.Size = new System.Drawing.Size(449, 24);
this.cbWorkorderItemTasks.TabIndex = 8;
this.cbWorkorderItemTasks.NeedMoreData += new GZTW.WinForm.Controls.NeedMoreDataHandler(this.cbWorkorderItemTasks_NeedMoreData);
this.cbWorkorderItemTasks.EditorButtonClick += new Infragistics.Win.UltraWinEditors.EditorButtonEventHandler(this.cbWorkorderItemTasks_EditorButtonClick);
//
// btnWorkorderItemTask
//
this.btnWorkorderItemTask.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
appearance19.TextHAlignAsString = "Left";
this.btnWorkorderItemTask.Appearance = appearance19;
this.btnWorkorderItemTask.Location = new System.Drawing.Point(0, 0);
this.btnWorkorderItemTask.Name = "btnWorkorderItemTask";
this.btnWorkorderItemTask.Size = new System.Drawing.Size(459, 28);
this.btnWorkorderItemTask.TabIndex = 7;
this.btnWorkorderItemTask.Tag = "";
this.btnWorkorderItemTask.Text = "LT:TaskGroupTask.Label.TaskGroupID";
this.btnWorkorderItemTask.UseHotTracking = Infragistics.Win.DefaultableBoolean.True;
this.btnWorkorderItemTask.Click += new System.EventHandler(this.btnWorkorderItemTask_Click);
//
// pnlTravel
//
this.pnlTravel.Controls.Add(this.gridTravel);
this.pnlTravel.Dock = System.Windows.Forms.DockStyle.Top;
this.pnlTravel.Location = new System.Drawing.Point(212, 1148);
this.pnlTravel.Name = "pnlTravel";
this.pnlTravel.Size = new System.Drawing.Size(802, 28);
this.pnlTravel.TabIndex = 12;
this.pnlTravel.Visible = false;
//
// gridTravel
//
this.gridTravel.Cursor = System.Windows.Forms.Cursors.Default;
appearance20.FontData.BoldAsString = "True";
appearance20.TextHAlignAsString = "Left";
this.gridTravel.DisplayLayout.CaptionAppearance = appearance20;
this.gridTravel.Dock = System.Windows.Forms.DockStyle.Fill;
this.gridTravel.Location = new System.Drawing.Point(0, 0);
this.gridTravel.Name = "gridTravel";
this.gridTravel.Size = new System.Drawing.Size(802, 28);
this.gridTravel.TabIndex = 1;
this.gridTravel.Text = "LT:WorkorderItem.Label.Travels";
this.gridTravel.AfterCellUpdate += new Infragistics.Win.UltraWinGrid.CellEventHandler(this.gridTravel_AfterCellUpdate);
this.gridTravel.InitializeLayout += new Infragistics.Win.UltraWinGrid.InitializeLayoutEventHandler(this.gridTravel_InitializeLayout);
this.gridTravel.InitializeRow += new Infragistics.Win.UltraWinGrid.InitializeRowEventHandler(this.gridTravel_InitializeRow);
this.gridTravel.AfterRowsDeleted += new System.EventHandler(this.gridTravel_AfterRowsDeleted);
this.gridTravel.ClickCellButton += new Infragistics.Win.UltraWinGrid.CellEventHandler(this.gridTravel_ClickCellButton);
this.gridTravel.BeforeAutoSizeEdit += new Infragistics.Win.UltraWinGrid.CancelableAutoSizeEditEventHandler(this.gridTravel_BeforeAutoSizeEdit);
this.gridTravel.BeforeRowInsert += new Infragistics.Win.UltraWinGrid.BeforeRowInsertEventHandler(this.gridTravel_BeforeRowInsert);
this.gridTravel.MouseEnterElement += new Infragistics.Win.UIElementEventHandler(this.gridTravel_MouseEnterElement);
this.gridTravel.Enter += new System.EventHandler(this.gridTravel_Enter);
//
// pnlUnit
//
this.pnlUnit.AutoScroll = true;
this.pnlUnit.Controls.Add(this.edWarrantyInfo);
this.pnlUnit.Controls.Add(this.cbWorkorderItemUnitServiceTypeID);
this.pnlUnit.Controls.Add(this.btnWorkorderItemUnitServiceTypeID);
this.pnlUnit.Controls.Add(this.cbWorkorderItemUnitID);
this.pnlUnit.Controls.Add(this.btnUnitID);
this.pnlUnit.Dock = System.Windows.Forms.DockStyle.Top;
this.pnlUnit.Location = new System.Drawing.Point(212, 1176);
this.pnlUnit.Name = "pnlUnit";
this.pnlUnit.Size = new System.Drawing.Size(802, 267);
this.pnlUnit.TabIndex = 13;
this.pnlUnit.Visible = false;
//
// edWarrantyInfo
//
this.edWarrantyInfo.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.edWarrantyInfo.BorderStyle = Infragistics.Win.UIElementBorderStyle.Etched;
this.edWarrantyInfo.Location = new System.Drawing.Point(19, 65);
this.edWarrantyInfo.Multiline = true;
this.edWarrantyInfo.Name = "edWarrantyInfo";
this.edWarrantyInfo.ReadOnly = true;
this.edWarrantyInfo.Scrollbars = System.Windows.Forms.ScrollBars.Vertical;
this.edWarrantyInfo.Size = new System.Drawing.Size(773, 197);
this.edWarrantyInfo.TabIndex = 154;
//
// cbWorkorderItemUnitServiceTypeID
//
this.cbWorkorderItemUnitServiceTypeID.Location = new System.Drawing.Point(19, 37);
this.cbWorkorderItemUnitServiceTypeID.Name = "cbWorkorderItemUnitServiceTypeID";
this.cbWorkorderItemUnitServiceTypeID.Size = new System.Drawing.Size(288, 24);
this.cbWorkorderItemUnitServiceTypeID.TabIndex = 153;
this.cbWorkorderItemUnitServiceTypeID.NeedMoreData += new GZTW.WinForm.Controls.NeedMoreDataHandler(this.cbWorkorderItemUnitServiceTypeID_NeedMoreData);
//
// btnWorkorderItemUnitServiceTypeID
//
appearance21.TextHAlignAsString = "Left";
this.btnWorkorderItemUnitServiceTypeID.Appearance = appearance21;
this.btnWorkorderItemUnitServiceTypeID.ButtonStyle = Infragistics.Win.UIElementButtonStyle.PopupBorderless;
this.btnWorkorderItemUnitServiceTypeID.Location = new System.Drawing.Point(19, 9);
this.btnWorkorderItemUnitServiceTypeID.Name = "btnWorkorderItemUnitServiceTypeID";
this.btnWorkorderItemUnitServiceTypeID.Size = new System.Drawing.Size(279, 28);
this.btnWorkorderItemUnitServiceTypeID.TabIndex = 152;
this.btnWorkorderItemUnitServiceTypeID.Tag = "";
this.btnWorkorderItemUnitServiceTypeID.Text = "LT:O.UnitServiceType";
this.btnWorkorderItemUnitServiceTypeID.UseHotTracking = Infragistics.Win.DefaultableBoolean.True;
this.btnWorkorderItemUnitServiceTypeID.Click += new System.EventHandler(this.btnWorkorderItemUnitServiceTypeID_Click);
//
// cbWorkorderItemUnitID
//
this.cbWorkorderItemUnitID.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.cbWorkorderItemUnitID.AutoCompleteMode = Infragistics.Win.AutoCompleteMode.SuggestAppend;
this.cbWorkorderItemUnitID.LimitToList = true;
this.cbWorkorderItemUnitID.Location = new System.Drawing.Point(326, 37);
this.cbWorkorderItemUnitID.Name = "cbWorkorderItemUnitID";
this.cbWorkorderItemUnitID.Size = new System.Drawing.Size(466, 24);
this.cbWorkorderItemUnitID.TabIndex = 151;
this.cbWorkorderItemUnitID.NeedMoreData += new GZTW.WinForm.Controls.NeedMoreDataHandler(this.cbWorkorderItemUnitID_NeedMoreData);
this.cbWorkorderItemUnitID.SelectionChanged += new System.EventHandler(this.cbWorkorderItemUnitID_SelectionChanged);
//
// btnUnitID
//
this.btnUnitID.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
appearance22.TextHAlignAsString = "Left";
this.btnUnitID.Appearance = appearance22;
this.btnUnitID.ButtonStyle = Infragistics.Win.UIElementButtonStyle.PopupBorderless;
this.btnUnitID.Location = new System.Drawing.Point(326, 9);
this.btnUnitID.Name = "btnUnitID";
this.btnUnitID.Size = new System.Drawing.Size(456, 28);
this.btnUnitID.TabIndex = 150;
this.btnUnitID.Tag = "";
this.btnUnitID.Text = "LT:O.Unit";
this.btnUnitID.UseHotTracking = Infragistics.Win.DefaultableBoolean.True;
this.btnUnitID.Click += new System.EventHandler(this.btnUnitID_Click);
//
// pnlNavigation
//
this.pnlNavigation.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.pnlNavigation.Controls.Add(this.btnViewLoans);
this.pnlNavigation.Controls.Add(this.btnViewCustomFields);
this.pnlNavigation.Controls.Add(this.btnViewOutsideService);
this.pnlNavigation.Controls.Add(this.btnViewExpenses);
this.pnlNavigation.Controls.Add(this.btnViewTasks);
this.pnlNavigation.Controls.Add(this.btnViewScheduledUsers);
this.pnlNavigation.Controls.Add(this.btnViewTravels);
this.pnlNavigation.Controls.Add(this.btnViewParts);
this.pnlNavigation.Controls.Add(this.btnViewUnit);
this.pnlNavigation.Controls.Add(this.btnViewLabors);
this.pnlNavigation.Dock = System.Windows.Forms.DockStyle.Left;
this.pnlNavigation.Location = new System.Drawing.Point(0, 594);
this.pnlNavigation.Name = "pnlNavigation";
this.pnlNavigation.Size = new System.Drawing.Size(202, 301);
this.pnlNavigation.TabIndex = 14;
this.pnlNavigation.SizeChanged += new System.EventHandler(this.pnlNavigation_SizeChanged);
//
// btnViewLoans
//
appearance23.TextHAlignAsString = "Left";
this.btnViewLoans.Appearance = appearance23;
this.btnViewLoans.ButtonStyle = Infragistics.Win.UIElementButtonStyle.WindowsVistaButton;
this.btnViewLoans.Location = new System.Drawing.Point(-1, 249);
this.btnViewLoans.Name = "btnViewLoans";
this.btnViewLoans.Size = new System.Drawing.Size(201, 27);
this.btnViewLoans.TabIndex = 9;
this.btnViewLoans.Text = "LT:WorkorderItem.Label.Loans";
this.btnViewLoans.UseHotTracking = Infragistics.Win.DefaultableBoolean.True;
this.btnViewLoans.Click += new System.EventHandler(this.btnViewLoans_Click);
//
// btnViewCustomFields
//
appearance24.TextHAlignAsString = "Left";
this.btnViewCustomFields.Appearance = appearance24;
this.btnViewCustomFields.ButtonStyle = Infragistics.Win.UIElementButtonStyle.Office2003ToolbarButton;
this.btnViewCustomFields.Location = new System.Drawing.Point(0, 222);
this.btnViewCustomFields.Name = "btnViewCustomFields";
this.btnViewCustomFields.Size = new System.Drawing.Size(202, 27);
this.btnViewCustomFields.TabIndex = 8;
this.btnViewCustomFields.Text = "LT:WorkorderItem.Label.CustomFields";
this.btnViewCustomFields.UseHotTracking = Infragistics.Win.DefaultableBoolean.True;
this.btnViewCustomFields.Visible = false;
this.btnViewCustomFields.Click += new System.EventHandler(this.btnViewCustomFields_Click);
//
// btnViewOutsideService
//
appearance25.TextHAlignAsString = "Left";
this.btnViewOutsideService.Appearance = appearance25;
this.btnViewOutsideService.ButtonStyle = Infragistics.Win.UIElementButtonStyle.Office2003ToolbarButton;
this.btnViewOutsideService.Location = new System.Drawing.Point(0, 194);
this.btnViewOutsideService.Name = "btnViewOutsideService";
this.btnViewOutsideService.Size = new System.Drawing.Size(202, 26);
this.btnViewOutsideService.TabIndex = 7;
this.btnViewOutsideService.Text = "LT:WorkorderItem.Label.OutsideService";
this.btnViewOutsideService.UseHotTracking = Infragistics.Win.DefaultableBoolean.True;
this.btnViewOutsideService.Click += new System.EventHandler(this.btnViewOutsideService_Click);
//
// btnViewExpenses
//
appearance26.TextHAlignAsString = "Left";
this.btnViewExpenses.Appearance = appearance26;
this.btnViewExpenses.ButtonStyle = Infragistics.Win.UIElementButtonStyle.Office2003ToolbarButton;
this.btnViewExpenses.Location = new System.Drawing.Point(0, 166);
this.btnViewExpenses.Name = "btnViewExpenses";
this.btnViewExpenses.Size = new System.Drawing.Size(202, 27);
this.btnViewExpenses.TabIndex = 6;
this.btnViewExpenses.Text = "LT:WorkorderItem.Label.Expenses";
this.btnViewExpenses.UseHotTracking = Infragistics.Win.DefaultableBoolean.True;
this.btnViewExpenses.Click += new System.EventHandler(this.btnViewExpenses_Click);
//
// btnViewTasks
//
appearance27.TextHAlignAsString = "Left";
this.btnViewTasks.Appearance = appearance27;
this.btnViewTasks.ButtonStyle = Infragistics.Win.UIElementButtonStyle.Office2003ToolbarButton;
this.btnViewTasks.Location = new System.Drawing.Point(0, 138);
this.btnViewTasks.Name = "btnViewTasks";
this.btnViewTasks.Size = new System.Drawing.Size(202, 27);
this.btnViewTasks.TabIndex = 5;
this.btnViewTasks.Text = "LT:WorkorderItem.Label.Tasks";
this.btnViewTasks.UseHotTracking = Infragistics.Win.DefaultableBoolean.True;
this.btnViewTasks.Click += new System.EventHandler(this.btnViewTasks_Click);
//
// btnViewScheduledUsers
//
appearance28.TextHAlignAsString = "Left";
this.btnViewScheduledUsers.Appearance = appearance28;
this.btnViewScheduledUsers.ButtonStyle = Infragistics.Win.UIElementButtonStyle.Office2003ToolbarButton;
this.btnViewScheduledUsers.Location = new System.Drawing.Point(0, 111);
this.btnViewScheduledUsers.Name = "btnViewScheduledUsers";
this.btnViewScheduledUsers.Size = new System.Drawing.Size(202, 26);
this.btnViewScheduledUsers.TabIndex = 4;
this.btnViewScheduledUsers.Text = "LT:WorkorderItem.Label.ScheduledUsers";
this.btnViewScheduledUsers.UseHotTracking = Infragistics.Win.DefaultableBoolean.True;
this.btnViewScheduledUsers.Click += new System.EventHandler(this.btnViewScheduledUsers_Click);
//
// btnViewTravels
//
appearance29.TextHAlignAsString = "Left";
this.btnViewTravels.Appearance = appearance29;
this.btnViewTravels.ButtonStyle = Infragistics.Win.UIElementButtonStyle.Office2003ToolbarButton;
this.btnViewTravels.Location = new System.Drawing.Point(0, 83);
this.btnViewTravels.Name = "btnViewTravels";
this.btnViewTravels.Size = new System.Drawing.Size(202, 27);
this.btnViewTravels.TabIndex = 3;
this.btnViewTravels.Text = "LT:WorkorderItem.Label.Travels";
this.btnViewTravels.UseHotTracking = Infragistics.Win.DefaultableBoolean.True;
this.btnViewTravels.Click += new System.EventHandler(this.btnViewTravels_Click);
//
// btnViewParts
//
appearance30.TextHAlignAsString = "Left";
this.btnViewParts.Appearance = appearance30;
this.btnViewParts.ButtonStyle = Infragistics.Win.UIElementButtonStyle.Office2003ToolbarButton;
this.btnViewParts.Location = new System.Drawing.Point(0, 55);
this.btnViewParts.Name = "btnViewParts";
this.btnViewParts.Size = new System.Drawing.Size(202, 27);
this.btnViewParts.TabIndex = 2;
this.btnViewParts.Text = "LT:WorkorderItem.Label.Parts";
this.btnViewParts.UseHotTracking = Infragistics.Win.DefaultableBoolean.True;
this.btnViewParts.Click += new System.EventHandler(this.btnViewParts_Click);
//
// btnViewUnit
//
appearance31.TextHAlignAsString = "Left";
this.btnViewUnit.Appearance = appearance31;
this.btnViewUnit.ButtonStyle = Infragistics.Win.UIElementButtonStyle.Office2003ToolbarButton;
this.btnViewUnit.Location = new System.Drawing.Point(0, 28);
this.btnViewUnit.Name = "btnViewUnit";
this.btnViewUnit.Size = new System.Drawing.Size(202, 26);
this.btnViewUnit.TabIndex = 1;
this.btnViewUnit.Text = "LT:O.Unit";
this.btnViewUnit.UseHotTracking = Infragistics.Win.DefaultableBoolean.True;
this.btnViewUnit.Click += new System.EventHandler(this.btnViewUnit_Click);
//
// btnViewLabors
//
appearance32.TextHAlignAsString = "Left";
this.btnViewLabors.Appearance = appearance32;
this.btnViewLabors.ButtonStyle = Infragistics.Win.UIElementButtonStyle.Office2003ToolbarButton;
this.btnViewLabors.Location = new System.Drawing.Point(0, 0);
this.btnViewLabors.Name = "btnViewLabors";
this.btnViewLabors.Size = new System.Drawing.Size(202, 27);
this.btnViewLabors.TabIndex = 0;
this.btnViewLabors.Text = "LT:WorkorderItem.Label.Labors";
this.btnViewLabors.UseHotTracking = Infragistics.Win.DefaultableBoolean.True;
this.btnViewLabors.Click += new System.EventHandler(this.btnViewLabors_Click);
//
// pnlWorkorderItemCustomFields
//
this.pnlWorkorderItemCustomFields.Controls.Add(this.gridCustom);
this.pnlWorkorderItemCustomFields.Dock = System.Windows.Forms.DockStyle.Top;
this.pnlWorkorderItemCustomFields.Location = new System.Drawing.Point(212, 1443);
this.pnlWorkorderItemCustomFields.Name = "pnlWorkorderItemCustomFields";
this.pnlWorkorderItemCustomFields.Size = new System.Drawing.Size(802, 64);
this.pnlWorkorderItemCustomFields.TabIndex = 15;
this.pnlWorkorderItemCustomFields.Visible = false;
//
// gridCustom
//
this.gridCustom.Cursor = System.Windows.Forms.Cursors.Default;
appearance33.FontData.BoldAsString = "True";
this.gridCustom.DisplayLayout.CaptionAppearance = appearance33;
this.gridCustom.Dock = System.Windows.Forms.DockStyle.Fill;
this.gridCustom.Location = new System.Drawing.Point(0, 0);
this.gridCustom.Name = "gridCustom";
this.gridCustom.Size = new System.Drawing.Size(802, 64);
this.gridCustom.TabIndex = 1;
this.gridCustom.Tag = "";
this.gridCustom.Text = "LT:ObjectCustomField.Label.CustomGrid";
this.gridCustom.AfterCellUpdate += new Infragistics.Win.UltraWinGrid.CellEventHandler(this.gridCustom_AfterCellUpdate);
this.gridCustom.InitializeRow += new Infragistics.Win.UltraWinGrid.InitializeRowEventHandler(this.gridCustom_InitializeRow);
this.gridCustom.MouseEnterElement += new Infragistics.Win.UIElementEventHandler(this.gridCustom_MouseEnterElement);
//
// splitter1
//
this.splitter1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.splitter1.Location = new System.Drawing.Point(202, 594);
this.splitter1.MinSize = 50;
this.splitter1.Name = "splitter1";
this.splitter1.Size = new System.Drawing.Size(10, 301);
this.splitter1.TabIndex = 16;
this.splitter1.TabStop = false;
//
// WorkorderForm_Fill_Panel
//
this.WorkorderForm_Fill_Panel.Controls.Add(this.pnlLoan);
this.WorkorderForm_Fill_Panel.Controls.Add(this.pnlWorkorderItemCustomFields);
this.WorkorderForm_Fill_Panel.Controls.Add(this.pnlUnit);
this.WorkorderForm_Fill_Panel.Controls.Add(this.pnlTravel);
this.WorkorderForm_Fill_Panel.Controls.Add(this.pnlTask);
this.WorkorderForm_Fill_Panel.Controls.Add(this.pnlScheduledUser);
this.WorkorderForm_Fill_Panel.Controls.Add(this.pnlOutsideService);
this.WorkorderForm_Fill_Panel.Controls.Add(this.pnlExpense);
this.WorkorderForm_Fill_Panel.Controls.Add(this.pnlParts);
this.WorkorderForm_Fill_Panel.Controls.Add(this.pnlLabour);
this.WorkorderForm_Fill_Panel.Controls.Add(this.splitter1);
this.WorkorderForm_Fill_Panel.Controls.Add(this.pnlNavigation);
this.WorkorderForm_Fill_Panel.Controls.Add(this.pnlItem);
this.WorkorderForm_Fill_Panel.Controls.Add(this.pnlPM);
this.WorkorderForm_Fill_Panel.Controls.Add(this.pnlQuote);
this.WorkorderForm_Fill_Panel.Controls.Add(this.pnlService);
this.WorkorderForm_Fill_Panel.Controls.Add(this.pnlHeader);
this.WorkorderForm_Fill_Panel.Cursor = System.Windows.Forms.Cursors.Default;
this.WorkorderForm_Fill_Panel.Dock = System.Windows.Forms.DockStyle.Fill;
this.WorkorderForm_Fill_Panel.Location = new System.Drawing.Point(0, 129);
this.WorkorderForm_Fill_Panel.Name = "WorkorderForm_Fill_Panel";
this.WorkorderForm_Fill_Panel.Size = new System.Drawing.Size(1014, 895);
this.WorkorderForm_Fill_Panel.TabIndex = 0;
//
// pnlLoan
//
this.pnlLoan.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.pnlLoan.Controls.Add(this.gridLoan);
this.pnlLoan.Dock = System.Windows.Forms.DockStyle.Top;
this.pnlLoan.Location = new System.Drawing.Point(212, 1507);
this.pnlLoan.Name = "pnlLoan";
this.pnlLoan.Size = new System.Drawing.Size(802, 74);
this.pnlLoan.TabIndex = 17;
this.pnlLoan.Visible = false;
//
// gridLoan
//
this.gridLoan.Cursor = System.Windows.Forms.Cursors.Default;
appearance34.FontData.BoldAsString = "True";
appearance34.TextHAlignAsString = "Left";
this.gridLoan.DisplayLayout.CaptionAppearance = appearance34;
this.gridLoan.DisplayLayout.GroupByBox.Hidden = true;
this.gridLoan.Dock = System.Windows.Forms.DockStyle.Fill;
this.gridLoan.Location = new System.Drawing.Point(0, 0);
this.gridLoan.Name = "gridLoan";
this.gridLoan.Size = new System.Drawing.Size(800, 72);
this.gridLoan.TabIndex = 4;
this.gridLoan.Text = "LT:WorkorderItem.Label.Loans";
this.gridLoan.AfterCellUpdate += new Infragistics.Win.UltraWinGrid.CellEventHandler(this.gridLoan_AfterCellUpdate);
this.gridLoan.InitializeLayout += new Infragistics.Win.UltraWinGrid.InitializeLayoutEventHandler(this.gridLoan_InitializeLayout);
this.gridLoan.InitializeRow += new Infragistics.Win.UltraWinGrid.InitializeRowEventHandler(this.gridLoan_InitializeRow);
this.gridLoan.AfterRowsDeleted += new System.EventHandler(this.gridLoan_AfterRowsDeleted);
this.gridLoan.ClickCellButton += new Infragistics.Win.UltraWinGrid.CellEventHandler(this.gridLoan_ClickCellButton);
this.gridLoan.BeforeAutoSizeEdit += new Infragistics.Win.UltraWinGrid.CancelableAutoSizeEditEventHandler(this.gridLoan_BeforeAutoSizeEdit);
this.gridLoan.BeforeRowInsert += new Infragistics.Win.UltraWinGrid.BeforeRowInsertEventHandler(this.gridLoan_BeforeRowInsert);
this.gridLoan.MouseEnterElement += new Infragistics.Win.UIElementEventHandler(this.gridLoan_MouseEnterElement);
//
// epWO
//
this.epWO.ContainerControl = this;
//
// tt
//
this.tt.ContainingControl = this;
this.tt.DisplayStyle = Infragistics.Win.ToolTipDisplayStyle.BalloonTip;
//
// _WorkorderForm_Toolbars_Dock_Area_Left
//
this._WorkorderForm_Toolbars_Dock_Area_Left.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
this._WorkorderForm_Toolbars_Dock_Area_Left.BackColor = System.Drawing.SystemColors.Control;
this._WorkorderForm_Toolbars_Dock_Area_Left.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Left;
this._WorkorderForm_Toolbars_Dock_Area_Left.ForeColor = System.Drawing.SystemColors.ControlText;
this._WorkorderForm_Toolbars_Dock_Area_Left.Location = new System.Drawing.Point(0, 129);
this._WorkorderForm_Toolbars_Dock_Area_Left.Name = "_WorkorderForm_Toolbars_Dock_Area_Left";
this._WorkorderForm_Toolbars_Dock_Area_Left.Size = new System.Drawing.Size(0, 895);
this._WorkorderForm_Toolbars_Dock_Area_Left.ToolbarsManager = this.tbManager;
//
// _WorkorderForm_Toolbars_Dock_Area_Right
//
this._WorkorderForm_Toolbars_Dock_Area_Right.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
this._WorkorderForm_Toolbars_Dock_Area_Right.BackColor = System.Drawing.SystemColors.Control;
this._WorkorderForm_Toolbars_Dock_Area_Right.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Right;
this._WorkorderForm_Toolbars_Dock_Area_Right.ForeColor = System.Drawing.SystemColors.ControlText;
this._WorkorderForm_Toolbars_Dock_Area_Right.Location = new System.Drawing.Point(1014, 129);
this._WorkorderForm_Toolbars_Dock_Area_Right.Name = "_WorkorderForm_Toolbars_Dock_Area_Right";
this._WorkorderForm_Toolbars_Dock_Area_Right.Size = new System.Drawing.Size(0, 895);
this._WorkorderForm_Toolbars_Dock_Area_Right.ToolbarsManager = this.tbManager;
//
// _WorkorderForm_Toolbars_Dock_Area_Top
//
this._WorkorderForm_Toolbars_Dock_Area_Top.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
this._WorkorderForm_Toolbars_Dock_Area_Top.BackColor = System.Drawing.SystemColors.Control;
this._WorkorderForm_Toolbars_Dock_Area_Top.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Top;
this._WorkorderForm_Toolbars_Dock_Area_Top.ForeColor = System.Drawing.SystemColors.ControlText;
this._WorkorderForm_Toolbars_Dock_Area_Top.Location = new System.Drawing.Point(0, 0);
this._WorkorderForm_Toolbars_Dock_Area_Top.Name = "_WorkorderForm_Toolbars_Dock_Area_Top";
this._WorkorderForm_Toolbars_Dock_Area_Top.Size = new System.Drawing.Size(1014, 129);
this._WorkorderForm_Toolbars_Dock_Area_Top.ToolbarsManager = this.tbManager;
//
// _WorkorderForm_Toolbars_Dock_Area_Bottom
//
this._WorkorderForm_Toolbars_Dock_Area_Bottom.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
this._WorkorderForm_Toolbars_Dock_Area_Bottom.BackColor = System.Drawing.SystemColors.Control;
this._WorkorderForm_Toolbars_Dock_Area_Bottom.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Bottom;
this._WorkorderForm_Toolbars_Dock_Area_Bottom.ForeColor = System.Drawing.SystemColors.ControlText;
this._WorkorderForm_Toolbars_Dock_Area_Bottom.Location = new System.Drawing.Point(0, 1024);
this._WorkorderForm_Toolbars_Dock_Area_Bottom.Name = "_WorkorderForm_Toolbars_Dock_Area_Bottom";
this._WorkorderForm_Toolbars_Dock_Area_Bottom.Size = new System.Drawing.Size(1014, 0);
this._WorkorderForm_Toolbars_Dock_Area_Bottom.ToolbarsManager = this.tbManager;
//
// tbManager
//
this.tbManager.DesignerFlags = 1;
this.tbManager.DockWithinContainer = this;
this.tbManager.DockWithinContainerBaseType = typeof(System.Windows.Forms.Form);
this.tbManager.SettingsKey = "WorkorderForm.tbManager";
this.tbManager.ShowFullMenusDelay = 500;
ultraToolbar1.DockedColumn = 0;
ultraToolbar1.DockedRow = 2;
ultraToolbar1.NonInheritedTools.AddRange(new Infragistics.Win.UltraWinToolbars.ToolBase[] {
popupMenuTool1,
buttonTool1,
buttonTool2,
buttonTool3,
buttonTool4,
buttonTool5,
buttonTool6,
buttonTool7,
buttonTool8,
buttonTool9,
buttonTool10,
buttonTool11,
buttonTool12});
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;
buttonTool19.InstanceProps.RecentlyUsed = false;
ultraToolbar2.NonInheritedTools.AddRange(new Infragistics.Win.UltraWinToolbars.ToolBase[] {
buttonTool13,
buttonTool14,
buttonTool15,
buttonTool16,
buttonTool17,
buttonTool18,
buttonTool19});
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[] {
buttonTool20});
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[] {
buttonTool21,
buttonTool22});
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[] {
buttonTool23});
ultraToolbar5.Text = "WorkorderItemTravelToolBar";
ultraToolbar6.DockedColumn = 0;
ultraToolbar6.DockedRow = 0;
ultraToolbar6.NonInheritedTools.AddRange(new Infragistics.Win.UltraWinToolbars.ToolBase[] {
buttonTool24});
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;
buttonTool25.SharedPropsInternal.AccessibleDescription = "recorddd";
appearance35.Image = global::AyaNova.Resource1.SaveExit32;
buttonTool25.SharedPropsInternal.AppearancesLarge.Appearance = appearance35;
appearance36.Image = global::AyaNova.Resource1.SaveExit16;
buttonTool25.SharedPropsInternal.AppearancesSmall.Appearance = appearance36;
buttonTool25.SharedPropsInternal.Caption = "LT:UI.Command.SaveClose";
appearance37.Image = global::AyaNova.Resource1.Documents32;
buttonTool26.SharedPropsInternal.AppearancesLarge.Appearance = appearance37;
appearance38.Image = global::AyaNova.Resource1.Documents16;
buttonTool26.SharedPropsInternal.AppearancesSmall.Appearance = appearance38;
buttonTool26.SharedPropsInternal.Caption = "LT:AssignedDoc.Label.List";
appearance39.Image = global::AyaNova.Resource1.RecordHistory32;
buttonTool27.SharedPropsInternal.AppearancesLarge.Appearance = appearance39;
appearance40.Image = global::AyaNova.Resource1.RecordHistory16;
buttonTool27.SharedPropsInternal.AppearancesSmall.Appearance = appearance40;
buttonTool27.SharedPropsInternal.Caption = "LT:UI.Command.RecordHistory";
buttonTool28.SharedPropsInternal.Caption = "LT:UI.Command.Save";
buttonTool28.SharedPropsInternal.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.TextOnlyAlways;
buttonTool29.SharedPropsInternal.Caption = "LT:UI.Command.Close";
buttonTool29.SharedPropsInternal.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.TextOnlyAlways;
appearance41.Image = global::AyaNova.Resource1.ClientNotes32;
buttonTool30.SharedPropsInternal.AppearancesLarge.Appearance = appearance41;
appearance42.Image = global::AyaNova.Resource1.ClientNotes16;
buttonTool30.SharedPropsInternal.AppearancesSmall.Appearance = appearance42;
buttonTool30.SharedPropsInternal.Caption = "LT:ClientNote.Label.List";
appearance43.Image = global::AyaNova.Resource1.Contract32;
buttonTool31.SharedPropsInternal.AppearancesLarge.Appearance = appearance43;
appearance44.Image = global::AyaNova.Resource1.Contract16;
buttonTool31.SharedPropsInternal.AppearancesSmall.Appearance = appearance44;
buttonTool31.SharedPropsInternal.Caption = "LT:O.Contract";
appearance45.Image = global::AyaNova.Resource1.Delete32;
buttonTool32.SharedPropsInternal.AppearancesLarge.Appearance = appearance45;
appearance46.Image = global::AyaNova.Resource1.Delete16;
buttonTool32.SharedPropsInternal.AppearancesSmall.Appearance = appearance46;
buttonTool32.SharedPropsInternal.Caption = "LT:UI.Command.Delete";
buttonTool33.SharedPropsInternal.Caption = "LT:UI.Command.CurrentDateAndTime";
buttonTool33.SharedPropsInternal.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.TextOnlyAlways;
appearance47.Image = global::AyaNova.Resource1.PartToUsed32;
buttonTool34.SharedPropsInternal.AppearancesLarge.Appearance = appearance47;
appearance48.Image = global::AyaNova.Resource1.PartToUsed16;
buttonTool34.SharedPropsInternal.AppearancesSmall.Appearance = appearance48;
buttonTool34.SharedPropsInternal.Caption = "LT:UI.Toolbar.WorkorderForm.SetAllPartsUsedInService";
buttonTool34.SharedPropsInternal.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.DefaultForToolType;
appearance49.Image = global::AyaNova.Resource1.WorkorderTypes32;
buttonTool35.SharedPropsInternal.AppearancesLarge.Appearance = appearance49;
appearance50.Image = global::AyaNova.Resource1.WorkorderTypes16;
buttonTool35.SharedPropsInternal.AppearancesSmall.Appearance = appearance50;
buttonTool35.SharedPropsInternal.Caption = "LT:WorkorderItemType.Label.List";
appearance51.Image = global::AyaNova.Resource1.WorkorderStatuses32;
buttonTool36.SharedPropsInternal.AppearancesLarge.Appearance = appearance51;
appearance52.Image = global::AyaNova.Resource1.WorkorderStatuses16;
buttonTool36.SharedPropsInternal.AppearancesSmall.Appearance = appearance52;
buttonTool36.SharedPropsInternal.Caption = "LT:WorkorderStatus.Label.List";
appearance53.Image = global::AyaNova.Resource1.Priorities32;
buttonTool37.SharedPropsInternal.AppearancesLarge.Appearance = appearance53;
appearance54.Image = global::AyaNova.Resource1.Priorities16;
buttonTool37.SharedPropsInternal.AppearancesSmall.Appearance = appearance54;
buttonTool37.SharedPropsInternal.Caption = "LT:Priority.Label.List";
appearance55.Image = global::AyaNova.Resource1.Rates32;
buttonTool38.SharedPropsInternal.AppearancesLarge.Appearance = appearance55;
appearance56.Image = global::AyaNova.Resource1.Rates16;
buttonTool38.SharedPropsInternal.AppearancesSmall.Appearance = appearance56;
buttonTool38.SharedPropsInternal.Caption = "LT:Rate.Label.List";
appearance57.Image = global::AyaNova.Resource1.WOItemMove32;
buttonTool39.SharedPropsInternal.AppearancesLarge.Appearance = appearance57;
appearance58.Image = global::AyaNova.Resource1.WOItemMove16;
buttonTool39.SharedPropsInternal.AppearancesSmall.Appearance = appearance58;
buttonTool39.SharedPropsInternal.Caption = "LT:Workorder.Label.Command.MoveWorkorderItem";
appearance59.Image = global::AyaNova.Resource1.UnitMeterReading32;
buttonTool40.SharedPropsInternal.AppearancesLarge.Appearance = appearance59;
appearance60.Image = global::AyaNova.Resource1.UnitMeterReading16;
buttonTool40.SharedPropsInternal.AppearancesSmall.Appearance = appearance60;
buttonTool40.SharedPropsInternal.Caption = "LT:UnitMeterReading.Label.List";
appearance61.Image = global::AyaNova.Resource1.ConvertScheduledUserToLabor32;
buttonTool41.SharedPropsInternal.AppearancesLarge.Appearance = appearance61;
appearance62.Image = global::AyaNova.Resource1.ConvertScheduledUserToLabor16;
buttonTool41.SharedPropsInternal.AppearancesSmall.Appearance = appearance62;
buttonTool41.SharedPropsInternal.Caption = "LT:Workorder.Label.Command.ConvertScheduledUserToLabor";
appearance63.Image = global::AyaNova.Resource1.WOItemCopy32;
buttonTool42.SharedPropsInternal.AppearancesLarge.Appearance = appearance63;
appearance64.Image = global::AyaNova.Resource1.WOItemCopy16;
buttonTool42.SharedPropsInternal.AppearancesSmall.Appearance = appearance64;
buttonTool42.SharedPropsInternal.Caption = "LT:Workorder.Label.Command.CopyWorkorderItem";
appearance65.Image = global::AyaNova.Resource1.Print32;
popupMenuTool2.SharedPropsInternal.AppearancesLarge.Appearance = appearance65;
appearance66.Image = global::AyaNova.Resource1.Print16;
popupMenuTool2.SharedPropsInternal.AppearancesSmall.Appearance = appearance66;
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";
appearance67.Image = global::AyaNova.Resource1.FollowUp32;
buttonTool43.SharedPropsInternal.AppearancesLarge.Appearance = appearance67;
appearance68.Image = global::AyaNova.Resource1.FollowUp16;
buttonTool43.SharedPropsInternal.AppearancesSmall.Appearance = appearance68;
buttonTool43.SharedPropsInternal.Caption = "LT:ScheduleMarker.Label.FollowUp";
buttonTool43.SharedPropsInternal.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageOnlyOnToolbars;
appearance69.Image = global::AyaNova.Resource1.Wiki32;
buttonTool44.SharedPropsInternal.AppearancesLarge.Appearance = appearance69;
appearance70.Image = global::AyaNova.Resource1.Wiki16;
buttonTool44.SharedPropsInternal.AppearancesSmall.Appearance = appearance70;
buttonTool44.SharedPropsInternal.Caption = "LT:O.WikiPage";
appearance71.Image = global::AyaNova.Resource1.GenerateUnit32;
buttonTool45.SharedPropsInternal.AppearancesLarge.Appearance = appearance71;
appearance72.Image = global::AyaNova.Resource1.GenerateUnit16;
buttonTool45.SharedPropsInternal.AppearancesSmall.Appearance = appearance72;
buttonTool45.SharedPropsInternal.Caption = "LT:Workorder.Label.GenerateUnit";
buttonTool46.SharedPropsInternal.Caption = "LT:UI.ToolBar.Customize";
buttonTool46.SharedPropsInternal.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.TextOnlyAlways;
this.tbManager.Tools.AddRange(new Infragistics.Win.UltraWinToolbars.ToolBase[] {
buttonTool25,
buttonTool26,
buttonTool27,
buttonTool28,
buttonTool29,
buttonTool30,
buttonTool31,
buttonTool32,
buttonTool33,
buttonTool34,
buttonTool35,
buttonTool36,
buttonTool37,
buttonTool38,
buttonTool39,
buttonTool40,
buttonTool41,
buttonTool42,
popupMenuTool2,
listTool2,
buttonTool43,
buttonTool44,
buttonTool45,
buttonTool46});
this.tbManager.UseLargeImagesOnToolbar = true;
this.tbManager.ToolClick += new Infragistics.Win.UltraWinToolbars.ToolClickEventHandler(this.tbManager_ToolClick);
//
// WorkorderForm
//
this.AllowDrop = true;
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
this.AutoScroll = true;
this.ClientSize = new System.Drawing.Size(1014, 1024);
this.Controls.Add(this.WorkorderForm_Fill_Panel);
this.Controls.Add(this._WorkorderForm_Toolbars_Dock_Area_Left);
this.Controls.Add(this._WorkorderForm_Toolbars_Dock_Area_Right);
this.Controls.Add(this._WorkorderForm_Toolbars_Dock_Area_Bottom);
this.Controls.Add(this._WorkorderForm_Toolbars_Dock_Area_Top);
this.helpProvider1.SetHelpKeyword(this, "");
this.helpProvider1.SetHelpNavigator(this, System.Windows.Forms.HelpNavigator.Topic);
this.MinimumSize = new System.Drawing.Size(614, 591);
this.Name = "WorkorderForm";
this.helpProvider1.SetShowHelp(this, true);
this.Closing += new System.ComponentModel.CancelEventHandler(this.WorkorderForm_Closing);
this.Load += new System.EventHandler(this.WorkorderForm_Load);
this.SizeChanged += new System.EventHandler(this.WorkorderForm_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.cbProjectID)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.cbWorkorderCategoryID)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.edSummary)).EndInit();
this.pnlHeaderLeft.ResumeLayout(false);
this.pnlHeaderLeft.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.ckTemplateFreshPrice)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.edTemplateDescription)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.cbRegion)).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.edInvoiceNumber)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.dtServiceDate)).EndInit();
this.pnlServiceLeft.ResumeLayout(false);
this.pnlServiceLeft.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.dtCloseByDate)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.cbWorkorderStatusID)).EndInit();
this.pnlQuote.ResumeLayout(false);
this.pnlQuoteRight.ResumeLayout(false);
this.pnlQuoteRight.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.dtQuoteRequestDate)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.dtValidUntilDate)).EndInit();
this.pnlQuoteMiddle.ResumeLayout(false);
this.pnlQuoteMiddle.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.dtDateSubmitted)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.dtDateApproved)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.cbWorkorderQuoteStatusID)).EndInit();
this.pnlQuoteLeft.ResumeLayout(false);
this.pnlQuoteLeft.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.cbPreparedByID)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.edIntroduction)).EndInit();
this.pnlPM.ResumeLayout(false);
this.pnlPMRight.ResumeLayout(false);
this.pnlPMRight.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.cbPMWorkorderStatusID)).EndInit();
this.pnlPMMiddle.ResumeLayout(false);
this.pnlPMMiddle.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.dtPMStopGeneratingDate)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.dtPMNextServiceDate)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.cbPMDayOfTheWeek)).EndInit();
this.pnlPMLeft.ResumeLayout(false);
this.pnlPMLeft.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.ckPMActive)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.cbPMThresholdSpanUnit)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.edPMThresholdSpan)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.cbPMGenerateSpanUnit)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.edPMGenerateSpan)).EndInit();
this.pnlItem.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.gridWorkorderItems)).EndInit();
this.pnlLabour.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.gridLabor)).EndInit();
this.pnlParts.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.gridPartRequests)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.gridParts)).EndInit();
this.pnlWoItemPartGridControlPanel.ResumeLayout(false);
this.pnlWoItemPartGridControlPanel.PerformLayout();
this.pnlExpense.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.gridExpense)).EndInit();
this.pnlOutsideService.ResumeLayout(false);
this.pnlOutsideServiceRight.ResumeLayout(false);
this.pnlOutsideServiceRight.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.dtWorkorderItemOutsideServiceDateReturned)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.dtWorkorderItemOutsideServiceDateETA)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.dtWorkorderItemOutsideServiceDateSent)).EndInit();
this.pnlOutsideServiceCenter.ResumeLayout(false);
this.pnlOutsideServiceCenter.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.edWorkorderItemOutsideServiceShippingPrice)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.edWorkorderItemOutsideServiceShippingCost)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.edWorkorderItemOutsideServiceTrackingNumber)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.cbWorkorderItemOutsideServiceVendorSentViaID)).EndInit();
this.pnlOutsideServiceLeft.ResumeLayout(false);
this.pnlOutsideServiceLeft.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.edWorkorderItemOutsideServiceRepairPrice)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.edWorkorderItemOutsideServiceRepairCost)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.edWorkorderItemOutsideServiceRMANumber)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.cbWorkorderItemOutsideServiceVendorSentToID)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.edWorkorderItemOutsideServiceNotes)).EndInit();
this.pnlScheduledUser.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.gridScheduledUsers)).EndInit();
this.pnlTask.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.gridTasks)).EndInit();
this.pnlTaskTop.ResumeLayout(false);
this.pnlTaskTop.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.cbWorkorderItemTasks)).EndInit();
this.pnlTravel.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.gridTravel)).EndInit();
this.pnlUnit.ResumeLayout(false);
this.pnlUnit.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.edWarrantyInfo)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.cbWorkorderItemUnitServiceTypeID)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.cbWorkorderItemUnitID)).EndInit();
this.pnlNavigation.ResumeLayout(false);
this.pnlWorkorderItemCustomFields.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.gridCustom)).EndInit();
this.WorkorderForm_Fill_Panel.ResumeLayout(false);
this.pnlLoan.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.gridLoan)).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();
/// <summary>
/// Used to track whether the close was done by the program
/// or done by the user clicking on the upper left corner X control
/// </summary>
bool bClosingHandled = false;
//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;
private ControlContainerEditor ccGridDateTimeEditor = null;
#endregion
#region Form load and close
private bool bLoading = true;
private bool bSuspendAppIdleHandler = false;
private bool bShowCustomFields = false;
private string mHideControlsFormName = "";
#region Loading
private void WorkorderForm_Load(object sender, System.EventArgs e)
{
//
// helpProvider1
//
this.helpProvider1.HelpNamespace = Util.BaseHelpUrl + "the_order_header.htm";
//case 1039 //log.Debug("WorkorderForm_Load");
Cursor.Current = Cursors.WaitCursor;
this.Visible = false;
if (AyaBizUtils.Lite)
{
//should never be here if it's lite, this is for testing and development more than anything else
MessageBox.Show("Error: Full Workorder form can not be used with AyaNova LITE.\r\nThis is a bug, report to AyaNova Support.");
this.Close();
return;
}
//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;
}
//Get contract and bankable status of client / head office
mWorkorderBankableObject = mWorkorder.BankableResolved();
//mContract=mWorkorder.ContractResolved();
//--------------------------------------
//Set date and time editor to format used by
//this locale
//this date and time editor is re-used in all the grids
//on this form
ccGridDateTimeEditor = new ControlContainerEditor();
ccGridDateTimeEditor.EditingControl = GridCalendar;
//ccGridDateTimeEditor.RenderingControl = GridCalendar;
//DateTimeEditor editor = this.GridCalendar.Editor as DateTimeEditor;
//this.GridCalendar.MaskInput = Util.LocaleDateTimeMask();
//dtServiceDate.MaskInput = Util.LocaleDateTimeMask();
//dtDateApproved.MaskInput = Util.LocaleDateTimeMask();
//dtDateSubmitted.MaskInput = Util.LocaleDateTimeMask();
//dtValidUntilDate.MaskInput = Util.LocaleDateTimeMask();
//dtQuoteRequestDate.MaskInput = Util.LocaleDateTimeMask();
//dtWorkorderItemOutsideServiceDateSent.MaskInput = Util.LocaleDateTimeMask();
//dtWorkorderItemOutsideServiceDateETA.MaskInput = Util.LocaleDateTimeMask();
//dtWorkorderItemOutsideServiceDateReturned.MaskInput = Util.LocaleDateTimeMask();
//dtCloseByDate.MaskInput = Util.LocaleDateTimeMask();
//dtPMNextServiceDate.MaskInput = Util.LocaleDateTimeMask();
//dtPMStopGeneratingDate.MaskInput = Util.LocaleDateTimeMask();
//-------------------------------------------
if (mWorkorder.WorkorderItems.Count > 0)
mCurrentWorkorderItem = mWorkorder.WorkorderItems[0];
else
mCurrentWorkorderItem = null;
LoadReadOnlyLists();
int Split1 = 0;
Util.LoadFormCustomization("WorkorderInfo", 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;
}
}
SetViewButtonToolTips();
bLoading = false;
NavButtonHop();
InitializeComboBoxes();
DataBind();
InitializeGrid();
//Initial panel to show
//todo: replace this with appropriate selection code
ShowPanel(pnlUnit);
Cursor.Current = Cursors.Default;
HideAllChildToolBars();
RestrictUI();
//case 1194
mHideControlsFormName = this.Name + "[" + this.mWorkorder.WorkorderType.ToString() + "]";
if (Util.GlobalSettings.HiddenControls.Count > 0)
{
HideSelectedControls(mHideControlsFormName, this);
}
this.Visible = true;
//Adjust display to show
//all of the workorder item or 1/4 the
//form height, whichever is smaller
SizeWorkorderItemsArea();
//Take user directly to preselected item if applicable
GoToSelectedItem();
WorkorderForm_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);
//case 2108
pnlWoItemPartGridControlPanel.BackColor = Color.Honeydew;
Application.Idle += new EventHandler(Application_Idle);
}
#endregion loading
#region HideFields
private bool bDesignMode = false;
System.Collections.Generic.List<Button> btnList = null;
/// <summary>
/// Turn on or off design mode
/// </summary>
/// <param name="bGoToDesignMode"></param>
private void SetDesignMode(bool bGoToDesignMode)
{
if (bGoToDesignMode)
{
btnList = new System.Collections.Generic.List<Button>();
}
FormDesignMode(this, bGoToDesignMode);
bDesignMode = bGoToDesignMode;
if (bGoToDesignMode)
foreach (Button b in btnList)
b.BringToFront();
else
{
foreach (Button b in btnList)
{
b.Parent.Controls.Remove(b);
b.Dispose();
}
btnList.Clear();
//coming out of design, hide hidden controls again
HideSelectedControls(mHideControlsFormName, this);
//Hide controls that are normally hidden through business logic
//but were re-shown as a result of customization
RestrictUI();
if (Util.GlobalSettings.IsSavable)
{
while (Util.GlobalSettings.IsEditing)
Util.GlobalSettings.ApplyEdit();
Util.GlobalSettings = (Global)Util.GlobalSettings.Save();
}
}
}
static private void fdSetAppearance(AppearanceBase b, bool bReset, bool bVisible)
{
if (bReset)
{
b.ResetBackColor();
b.ResetBackColor2();
b.ResetBackHatchStyle();
return;
}
//set style for control that was visible
if (bVisible)
{
b.ResetBackColor2();
b.ResetBackHatchStyle();
b.BackColor = Color.LightGreen;
return;
}
else
{
//set style for invisible control
b.ResetBackColor();
b.BackColor2 = Color.LightSalmon;
b.BackHatchStyle = BackHatchStyle.LargeCheckerBoard;
}
}
#region set display mode for each control type
private void SetDisplayMode(Control c, bool bGoToDesignMode, bool bVisible)
{
if (c is Infragistics.Win.Misc.UltraLabel)
{
fdSetAppearance(((Infragistics.Win.Misc.UltraLabel)c).Appearance, !bGoToDesignMode, bVisible);
c.Visible = true;
}
if (c is GZTW.WinForm.Controls.GZUltraComboEditor)
{
fdSetAppearance(((GZTW.WinForm.Controls.GZUltraComboEditor)c).Appearance, !bGoToDesignMode, bVisible);
c.Visible = true;
}
if (c is GZTW.WinForm.Controls.GZDateTimePicker)
{
fdSetAppearance(((GZTW.WinForm.Controls.GZDateTimePicker)c).Appearance, !bGoToDesignMode, bVisible);
c.Visible = true;
}
if (c is Infragistics.Win.Misc.UltraButton)
{
fdSetAppearance(((Infragistics.Win.Misc.UltraButton)c).Appearance, !bGoToDesignMode, bVisible);
c.Visible = true;
}
if (c is Infragistics.Win.UltraWinEditors.UltraCheckEditor)
{
fdSetAppearance(((Infragistics.Win.UltraWinEditors.UltraCheckEditor)c).Appearance, !bGoToDesignMode, bVisible);
c.Visible = true;
}
if (c is Infragistics.Win.UltraWinEditors.UltraTextEditor)
{
fdSetAppearance(((Infragistics.Win.UltraWinEditors.UltraTextEditor)c).Appearance, !bGoToDesignMode, bVisible);
c.Visible = true;
}
if (c is Infragistics.Win.Misc.UltraDropDownButton)
{
fdSetAppearance(((Infragistics.Win.Misc.UltraDropDownButton)c).Appearance, !bGoToDesignMode, bVisible);
c.Visible = true;
}
if (c is Infragistics.Win.UltraWinGrid.UltraGrid)
{
return;
}
if (c is Infragistics.Win.UltraWinTabControl.UltraTabControl)
{
fdSetAppearance(((Infragistics.Win.UltraWinTabControl.UltraTabControl)c).Appearance, !bGoToDesignMode, bVisible);
c.Visible = true;
//isn't this redundant as the foreach loop below ill catch it anyway
//foreach (Infragistics.Win.UltraWinTabControl.UltraTab ut in ((Infragistics.Win.UltraWinTabControl.UltraTabControl)c).Tabs)
//{
// Localize(ut);
//}
}
}
#endregion
/// <summary>
/// Modify UI elements to go into or out of design mode
///
/// </summary>
private void FormDesignMode(Control c, bool bGoToDesignMode)
{
//deal with controls that are not hideable
if (c.Tag == null || !c.Tag.ToString().StartsWith("`"))
{
//process any contained controls then bail
foreach (Control c2 in c.Controls)
FormDesignMode(c2, bGoToDesignMode);
return;
}
bool bCWasVisible = c.Visible;
SetDisplayMode(c, bGoToDesignMode, c.Visible);
if (bGoToDesignMode)
{
Button b = new Button();
b.Click += new EventHandler(btnCustomize_Click);
b.Tag = c;
b.Location = c.Location;
b.Size = new Size(10, 20);
if (bCWasVisible)
{
b.BackColor = Color.Green;
}
else
{
b.BackColor = Color.Red;
}
c.Parent.Controls.Add(b);
btnList.Add(b);
}
//Loop through the controls
foreach (Control c2 in c.Controls)
FormDesignMode(c2, bGoToDesignMode);
}
private void btnCustomize_Click(object sender, System.EventArgs e)
{
Button b = sender as Button;
Control c = b.Tag as Control;
string sHiddenTag = mHideControlsFormName + ":" + c.Name;
//flip current state
bool bWasVisible = b.BackColor == Color.Green;
if (bWasVisible)
{
b.BackColor = Color.Red;
//now hidden, add to list
Util.GlobalSettings.AddHiddenControl(sHiddenTag);
}
else
{
b.BackColor = Color.Green;
Util.GlobalSettings.RemoveHiddenControl(sHiddenTag);
}
SetDisplayMode(c, true, !bWasVisible);
}
//case 1194
/// <summary>
/// Scan every control contained within passed in control (form)
/// if on hiddencontrols list of global object then hide
/// </summary>
/// <param name="c"></param>
private static void HideSelectedControls(string sFormName, Control c)
{
//deal with controls that are hideable only.
//this is to stop people from using the api to hide controls that would normally
//be unhideable due to necessity
if (c.Tag != null && c.Tag.ToString().StartsWith("`"))
{
string sHiddenTag = sFormName + ":" + c.Name;
if (Util.GlobalSettings.HiddenControls.Contains(sHiddenTag))
c.Visible = false;
}
foreach (Control c2 in c.Controls)
HideSelectedControls(sFormName, c2);
}
#endregion
#region closing
private void WorkorderForm_Closing(object sender, System.ComponentModel.CancelEventArgs e)
{
//case 1039 //log.Debug("WorkorderForm_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("WorkorderInfo", this, tbManager, false, splitter1.SplitPosition);
}
/// <summary>
/// Save the user's pref's for grid layouts
/// </summary>
private void SaveGridLayouts()
{
//case 1039 //log.Debug("SaveGridLayouts");
Util.SaveGridLayout("WorkorderItems" + (mWorkorder.IsTemplate ? "Template" : ""), "", "", gridWorkorderItems);
if (this.bExpenseGridIntialized)
Util.SaveGridLayout("WorkorderItemExpense", "", "", gridExpense);
if (this.bLoanGridIntialized)
Util.SaveGridLayout("WorkorderItemLoan", "", "", gridLoan);
if (this.bLaborGridIntialized)
Util.SaveGridLayout("WorkorderItemLabor", "", "", gridLabor);
if (this.bPartsGridIntialized)
Util.SaveGridLayout("WorkorderItemParts", "", "", gridParts);
if (this.bPartRequestsGridIntialized)
Util.SaveGridLayout("WorkorderItemPartRequests", "", "", gridPartRequests);
if (this.bScheduledUsersGridIntialized)
Util.SaveGridLayout("WorkorderItemScheduledUsers", "", "", gridScheduledUsers);
if (this.bTasksGridIntialized)
Util.SaveGridLayout("WorkorderItemTasks", "", "", gridTasks);
if (this.bTravelGridIntialized)
Util.SaveGridLayout("WorkorderItemTravel", "", "", gridTravel);
}
#endregion form closing
#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;
//case 2082
private System.Collections.Generic.List<Guid> mValidWarehouseIdList;
/// <summary>
///
/// </summary>
private void LoadReadOnlyLists()
{
//case 1039 //log.Debug("LoadReadOnlyLists");
mPriorityList = PriorityPickList.GetList();
mClientUnitList = UnitPickList.GetListByClient(mWorkorder.ClientID);
if (mWorkorder.IsTemplate)
mRateList = RatePickList.GetListAllActiveRates();
else
{
if (mWorkorder.ContractResolved() == null)
mRateList = RatePickList.GetList(true);
else
mRateList = RatePickList.GetListWithContract(mWorkorder.ContractIDResolved());
}
//case 1160 - this is redundant, the part list is loaded on demand when required
//mPartList=PartPickList.GetAllParts();
mUserList = UserListScheduleable.GetList();
mAllUsers = UserPickList.GetList(false);//case 58 not regional
mTaxList = TaxCodeList.GetList(mWorkorder.ListOfTaxCodesSelected());
mVendors = VendorPickList.GetList();
mTaskList = TaskPickList.GetList();
mLoanItemList = LoanItemPickList.GetList(true);
//Case 640
mWarehouseList = PartWarehousePickList.GetActiveOnlyListWithExceptions(mWorkorder.ListOfPartWarehousesSelected());
//case 1121
mTypeList = WorkorderItemTypePickList.GetList();
//case 2082
mValidWarehouseIdList = PartWarehouse.UserValidWarehouseIdList(User.CurrentThreadUserID, Guid.Empty);
}
#endregion
#region Form sizing and view button setup related
private void WorkorderForm_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("WorkorderForm_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;
//case 3179 top panels a little short while doing this
//this.pnlHeader.Height = 106;
//this.pnlService.Height = 66;
//this.pnlQuote.Height = 114;
int nFootRoom = 16;
this.pnlHeader.Height = 120 + nFootRoom;
this.pnlService.Height = 66 + nFootRoom;
this.pnlQuote.Height = 114 + nFootRoom;
//****************************************
//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();
//Resize active child panel
if (ActivePanel != null)
{
//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
ActivePanel.Height = pnlNavigation.Height;
}
}
/// <summary>
/// Optimally size the workorder items area
/// giving maximum room to child area beneath it
/// </summary>
private void SizeWorkorderItemsArea()
{
if (this.gridWorkorderItems.Visible == true && this.gridWorkorderItems.Rows.Count > 0)
{
//case 3179
int nFootRoom = 16;
//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 + nFootRoom;
//gridWorkorderItems.Text="WorkroderItemPanelHeight=" + nCalcHeight.ToString() + " / Totaldisplayheight=" + this.DisplayRectangle.Height.ToString();
//ScrollTemplateRowIntoView();
}
}
private void pnlNavigation_SizeChanged(object sender, System.EventArgs e)
{
if (this.WindowState == FormWindowState.Minimized) return;
if (!bLoading)
NavButtonHop();
}
/// <summary>
/// case 918
/// </summary>
/// <param name="sImage"></param>
/// <param name="nSize"></param>
/// <param name="bIncomplete"></param>
/// <returns></returns>
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);
}
/// <summary>
/// Move and resize and draw icons on navigation buttons
/// according to their container panel's size
/// </summary>
private void NavButtonHop()
{
//case 1039 //log.Debug("NavButtonHop");
//Disable certain buttons if not a service workorder
btnViewLoans.Visible = mWorkorder.IsServiceWorkorder;
btnViewExpenses.Visible = mWorkorder.IsServiceWorkorder;
btnViewOutsideService.Visible = mWorkorder.IsServiceWorkorder;
//case 1317
if (AyaBizUtils.Right(RootObjectTypes.WorkorderItemLabor) < (int)SecurityLevelTypes.ReadOnly)
btnViewLabors.Visible = false;
if (AyaBizUtils.Right(RootObjectTypes.WorkorderItemUnit) < (int)SecurityLevelTypes.ReadOnly)
{
this.pnlUnit.Visible = false;
btnViewUnit.Visible = false;
}
if ((AyaBizUtils.Right(RootObjectTypes.WorkorderItemPart) < (int)SecurityLevelTypes.ReadOnly))
btnViewParts.Visible = false;
if (AyaBizUtils.Right(RootObjectTypes.WorkorderItemTravel) < (int)SecurityLevelTypes.ReadOnly)
btnViewTravels.Visible = false;
if (AyaBizUtils.Right(RootObjectTypes.WorkorderItemScheduledUser) < (int)SecurityLevelTypes.ReadOnly)
btnViewScheduledUsers.Visible = false;
if (AyaBizUtils.Right(RootObjectTypes.WorkorderItemTask) < (int)SecurityLevelTypes.ReadOnly)
btnViewTasks.Visible = false;
if (AyaBizUtils.Right(RootObjectTypes.WorkorderItemMiscExpense) < (int)SecurityLevelTypes.ReadOnly)
btnViewExpenses.Visible = false;
if (AyaBizUtils.Right(RootObjectTypes.WorkorderItemLoan) < (int)SecurityLevelTypes.ReadOnly)
btnViewLoans.Visible = false;
if (AyaBizUtils.Right(RootObjectTypes.WorkorderItemOutsideService) < (int)SecurityLevelTypes.ReadOnly)
btnViewOutsideService.Visible = false;
int VisibleButtonCount = 0;
foreach (Control c in pnlNavigation.Controls)
{
if (c.Visible) VisibleButtonCount++;
}
if (VisibleButtonCount < 1) return;
int nHeight = 0;
nHeight = pnlNavigation.Height / VisibleButtonCount;
int nWidth = pnlNavigation.Width - 2;
//Buttons don't allow their full height to be used for
//the icon so it get's cut off unless the image is shrinked down
//8 seems to be the magic number
int nShrinkFactor = 8;
//Set the image size to draw at...
System.Drawing.Size sizeImage = new Size(nHeight - nShrinkFactor, nHeight - nShrinkFactor);
//Don't attempt to draw or size below 1
//or there will be a crash
if (sizeImage.Height < 1 || sizeImage.Width < 1 || nWidth < 1 || nHeight < 1)
return;
//Don't allow the images to get overly large or they will look bad:
int nMaxImageSize = 40;
if (sizeImage.Width > nMaxImageSize)
{
sizeImage.Height = nMaxImageSize;
sizeImage.Width = nMaxImageSize;
}
//select the raw image that most closely matches the drawing size to minimize distortion...
int nSize = 16;
if (nHeight > 23 && nHeight < 32)
{ nSize = 24; }
if (nHeight > 32)
{ nSize = 32; }
//Get the button image from the assembly and optionally draw it as incomplete
//if that part of the business object has not yet been filled in yet by user
bool bWoItemIsNull = mCurrentWorkorderItem == null;
if (btnViewLabors.Visible)
btnViewLabors.Appearance.Image = NavButtonImage("WorkorderLabor", nSize, (bWoItemIsNull || !mCurrentWorkorderItem.HasLabor));
if (btnViewUnit.Visible)
btnViewUnit.Appearance.Image = NavButtonImage("Unit", nSize, (bWoItemIsNull || !mCurrentWorkorderItem.HasUnit));
if (btnViewParts.Visible)
btnViewParts.Appearance.Image = NavButtonImage("Part", nSize, (bWoItemIsNull || !mCurrentWorkorderItem.HasParts));
if (btnViewTravels.Visible)
btnViewTravels.Appearance.Image = NavButtonImage("WorkorderTravel", nSize, (bWoItemIsNull || !mCurrentWorkorderItem.HasTravel));
if (btnViewScheduledUsers.Visible)
btnViewScheduledUsers.Appearance.Image = NavButtonImage("WorkorderScheduled", nSize, (bWoItemIsNull || !mCurrentWorkorderItem.HasScheduledUsers));
if (btnViewTasks.Visible)
btnViewTasks.Appearance.Image = NavButtonImage("WorkorderTask", nSize, (bWoItemIsNull || !mCurrentWorkorderItem.HasTasks));
if (mWorkorder.IsServiceWorkorder || mWorkorder.IsServiceTemplateWorkorder)
{
btnViewExpenses.Appearance.Image = NavButtonImage("WorkorderExpenses", nSize, (bWoItemIsNull || !mCurrentWorkorderItem.HasExpenses));
btnViewLoans.Appearance.Image = NavButtonImage("WorkorderLoanItem", nSize, (bWoItemIsNull || !mCurrentWorkorderItem.HasLoans));
btnViewOutsideService.Appearance.Image = NavButtonImage("WorkorderOutside", nSize, (bWoItemIsNull || !mCurrentWorkorderItem.HasOutsideService));
}
if (bShowCustomFields)
btnViewCustomFields.Appearance.Image = NavButtonImage("WorkorderCustom", nSize, (bWoItemIsNull));
//Set image drawn size for button...
btnViewLabors.ImageSize = sizeImage;
btnViewUnit.ImageSize = sizeImage;
btnViewParts.ImageSize = sizeImage;
btnViewTravels.ImageSize = sizeImage;
btnViewScheduledUsers.ImageSize = sizeImage;
btnViewTasks.ImageSize = sizeImage;
if (mWorkorder.IsServiceWorkorder || mWorkorder.IsServiceTemplateWorkorder)
{
btnViewExpenses.ImageSize = sizeImage;
btnViewLoans.ImageSize = sizeImage;
btnViewOutsideService.ImageSize = sizeImage;
}
if (bShowCustomFields)
btnViewCustomFields.ImageSize = sizeImage;
//Now set the button's physical dimensions...
btnViewLabors.Width = nWidth;
btnViewUnit.Width = nWidth;
btnViewParts.Width = nWidth;
btnViewTravels.Width = nWidth;
btnViewScheduledUsers.Width = nWidth;
btnViewTasks.Width = nWidth;
if (mWorkorder.IsServiceWorkorder || mWorkorder.IsServiceTemplateWorkorder)
{
btnViewExpenses.Width = nWidth;
btnViewLoans.Width = nWidth;
btnViewOutsideService.Width = nWidth;
}
if (bShowCustomFields)
btnViewCustomFields.Width = nWidth;
btnViewLabors.Height = nHeight;
btnViewUnit.Height = nHeight;
btnViewParts.Height = nHeight;
btnViewTravels.Height = nHeight;
btnViewScheduledUsers.Height = nHeight;
btnViewTasks.Height = nHeight;
if (mWorkorder.IsServiceWorkorder || mWorkorder.IsServiceTemplateWorkorder)
{
btnViewExpenses.Height = nHeight;
btnViewLoans.Height = nHeight;
btnViewOutsideService.Height = nHeight;
}
if (bShowCustomFields)
btnViewCustomFields.Height = nHeight;
//This sets the display order!!!
//careful...
int nTop = 0 - nHeight;
if (btnViewUnit.Visible)
{
nTop += nHeight;
btnViewUnit.Top = nTop;
}
if (btnViewScheduledUsers.Visible)
{
nTop += nHeight;
btnViewScheduledUsers.Top = nTop;
}
if (btnViewTasks.Visible)
{
nTop += nHeight;
btnViewTasks.Top = nTop;
}
if (btnViewParts.Visible)
{
nTop += nHeight;
btnViewParts.Top = nTop;
}
if (btnViewLabors.Visible)
{
nTop += nHeight;
btnViewLabors.Top = nTop;
}
if (btnViewTravels.Visible)
{
nTop += nHeight;
btnViewTravels.Top = nTop;
}
if (mWorkorder.IsServiceWorkorder)
{
if (btnViewExpenses.Visible)
{
nTop += nHeight;
btnViewExpenses.Top = nTop;
}
if (btnViewLoans.Visible)
{
nTop += nHeight;
btnViewLoans.Top = nTop;
}
if (btnViewOutsideService.Visible)
{
nTop += nHeight;
btnViewOutsideService.Top = nTop;
}
}
if (bShowCustomFields)
{
nTop += nHeight;
btnViewCustomFields.Top = nTop;
}
}
/// <summary>
/// Called after localize to set tooltips on view change
/// buttons to the buttons text.
///
/// This is because the user can shrink the width of the view buttons
/// to a size that hides the text and only shows the icon, this way they
/// will still see the text in a tooltip
/// </summary>
private void SetViewButtonToolTips()
{
//case 1039 //log.Debug("SetViewButtonToolTips");
//Case 43 - since added balloon tooltip anyway
//changed this code to use the balloon tooltip and removed the
//standard windows.forms one
tt.GetUltraToolTip(btnViewLabors).ToolTipText = btnViewLabors.Text;
tt.GetUltraToolTip(btnViewUnit).ToolTipText = btnViewUnit.Text;
tt.GetUltraToolTip(btnViewParts).ToolTipText = btnViewParts.Text;
tt.GetUltraToolTip(btnViewTravels).ToolTipText = btnViewTravels.Text;
tt.GetUltraToolTip(btnViewScheduledUsers).ToolTipText = btnViewScheduledUsers.Text;
tt.GetUltraToolTip(btnViewTasks).ToolTipText = btnViewTasks.Text;
tt.GetUltraToolTip(btnViewExpenses).ToolTipText = btnViewExpenses.Text;
tt.GetUltraToolTip(btnViewLoans).ToolTipText = btnViewLoans.Text;
tt.GetUltraToolTip(btnViewOutsideService).ToolTipText = btnViewOutsideService.Text;
if (bShowCustomFields)
tt.GetUltraToolTip(btnViewCustomFields).ToolTipText = btnViewCustomFields.Text;
}
#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;
}
private void btnViewLabors_Click(object sender, System.EventArgs e)
{
//case 1039 //log.Debug("btnViewLabors_Click");
ShowPanel(pnlLabour);
//gridEnterEditMode(gridLabor);
}
private void btnViewUnit_Click(object sender, System.EventArgs e)
{
//case 1039 //log.Debug("btnViewUnit_Click");
ShowPanel(pnlUnit);
//cbWorkorderItemUnitServiceTypeID.Focus();
}
private void btnViewParts_Click(object sender, System.EventArgs e)
{
//case 1039 //log.Debug("btnViewParts_Click");
if (!bPartsFetched)
FetchParts();
ShowPanel(pnlParts);
//gridEnterEditMode(gridParts);
}
private void btnViewTravels_Click(object sender, System.EventArgs e)
{
//case 1039 //log.Debug("btnViewTravels_Click");
ShowPanel(pnlTravel);
//gridEnterEditMode(gridTravel);
}
private void btnViewScheduledUsers_Click(object sender, System.EventArgs e)
{
//case 1039 //log.Debug("btnViewScheduledUsers_Click");
ShowPanel(pnlScheduledUser);
//gridEnterEditMode(gridScheduledUsers);
}
private void btnViewTasks_Click(object sender, System.EventArgs e)
{
//case 1039 //log.Debug("btnViewTasks_Click");
ShowPanel(pnlTask);
//cbWorkorderItemTasks.Focus();
}
private void btnViewExpenses_Click(object sender, System.EventArgs e)
{
//case 1039 //log.Debug("btnViewExpenses_Click");
ShowPanel(pnlExpense);
//gridEnterEditMode(gridExpense);
}
private void btnViewLoans_Click(object sender, System.EventArgs e)
{
//case 1039 //log.Debug("btnViewLoans_Click");
ShowPanel(pnlLoan);
//gridEnterEditMode(gridLoan);
}
private void btnViewOutsideService_Click(object sender, System.EventArgs e)
{
//case 1039 //log.Debug("btnViewOutsideService_Click");
ShowPanel(pnlOutsideService);
//cbWorkorderItemOutsideServiceVendorSentToID.Focus();
}
private void btnViewCustomFields_Click(object sender, System.EventArgs e)
{
//case 1039 //log.Debug("btnViewCustomFields_Click");
ShowPanel(pnlWorkorderItemCustomFields);
}
////case 1996
///// <summary>
///// select first column first row enter edit mode.
///// </summary>
///// <param name="g"></param>
//private void gridEnterEditMode(UltraGrid g)
//{
// return;
// try
// {
// g.Focus();
// g.Rows[0].Cells[0].Activate();
// g.PerformAction(UltraGridAction.FirstCellInRow);
// g.PerformAction(UltraGridAction.EnterEditMode);
// }
// catch { }
//}
#endregion
#region Form DataBinding and BrokenRules handling
#region --- Header related ---
private bool AmBinding = false;
/// <summary>
/// Bind controls to business objects
/// </summary>
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");
Util.BindField(ckTemplateFreshPrice, "Checked", mWorkorder, "TemplateFreshPrice");
}
//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;
case WorkorderTypes.TemplateService:
tbManager.Tools["LT:UI.Toolbar.Print"].SharedProps.Visible = false;
//Show panel and set icon for form
pnlService.Visible = true;
this.Icon = Resource1.Template16icon;
//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;
case WorkorderTypes.PreventiveMaintenance:
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"], WorkorderPMList.ReportKey, WorkorderPMDetailedReportData.ReportKey);
}
//bind and show preventive maint fields
pnlPM.Visible = true;
this.Icon = Resource1.PreventiveMaintenance16icon;
Util.BindField(ckPMActive, "Checked", mWorkorder.WorkorderPreventiveMaintenance, "Active");
Util.BindField(edPMGenerateSpan, "Value", mWorkorder.WorkorderPreventiveMaintenance, "GenerateSpan");
Util.BindField(cbPMGenerateSpanUnit, "Value", mWorkorder.WorkorderPreventiveMaintenance, "GenerateSpanUnit");
Util.BindField(edPMThresholdSpan, "Value", mWorkorder.WorkorderPreventiveMaintenance, "ThresholdSpan");
Util.BindField(cbPMThresholdSpanUnit, "Value", mWorkorder.WorkorderPreventiveMaintenance, "ThresholdSpanUnit");
Util.BindField(dtPMStopGeneratingDate, "Value", mWorkorder.WorkorderPreventiveMaintenance, "StopGeneratingDate");
Util.BindField(dtPMNextServiceDate, "Value", mWorkorder.WorkorderPreventiveMaintenance, "NextServiceDate");
Util.BindField(cbPMDayOfTheWeek, "Value", mWorkorder.WorkorderPreventiveMaintenance, "DayOfTheWeek");
Util.BindField(cbPMWorkorderStatusID, "Value", mWorkorder.WorkorderPreventiveMaintenance, "WorkorderStatusID");
break;
case WorkorderTypes.TemplatePreventiveMaintenance:
tbManager.Tools["LT:UI.Toolbar.Print"].SharedProps.Visible = false;
//bind and show preventive maint fields
pnlPM.Visible = true;
this.Icon = Resource1.Template16icon;
Util.BindField(ckPMActive, "Checked", mWorkorder.WorkorderPreventiveMaintenance, "Active");
Util.BindField(edPMGenerateSpan, "Value", mWorkorder.WorkorderPreventiveMaintenance, "GenerateSpan");
Util.BindField(cbPMGenerateSpanUnit, "Value", mWorkorder.WorkorderPreventiveMaintenance, "GenerateSpanUnit");
Util.BindField(edPMThresholdSpan, "Value", mWorkorder.WorkorderPreventiveMaintenance, "ThresholdSpan");
Util.BindField(cbPMThresholdSpanUnit, "Value", mWorkorder.WorkorderPreventiveMaintenance, "ThresholdSpanUnit");
Util.BindField(dtPMStopGeneratingDate, "Value", mWorkorder.WorkorderPreventiveMaintenance, "StopGeneratingDate");
Util.BindField(dtPMNextServiceDate, "Value", mWorkorder.WorkorderPreventiveMaintenance, "NextServiceDate");
Util.BindField(cbPMDayOfTheWeek, "Value", mWorkorder.WorkorderPreventiveMaintenance, "DayOfTheWeek");
Util.BindField(cbPMWorkorderStatusID, "Value", mWorkorder.WorkorderPreventiveMaintenance, "WorkorderStatusID");
break;
case WorkorderTypes.Quote:
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"], WorkorderQuoteList.ReportKey, WorkorderQuoteDetailedReportData.ReportKey);
}
//Show quote panel and set quote icon for form
pnlQuote.Visible = true;
this.Icon = Resource1.Quote16icon;
//Bind quote fields
Util.BindField(dtDateApproved, "Value", mWorkorder.WorkorderQuote, "DateApproved");
Util.BindField(dtDateSubmitted, "Value", mWorkorder.WorkorderQuote, "DateSubmitted");
Util.BindField(dtQuoteRequestDate, "Value", mWorkorder.WorkorderQuote, "QuoteRequestDate");
Util.BindField(dtValidUntilDate, "Value", mWorkorder.WorkorderQuote, "ValidUntilDate");
Util.BindField(cbPreparedByID, "Value", mWorkorder.WorkorderQuote, "PreparedByID");
Util.BindField(edIntroduction, "Text", mWorkorder.WorkorderQuote, "Introduction");
//Added: 30-Aug-2006
edIntroduction.MaxLength = 255;
Util.BindField(cbWorkorderQuoteStatusID, "Value", mWorkorder.WorkorderQuote, "QuoteStatus");
break;
case WorkorderTypes.TemplateQuote:
tbManager.Tools["LT:UI.Toolbar.Print"].SharedProps.Visible = false;
//Show quote panel and set quote icon for form
pnlQuote.Visible = true;
this.Icon = Resource1.Template16icon;
//Bind quote fields
Util.BindField(dtDateApproved, "Value", mWorkorder.WorkorderQuote, "DateApproved");
Util.BindField(dtDateSubmitted, "Value", mWorkorder.WorkorderQuote, "DateSubmitted");
Util.BindField(dtQuoteRequestDate, "Value", mWorkorder.WorkorderQuote, "QuoteRequestDate");
Util.BindField(dtValidUntilDate, "Value", mWorkorder.WorkorderQuote, "ValidUntilDate");
Util.BindField(cbPreparedByID, "Value", mWorkorder.WorkorderQuote, "PreparedByID");
Util.BindField(edIntroduction, "Text", mWorkorder.WorkorderQuote, "Introduction");
//Added: 30-Aug-2006
edIntroduction.MaxLength = 255;
Util.BindField(cbWorkorderQuoteStatusID, "Value", mWorkorder.WorkorderQuote, "QuoteStatus");
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;
gridTravel.DisplayLayout.MaxBandDepth = 1;
//case 1420
int nActiveRow = -1;
if (gridWorkorderItems.ActiveRow != null)
nActiveRow = gridWorkorderItems.ActiveRow.Index;
//UltraGridRow ar = gridWorkorderItems.ActiveRow;
Util.BindField(gridWorkorderItems, "DataSource", mWorkorder, "WorkorderItems");
//case 1420
//case 1423 check if ar null first
if (nActiveRow != -1 && AyaBizUtils.AyaNovaConnectionSetting.UsingDataPortal)
{
gridWorkorderItems.Rows[nActiveRow].Activate();
//gridWorkorderItems.ActiveRow = ar;
//gridWorkorderItems.ActiveRow.Selected = true;
}
//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
//Bind IsDirty property to hidden checkbox to
//ensure isdirtychanged event is available
//to data binding infrastructure
Util.BindField(ckIsDirty, "Checked", mWorkorder, "IsDirty");
//Setup initial link to broken rules
OnBrokenRulesChanged(null, null);
AmBinding = false;
}
/// <summary>
/// Handle a change in broken rules
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void OnBrokenRulesChanged(object sender, System.ComponentModel.ListChangedEventArgs e)
{
Util.BrokenRuleFeedback(this, mWorkorder, epWO);
}
/// <summary>
/// retrieve and display address
/// and contact info for selected Client
/// </summary>
private void DisplayFullerAddressForClientSelected()
{
if (mWorkorder.IsTemplate)
lblTemplate.Text = mWorkorder.NameAndAddress;
else
edClientID.Text = mWorkorder.NameAndAddress;
}
#endregion
#region --- Workorder Item related ---
private WorkorderItem mCurrentWorkorderItem = null;
/// <summary>
/// Binds workorder item related controls to workorder item selected
/// </summary>
/// <param name="WorkorderItemID"></param>
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.gridTravel, "DataSource", mCurrentWorkorderItem, "Travels");
Util.BindField(this.gridParts, "DataSource", mCurrentWorkorderItem, "Parts");
Util.BindField(this.gridPartRequests, "DataSource", mCurrentWorkorderItem, "PartRequests");
Util.BindField(this.gridScheduledUsers, "DataSource", mCurrentWorkorderItem, "ScheduledUsers");
Util.BindField(this.gridExpense, "DataSource", mCurrentWorkorderItem, "Expenses");
Util.BindField(this.gridTasks, "DataSource", mCurrentWorkorderItem, "Tasks");
Util.BindField(this.gridLoan, "DataSource", mCurrentWorkorderItem, "Loans");
//case 1334
//if (this.gridLabor.Rows.Count > 0) this.gridLabor.ActiveRow = this.gridLabor.Rows[0];
//if (this.gridTravel.Rows.Count > 0) this.gridTravel.ActiveRow = this.gridTravel.Rows[0];
//if (this.gridParts.Rows.Count > 0) this.gridParts.ActiveRow = this.gridParts.Rows[0];
//if (this.gridPartRequests.Rows.Count > 0) this.gridPartRequests.ActiveRow = this.gridPartRequests.Rows[0];
//if (this.gridScheduledUsers.Rows.Count > 0) this.gridScheduledUsers.ActiveRow = this.gridScheduledUsers.Rows[0];
//if (this.gridExpense.Rows.Count > 0) this.gridExpense.ActiveRow = this.gridExpense.Rows[0];
//if (this.gridTasks.Rows.Count > 0) this.gridTasks.ActiveRow = this.gridTasks.Rows[0];
//if (this.gridLoan.Rows.Count > 0) this.gridLoan.ActiveRow = this.gridLoan.Rows[0];
//Unit panel items
IntializeUnitComboBoxes();
Util.BindField(cbWorkorderItemUnitID, "Value", mCurrentWorkorderItem, "UnitID");
Util.BindField(cbWorkorderItemUnitServiceTypeID, "Value", mCurrentWorkorderItem, "WorkorderItemUnitServiceTypeID");
//Outside service panel items
//combo boxes
IntializeOutsideServiceComboBoxes();
Util.BindField(cbWorkorderItemOutsideServiceVendorSentToID, "Value", mCurrentWorkorderItem.OutsideService, "VendorSentToID");
Util.BindField(cbWorkorderItemOutsideServiceVendorSentViaID, "Value", mCurrentWorkorderItem.OutsideService, "VendorSentViaID");
//Text editors
Util.BindField(edWorkorderItemOutsideServiceRMANumber, "Text", mCurrentWorkorderItem.OutsideService, "RMANumber");
Util.BindField(edWorkorderItemOutsideServiceTrackingNumber, "Text", mCurrentWorkorderItem.OutsideService, "TrackingNumber");
Util.BindField(edWorkorderItemOutsideServiceNotes, "Text", mCurrentWorkorderItem.OutsideService, "Notes");
//Currency
Util.BindField(edWorkorderItemOutsideServiceRepairCost, "Value", mCurrentWorkorderItem.OutsideService, "RepairCost");
Util.BindField(edWorkorderItemOutsideServiceRepairPrice, "Value", mCurrentWorkorderItem.OutsideService, "RepairPrice");
Util.BindField(edWorkorderItemOutsideServiceShippingCost, "Value", mCurrentWorkorderItem.OutsideService, "ShippingCost");
Util.BindField(edWorkorderItemOutsideServiceShippingPrice, "Value", mCurrentWorkorderItem.OutsideService, "ShippingPrice");
//Date editors
Util.BindField(dtWorkorderItemOutsideServiceDateSent, "Value", mCurrentWorkorderItem.OutsideService, "DateSent");
Util.BindField(dtWorkorderItemOutsideServiceDateETA, "Value", mCurrentWorkorderItem.OutsideService, "DateETA");
Util.BindField(dtWorkorderItemOutsideServiceDateReturned, "Value", mCurrentWorkorderItem.OutsideService, "DateReturned");
//Custom panel items
FillCustomFieldGrid();
ShowMeterReadingTool();
ShowWarrantyInfo();
//Show part requests if appropriate
AdjustPartsDisplay();
//case 1347
bWorkorderChildrenStateChanged = true;
}
#endregion
#endregion
#region QuickAccess
/// <summary>
/// Take user to part that needs to be edited directly
/// </summary>
private void GoToSelectedItem()
{
//case 1039 //log.Debug("GoToSelectedItem");
//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.Unit:
//case 1039 //log.Debug("GoToSelectedItem:UnitPanel");
ShowPanel(pnlUnit);
cbWorkorderItemUnitID.Focus();
break;
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;
case RootObjectTypes.WorkorderItemLoan:
//case 1039 //log.Debug("GoToSelectedItem:Loan");
ShowPanel(this.pnlLoan);
this.gridLoan.Focus();
//STEP 4: Select a specific record?
bItemSelected = false;
if (mGoToWorkorderItemSubItemID != Guid.Empty)
{
//case 1039 //log.Debug("GoToSelectedItem:Loan:SPECIFIC");
foreach (UltraGridRow r in gridLoan.Rows)
{
if ((Guid)r.Cells["ID"].Value == mGoToWorkorderItemSubItemID)
{
r.Activate();
bItemSelected = true;
break;
}
}
}
if (!bItemSelected)
{
if (gridLoan.Rows.Count > 0)
gridLoan.Rows[0].Activate();
}
break;
//Changed: June-16-2006 Added support for going to a part
case RootObjectTypes.WorkorderItemPart:
//bugbug mparts is null need to call fillparts here
//case 1378
FetchParts();
//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;
//Changed: 2-Oct-2006 Added support for going to a misc expense
case RootObjectTypes.WorkorderItemMiscExpense:
//case 1039 //log.Debug("GoToSelectedItem:Expense");
ShowPanel(pnlExpense);
this.gridExpense.Focus();
//STEP 4: Select a specific record?
bItemSelected = false;
if (mGoToWorkorderItemSubItemID != Guid.Empty)
{
//case 1039 //log.Debug("GoToSelectedItem:ExpensePanel:SPECIFIC");
foreach (UltraGridRow r in gridExpense.Rows)
{
if ((Guid)r.Cells["ID"].Value == mGoToWorkorderItemSubItemID)
{
r.Activate();
bItemSelected = true;
break;
}
}
}
if (!bItemSelected)
{
if (gridExpense.Rows.Count > 0)
gridExpense.Rows[0].Activate();
}
break;
//Changed: 2-Oct-2006 Added support for going to outside service
case RootObjectTypes.WorkorderItemOutsideService:
//case 1039 //log.Debug("GoToSelectedItem:OutsideService");
ShowPanel(pnlOutsideService);
break;
}
}
}
#region Quick Access properties
private RootObjectTypes mGoTo = RootObjectTypes.Workorder;
/// <summary>
/// Part of workorder to focus on when opened for quicker access by user
/// </summary>
public RootObjectTypes GoTo
{
get
{
return mGoTo;
}
set
{
mGoTo = value;
}
}
private Guid mGoToWorkorderItemID = Guid.Empty;
/// <summary>
/// ID of specific Workorder item to intially select or if
/// guid empty then only goes to intiial workorder item
/// and area specified in GOTO
/// </summary>
public Guid GoToWorkorderItemID
{
get
{
return mGoToWorkorderItemID;
}
set
{
mGoToWorkorderItemID = value;
}
}
private Guid mGoToWorkorderItemSubItemID = Guid.Empty;
/// <summary>
///ID of child item of workorderitem to focus on
///if applicable otherwise Guid.Empty signifies no selection
///of child item necessary
/// </summary>
public Guid GoToWorkorderItemSubItemID
{
get
{
return mGoToWorkorderItemSubItemID;
}
set
{
mGoToWorkorderItemSubItemID = value;
}
}
#endregion
#endregion
#region Business object editing / adding / deletion related code
private Workorder mWorkorder;
/// <summary>
/// Workorder record to display
/// set by caller
/// </summary>
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;
}
}
/// <summary>
/// Update record and quit if requested
///
/// </summary>
/// <returns>True if handled, false if not handled</returns>
private bool RecordUpdate(RecordActionType SaveType)
{
//case 1039 //if(log.IsDebugEnabled) //case 1039 //log.Debug("SaveHandler(Action="+SaveType.ToString()+")");
//switch the focus to a non-editable control
//so that any changes in the current editable control
//will get updated before attempting to save
//case 1797
ckClosed.Focus();
btnClientID.Focus();
btnProjectID.Focus();
try//case 1450
{
gridWorkorderItems.UpdateData();
gridTravel.UpdateData();
gridLabor.UpdateData();
gridParts.UpdateData();
gridPartRequests.UpdateData();
gridScheduledUsers.UpdateData();
gridExpense.UpdateData();
gridTasks.UpdateData();
gridLoan.UpdateData();
if (bShowCustomFields)
gridCustom.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);
//Workorder.DeleteItem(mWorkorder.ID);
}
catch (Exception ex)
{
Util.ReportSQLError(ex);
return false;
}
bClosingHandled = true;
this.Close();
mbChangesMade = true;
return true;
}
else return false;
case RecordActionType.SaveAndExit:
//Save if necessary and exit
if (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();//<---here is where the dp is losing woitem focus on save
//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;
}
}
}
//Update the bank button in the travel grid
//so that it's state is changed now that hte object has
//been saved
if (gridTravel.DisplayLayout.Bands[0].Columns.Exists("BANK"))
{
foreach (UltraGridRow r in gridTravel.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);
}
private void cbPMWorkorderStatusID_NeedMoreData()
{ Util.FillGZComboBoxWithNameIDList("WorkorderStatus", cbPMWorkorderStatusID, false, Guid.Empty, false); }
private void cbProjectID_NeedMoreData()
{ Util.FillGZComboBoxWithNameIDList("Project", cbProjectID, false, Guid.Empty, true); }
//case 58
private void cbRegion_NeedMoreData()
{
Util.FillGZComboBoxWithNameIDList("Region", cbRegion, false, Guid.Empty, true);
}
//case 1842
private void cbWorkorderStatusID_NeedMoreData()
{
Util.FillGZComboBoxWithNameIDList("WorkorderStatus", cbWorkorderStatusID, false, Guid.Empty, false);
}
private void cbPreparedByID_NeedMoreData()
{
//Any user can prepare a quote so use all users list instead of sched users list
cbPreparedByID.Items.Clear();
//Added: 19-July-2006 Huge performance increase with large lists
Util.ComboBeginUpdate(cbPreparedByID);
foreach (UserPickList.UserPickListInfo ui in mAllUsers)
{
if (ui.Type != UserTypes.Utility && ui.Type != UserTypes.Client && ui.Type != UserTypes.HeadOffice)
if (ui.Active == true || ui.ID == this.mWorkorder.WorkorderQuote.PreparedByID)
cbPreparedByID.Items.Add(ui.ID, ui.Name);
}
//Added: 19-July-2006 see above
Util.ComboEndUpdate(cbPreparedByID);
}
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:
case WorkorderTypes.TemplateService:
// Util.FillGZComboBoxWithNameIDList("WorkorderStatus",cbWorkorderStatusID,true,mWorkorder.WorkorderService.WorkorderStatusID, false);
Util.FillGZComboBoxWithNameIDList("WorkorderStatus", cbWorkorderStatusID, true, mWorkorder.WorkorderService.WorkorderStatusID, false);
break;
case WorkorderTypes.PreventiveMaintenance:
case WorkorderTypes.TemplatePreventiveMaintenance:
Util.FillGZComboBoxWithNameIDList("WorkorderStatus", cbPMWorkorderStatusID, true, mWorkorder.WorkorderPreventiveMaintenance.WorkorderStatusID, false);
//Generate Timespans
//cbPMGenerateSpanUnit.Items.Add(AyaUnitsOfTime.Minutes,Util.LocaleText.GetLocalizedText("UI.Label.TimeSpan.Minutes"));
cbPMGenerateSpanUnit.Items.Add(AyaUnitsOfTime.Hours, Util.LocaleText.GetLocalizedText("UI.Label.TimeSpan.Hours"));
cbPMGenerateSpanUnit.Items.Add(AyaUnitsOfTime.Days, Util.LocaleText.GetLocalizedText("UI.Label.TimeSpan.Days"));
//Weeks are not supported because the concept of Week is very "weak" globally :)
//and is not supported by the .net datetime.Add function for this reason
//cbPMGenerateSpanUnit.Items.Add(AyaUnitsOfTime.Weeks,Util.LocaleText.GetLocalizedText("UI.Label.TimeSpan.Weeks"));
cbPMGenerateSpanUnit.Items.Add(AyaUnitsOfTime.Months, Util.LocaleText.GetLocalizedText("UI.Label.TimeSpan.Months"));
cbPMGenerateSpanUnit.Items.Add(AyaUnitsOfTime.Years, Util.LocaleText.GetLocalizedText("UI.Label.TimeSpan.Years"));
//Threshold Timespans
cbPMThresholdSpanUnit.Items.Add(AyaUnitsOfTime.Minutes, Util.LocaleText.GetLocalizedText("UI.Label.TimeSpan.Minutes"));
cbPMThresholdSpanUnit.Items.Add(AyaUnitsOfTime.Hours, Util.LocaleText.GetLocalizedText("UI.Label.TimeSpan.Hours"));
cbPMThresholdSpanUnit.Items.Add(AyaUnitsOfTime.Days, Util.LocaleText.GetLocalizedText("UI.Label.TimeSpan.Days"));
//Weeks are not supported because the concept of Week is very "weak" globally :)
//and is not supported by the .net datetime.Add function for this reason
//cbPMThresholdSpanUnit.Items.Add(AyaUnitsOfTime.Weeks,Util.LocaleText.GetLocalizedText("UI.Label.TimeSpan.Weeks"));
cbPMThresholdSpanUnit.Items.Add(AyaUnitsOfTime.Months, Util.LocaleText.GetLocalizedText("UI.Label.TimeSpan.Months"));
cbPMThresholdSpanUnit.Items.Add(AyaUnitsOfTime.Years, Util.LocaleText.GetLocalizedText("UI.Label.TimeSpan.Years"));
//Day of week
cbPMDayOfTheWeek.Items.Add(AyaDayOfWeek.AnyDayOfWeek, Util.LocaleText.GetLocalizedText("UI.Label.Day.Any"));
cbPMDayOfTheWeek.Items.Add(AyaDayOfWeek.Monday, Util.LocaleText.GetLocalizedText("UI.Label.Day.Monday"));
cbPMDayOfTheWeek.Items.Add(AyaDayOfWeek.Tuesday, Util.LocaleText.GetLocalizedText("UI.Label.Day.Tuesday"));
cbPMDayOfTheWeek.Items.Add(AyaDayOfWeek.Wednesday, Util.LocaleText.GetLocalizedText("UI.Label.Day.Wednesday"));
cbPMDayOfTheWeek.Items.Add(AyaDayOfWeek.Thursday, Util.LocaleText.GetLocalizedText("UI.Label.Day.Thursday"));
cbPMDayOfTheWeek.Items.Add(AyaDayOfWeek.Friday, Util.LocaleText.GetLocalizedText("UI.Label.Day.Friday"));
cbPMDayOfTheWeek.Items.Add(AyaDayOfWeek.Saturday, Util.LocaleText.GetLocalizedText("UI.Label.Day.Saturday"));
cbPMDayOfTheWeek.Items.Add(AyaDayOfWeek.Sunday, Util.LocaleText.GetLocalizedText("UI.Label.Day.Sunday"));
break;
case WorkorderTypes.Quote:
case WorkorderTypes.TemplateQuote:
if (this.mWorkorder.WorkorderQuote.PreparedByID != Guid.Empty)
{
ValueListItem vli = cbPreparedByID.Items.Add(this.mWorkorder.WorkorderQuote.PreparedByID, mAllUsers[this.mWorkorder.WorkorderQuote.PreparedByID.ToString()].Name);
cbPreparedByID.SelectedItem = vli;
}
this.cbWorkorderQuoteStatusID.Items.Add(WorkorderQuoteStatusTypes.Awarded, Util.LocaleText.GetLocalizedText("WorkorderQuoteStatusTypes.Label.Awarded"));
this.cbWorkorderQuoteStatusID.Items.Add(WorkorderQuoteStatusTypes.InProgress, Util.LocaleText.GetLocalizedText("WorkorderQuoteStatusTypes.Label.InProgress"));
this.cbWorkorderQuoteStatusID.Items.Add(WorkorderQuoteStatusTypes.NotAwarded, Util.LocaleText.GetLocalizedText("WorkorderQuoteStatusTypes.Label.NotAwarded"));
this.cbWorkorderQuoteStatusID.Items.Add(WorkorderQuoteStatusTypes.Submitted, Util.LocaleText.GetLocalizedText("WorkorderQuoteStatusTypes.Label.Submitted"));
//case 1556
this.cbWorkorderQuoteStatusID.Items.Add(WorkorderQuoteStatusTypes.New, Util.LocaleText.GetLocalizedText("WorkorderQuoteStatusTypes.Label.New"));
this.cbWorkorderQuoteStatusID.Items.Add(WorkorderQuoteStatusTypes.NotAwarded2, Util.LocaleText.GetLocalizedText("WorkorderQuoteStatusTypes.Label.NotAwarded2"));
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 btnProjectID_Click(object sender, System.EventArgs e)
{
//case 1039 //log.Debug("btnProjectID_Click");
ProjectInfoForm cf = new ProjectInfoForm();
if (cbProjectID.Value != null && (Guid)cbProjectID.Value != Guid.Empty)
{
cf.ProjectToEdit = Project.GetItem((Guid)cbProjectID.Value);
}
else
{
if (AyaBizUtils.Right("Object.Project") < (int)SecurityLevelTypes.ReadWrite)
{
//case 1039 //log.Debug("No Project selected to view and user has no rights to create a new one.");
return;
}
cf.ProjectToEdit = Project.NewItem();
}
cf.Visible = false;
cf.ShowDialog();
if (cf.ChangesMade)
{
mWorkorder.ProjectID = Guid.Empty;
Util.FillGZComboBoxWithNameIDList("Project", cbProjectID, false, Guid.Empty, true);
mWorkorder.ProjectID = cf.ProjectToEdit.ID;
}
}
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;
}
}
private void btnPMWorkorderStatusID_Click(object sender, System.EventArgs e)
{
//case 1039 //log.Debug("btnPMWorkorderStatusID_Click");
GenericListForm g = new GenericListForm();
WorkorderStatuses o = WorkorderStatuses.GetItems();
g.SelectedRecordID = cbWorkorderStatusID.Value;
g.GridDataSource = o;
g.ShowDialog();
if (g.ChangesMade)
{
mWorkorder.WorkorderPreventiveMaintenance.WorkorderStatusID = Guid.Empty;
Util.FillGZComboBoxWithNameIDList("WorkorderStatus", cbPMWorkorderStatusID, false, Guid.Empty, false);
mWorkorder.WorkorderPreventiveMaintenance.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;
//case 3179 overlapping
int nGap = 16;
//Left panel
lblTemplate.Width = nLeftWidth + nRightWidth;
this.lblTemplateDescription.Width = nLeftWidth - nGap;
edTemplateDescription.Left = nLeftWidth;
edTemplateDescription.Width = nRightWidth;
//case 3132
ckTemplateFreshPrice.Width = nLeftWidth + nRightWidth - nGap;
//case 58
lblRegionID.Width = nLeftWidth + nRightWidth;
cbRegion.Left = nLeftWidth;
cbRegion.Width = nRightWidth;
//center panel
lblSummary.Width = nLeftWidth - nGap;
edSummary.Left = nLeftWidth;
edSummary.Width = nRightWidth;
btnProjectID.Width = nLeftWidth - nGap;
cbProjectID.Left = nLeftWidth;
cbProjectID.Width = nRightWidth;
btnWorkorderCategoryID.Width = nLeftWidth - nGap;
cbWorkorderCategoryID.Left = nLeftWidth;
cbWorkorderCategoryID.Width = nRightWidth;
//Right panel
//turn off Offset
nRightWidth = nRightWidth + 8;
lblCustomerReferenceNumber.Width = nLeftWidth - nGap;
edCustomerReferenceNumber.Left = nLeftWidth;
edCustomerReferenceNumber.Width = nRightWidth;
lblInternalReferenceNumber.Width = nLeftWidth - nGap;
edInternalReferenceNumber.Left = nLeftWidth;
edInternalReferenceNumber.Width = nRightWidth;
lblCustomerContactName.Width = nLeftWidth - nGap;
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;
//case 3179 overlapping
int nGap = 16;
//Size and align controls in Left panel
btnWorkorderStatusID.Width = nLeftWidth - nGap;
cbWorkorderStatusID.Left = nLeftWidth;
cbWorkorderStatusID.Width = nRightWidth;
lblCloseByDate.Width = nLeftWidth - nGap;
dtCloseByDate.Left = nLeftWidth;
dtCloseByDate.Width = nRightWidth;
//center panel
lblInvoiceNumber.Width = nLeftWidth - nGap;
edInvoiceNumber.Left = nLeftWidth;
edInvoiceNumber.Width = nRightWidth;
lblServiceDate.Width = nLeftWidth - nGap;
dtServiceDate.Left = nLeftWidth;
dtServiceDate.Width = nRightWidth;
}
#endregion
#region Quote panel control sizing
private void pnlQuote_SizeChanged(object sender, System.EventArgs e)
{
if (this.WindowState == FormWindowState.Minimized) return;
//case 1039 //log.Debug("pnlQuote_SizeChanged");
int nPanelWidth = pnlQuote.Width / 3;
pnlQuoteLeft.Width = nPanelWidth;
pnlQuoteMiddle.Width = nPanelWidth;
pnlQuoteRight.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;
//case 3179 overlapping
int nGap = 16;
//Size and align controls in Left panel
lblPreparedByID.Width = nLeftWidth - nGap;
cbPreparedByID.Left = nLeftWidth;
cbPreparedByID.Width = nRightWidth + 16;
//center panel
lblDateApproved.Width = nLeftWidth - nGap;
dtDateApproved.Left = nLeftWidth;
dtDateApproved.Width = nRightWidth;
lblDateSubmitted.Width = nLeftWidth - nGap;
dtDateSubmitted.Left = nLeftWidth;
dtDateSubmitted.Width = nRightWidth;
cbWorkorderQuoteStatusID.Left = nLeftWidth;
cbWorkorderQuoteStatusID.Width = nRightWidth;
lblWorkorderQuoteStatusID.Width = nLeftWidth - nGap;
//Right panel
//turn off Offset
nRightWidth = nRightWidth + 8;
lblQuoteRequestDate.Width = nLeftWidth - nGap;
dtQuoteRequestDate.Left = nLeftWidth;
dtQuoteRequestDate.Width = nRightWidth;
lblValidUntilDate.Width = nLeftWidth - nGap;
dtValidUntilDate.Left = nLeftWidth;
dtValidUntilDate.Width = nRightWidth;
}
#endregion
#region PM panel control sizing
private void pnlPM_SizeChanged(object sender, System.EventArgs e)
{
if (this.WindowState == FormWindowState.Minimized) return;
//case 1039 //log.Debug("pnlPM_SizeChanged");
int nPanelWidth = pnlPM.Width / 3;
pnlPMLeft.Width = nPanelWidth;
pnlPMMiddle.Width = nPanelWidth;
pnlPMRight.Width = nPanelWidth;
int nFullPanelWidthItem = nPanelWidth - 8;
//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;
//case 3179 overlapping
int nGap = 16;
//Size and align controls in Left panel
ckPMActive.Width = nFullPanelWidthItem;
lblPMGenerateSpan.Width = nFullPanelWidthItem;
edPMGenerateSpan.Width = nLeftWidth;
cbPMGenerateSpanUnit.Left = nLeftWidth;
cbPMGenerateSpanUnit.Width = nRightWidth;
lblPMThresholdSpan.Width = nFullPanelWidthItem;
edPMThresholdSpan.Width = nLeftWidth;
cbPMThresholdSpanUnit.Left = nLeftWidth;
cbPMThresholdSpanUnit.Width = nRightWidth;
//center panel
lblPMStopGeneratingDate.Width = nLeftWidth - nGap;
dtPMStopGeneratingDate.Left = nLeftWidth;
dtPMStopGeneratingDate.Width = nRightWidth;
lblPMNextServiceDate.Width = nLeftWidth - nGap;
dtPMNextServiceDate.Left = nLeftWidth;
dtPMNextServiceDate.Width = nRightWidth;
lblPMDayOfTheWeek.Width = nLeftWidth - nGap;
cbPMDayOfTheWeek.Left = nLeftWidth;
cbPMDayOfTheWeek.Width = nRightWidth;
//Right panel
//turn off Offset
nRightWidth = nRightWidth + 8;
btnPMWorkorderStatusID.Width = nLeftWidth;
cbPMWorkorderStatusID.Left = nLeftWidth;
cbPMWorkorderStatusID.Width = nRightWidth;
}
#endregion
#region Unit panel items / events / initialization
#region ======== Initialze Unit list ========
/// <summary>
/// Add initial single currently selected items to combo boxes
/// </summary>
private void IntializeUnitComboBoxes()
{
//case 1039 //log.Debug("IntializeUnitComboBoxes");
cbWorkorderItemUnitID.ClearList();
if (mCurrentWorkorderItem.UnitID != Guid.Empty)
{
cbWorkorderItemUnitID.Appearance.ForeColor = System.Drawing.SystemColors.WindowText;
//CHANGED:21-March-2006
//Change to still display a unit even if it's owned by another client
//this is for closed workorders only, so no need to put this in the need more data code
if (mClientUnitList.Contains(mCurrentWorkorderItem.UnitID))
{
ValueListItem vlc = cbWorkorderItemUnitID.Items.Add(mCurrentWorkorderItem.UnitID, mClientUnitList[mCurrentWorkorderItem.UnitID].UnitName(Util.GlobalSettings.DefaultUnitNameDisplayFormat));
//Case 399
cbWorkorderItemUnitID.SelectedItem = vlc;
}
else
{
//new owner for unit so add it manually but as graytext
//yes, so add it manually and grayed out
cbWorkorderItemUnitID.Items.Add(mCurrentWorkorderItem.UnitID, UnitNameFetcher.GetUnitNameFromUnitID(mCurrentWorkorderItem.UnitID) + " [" + Unit.GetOwnerNameForUnit(mCurrentWorkorderItem.UnitID) + "]");
cbWorkorderItemUnitID.Appearance.ForeColor = System.Drawing.SystemColors.GrayText;
}
}
Util.FillGZComboBoxWithNameIDList("UnitServiceType", cbWorkorderItemUnitServiceTypeID, true, mCurrentWorkorderItem.WorkorderItemUnitServiceTypeID, false);
//Case 399
cbWorkorderItemUnitServiceTypeID.SelectedIndex = cbWorkorderItemUnitServiceTypeID.Items.Count - 1;
}
#endregion
#region drop down events
private void cbWorkorderItemUnitID_NeedMoreData()
{
//case 1039 //log.Debug("cbWorkorderItemUnitID_NeedMoreData");
//Case 410
bIgnoreUnitChanged = true;
Guid gCurrentlySelectedID = Guid.Empty;
if (cbWorkorderItemUnitID.Value != null && cbWorkorderItemUnitID.Value is Guid)//case 1853
{
gCurrentlySelectedID = (Guid)cbWorkorderItemUnitID.Value;
}
cbWorkorderItemUnitID.ClearList();
//case 410
ValueListItem viSelected = cbWorkorderItemUnitID.EmptyValueListItem;
//Added: 19-July-2006 Huge performance increase with large lists
//Util.ComboBeginUpdate(cbWorkorderItemUnitID);
foreach (UnitPickList.UnitPickListInfo ui in mClientUnitList)
{
if (ui.Active == true)
{
ValueListItem vi = cbWorkorderItemUnitID.Items.Add(ui.ID, ui.UnitName(Util.GlobalSettings.DefaultUnitNameDisplayFormat));
//Case 410
if (ui.ID == mCurrentWorkorderItem.UnitID)
viSelected = vi;
}
else
{
//is the current, inactive item the one selected in this record?
if (ui.ID == mCurrentWorkorderItem.UnitID)
{
//yes, so add it manually and grayed out
ValueListItem vi = cbWorkorderItemUnitID.Items.Add(ui.ID, ui.UnitName(Util.GlobalSettings.DefaultUnitNameDisplayFormat));
vi.Appearance.ForeColor = System.Drawing.SystemColors.GrayText;
//case 410
viSelected = vi;
}
}
}
//Case 410
cbWorkorderItemUnitID.SelectedItem = viSelected;
//Added: 19-July-2006 see above
Util.ComboEndUpdate(cbWorkorderItemUnitID);
//Case 410
bIgnoreUnitChanged = false;
}
bool bIgnoreUnitChanged = false;
private void cbWorkorderItemUnitID_SelectionChanged(object sender, System.EventArgs e)
{
if (bIgnoreUnitChanged) return;
//case 1039 //log.Debug("cbWorkorderItemUnitID_SelectionChanged");
bWorkorderChildrenStateChanged = true;
//May need to display bank colum in labor table...
//case 1617
mCachedBankColumnDisplay = null;
BankColumnDisplay(gridLabor);
BankColumnDisplay(gridTravel);
ShowMeterReadingTool();
ShowWarrantyInfo();
}
//Changed:20-June-2006 added this to stop redundant recalculation of whether
//to show meter reading toolbar menu option
private Guid mLastUnitMeterReadingWasDisplayedFor = Guid.Empty;
/// <summary>
/// Displays meter reading tool or hides it as appropriate
/// </summary>
private void ShowMeterReadingTool()
{
//case 1039 //log.Debug("ShowMeterReadingTool");
bool bShowMeter = false;
//Changed: 20-June-2006 now get unit id from combo rather than old method of from
//the biz object because if it was just selected in the combo and this code is called
//the biz object doesn't know about it yet
Guid unitid = Guid.Empty;
if (this.cbWorkorderItemUnitID.Value != null)
unitid = (Guid)cbWorkorderItemUnitID.Value;
//Do nothing if this was just done before
if (mLastUnitMeterReadingWasDisplayedFor == unitid) return;
mLastUnitMeterReadingWasDisplayedFor = unitid;
if (mWorkorder.IsServiceWorkorder &&
unitid != Guid.Empty &&
mClientUnitList.Contains(unitid) &&
mClientUnitList[unitid].Metered)
bShowMeter = true;
tbManager.Tools["LT:UnitMeterReading.Label.List"].SharedProps.Visible = bShowMeter;
}
private Guid lastUnitWarrantyInfoWasShownFor = Guid.Empty;
private void ShowWarrantyInfo()
{
//case 1039 //log.Debug("ShowWarrantyInfo");
//Changed: 20-June-2006 now get unit id from combo rather than old method of from
//the biz object because if it was just selected in the combo and this code is called
//the biz object doesn't know about it yet
Guid unitid = Guid.Empty;
if (this.cbWorkorderItemUnitID.Value != null)
unitid = (Guid)cbWorkorderItemUnitID.Value;
if (unitid == Guid.Empty)
{
edWarrantyInfo.Visible = false;
return;
}
edWarrantyInfo.Visible = true;
if (lastUnitWarrantyInfoWasShownFor == unitid)
return;
lastUnitWarrantyInfoWasShownFor = unitid;
bool bCalcWarranty = true;
//Don't calc warranty for closed or s.c. workorders or ones without a unit
if (mWorkorder.Closed || mWorkorder.ServiceCompleted)
{
bCalcWarranty = false;
}
Unit u = Unit.GetItemMRU(unitid, false);
if (bCalcWarranty)
{
string sDate = "";
if (u.WarrantyExpiryDateResolved != null)
sDate = ((DateTime)u.WarrantyExpiryDateResolved).ToLongDateString();
switch (u.WarrantyStatusResolved)
{
case WarrantyStatus.None:
edWarrantyInfo.Text = Util.LocaleText.GetLocalizedText("Unit.Label.UI.NotWarrantiedDisplay");
break;
case WarrantyStatus.Expired:
edWarrantyInfo.Text = string.Format
(
Util.LocaleText.GetLocalizedText("Unit.Label.UI.WarrantyExpiredDisplay"),
sDate
);
break;
case WarrantyStatus.Active:
edWarrantyInfo.Text = string.Format
(
Util.LocaleText.GetLocalizedText("Unit.Label.UI.WarrantiedDisplay"),
sDate,
u.WarrantyTermsResolved
);
break;
}
}
edWarrantyInfo.Text = edWarrantyInfo.Text + "\r\n--------------\r\n" + u.History;
}
private void cbWorkorderItemUnitServiceTypeID_NeedMoreData()
{
//case 1039 //log.Debug("cbWorkorderItemUnitServiceTypeID_NeedMoreData");
Util.FillGZComboBoxWithNameIDList("UnitServiceType", cbWorkorderItemUnitServiceTypeID, false, Guid.Empty, false);
//Util.ComboSelectGuid(cbWorkorderItemUnitServiceTypeID,mCurrentWorkorderItem.WorkorderItemUnitServiceTypeID);
}
#endregion
#region hyperButtons
private void btnUnitID_Click(object sender, System.EventArgs e)
{
//case 1039 //log.Debug("btnUnitID_Click");
UnitInfoForm cf = new UnitInfoForm();
if (cbWorkorderItemUnitID.Value != null && (Guid)cbWorkorderItemUnitID.Value != Guid.Empty)
{
cf.UnitToEdit = Unit.GetItem((Guid)cbWorkorderItemUnitID.Value);
}
else
{
if (AyaBizUtils.Right("Object.Unit") < (int)SecurityLevelTypes.ReadWrite)
{
//case 1039 //log.Debug("No Unit selected to view and user has no rights to create a new one.");
return;
}
//Case 625 preselect client for new unit
Unit uu = Unit.NewItem();
uu.ClientID = mWorkorder.ClientID;
cf.UnitToEdit = uu;
}
cf.Visible = false;
cf.ShowDialog();
if (cf.ChangesMade)
{
//refresh client unit list
mClientUnitList = UnitPickList.GetListByClient(mWorkorder.ClientID);
IntializeUnitComboBoxes();
//Util.ComboSelectGuid(cbWorkorderItemUnitID,mCurrentWorkorderItem.UnitID);
}
cf.Dispose();
}
private void btnWorkorderItemUnitServiceTypeID_Click(object sender, System.EventArgs e)
{
//case 1039 //log.Debug("btnWorkorderItemUnitServiceTypeID_Click");
GenericListForm glf = new GenericListForm();
UnitServiceTypes wit = UnitServiceTypes.GetItems();
glf.GridDataSource = wit;
glf.ShowDialog();
if (glf.ChangesMade)
{
IntializeUnitComboBoxes();
}
}
#endregion hyperbuttons
#endregion
#region Outside service panel items / events / initialization / Control sizing
#region ======== Initialize outside service vendor lists ========
/// <summary>
/// Add intial single currently selected items to combo boxes
/// </summary>
private void IntializeOutsideServiceComboBoxes()
{
//case 1039 //log.Debug("IntializeOutsideServiceComboBoxes");
//SENT TO:
cbWorkorderItemOutsideServiceVendorSentToID.ClearList();
if (mCurrentWorkorderItem.OutsideService.VendorSentToID != Guid.Empty)
{
cbWorkorderItemOutsideServiceVendorSentToID.Items.Add(mCurrentWorkorderItem.OutsideService.VendorSentToID, mVendors[mCurrentWorkorderItem.OutsideService.VendorSentToID].Name);
}
//SENT VIA:
cbWorkorderItemOutsideServiceVendorSentViaID.ClearList();
if (mCurrentWorkorderItem.OutsideService.VendorSentViaID != Guid.Empty)
{
cbWorkorderItemOutsideServiceVendorSentViaID.Items.Add(mCurrentWorkorderItem.OutsideService.VendorSentViaID, mVendors[mCurrentWorkorderItem.OutsideService.VendorSentViaID].Name);
}
}
#endregion
#region === Outside service Combo box drop down events ===
/// <summary>
/// Sent TO:
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void cbWorkorderItemOutsideServiceVendorSentToID_NeedMoreData()
{
//case 1039 //log.Debug("cbWorkorderItemOutsideServiceVendorSentToID_NeedMoreData");
cbWorkorderItemOutsideServiceVendorSentToID.ClearList();
//Added: 19-July-2006 Huge performance increase with large lists
Util.ComboBeginUpdate(cbWorkorderItemOutsideServiceVendorSentToID);
foreach (VendorPickList.VendorPickListInfo i in mVendors)
{
if (i.Active == true && i.VendorType != VendorTypes.Shipper)
{
cbWorkorderItemOutsideServiceVendorSentToID.Items.Add(i.ID, i.Name);
}
else
{
//is the current, inactive item the one selected in this record?
if (i.ID == mCurrentWorkorderItem.OutsideService.VendorSentToID)
{
//yes, so add it manually and grayed out
ValueListItem vi = cbWorkorderItemUnitID.Items.Add(i.ID, i.Name);
vi.Appearance.ForeColor = System.Drawing.SystemColors.GrayText;
}
}
}
//Added: 19-July-2006 see above
Util.ComboEndUpdate(cbWorkorderItemOutsideServiceVendorSentToID);
//Util.ComboSelectGuid(cbWorkorderItemOutsideServiceVendorSentToID,mCurrentWorkorderItem.OutsideService.VendorSentToID);
}
/// <summary>
/// Sent VIA:
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void cbWorkorderItemOutsideServiceVendorSentViaID_NeedMoreData()
{
//case 1039 //log.Debug("cbWorkorderItemOutsideServiceVendorSentViaID_NeedMoreData");
cbWorkorderItemOutsideServiceVendorSentViaID.ClearList();
//Added: 19-July-2006 Huge performance increase with large lists
Util.ComboBeginUpdate(cbWorkorderItemOutsideServiceVendorSentViaID);
foreach (VendorPickList.VendorPickListInfo i in mVendors)
{
if (i.Active == true && i.VendorType == VendorTypes.Shipper)
{
cbWorkorderItemOutsideServiceVendorSentViaID.Items.Add(i.ID, i.Name);
}
else
{
//is the current, inactive item the one selected in this record?
if (i.ID == mCurrentWorkorderItem.OutsideService.VendorSentViaID)
{
//yes, so add it manually and grayed out
ValueListItem vi = cbWorkorderItemUnitID.Items.Add(i.ID, i.Name);
vi.Appearance.ForeColor = System.Drawing.SystemColors.GrayText;
}
}
}
//Added: 19-July-2006 see above
Util.ComboEndUpdate(cbWorkorderItemOutsideServiceVendorSentViaID);
}
private void cbWorkorderItemOutsideServiceVendorSentToID_ValueChanged(object sender, System.EventArgs e)
{
//case 1039 //log.Debug("cbWorkorderItemOutsideServiceVendorSentToID_ValueChanged");
bWorkorderChildrenStateChanged = true;
}
#endregion
#region === Outside service Panel sizing ===
private void pnlOutsideService_SizeChanged(object sender, System.EventArgs e)
{
if (this.WindowState == FormWindowState.Minimized) return;
//case 1039 //log.Debug("pnlOutsideService_SizeChanged");
int nPanelWidth = pnlOutsideService.Width / 3;
pnlOutsideServiceLeft.Width = nPanelWidth;
pnlOutsideServiceCenter.Width = nPanelWidth;
pnlOutsideServiceRight.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 - 8;
//make room for error icons
nRightWidth -= 16;
//Size and align controls in Left panel
btnWorkorderItemOutsideServiceVendorSentToID.Width = nLeftWidth;
cbWorkorderItemOutsideServiceVendorSentToID.Left = nLeftWidth;
cbWorkorderItemOutsideServiceVendorSentToID.Width = nRightWidth;
lblWorkorderItemOutsideServiceRMANumber.Width = nLeftWidth;
edWorkorderItemOutsideServiceRMANumber.Left = nLeftWidth;
edWorkorderItemOutsideServiceRMANumber.Width = nRightWidth;
lblWorkorderItemOutsideServiceRepairCost.Width = nLeftWidth;
edWorkorderItemOutsideServiceRepairCost.Left = nLeftWidth;
edWorkorderItemOutsideServiceRepairCost.Width = nRightWidth;
lblWorkorderItemOutsideServiceRepairPrice.Width = nLeftWidth;
edWorkorderItemOutsideServiceRepairPrice.Left = nLeftWidth;
edWorkorderItemOutsideServiceRepairPrice.Width = nRightWidth;
//Case 266
lblWorkorderItemOutsideServiceNotes.Width = nLeftWidth;
edWorkorderItemOutsideServiceNotes.Width = nLeftWidth + nRightWidth;
//center panel
btnWorkorderItemOutsideServiceVendorSentViaID.Width = nLeftWidth;
cbWorkorderItemOutsideServiceVendorSentViaID.Left = nLeftWidth;
cbWorkorderItemOutsideServiceVendorSentViaID.Width = nRightWidth;
lblWorkorderItemOutsideServiceTrackingNumber.Width = nLeftWidth;
edWorkorderItemOutsideServiceTrackingNumber.Left = nLeftWidth;
edWorkorderItemOutsideServiceTrackingNumber.Width = nRightWidth;
lblWorkorderItemOutsideServiceShippingCost.Width = nLeftWidth;
edWorkorderItemOutsideServiceShippingCost.Left = nLeftWidth;
edWorkorderItemOutsideServiceShippingCost.Width = nRightWidth;
lblWorkorderItemOutsideServiceShippingPrice.Width = nLeftWidth;
edWorkorderItemOutsideServiceShippingPrice.Left = nLeftWidth;
edWorkorderItemOutsideServiceShippingPrice.Width = nRightWidth;
//Right panel
//turn off Offset
nRightWidth = nRightWidth + 8;
lblWorkorderItemOutsideServiceDateSent.Width = nLeftWidth;
dtWorkorderItemOutsideServiceDateSent.Left = nLeftWidth;
dtWorkorderItemOutsideServiceDateSent.Width = nRightWidth;
lblWorkorderItemOutsideServiceDateETA.Width = nLeftWidth;
dtWorkorderItemOutsideServiceDateETA.Left = nLeftWidth;
dtWorkorderItemOutsideServiceDateETA.Width = nRightWidth;
lblWorkorderItemOutsideServiceDateReturned.Width = nLeftWidth;
dtWorkorderItemOutsideServiceDateReturned.Left = nLeftWidth;
dtWorkorderItemOutsideServiceDateReturned.Width = nRightWidth;
}
#endregion
#region Outside Service hyperbuttons
private void btnWorkorderItemOutsideServiceVendorSentToID_Click(object sender, System.EventArgs e)
{
//case 1039 //log.Debug("btnWorkorderItemOutsideServiceVendorSentToID_Click");
VendorInfoForm cf = new VendorInfoForm(VendorTypes.All);
if (cbWorkorderItemOutsideServiceVendorSentToID.Value != null && (Guid)cbWorkorderItemOutsideServiceVendorSentToID.Value != Guid.Empty)
{
cf.VendorToEdit = Vendor.GetItem((Guid)cbWorkorderItemOutsideServiceVendorSentToID.Value);
}
else
{
if (AyaBizUtils.Right("Object.Vendor") < (int)SecurityLevelTypes.ReadWrite)
{
//case 1039 //log.Debug("No Vendor selected to view and user has no rights to create a new one.");
return;
}
cf.VendorToEdit = Vendor.NewItem();
//cf.VendorTypeToEdit=VendorTypes.Wholesaler;
}
cf.Visible = false;
cf.ShowDialog();
if (cf.ChangesMade)
{
mCurrentWorkorderItem.OutsideService.VendorSentToID = Guid.Empty;
Util.FillGZComboBoxWithNameIDList("Vendor", cbWorkorderItemOutsideServiceVendorSentToID, false, Guid.Empty, false);
mCurrentWorkorderItem.OutsideService.VendorSentToID = cf.VendorToEdit.ID;
//Case 2
mVendors = VendorPickList.GetList();
}
}
private void btnWorkorderItemOutsideServiceVendorSentViaID_Click(object sender, System.EventArgs e)
{
//case 1039 //log.Debug("btnWorkorderItemOutsideServiceVendorSentViaID_Click");
VendorInfoForm cf = new VendorInfoForm(VendorTypes.All);
if (cbWorkorderItemOutsideServiceVendorSentViaID.Value != null && (Guid)cbWorkorderItemOutsideServiceVendorSentViaID.Value != Guid.Empty)
{
cf.VendorToEdit = Vendor.GetItem((Guid)cbWorkorderItemOutsideServiceVendorSentViaID.Value);
}
else
{
if (AyaBizUtils.Right("Object.Vendor") < (int)SecurityLevelTypes.ReadWrite)
{
//case 1039 //log.Debug("No Vendor selected to view and user has no rights to create a new one.");
return;
}
cf.VendorToEdit = Vendor.NewItem();
cf.VendorToEdit.VendorType = VendorTypes.Shipper;
}
cf.Visible = false;
cf.ShowDialog();
if (cf.ChangesMade)
{
mCurrentWorkorderItem.OutsideService.VendorSentViaID = Guid.Empty;
Util.FillGZComboBoxWithNameIDList("Vendor:Shipper", cbWorkorderItemOutsideServiceVendorSentViaID, false, Guid.Empty, false);
mCurrentWorkorderItem.OutsideService.VendorSentViaID = cf.VendorToEdit.ID;
//Case 2
mVendors = VendorPickList.GetList();
}
}
#endregion Outside Service hyperbuttons
#endregion
#region Form UI / Business object synchronization and Restrictions
private int mLastDocsCount = -1;
/// <summary>
/// Synchronize the state of the UI to the BO's
/// </summary>
private void SyncUI()
{
foreach (ToolBase tb in tbManager.Tools)
{
if (tb.Key != "LT:UI.ToolBar.Customize")
tb.SharedProps.Enabled = !bDesignMode;
else
{
if (bDesignMode)
{
tb.SharedProps.AppearancesLarge.Appearance.BackColor = Color.LightGreen;
tb.SharedProps.AppearancesSmall.Appearance.BackColor = Color.LightGreen;
}
else
{
tb.SharedProps.AppearancesLarge.ResetAppearance();//.Appearance.BackColor = Color.LightGreen;
tb.SharedProps.AppearancesSmall.ResetAppearance();//.Appearance.BackColor = Color.LightGreen;
}
}
}
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();
tbManager.Tools["LT:O.Contract"].SharedProps.Visible = (mWorkorder.ContractResolved() != null && !mWorkorder.IsTemplate);
//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;
//case 1456
tbManager.Tools["LT:UI.Toolbar.Print"].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;
}
//Indicate if any docs in icon
//case 918
if (this.mLastDocsCount != mWorkorder.Docs.Count)
{
this.mLastDocsCount = mWorkorder.Docs.Count;
Util.AssignedDocsSetImage(tbManager, (mLastDocsCount > 0));
}
tbManager.Tools["LT:UI.Toolbar.WorkorderForm.SetAllPartsUsedInService"].SharedProps.Visible = mWorkorder.IsServiceWorkorder;
tbManager.Tools["LT:Workorder.Label.Command.ConvertScheduledUserToLabor"].SharedProps.Visible = mWorkorder.IsServiceWorkorder || mWorkorder.IsServiceTemplateWorkorder;
//Unit meter reading
if (tbManager.Tools["LT:UnitMeterReading.Label.List"].SharedProps.Visible)
{
tbManager.Tools["LT:UnitMeterReading.Label.List"].SharedProps.Enabled = !this.mWorkorder.IsNew;
}
//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;
}
/// <summary>
/// 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)
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void Application_Idle(object sender, EventArgs e)
{
if (!bSuspendAppIdleHandler)
SyncUI();
}
/// <summary>
/// Adapt UI to accomodate users security access level
/// </summary>
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;
//case 73
tbManager.Tools["LT:O.WikiPage"].SharedProps.Visible = mWorkorder.CanWiki;
//case 1172
tbManager.Tools["LT:AssignedDoc.Label.List"].SharedProps.Visible = !AyaBizUtils.Lite;
//case 1194
tbManager.Tools["LT:UI.ToolBar.Customize"].SharedProps.Visible = User.IsAdmin;
}
/// <summary>
/// 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
/// </summary>
/// <param name="ReadOnly">Set access rights to read only if true</param>
/// <param name="ForceSetting">Make settings regardless if already set that way, used to initialize first time</param>
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.Tools["LT:Workorder.Label.Command.MoveWorkorderItem"].SharedProps.Visible = !bNoDelete;
tbManager.EndUpdate();
#endregion toolbars
//DISABLE / ENABLE EDITABLE CONTROLS
Util.SetAccess(ReadOnly, this, mWorkorder.Rights == SecurityLevelTypes.ReadWrite);
//case 1408 add proper check for deleteable
//if (mWorkorder.IsDeleteable && (AyaBizUtils.Right("Object.WorkorderItem") > (int)SecurityLevelTypes.ReadWrite))
// Util.GridAddDeleteButton(gridWorkorderItems);
//else
// Util.GridRemoveDeleteButton(gridWorkorderItems);
//case 1562
Util.SetAccessOnGrid(!mWorkorder.IsWorkorderItemEditable, gridWorkorderItems, !mWorkorder.IsWorkorderItemDeletable);
edClientID.ReadOnly = true;
edWarrantyInfo.ReadOnly = true;
//disallow editing of invoice number and
//only allow in special circs. below
edInvoiceNumber.ReadOnly = true;
//CloseByDate: Separate from other rights but honours workorder object rights that
//are more restrictive.
if (ReadOnly)
dtCloseByDate.GZReadOnly = true;
else
{
//they *may* be allowed to access it
if (AyaBizUtils.Right("Object.WorkorderService.CloseByDate") > (int)SecurityLevelTypes.ReadOnly)
dtCloseByDate.GZReadOnly = false;
else//Added: 2-Oct-2006 was not graying out when user had no rights to it.
dtCloseByDate.GZReadOnly = true;
//case 1898 case 1899
//they *may* be allowed to access it
if (AyaBizUtils.Right("Object.WorkorderItemUnit") > (int)SecurityLevelTypes.ReadOnly &&
AyaBizUtils.Right("Object.WorkorderItem") > (int)SecurityLevelTypes.ReadOnly)
{
cbWorkorderItemUnitID.ReadOnly = false;
cbWorkorderItemUnitServiceTypeID.ReadOnly = false;
}
else
{
cbWorkorderItemUnitID.ReadOnly = true;
cbWorkorderItemUnitServiceTypeID.ReadOnly = true;
}
//case 1899
//they *may* be allowed to access it
if (AyaBizUtils.Right("Object.WorkorderItem") > (int)SecurityLevelTypes.ReadOnly)
{
cbWorkorderItemTasks.ReadOnly = false;
gridCustom.Enabled = true;
}
else
{
cbWorkorderItemTasks.ReadOnly = true;
gridCustom.DisplayLayout.Override.AllowUpdate = DefaultableBoolean.True;
gridCustom.Enabled = false;
}
}
//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;
#region Outside service access rights
//Outside service rights are special because they affect shipping and receiving
//so we use the more specific "Object.WorkorderItemOutsideService" rights check for that
//because we may not want a user to have rights to s&r, but *do* have rights here to outsideservice
//Note that NoAccess isn't currently supported, only read only or editable
//However in any case the rights to the overall workorder take precendence
//so only check for more specific rights if the overall isn't read only already
//(because if it is, then the outside service will have been set to read only above already)
if (!ReadOnly)
{
bool bOutsideServiceReadOnly = AyaBizUtils.Right("Object.WorkorderItemOutsideService") < (int)SecurityLevelTypes.ReadWrite ||
AyaBizUtils.Right("Object.WorkorderItem") < (int)SecurityLevelTypes.ReadWrite;//case 1899
cbWorkorderItemOutsideServiceVendorSentToID.ReadOnly = bOutsideServiceReadOnly;
edWorkorderItemOutsideServiceRMANumber.ReadOnly = bOutsideServiceReadOnly;
edWorkorderItemOutsideServiceRepairCost.ReadOnly = bOutsideServiceReadOnly;
edWorkorderItemOutsideServiceRepairPrice.ReadOnly = bOutsideServiceReadOnly;
edWorkorderItemOutsideServiceNotes.ReadOnly = bOutsideServiceReadOnly;
cbWorkorderItemOutsideServiceVendorSentViaID.ReadOnly = bOutsideServiceReadOnly;
edWorkorderItemOutsideServiceTrackingNumber.ReadOnly = bOutsideServiceReadOnly;
edWorkorderItemOutsideServiceShippingCost.ReadOnly = bOutsideServiceReadOnly;
edWorkorderItemOutsideServiceShippingPrice.ReadOnly = bOutsideServiceReadOnly;
dtWorkorderItemOutsideServiceDateSent.GZReadOnly = bOutsideServiceReadOnly;
dtWorkorderItemOutsideServiceDateETA.GZReadOnly = bOutsideServiceReadOnly;
dtWorkorderItemOutsideServiceDateReturned.GZReadOnly = bOutsideServiceReadOnly;
}
#endregion
//Case 405
ckClosed.Enabled = mWorkorder.IsCloseAllowed;
//Case 413
ckServiceCompleted.Enabled = mWorkorder.IsServiceCompletedEditable;
//tasks combo
this.cbWorkorderItemTasks.ButtonsLeft[0].Visible = !ReadOnly;
if (mWorkorder.IsTemplate)
{
btnClientID.Visible = false;
edClientID.Visible = false;
lblTemplate.Visible = true;
ckClosed.Visible = false;
ckServiceCompleted.Visible = false;
edTemplateDescription.Visible = true;
lblTemplateDescription.Visible = true;
//case 3132
ckTemplateFreshPrice.Visible = true;
//case 58
cbRegion.Visible = true;
lblRegionID.Visible = true;
edInvoiceNumber.Visible = false;
lblInvoiceNumber.Visible = false;
cbWorkorderItemUnitID.Visible = false;
btnUnitID.Visible = false;
lblCloseByDate.Visible = false;
dtCloseByDate.Visible = false;
lblServiceDate.Visible = false;
dtServiceDate.Visible = false;
//Quote
lblQuoteRequestDate.Visible = false;
dtQuoteRequestDate.Visible = false;
lblDateApproved.Visible = false;
dtDateApproved.Visible = false;
lblDateSubmitted.Visible = false;
dtDateSubmitted.Visible = false;
lblValidUntilDate.Visible = false;
dtValidUntilDate.Visible = false;
//PM
//case 779
ckPMActive.Visible = false;
lblPMNextServiceDate.Visible = false;
dtPMNextServiceDate.Visible = false;
lblPMStopGeneratingDate.Visible = false;
dtPMStopGeneratingDate.Visible = false;
tbManager.Tools["LT:O.Contract"].SharedProps.Visible = false;
tbManager.Tools["LT:ClientNote.Label.List"].SharedProps.Visible = false;
tbManager.Tools["LT:UnitMeterReading.Label.List"].SharedProps.Visible = false;
tbManager.Tools["LT:Workorder.Label.Command.MoveWorkorderItem"].SharedProps.Visible = false;
tbManager.Tools["LT:Workorder.Label.Command.CopyWorkorderItem"].SharedProps.Visible = false;
}
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;
}
}
#endregion
#region Workorder Items Grid Initialization
/// <summary>
/// Get grid ready
/// </summary>
private void InitializeGrid()
{
//case 1039 //log.Debug("InitializeGrid (workorderitems)");
gridWorkorderItems.DisplayLayout.Override.HeaderClickAction = HeaderClickAction.SortSingle;
gridWorkorderItems.DisplayLayout.Override.SelectTypeRow = SelectType.Single;
//case 1334
gridWorkorderItems.DisplayLayout.ScrollBounds = ScrollBounds.ScrollToFill;
Util.GridPreLocalize("WorkorderItem", gridWorkorderItems.DisplayLayout.Bands[0]);
Util.LocalizeHelperSuckOutKeys(this.Name, gridWorkorderItems);//case 1810
Util.FetchGridLayout("WorkorderItems" + (mWorkorder.IsTemplate ? "Template" : ""), "", 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;
//}
//case 3183
gridWorkorderItems.DisplayLayout.Bands[0].Columns["HasRequestDate"].Hidden = true;
//case 3201 re-enable unit name
//gridWorkorderItems.DisplayLayout.Bands[0].Columns["UnitName"].Hidden = true;
#endregion hide internal columns
bool bCanEdit = mWorkorder.IsWorkorderItemEditable;
//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"].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["PriorityID"].CellAppearance.ImageVAlign = VAlign.Top;//case 1539
// gridWorkorderItems.DisplayLayout.Bands[0].Columns["WarrantyService"].CellAppearance.TextVAlign = VAlign.Top;//case 1539
if (mWorkorder.IsTemplate)
gridWorkorderItems.DisplayLayout.Bands[0].Columns["RequestDate"].Hidden = true;
if (bCanEdit)
gridWorkorderItems.DisplayLayout.Bands[0].Columns["RequestDate"].Editor = ccGridDateTimeEditor;
Util.LocalizeGrid(gridWorkorderItems);
//case 3201
//need to manually localize the unit name item since it's normally not intended for display
//and there is no matching key
gridWorkorderItems.DisplayLayout.Bands[0].Columns["UnitName"].Header.Caption = Util.LocaleText.GetLocalizedText("O.Unit");
PopulateGridValueLists();
//Allow empty string entry on grid
Util.SetTextColumnsNullable(gridWorkorderItems);
}
//case 1539
private void gridWorkorderItems_InitializeLayout(object sender, InitializeLayoutEventArgs e)
{
CheckEditor checkEditor = new CheckEditor();
checkEditor.CheckAlign = ContentAlignment.TopCenter;
e.Layout.Bands[0].Columns["WarrantyService"].Editor = checkEditor;
}
/// <summary>
/// Populate the drop down lists inside the grid
/// so they display and can select the correct underlying
/// value
/// </summary>
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()
{
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<Guid> 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<Guid> 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<l.Count;x++)
//{
// vl.ValueListItems.Add(new Guid(((DictionaryEntry)l.BindableList[x]).Key.ToString()),
// ((DictionaryEntry)l.BindableList[x]).Value.ToString());
//}
vl.SortStyle = ValueListSortStyle.Ascending;
//Bind value lists to correct columns in grid
gridWorkorderItems.DisplayLayout.Bands[0].Columns["WorkorderStatusID"].ValueList = gridWorkorderItems.DisplayLayout.ValueLists["WorkorderStatusTypes"];
//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["WorkorderStatusID"].AutoCompleteMode = Infragistics.Win.AutoCompleteMode.SuggestAppend;
gridWorkorderItems.DisplayLayout.Bands[0].Columns["WorkorderStatusID"].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.DropDownValidate;//Case 96 for autocomplete (was DropDownList)
//-------------------------------------------------------------------
}
private void FillWorkorderItemTypesList()
{
//case 1039 //log.Debug("FillWorkorderItemTypesList");
//TYPES
if (gridWorkorderItems.DisplayLayout.ValueLists.Exists("WorkorderItemTypes"))
gridWorkorderItems.DisplayLayout.ValueLists.Remove("WorkorderItemTypes");
ValueList vl = gridWorkorderItems.DisplayLayout.ValueLists.Add("WorkorderItemTypes");
//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
//case 1121
System.Collections.Generic.List<Guid> 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;
}
}
/// <summary>
/// Selection of workorder item...
/// this triggers change of which workorderitem is bound to the parts / labour etc etc fields at the bottom
///
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
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;
}
/// <summary>
/// Set the size of popout edit boxes to huge
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
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();
}
/// <summary>
/// Prevent user from deleting last workorder item if they
/// attempt to do so..
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
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();
}
}
//case 1333
private void gridWorkorderItems_AfterRowsDeleted(object sender, EventArgs e)
{
gridWorkorderItems.ActiveRow = gridWorkorderItems.Rows[0];
}
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); }
//case 1105
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);
//case 3183
c.HideColumns.Add("HasRequestDate", 0);
//3201 - re enable unit name
//c.HideColumns.Add("UnitName", 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 1562
bool bCanDelete = mWorkorder.IsWorkorderItemChildDeletable(RootObjectTypes.WorkorderItemLabor);
bool bCanEdit = mWorkorder.IsWorkorderItemChildEditable(RootObjectTypes.WorkorderItemLabor);
gridLabor.DisplayLayout.Override.HeaderClickAction = HeaderClickAction.SortSingle;
gridLabor.DisplayLayout.Override.AllowAddNew = AllowAddNew.TemplateOnBottom;
//case 1334
gridLabor.DisplayLayout.ScrollBounds = ScrollBounds.ScrollToFill;
Util.GridPreLocalize("WorkorderItemLabor", this.gridLabor.DisplayLayout.Bands[0]);
//case 1810
Util.LocalizeHelperSuckOutKeys(this.Name, gridLabor);
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;
}
gridLabor.DisplayLayout.Bands[0].Columns["UserID"].Hidden = false;
gridLabor.DisplayLayout.Bands[0].Columns["TaxRateSaleID"].Hidden = false;
gridLabor.DisplayLayout.Bands[0].Columns["ServiceStartDate"].Hidden = mWorkorder.IsTemplate;
if (bCanEdit)
gridLabor.DisplayLayout.Bands[0].Columns["ServiceStartDate"].Editor = ccGridDateTimeEditor;
gridLabor.DisplayLayout.Bands[0].Columns["ServiceStopDate"].Hidden = mWorkorder.IsTemplate;
if (bCanEdit)
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";
if (mWorkorder.WorkorderType == WorkorderTypes.Service)
{
//case 1617
mCachedBankColumnDisplay = null;
BankColumnDisplay(gridLabor);
}
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 1562
Util.SetAccessOnGrid(!bCanEdit, gridLabor, !bCanDelete);
//=========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)
{
if (gridLabor.DisplayLayout.Bands[0].Columns.Exists("BANK"))
{
if ((Guid)e.Row.Cells["ServiceBankID"].Value == Guid.Empty)
{
e.Row.Cells["BANK"].Appearance.Image = Resource1.BankedServiceNew16;//Util.Image("ServiceBankNew16.png");
//If the underlying record is new or dirty (not saved) then
//user can not click on button
if (!((CSLA.BusinessBase)e.Row.ListObject).IsDirty && !((CSLA.BusinessBase)e.Row.ListObject).IsNew)
e.Row.Cells["BANK"].Activation = Activation.ActivateOnly;
else
e.Row.Cells["BANK"].Activation = Activation.Disabled;
}
else
{
//Case 481
//e.Row.Activation=Activation.NoEdit;
e.Row.Activation = Activation.ActivateOnly;
e.Row.Cells["BANK"].Activation = Activation.Disabled;
e.Row.Cells["BANK"].Appearance.Image = null;
e.Row.Appearance.ForeColor = System.Drawing.SystemColors.GrayText;
}
}
//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 ServiceBank and Delete button related
//case 1617
private string mCachedBankColumnDisplay = null;
/// <summary>
/// Display or remove banked button column
/// from specified grids as required
/// </summary>
private void BankColumnDisplay(UltraGrid g)
{
//case 1039 //log.Debug("BankColumnDisplay");
//Add the bank column if required
if (!g.DisplayLayout.Bands[0].Columns.Exists("BANK"))
{
g.DisplayLayout.Bands[0].Columns.Add("BANK", "");
g.DisplayLayout.Bands[0].Columns["BANK"].Header.Caption = "";
g.DisplayLayout.Bands[0].Columns["BANK"].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.Button;
g.DisplayLayout.Bands[0].Columns["BANK"].Header.Appearance.Image = Resource1.BankedServiceNew16;
g.DisplayLayout.Bands[0].Columns["BANK"].Header.Appearance.ImageHAlign = HAlign.Center;
g.DisplayLayout.Bands[0].Columns["BANK"].Width = 24;
g.DisplayLayout.Bands[0].Columns["BANK"].MinWidth = 24;
g.DisplayLayout.Bands[0].Columns["BANK"].MaxWidth = 24;
}
//case 1617
//note for case 1617 mworkorderbankable object only applies to the "header" of the workorder in that
//it only checks for client or headoffice
//Since a bankable unit trumps both of those this means that this code
//below is backwards, the Unit should be checked first, *then* the client / headoffice if the unit is not bankable
//so for case 1617 I've flipped the two blocks below
//and also added caching to prevent the multiple calls that aren't really required to currentbalancefetcher which is expensive
//Also this code was used above but not here I guess because it wasn't really working so now it's here
//Changed: 20-June-2006 now get unit id from combo rather than old method of from
//the biz object because if it was just selected in the combo and this code is called
//the biz object doesn't know about it yet
Guid unitid = Guid.Empty;
if (this.cbWorkorderItemUnitID.Value != null)
unitid = (Guid)cbWorkorderItemUnitID.Value;
if (unitid != Guid.Empty &&
mClientUnitList.Contains(unitid) &&
this.mClientUnitList[unitid].UsesBanking)
{
g.DisplayLayout.Bands[0].Columns["BANK"].Hidden = false;
//case 1617
if (mCachedBankColumnDisplay == null)
mCachedBankColumnDisplay = ServiceBankCurrentBalanceFetcher.GetItem(unitid, RootObjectTypes.Unit).DisplayBalances;
//case 635
g.DisplayLayout.Bands[0].Columns["BANK"].Header.ToolTipText = mCachedBankColumnDisplay;
return;
}
if (mWorkorderBankableObject != null)
{
g.DisplayLayout.Bands[0].Columns["BANK"].Hidden = false;
//case 1617
if (mCachedBankColumnDisplay == null)
mCachedBankColumnDisplay = ServiceBankCurrentBalanceFetcher.GetItem(mWorkorderBankableObject.ID, mWorkorderBankableObject.RootObjectType).DisplayBalances;
//Case 635
g.DisplayLayout.Bands[0].Columns["BANK"].Header.ToolTipText = mCachedBankColumnDisplay;
return;
}
//nope, nothing to show...
g.DisplayLayout.Bands[0].Columns["BANK"].Hidden = true;
//Case 635
g.DisplayLayout.Bands[0].Columns["BANK"].Header.ToolTipText = "";
}
private void gridTravel_ClickCellButton(object sender, CellEventArgs e)
{
//case 1039 //log.Debug("gridLabor_ClickCellButton");
//Bank cell?
if (e.Cell.Column.Key == "BANK")
{
if ((Guid)e.Cell.Row.Cells["TravelRateID"].Value == Guid.Empty) return;
if ((decimal)e.Cell.Row.Cells["TravelRateQuantity"].Value == 0) return;
if ((Guid)e.Cell.Row.Cells["ServiceBankID"].Value != Guid.Empty) return;
//warn user bank is permanent, no going back...
//if (Util.PromptYesNoCancelFromLocaleKey("WorkorderItemLabor.Label.UI.BankWarning") != DialogResult.Yes)
// return;
//Figure out what to apply this to...
TypeAndID tid = null;
if (mCurrentWorkorderItem.UnitID != Guid.Empty && this.mClientUnitList[mCurrentWorkorderItem.UnitID].UsesBanking)
{
tid = new TypeAndID(RootObjectTypes.Unit, mCurrentWorkorderItem.UnitID);
}
if (tid == null)
{
if (mWorkorderBankableObject == null)
return;
else
tid = mWorkorderBankableObject;
}
decimal dCharge = mRateList[(Guid)e.Cell.Row.Cells["TravelRateID"].Value].Charge;
//case 1170
//case 1189
//Check if already banked, i.e. at another workstation or in another session
Guid gPriorBank = ServiceBankCheckAlreadyBanked.GetBankID(new Guid(e.Cell.Row.Cells["ID"].Value.ToString()), RootObjectTypes.WorkorderItemTravel);
if (gPriorBank != Guid.Empty)
{
//If it's already banked then just disable it as if it was just banked now
e.Cell.Row.Activation = Activation.ActivateOnly;
e.Cell.Activation = Activation.Disabled;
//case 1189 flag the travel record
mCurrentWorkorderItem.Travels[e.Cell.Row.Cells["ID"].Value.ToString()].ApplyServiceBankID(gPriorBank);
return;
}
if (BankServicePrompt(tid, dCharge, (decimal)e.Cell.Row.Cells["TravelRateQuantity"].Value) != DialogResult.Yes)
return;
mCurrentWorkorderItem.Travels[e.Cell.Row.Cells["ID"].Value.ToString()].ApplyToServiceBank(tid, dCharge, Util.LocaleText.GetLocalizedText("O.Workorder") + " " + this.mWorkorder.WorkorderService.ServiceNumber.ToString());
//Case 481
e.Cell.Row.Activation = Activation.ActivateOnly;
//e.Cell.Row.Activation=Activation.NoEdit;
//Prevent it from being re-clicked
e.Cell.Activation = Activation.Disabled;
}
if (e.Cell.Column.Key == "REMOVE")
gridTravel.DisplayLayout.ActiveRow.Delete();
}
private void gridLabor_ClickCellButton(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e)
{
//case 1039 //log.Debug("gridLabor_ClickCellButton");
//Bank cell?
if (e.Cell.Column.Key == "BANK")
{
if ((Guid)e.Cell.Row.Cells["ServiceRateID"].Value == Guid.Empty) return;
if ((decimal)e.Cell.Row.Cells["ServiceRateQuantity"].Value == 0) return;
if ((Guid)e.Cell.Row.Cells["ServiceBankID"].Value != Guid.Empty) return;
//warn user bank is permanent, no going back...
//if (Util.PromptYesNoCancelFromLocaleKey("WorkorderItemLabor.Label.UI.BankWarning") != DialogResult.Yes)
// return;
//Figure out what to apply this to...
TypeAndID tid = null;
if (mCurrentWorkorderItem.UnitID != Guid.Empty && this.mClientUnitList[mCurrentWorkorderItem.UnitID].UsesBanking)
{
tid = new TypeAndID(RootObjectTypes.Unit, mCurrentWorkorderItem.UnitID);
}
if (tid == null)
{
if (mWorkorderBankableObject == null)
return;
else
tid = mWorkorderBankableObject;
}
decimal dCharge = mRateList[(Guid)e.Cell.Row.Cells["ServiceRateID"].Value].Charge;
//case 1170
//case 1189
//Check if already banked, i.e. at another workstation or in another session
Guid gPriorBank = ServiceBankCheckAlreadyBanked.GetBankID(new Guid(e.Cell.Row.Cells["ID"].Value.ToString()), RootObjectTypes.WorkorderItemLabor);
if (gPriorBank != Guid.Empty)
{
//If it's already banked then just disable it as if it was just banked now
e.Cell.Row.Activation = Activation.ActivateOnly;
e.Cell.Activation = Activation.Disabled;
//case 1189 flag the labor record
mCurrentWorkorderItem.Labors[e.Cell.Row.Cells["ID"].Value.ToString()].ApplyServiceBankID(gPriorBank);
return;
}
if (BankServicePrompt(tid, dCharge, (decimal)e.Cell.Row.Cells["ServiceRateQuantity"].Value) != DialogResult.Yes)
return;
mCurrentWorkorderItem.Labors[e.Cell.Row.Cells["ID"].Value.ToString()].ApplyToServiceBank(tid, dCharge, Util.LocaleText.GetLocalizedText("O.Workorder") + " " + this.mWorkorder.WorkorderService.ServiceNumber.ToString());
//Case 481
e.Cell.Row.Activation = Activation.ActivateOnly;
//e.Cell.Row.Activation=Activation.NoEdit;
//Prevent it from being re-clicked
e.Cell.Activation = Activation.Disabled;
}
if (e.Cell.Column.Key == "REMOVE")
gridLabor.DisplayLayout.ActiveRow.Delete();
}
/// <summary>
/// Prompt with current balance
/// </summary>
/// <param name="tid"></param>
/// <returns></returns>
public static DialogResult BankServicePrompt(TypeAndID tid, decimal currency, decimal hours)
{
ServiceBankCurrentBalanceFetcher cbf = ServiceBankCurrentBalanceFetcher.GetItem(tid.ID, tid.RootObjectType);
string sMessage = cbf.DisplayProposedBalances(currency, hours, 1) + "\r\n\r\n" + Util.LocaleText.GetLocalizedText("WorkorderItemLabor.Label.UI.BankWarning");
MessageBoxIcon ico = MessageBoxIcon.Information;
if (sMessage.Contains("<-- !"))
ico = MessageBoxIcon.Exclamation;
DialogResult dr = MessageBox.Show(sMessage, "", MessageBoxButtons.YesNoCancel,
ico, MessageBoxDefaultButton.Button3);
//if (log.IsDebugEnabled)
//case 1039 //log.Debug("BankServicePrompt(" + sMessage + " (user selected " + dr.ToString() + ")");
return dr;
}
#endregion
#region Travel items grid events / Initialization
private bool bTravelGridIntialized = false;
private void gridTravel_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e)
{
if (bTravelGridIntialized || gridTravel.DisplayLayout.Bands[0].Columns.Count == 0) return;
//case 1562
bool bCanDelete = mWorkorder.IsWorkorderItemChildDeletable(RootObjectTypes.WorkorderItemTravel);
bool bCanEdit = mWorkorder.IsWorkorderItemChildEditable(RootObjectTypes.WorkorderItemTravel);
gridTravel.DisplayLayout.Override.HeaderClickAction = HeaderClickAction.SortSingle;
gridTravel.DisplayLayout.Override.AllowAddNew = AllowAddNew.TemplateOnBottom;
//case 1334
gridTravel.DisplayLayout.ScrollBounds = ScrollBounds.ScrollToFill;
Util.GridPreLocalize("WorkorderItemTravel", this.gridTravel.DisplayLayout.Bands[0]);
Util.LocalizeHelperSuckOutKeys(this.Name, gridTravel);//case 1810
Util.FetchGridLayout("WorkorderItemTravel", "", gridTravel);
if (gridTravel.DisplayLayout.Bands[0].Columns.Exists("BANK"))
gridTravel.DisplayLayout.Bands[0].Columns.Remove("BANK");
//Hide unwanted workorder item Travel fields in that grid
foreach (UltraGridColumn c in gridTravel.DisplayLayout.Bands[0].Columns)
{
c.Hidden = true;
}
gridTravel.DisplayLayout.Bands[0].Columns["UserID"].Hidden = false;
gridTravel.DisplayLayout.Bands[0].Columns["TravelStartDate"].Hidden = mWorkorder.IsTemplate;
if (bCanEdit)
gridTravel.DisplayLayout.Bands[0].Columns["TravelStartDate"].Editor = ccGridDateTimeEditor;
gridTravel.DisplayLayout.Bands[0].Columns["TravelStopDate"].Hidden = mWorkorder.IsTemplate;
if (bCanEdit)
gridTravel.DisplayLayout.Bands[0].Columns["TravelStopDate"].Editor = ccGridDateTimeEditor;
gridTravel.DisplayLayout.Bands[0].Columns["TravelRateID"].Hidden = false;
gridTravel.DisplayLayout.Bands[0].Columns["TaxRateSaleID"].Hidden = false;
gridTravel.DisplayLayout.Bands[0].Columns["TravelDetails"].Hidden = false;
gridTravel.DisplayLayout.Bands[0].Columns["TravelDetails"].CellMultiLine = DefaultableBoolean.True;
gridTravel.DisplayLayout.Bands[0].Columns["TravelDetails"].AutoSizeEdit = DefaultableBoolean.True;
gridTravel.DisplayLayout.Bands[0].Columns["TravelDetails"].VertScrollBar = true;
//case 2006
gridTravel.DisplayLayout.Bands[0].Columns["TravelDetails"].MaxLength = 255;
gridTravel.DisplayLayout.Bands[0].Columns["TravelRateQuantity"].Hidden = false;
gridTravel.DisplayLayout.Bands[0].Columns["NoChargeQuantity"].Hidden = false;
gridTravel.DisplayLayout.Bands[0].Columns["Distance"].Hidden = false;
gridTravel.DisplayLayout.Bands[0].Columns["TravelRateQuantity"].Format = "g29";
gridTravel.DisplayLayout.Bands[0].Columns["NoChargeQuantity"].Format = "g29";
gridTravel.DisplayLayout.Bands[0].Columns["Distance"].Format = "g29";
if (mWorkorder.WorkorderType == WorkorderTypes.Service)
{
//case 1617
mCachedBankColumnDisplay = null;
BankColumnDisplay(gridTravel);
}
Util.LocalizeGrid(gridTravel);
gridTravel.DisplayLayout.ValueLists.Clear();
//**************************************************
//Populate value lists
#region ======== Rates value list ========
//Clear any previous value list from this column
gridTravel.DisplayLayout.Bands[0].Columns["TravelRateID"].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 travel rates
foreach (RatePickList.RatePickListInfo ui in mRateList)
{
if ((ui.Selectable == true) && ui.RateType == RateTypes.Travel)
{
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 (WorkorderItemTravel wl in wi.Travels)
{
//Is this travel item's travel rate ID in the list already?
if (vlRates.FindByDataValue(wl.TravelRateID) != 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.TravelRateID, mRateList[wl.TravelRateID].Name);
vi.Appearance.ForeColor = System.Drawing.SystemColors.GrayText;
}
}
}
//Bind value lists to correct columns in grid
gridTravel.DisplayLayout.Bands[0].Columns["TravelRateID"].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
gridTravel.DisplayLayout.Bands[0].Columns["TravelRateID"].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.DropDownValidate;//Case 96 for autocomplete (was DropDownList)
gridTravel.DisplayLayout.Bands[0].Columns["TravelRateID"].AutoCompleteMode = Infragistics.Win.AutoCompleteMode.SuggestAppend;
#endregion
#region ======== Sheduleable users value list ========
//Clear any previous value list from this column
gridTravel.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 (WorkorderItemTravel wl in wi.Travels)
{
//Is this Travel 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
gridTravel.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
gridTravel.DisplayLayout.Bands[0].Columns["UserID"].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.DropDownValidate;//Case 96 for autocomplete (was DropDownList)
gridTravel.DisplayLayout.Bands[0].Columns["UserID"].AutoCompleteMode = Infragistics.Win.AutoCompleteMode.SuggestAppend;
#endregion
#region ======== Tax Code list ========
//Clear any previous value list from this column
gridTravel.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)
{
//vl.ValueListItems.Add(ui.ID,ui.Name);
//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
gridTravel.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
gridTravel.DisplayLayout.Bands[0].Columns["TaxRateSaleID"].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.DropDownValidate;//Case 96 for autocomplete (was DropDownList)
gridTravel.DisplayLayout.Bands[0].Columns["TaxRateSaleID"].AutoCompleteMode = Infragistics.Win.AutoCompleteMode.SuggestAppend;
#endregion
//Allow empty string entry on grid
Util.SetTextColumnsNullable(gridTravel);
//case 1562
Util.SetAccessOnGrid(!bCanEdit, gridTravel, !bCanDelete);
//=========DONE==============
bTravelGridIntialized = true;
}
private void gridTravel_BeforeRowInsert(object sender, Infragistics.Win.UltraWinGrid.BeforeRowInsertEventArgs e)
{
//case 1039 //log.Debug("gridTravel_BeforeRowInsert");
if (mWorkorder.Closed || mWorkorder.ServiceCompleted) return;
mCurrentWorkorderItem.Travels.Add(mCurrentWorkorderItem);
e.Cancel = true;
bWorkorderChildrenStateChanged = true;
}
private void gridTravel_AfterRowsDeleted(object sender, System.EventArgs e)
{
//case 1039 //log.Debug("gridTravel_AfterRowsDeleted");
bWorkorderChildrenStateChanged = true;
}
private void gridTravel_BeforeAutoSizeEdit(object sender, Infragistics.Win.UltraWinGrid.CancelableAutoSizeEditEventArgs e)
{
e.StartWidth = pnlTravel.Width - 5;
e.StartHeight = pnlTravel.Height - 20;
e.MaxHeight = pnlTravel.Height - 20;
e.MaxWidth = pnlTravel.Width - 5;
}
private void gridTravel_InitializeRow(object sender, Infragistics.Win.UltraWinGrid.InitializeRowEventArgs e)
{
if (gridTravel.DisplayLayout.Bands[0].Columns.Exists("BANK"))
{
if ((Guid)e.Row.Cells["ServiceBankID"].Value == Guid.Empty)
{
e.Row.Cells["BANK"].Appearance.Image = Resource1.BankedServiceNew16;//Util.Image("ServiceBankNew16.png");
//If the underlying record is new or dirty (not saved) then
//user can not click on button
if (!((CSLA.BusinessBase)e.Row.ListObject).IsDirty && !((CSLA.BusinessBase)e.Row.ListObject).IsNew)
e.Row.Cells["BANK"].Activation = Activation.ActivateOnly;
else
e.Row.Cells["BANK"].Activation = Activation.Disabled;
}
else
{
//Case 481
//e.Row.Activation=Activation.NoEdit;
e.Row.Activation = Activation.ActivateOnly;
e.Row.Cells["BANK"].Activation = Activation.Disabled;
e.Row.Cells["BANK"].Appearance.Image = null;
e.Row.Appearance.ForeColor = System.Drawing.SystemColors.GrayText;
}
}
Util.GridShowBrokenRulesErrorIcons(e);
}
private void gridTravel_MouseEnterElement(object sender, Infragistics.Win.UIElementEventArgs e)
{ Util.GridShowBrokenRulesToolTip(e, tipError); }
private void gridTravel_AfterCellUpdate(object sender, CellEventArgs e)
{
if ("TravelStartDate" == e.Cell.Column.Key || "TravelStopDate" == e.Cell.Column.Key)
{
//case 1251
if (!(e.Cell.Row.Cells["TravelStopDate"].Value is DateTime)) return;
if (!(e.Cell.Row.Cells["TravelStartDate"].Value is DateTime)) return;
DateTime dtStart = (DateTime)e.Cell.Row.Cells["TravelStartDate"].Value;
DateTime dtStop = (DateTime)e.Cell.Row.Cells["TravelStopDate"].Value;
// if (dtStart == dtStop) return;
TimeSpan ts = dtStop.Subtract(dtStart);
e.Cell.Row.Cells["TravelRateQuantity"].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);
//case 1334
gridParts.DisplayLayout.ScrollBounds = ScrollBounds.ScrollToFill;
//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;
//case 1505
gridParts.DisplayLayout.Bands[0].Columns["QuantityReserved"].Header.VisiblePosition = 0;
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<l.Count;x++)
//{
// vl.ValueListItems.Add(new Guid(((DictionaryEntry)l.BindableList[x]).Key.ToString()),
// ((DictionaryEntry)l.BindableList[x]).Value.ToString());
//}
foreach (PartWarehousePickList.PartWarehousePickListInfo ui in mWarehouseList)
{
if (ui.Active == true)
{
vl.ValueListItems.Add(ui.ID, ui.Name);
}
else
{
ValueListItem vi = vl.ValueListItems.Add(ui.ID, ui.Name);
vi.Appearance.ForeColor = System.Drawing.SystemColors.GrayText;
}
}
//Bind value lists to correct columns in gridParts
gridParts.DisplayLayout.Bands[0].Columns["PartWarehouseID"].ValueList = gridParts.DisplayLayout.ValueLists["Warehouses"];
//Set column to dropdownlist style so that user can not type an invalid value in a cell
//but must select from the list only
gridParts.DisplayLayout.Bands[0].Columns["PartWarehouseID"].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.DropDownValidate;//Case 96 for autocomplete (was DropDownList)
gridParts.DisplayLayout.Bands[0].Columns["PartWarehouseID"].AutoCompleteMode = Infragistics.Win.AutoCompleteMode.SuggestAppend;
#endregion
#region ======== parts value list ========
//Set column to dropdownlist style so that user can not type an invalid value in a cell
//but must select from the list only
FillPartsList();
gridParts.DisplayLayout.Bands[0].Columns["PartID"].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.DropDownValidate;//Case 96 for autocomplete (was DropDownList)
gridParts.DisplayLayout.Bands[0].Columns["PartID"].AutoCompleteMode = Infragistics.Win.AutoCompleteMode.SuggestAppend;
#endregion
#region ======== Tax Code list ========
//Clear any previous value list from this column
gridParts.DisplayLayout.Bands[0].Columns["TaxPartSaleID"].ValueList = null;
//Add all potential active items
ValueList vlTaxes = new ValueList();
//Empty is valid choice here
vlTaxes.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)
{
//vlTaxes.ValueListItems.Add(ui.ID,ui.Name);
//Case 360 slight modification
ValueListItem vi = vlTaxes.ValueListItems.Add(ui.ID, ui.Name);
if (!ui.Active)
vi.Appearance.ForeColor = System.Drawing.SystemColors.GrayText;
}
//Show sorted alphabetically
vlTaxes.SortStyle = ValueListSortStyle.Ascending;
//Bind value lists to correct columns in grid
gridParts.DisplayLayout.Bands[0].Columns["TaxPartSaleID"].ValueList = vlTaxes;
//Set column to dropdownlist style so that user can not type an invalid value in a cell
//but must select from the list only
gridParts.DisplayLayout.Bands[0].Columns["TaxPartSaleID"].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.DropDownValidate;//Case 96 for autocomplete (was DropDownList)
gridParts.DisplayLayout.Bands[0].Columns["TaxPartSaleID"].AutoCompleteMode = Infragistics.Win.AutoCompleteMode.SuggestAppend;
#endregion
//Allow empty string entry on grid
Util.SetTextColumnsNullable(gridParts);
//case 1562
Util.SetAccessOnGrid(!mWorkorder.IsWorkorderItemChildEditable(RootObjectTypes.WorkorderItemPart), gridParts, !mWorkorder.IsWorkorderItemChildDeletable(RootObjectTypes.WorkorderItemPart));
//=========DONE==============
bPartsGridIntialized = true;
}
private void gridParts_BeforeRowInsert(object sender, Infragistics.Win.UltraWinGrid.BeforeRowInsertEventArgs e)
{
if (mWorkorder.Closed || mWorkorder.ServiceCompleted) return;
//case 1039 //log.Debug("gridParts_BeforeRowInsert");
WorkorderItemPart wip = mCurrentWorkorderItem.Parts.Add(mCurrentWorkorderItem);
if (Util.CurrentUserDefaultPartWarehouseID != Guid.Empty && wip.PartWarehouseID != Util.CurrentUserDefaultPartWarehouseID)
wip.PartWarehouseID = Util.CurrentUserDefaultPartWarehouseID;
//case 2082
if (!mValidWarehouseIdList.Contains(wip.PartWarehouseID))
{
wip.PartWarehouseID = Guid.Empty;
}
bWorkorderChildrenStateChanged = true;
//e.Cancel=true;
}
private void gridParts_AfterRowsDeleted(object sender, System.EventArgs e)
{
//case 1039 //log.Debug("gridParts_AfterRowsDeleted");
bWorkorderChildrenStateChanged = true;
}
//case 105
private void btWoItemPartAddNew_Click(object sender, EventArgs e)
{
Part p = Part.NewItem();
PartInfoForm pi = new PartInfoForm();
pi.PartToEdit = p;
pi.ShowDialog();
if (pi.ChangesMade)
{
FetchParts();
FillPartsList();
}
pi.Dispose();
}
private void btnWOItemPartRefreshList_Click(object sender, EventArgs e)
{
FetchParts();
FillPartsList();
}
bool bPartsFetched = false;
private void FetchParts()
{
bPartsFetched = true;
mPartList = PartPickList.GetAllParts();
}
private void FillPartsList()
{
//Clear any previous value list from this column
gridParts.DisplayLayout.Bands[0].Columns["PartID"].ValueList = null;
//Add all potential active items
ValueList vlparts = new ValueList();
//Empty not valid but looks better this way when new record is added
//biz object's broken rules will catch any invalid entry anyway
vlparts.ValueListItems.Add(Guid.Empty, Util.NoSelectionString);//Case 318
vlparts.SortStyle = ValueListSortStyle.None;
//fill list with active labor (service) parts
foreach (PartPickList.PartPickListInfo ui in mPartList)
{
if (ui.Active == true)
{
vlparts.ValueListItems.Add(ui.ID, ui.DisplayName(Util.GlobalSettings.DefaultPartDisplayFormat));
}
}
vlparts.SortStyle = ValueListSortStyle.Ascending;
//Add manual items that are inactive but need to be displayed to list
foreach (WorkorderItem wi in mWorkorder.WorkorderItems)
{
foreach (WorkorderItemPart wp in wi.Parts)
{
//Is this workorder item's part ID in the list already?
if (vlparts.FindByDataValue(wp.PartID) != null)
continue;//17-April-2006 was a break; causing the loop to end prematurely
else
{
//Nope, add it to the list manually
ValueListItem vi = vlparts.ValueListItems.Add(wp.PartID, mPartList[wp.PartID].DisplayName(Util.GlobalSettings.DefaultPartDisplayFormat));
vi.Appearance.ForeColor = System.Drawing.SystemColors.GrayText;
}
}
}
//Bind value lists to correct columns in grid
gridParts.DisplayLayout.Bands[0].Columns["PartID"].ValueList = vlparts;
}
/// <summary>
/// Handle users changes and update grid as appropriate
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void gridParts_AfterCellUpdate(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e)
{
//case 1039 //log.Debug("gridParts_AfterCellUpdate");
//case 2082
bool hasWarehouseSelected = ((Guid)e.Cell.Row.Cells["PartWarehouseID"].Value != Guid.Empty);
//case 3234 forgot about UPC in case 2082...oops!
bool hasPartSelected = (((Guid)e.Cell.Row.Cells["PartID"].Value != Guid.Empty) || (e.Cell.Row.Cells["UPC"].Value != null));
if (!hasWarehouseSelected || !hasPartSelected)
{
//Turn off cell update event because code below is going to fire it
gridParts.EventManager.SetEnabled(GridEventIds.AfterCellUpdate, false);
e.Cell.Row.Cells["Quantity"].Value = 0m;
e.Cell.Row.Cells["Price"].Value = 0m;
e.Cell.Row.Cells["Discount"].Value = 0m;
e.Cell.Row.Cells["Description"].Value = String.Empty;
e.Cell.Row.Cells["PartSerialID"].ValueList = null;
e.Cell.Row.Cells["PartSerialID"].Value = Guid.Empty;
e.Cell.Row.Cells["PartSerialID"].Hidden = true;
gridParts.EventManager.SetEnabled(GridEventIds.AfterCellUpdate, true);
return;
}
#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;
}
//Set the retail price from the part list record
e.Cell.Row.Cells["Price"].Value = mPartList[(Guid)e.Cell.Value].Retail;
PopulateSerialNumbers(e.Cell.Row);
//case 1940
//get the user's selected amount
decimal dCurrentQuantity = (decimal)e.Cell.Row.Cells["Quantity"].Value;
CheckIfEnoughInventory(e, dCurrentQuantity);
}
#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)
{
//case 1340
PopulateSerialNumbers(e.Cell.Row);
//get the user's selected amount
decimal dCurrentQuantity = (decimal)e.Cell.Row.Cells["Quantity"].Value;
CheckIfEnoughInventory(e, dCurrentQuantity);
return;
}
//---------------------------------------------------------------------------
#endregion
#region Quantity changed
//----------------------------------------------------------------------
//change in quantity selected?
if (this.mWorkorder.IsServiceWorkorder &&
Util.GlobalSettings.UseInventory &&
"Quantity" == e.Cell.Column.Key &&
(Guid)e.Cell.Row.Cells["PartID"].Value != Guid.Empty)
{
//get the user's selected amount
decimal dCurrentQuantity = (decimal)e.Cell.Value;
if (dCurrentQuantity == 0)
return;
//is it serialized?
if (mPartList[(Guid)e.Cell.Row.Cells["PartID"].Value].TrackSerialNumber)
{
//quantity can only be one or zero if serialized and using AyaNova inventory
if (dCurrentQuantity != 1)
{
//set it to one
e.Cell.Row.Cells["Quantity"].Value = 1.0m;
dCurrentQuantity = 1;
}
//case 1506
//if there are no serials in the list (in case of a wo generated from a quote where this is pre-filled
//then populate the list now
if (e.Cell.Row.Cells["PartSerialID"].ValueList == null)
{
PopulateSerialNumbers(e.Cell.Row);
}
}
CheckIfEnoughInventory(e, dCurrentQuantity);
//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 < dCurrentQuantity)
// {
// //Out of stock, prompt if they want to put on request list
// if (OrderPartsPrompt(dOnHand, dCurrentQuantity))
// {//Yes, put balance out of stock on restock list
// mCurrentWorkorderItem.MovePartToRequest((Guid)e.Cell.Row.Cells["ID"].Value, dCurrentQuantity - dOnHand);
// 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, dCurrentQuantity))
// {//Yes, put balance out of stock on restock list
// mCurrentWorkorderItem.MovePartToRequest((Guid)e.Cell.Row.Cells["ID"].Value, dCurrentQuantity);
// AdjustPartsDisplay();
// }
// else
// {//No, so set quantity to zero
// e.Cell.Row.Cells["Quantity"].Value = 0.0m;
// }
//}
return;
}
//---------------------------------------------------------------------------
#endregion
}
//case 1940 extracted this block since it's now done three times
private void CheckIfEnoughInventory(Infragistics.Win.UltraWinGrid.CellEventArgs e, decimal dCurrentQuantity)
{
//case 2035 - whups, this was being called on quotes and pm's due to changes in after cell update above in case 1940
if (this.mWorkorder.IsServiceWorkorder && Util.GlobalSettings.UseInventory)
{
//case 3175 do not check inventory if there is no warehouse selected...duh!
Guid gSelectedWarehouseId = (Guid)e.Cell.Row.Cells["PartWarehouseID"].Value;
if (gSelectedWarehouseId == Guid.Empty)
return;
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 < dCurrentQuantity)
{
//Out of stock, prompt if they want to put on request list
if (OrderPartsPrompt(dOnHand, dCurrentQuantity))
{//Yes, put balance out of stock on restock list
mCurrentWorkorderItem.MovePartToRequest((Guid)e.Cell.Row.Cells["ID"].Value, dCurrentQuantity - dOnHand);
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, dCurrentQuantity))
{//Yes, put balance out of stock on restock list
mCurrentWorkorderItem.MovePartToRequest((Guid)e.Cell.Row.Cells["ID"].Value, dCurrentQuantity);
AdjustPartsDisplay();
}
else
{//No, so set quantity to zero
e.Cell.Row.Cells["Quantity"].Value = 0.0m;
}
}
}
}
//case 1340
private void PopulateSerialNumbers(UltraGridRow Row)
{
//make sure there are no old serial numbers around
//then we can either add them or bail as required below
Row.Cells["PartSerialID"].ValueList = null;
Row.Cells["PartSerialID"].Value = Guid.Empty;
Row.Cells["PartSerialID"].Hidden = true;
//Do we need to populate serial number list?
if (this.mWorkorder.IsServiceWorkorder && Util.GlobalSettings.UseInventory && mPartList[(Guid)Row.Cells["PartID"].Value].TrackSerialNumber)
{
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)Row.Cells["PartID"].Value, (Guid)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;
Row.Cells["PartSerialID"].ValueList = vl;
Row.Cells["PartSerialID"].Activation = Activation.AllowEdit;
Row.Cells["PartSerialID"].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.DropDownValidate;//Case 96 for autocomplete (was DropDownList)
Row.Cells["PartSerialID"].Column.AutoCompleteMode = Infragistics.Win.AutoCompleteMode.SuggestAppend;
//done, bail out...
return;
}
}
/// <summary>
/// Prompt if user want's to order parts that are not in stock
/// </summary>
/// <returns>true if they do</returns>
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");
//case 1562
bool bCanDelete = mWorkorder.IsWorkorderItemChildDeletable(RootObjectTypes.WorkorderItemScheduledUser);
bool bCanEdit = mWorkorder.IsWorkorderItemChildEditable(RootObjectTypes.WorkorderItemScheduledUser);
gridScheduledUsers.DisplayLayout.Override.HeaderClickAction = HeaderClickAction.SortSingle;
gridScheduledUsers.DisplayLayout.Override.AllowAddNew = AllowAddNew.TemplateOnBottom;
//case 1334
gridScheduledUsers.DisplayLayout.ScrollBounds = ScrollBounds.ScrollToFill;
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;
}
//Show the ones we want to...
gridScheduledUsers.DisplayLayout.Bands[0].Columns["UserID"].Hidden = false;
gridScheduledUsers.DisplayLayout.Bands[0].Columns["ServiceRateID"].Hidden = false;
gridScheduledUsers.DisplayLayout.Bands[0].Columns["StartDate"].Hidden = mWorkorder.IsTemplate;
if (bCanEdit)
gridScheduledUsers.DisplayLayout.Bands[0].Columns["StartDate"].Editor = ccGridDateTimeEditor;
gridScheduledUsers.DisplayLayout.Bands[0].Columns["StopDate"].Hidden = mWorkorder.IsTemplate;
if (bCanEdit)
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 1562
Util.SetAccessOnGrid(!bCanEdit, gridScheduledUsers, !bCanDelete);
//=========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
}
/// <summary>
///
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void gridScheduledUsers_BeforeRowInsert(object sender, Infragistics.Win.UltraWinGrid.BeforeRowInsertEventArgs e)
{
//case 1039 //log.Debug("gridScheduledUsers_BeforeRowInsert");
if (mWorkorder.Closed || mWorkorder.ServiceCompleted) return;
mCurrentWorkorderItem.ScheduledUsers.Add(mCurrentWorkorderItem);
e.Cancel = true;
}
/// <summary>
/// Handle users changes and update grid as appropriate
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void gridScheduledUsers_AfterCellUpdate(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e)
{
if ("StartDate" == e.Cell.Column.Key || "StopDate" == e.Cell.Column.Key)
{
//case 1251
if (!(e.Cell.Row.Cells["StopDate"].Value is DateTime)) return;
if (!(e.Cell.Row.Cells["StartDate"].Value is DateTime)) return;
DateTime dtStart = (DateTime)e.Cell.Row.Cells["StartDate"].Value;
DateTime dtStop = (DateTime)e.Cell.Row.Cells["StopDate"].Value;
if (dtStart == dtStop) return;
TimeSpan ts = dtStop.Subtract(dtStart);
e.Cell.Row.Cells["EstimatedQuantity"].Value = decimal.Round(
(decimal)ts.TotalHours,
2, MidpointRounding.AwayFromZero);
}
else if ("UserID" == e.Cell.Column.Key)
{
if (e.Cell.Value == null) return;
Guid gUserID = (Guid)e.Cell.Value;
//case 1140
Util.ShowSchedTechOutsideRegionWarning(gUserID, this.mWorkorder.ClientID);
}
}
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 Expenses items grid events / Initialization
private bool bExpenseGridIntialized = false;
private void gridExpense_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e)
{
if (bExpenseGridIntialized || gridExpense.DisplayLayout.Bands[0].Columns.Count == 0) return;
//case 1039 //log.Debug("gridExpense_InitializeLayout");
gridExpense.DisplayLayout.Override.HeaderClickAction = HeaderClickAction.SortSingle;
gridExpense.DisplayLayout.Override.AllowAddNew = AllowAddNew.TemplateOnBottom;
//case 1334
gridExpense.DisplayLayout.ScrollBounds = ScrollBounds.ScrollToFill;
Util.GridPreLocalize("WorkorderItemMiscExpense", this.gridExpense.DisplayLayout.Bands[0]);
Util.LocalizeHelperSuckOutKeys(this.Name, gridExpense);//case 1810
Util.FetchGridLayout("WorkorderItemExpense", "", gridExpense);
//Hide unwanted workorder item Expense fields in that grid
foreach (UltraGridColumn c in gridExpense.DisplayLayout.Bands[0].Columns)
{
c.Hidden = true;
}
//Show the ones we want to...
gridExpense.DisplayLayout.Bands[0].Columns["TotalCost"].Hidden = false;
gridExpense.DisplayLayout.Bands[0].Columns["TotalCost"].Format = "c";
gridExpense.DisplayLayout.Bands[0].Columns["TotalCost"].CellAppearance.TextHAlign = HAlign.Right;
gridExpense.DisplayLayout.Bands[0].Columns["TaxPaid"].Hidden = false;
gridExpense.DisplayLayout.Bands[0].Columns["TaxPaid"].Format = "c";
gridExpense.DisplayLayout.Bands[0].Columns["TaxPaid"].CellAppearance.TextHAlign = HAlign.Right;
gridExpense.DisplayLayout.Bands[0].Columns["ChargeAmount"].Hidden = false;
gridExpense.DisplayLayout.Bands[0].Columns["ChargeAmount"].Format = "c";
gridExpense.DisplayLayout.Bands[0].Columns["ChargeAmount"].CellAppearance.TextHAlign = HAlign.Right;
gridExpense.DisplayLayout.Bands[0].Columns["ChargeToClient"].Hidden = false;
gridExpense.DisplayLayout.Bands[0].Columns["ReimburseUser"].Hidden = false;
gridExpense.DisplayLayout.Bands[0].Columns["Name"].Hidden = false;
//Added 2-Aug-2006
gridExpense.DisplayLayout.Bands[0].Columns["Name"].MaxLength = 255;
gridExpense.DisplayLayout.Bands[0].Columns["Description"].Hidden = false;
gridExpense.DisplayLayout.Bands[0].Columns["Description"].CellMultiLine = DefaultableBoolean.True;
gridExpense.DisplayLayout.Bands[0].Columns["Description"].AutoSizeEdit = DefaultableBoolean.True;
gridExpense.DisplayLayout.Bands[0].Columns["Description"].VertScrollBar = true;
//Added 2-Aug-2006
gridExpense.DisplayLayout.Bands[0].Columns["Description"].MaxLength = 255;
//ID fields
gridExpense.DisplayLayout.Bands[0].Columns["UserID"].Hidden = false;
gridExpense.DisplayLayout.Bands[0].Columns["ChargeTaxCodeID"].Hidden = false;
Util.LocalizeGrid(gridExpense);
gridExpense.DisplayLayout.ValueLists.Clear();
//**************************************************
//Populate value lists
#region ======== Re-imburseable Sheduleable users value list ========
//Clear any previous value list from this column
gridExpense.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
//TODO: Fetch display format from preferences, for now defaults to last/first
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)
{
//Bugbug: shouldn't this be workorder item misc expenses?
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
gridExpense.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
gridExpense.DisplayLayout.Bands[0].Columns["UserID"].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.DropDownValidate;//Case 96 for autocomplete (was DropDownList)
gridExpense.DisplayLayout.Bands[0].Columns["UserID"].AutoCompleteMode = Infragistics.Win.AutoCompleteMode.SuggestAppend;
#endregion
#region ======== Tax Code list ========
//Clear any previous value list from this column
gridExpense.DisplayLayout.Bands[0].Columns["ChargeTaxCodeID"].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)
{
//vl.ValueListItems.Add(ui.ID,ui.Name);
//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
gridExpense.DisplayLayout.Bands[0].Columns["ChargeTaxCodeID"].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
gridExpense.DisplayLayout.Bands[0].Columns["ChargeTaxCodeID"].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.DropDownValidate;//Case 96 for autocomplete (was DropDownList)
gridExpense.DisplayLayout.Bands[0].Columns["ChargeTaxCodeID"].AutoCompleteMode = Infragistics.Win.AutoCompleteMode.SuggestAppend;
#endregion
//Allow empty string entry on grid
Util.SetTextColumnsNullable(gridExpense);
//case 1562
Util.SetAccessOnGrid(!mWorkorder.IsWorkorderItemChildEditable(RootObjectTypes.WorkorderItemMiscExpense), gridExpense, !mWorkorder.IsWorkorderItemChildDeletable(RootObjectTypes.WorkorderItemMiscExpense));
//=========DONE==============
bExpenseGridIntialized = true;
}
/// <summary>
///
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void gridExpense_BeforeRowInsert(object sender, Infragistics.Win.UltraWinGrid.BeforeRowInsertEventArgs e)
{
//case 1039 //log.Debug("gridExpense_BeforeRowInsert");
if (mWorkorder.Closed || mWorkorder.ServiceCompleted) return;
mCurrentWorkorderItem.Expenses.Add(mCurrentWorkorderItem);
e.Cancel = true;
bWorkorderChildrenStateChanged = true;
}
private void gridExpense_AfterRowsDeleted(object sender, System.EventArgs e)
{
//case 1039 //log.Debug("gridExpense_AfterRowsDeleted");
bWorkorderChildrenStateChanged = true;
}
/// <summary>
/// Handle users changes and update grid as appropriate
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void gridExpense_AfterCellUpdate(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e)
{
}
private void gridExpense_BeforeAutoSizeEdit(object sender, Infragistics.Win.UltraWinGrid.CancelableAutoSizeEditEventArgs e)
{
e.StartWidth = pnlExpense.Width - 5;
e.StartHeight = pnlExpense.Height - 20;
e.MaxHeight = pnlExpense.Height - 20;
e.MaxWidth = pnlExpense.Width - 5;
}
private void gridExpense_InitializeRow(object sender, Infragistics.Win.UltraWinGrid.InitializeRowEventArgs e)
{
Util.GridShowBrokenRulesErrorIcons(e);
}
private void gridExpense_MouseEnterElement(object sender, Infragistics.Win.UIElementEventArgs e)
{ Util.GridShowBrokenRulesToolTip(e, tipError); }
private void gridExpense_ClickCellButton(object sender, CellEventArgs e)
{
//case 1105
if (e.Cell.Column.Key == "REMOVE")
gridExpense.DisplayLayout.ActiveRow.Delete();
}
#endregion
#region Custom fields grid
/// <summary>
/// put custom field data into custom grid and show it if applicable
/// </summary>
private void FillCustomFieldGrid()
{
//case 1039 //log.Debug("FillCustomFieldGrid");
bShowCustomFields = Util.PrepareCustomFieldsGrid("WorkorderItem", gridCustom);
if (bShowCustomFields)
{
btnViewCustomFields.Visible = true;
Util.GridFromCustomFields(mCurrentWorkorderItem, gridCustom);
//case 1905
gridCustom.DisplayLayout.Bands[0].Columns[2].PerformAutoResize(PerformAutoSizeType.VisibleRows);
}
else
btnViewCustomFields.Visible = false;
}
private void gridCustom_AfterCellUpdate(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e)
{
Util.GridToCustomFields(mCurrentWorkorderItem, gridCustom);
}
private void gridCustom_InitializeRow(object sender, Infragistics.Win.UltraWinGrid.InitializeRowEventArgs e)
{
//Custom fields are not a list object so don't do this:
//Util.GridShowBrokenRulesErrorIcons(e);
}
private void gridCustom_MouseEnterElement(object sender, Infragistics.Win.UIElementEventArgs e)
{
//Custom fields are not a list object so don't do this:
//Util.GridShowBrokenRulesToolTip(e,tipError);
}
#endregion
#region Tasks items grid events / initialization and combo boxes
private bool bTasksGridIntialized = false;
private void gridTasks_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e)
{
if (bTasksGridIntialized || gridTasks.DisplayLayout.Bands[0].Columns.Count == 0) return;
//case 1039 //log.Debug("gridTasks_InitializeLayout");
gridTasks.DisplayLayout.Override.HeaderClickAction = HeaderClickAction.SortSingle;
gridTasks.DisplayLayout.Override.AllowAddNew = AllowAddNew.No;
//case 1334
gridTasks.DisplayLayout.ScrollBounds = ScrollBounds.ScrollToFill;
Util.GridPreLocalize("WorkorderItemTask", this.gridTasks.DisplayLayout.Bands[0]);
Util.LocalizeHelperSuckOutKeys(this.Name, gridTasks);//case 1810
Util.FetchGridLayout("WorkorderItemTasks", "", gridTasks);
//Hide unwanted workorder item Tasks fields in that grid
foreach (UltraGridColumn c in gridTasks.DisplayLayout.Bands[0].Columns)
{
c.Hidden = true;
}
//Show the ones we want to...
gridTasks.DisplayLayout.Bands[0].Columns["WorkorderItemTaskCompletionType"].Hidden = false;
gridTasks.DisplayLayout.Bands[0].Columns["TaskID"].Hidden = false;
Util.LocalizeGrid(gridTasks);
gridTasks.DisplayLayout.ValueLists.Clear();
//**************************************************
//Populate value lists
#region ======== WorkorderItemTaskCompletionTypes value list ========
//Clear any previous value list from this column
gridTasks.DisplayLayout.Bands[0].Columns["WorkorderItemTaskCompletionType"].ValueList = null;
//Add all potential active items
ValueList vlTaskStatus = new ValueList();
ValueListItem viTaskStatus = vlTaskStatus.ValueListItems.Add(WorkorderItemTaskCompletionTypes.Incomplete, Util.LocaleText.GetLocalizedText("WorkorderItemTask.Label.CompletionType.Incomplete"));
//viTaskStatus.Appearance.ForeColor=System.Drawing.SystemColors.HighlightText;
//viTaskStatus.Appearance.BackColor=System.Drawing.SystemColors.Highlight;
vlTaskStatus.ValueListItems.Add(WorkorderItemTaskCompletionTypes.Complete, Util.LocaleText.GetLocalizedText("WorkorderItemTask.Label.CompletionType.Complete"));
vlTaskStatus.ValueListItems.Add(WorkorderItemTaskCompletionTypes.NotApplicable, Util.LocaleText.GetLocalizedText("WorkorderItemTask.Label.CompletionType.NotApplicable"));
vlTaskStatus.SortStyle = ValueListSortStyle.Ascending;
//Bind value lists to correct columns in grid
gridTasks.DisplayLayout.Bands[0].Columns["WorkorderItemTaskCompletionType"].ValueList = vlTaskStatus;
//Set column to dropdownlist style so that user can not type an invalid value in a cell
//but must select from the list only
gridTasks.DisplayLayout.Bands[0].Columns["WorkorderItemTaskCompletionType"].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.DropDownValidate;//Case 96 for autocomplete (was DropDownList)
gridTasks.DisplayLayout.Bands[0].Columns["WorkorderItemTaskCompletionType"].AutoCompleteMode = Infragistics.Win.AutoCompleteMode.SuggestAppend;
#endregion
FillTasksValueList();
//Allow empty string entry on grid
Util.SetTextColumnsNullable(gridTasks);
//case 1562
Util.SetAccessOnGrid(!mWorkorder.IsWorkorderItemChildEditable(RootObjectTypes.WorkorderItemTask), gridTasks, !mWorkorder.IsWorkorderItemChildDeletable(RootObjectTypes.WorkorderItemTask));
//=========DONE==============
bTasksGridIntialized = true;
}
private void FillTasksValueList()
{
#region ======== Tasks value list ========
//Clear any previous value list from this column
gridTasks.DisplayLayout.Bands[0].Columns["TaskID"].ValueList = null;
//Add all potential active items
ValueList vlTasks = new ValueList();
//Empty not valid but looks better this way when new record is added
//biz object's broken rules will catch any invalid entry anyway
vlTasks.ValueListItems.Add(Guid.Empty, Util.NoSelectionString);//Case 318
//fill list with active labor (service) Tasks
foreach (TaskPickList.TaskPickListInfo ui in mTaskList)
{
if (ui.Active == true)
{
vlTasks.ValueListItems.Add(ui.ID, ui.Name);
}
}
vlTasks.SortStyle = ValueListSortStyle.Ascending;
//Add manual items that are inactive but need to be displayed to list
foreach (WorkorderItem wi in mWorkorder.WorkorderItems)
{
foreach (WorkorderItemTask wp in wi.Tasks)
{
//Is this workorder item's Task ID in the list already?
if (vlTasks.FindByDataValue(wp.TaskID) != null)
continue;//17-April-2006 was a break; causing the loop to end prematurely
else
{
//Nope, add it to the list manually
ValueListItem vi = vlTasks.ValueListItems.Add(wp.TaskID, mTaskList[wp.TaskID].Name);
vi.Appearance.ForeColor = System.Drawing.SystemColors.GrayText;
}
}
}
//Bind value lists to correct columns in grid
gridTasks.DisplayLayout.Bands[0].Columns["TaskID"].ValueList = vlTasks;
//Set column to dropdownlist style so that user can not type an invalid value in a cell
//but must select from the list only
gridTasks.DisplayLayout.Bands[0].Columns["TaskID"].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.DropDownValidate;//Case 96 for autocomplete (was DropDownList)
gridTasks.DisplayLayout.Bands[0].Columns["TaskID"].AutoCompleteMode = Infragistics.Win.AutoCompleteMode.SuggestAppend;
//User cannot change task, it's read only, so set accordingly...
gridTasks.DisplayLayout.Bands[0].Columns["TaskID"].CellActivation = Activation.ActivateOnly;
#endregion
}
/// <summary>
/// Snazz up appearance of row depending upon status
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void gridTasks_InitializeRow(object sender, Infragistics.Win.UltraWinGrid.InitializeRowEventArgs e)
{
//show broken rules icons if any
Util.GridShowBrokenRulesErrorIcons(e);
switch ((WorkorderItemTaskCompletionTypes)e.Row.Cells["WorkorderItemTaskCompletionType"].Value)
{
case WorkorderItemTaskCompletionTypes.Complete:
e.Row.Appearance.BackColor = System.Drawing.SystemColors.Window;
e.Row.Appearance.ForeColor = System.Drawing.SystemColors.ControlText;
break;
case WorkorderItemTaskCompletionTypes.Incomplete:
e.Row.Appearance.BackColor = System.Drawing.SystemColors.Highlight;
e.Row.Appearance.ForeColor = System.Drawing.SystemColors.HighlightText;
break;
case WorkorderItemTaskCompletionTypes.NotApplicable:
e.Row.Appearance.BackColor = System.Drawing.SystemColors.Window;
e.Row.Appearance.ForeColor = System.Drawing.SystemColors.GrayText;
break;
}
gridTasks.Update();
}
/// <summary>
/// Loop through all rows in task grid and set appearance appropriately
/// </summary>
private void SetTaskRowsHighlight()
{
//case 1039 //log.Debug("SetTaskRowsHighlight");
foreach (UltraGridRow r in gridTasks.Rows)
{
switch ((WorkorderItemTaskCompletionTypes)r.Cells["WorkorderItemTaskCompletionType"].Value)
{
case WorkorderItemTaskCompletionTypes.Complete:
r.Appearance.BackColor = System.Drawing.SystemColors.Window;
r.Appearance.ForeColor = System.Drawing.SystemColors.ControlText;
break;
case WorkorderItemTaskCompletionTypes.Incomplete:
r.Appearance.BackColor = System.Drawing.SystemColors.Highlight;
r.Appearance.ForeColor = System.Drawing.SystemColors.HighlightText;
break;
case WorkorderItemTaskCompletionTypes.NotApplicable:
r.Appearance.BackColor = System.Drawing.SystemColors.Window;
r.Appearance.ForeColor = System.Drawing.SystemColors.GrayText;
break;
}
}
}
private void gridTasks_AfterRowsDeleted(object sender, System.EventArgs e)
{
//case 1039 //log.Debug("gridTasks_AfterRowsDeleted");
bWorkorderChildrenStateChanged = true;
}
private void gridTasks_MouseEnterElement(object sender, Infragistics.Win.UIElementEventArgs e)
{ Util.GridShowBrokenRulesToolTip(e, tipError); }
private void gridTasks_ClickCellButton(object sender, CellEventArgs e)
{
//case 1105
if (e.Cell.Column.Key == "REMOVE")
gridTasks.DisplayLayout.ActiveRow.Delete();
}
#region Taskcombo events
private void btnWorkorderItemTask_Click(object sender, System.EventArgs e)
{
//case 1039 //log.Debug("btnWorkorderItemTask_Click");
TaskGroupsForm tf = new TaskGroupsForm();
Guid SelectedGroup = Guid.Empty;
if (cbWorkorderItemTasks.Value != null)
SelectedGroup = (Guid)cbWorkorderItemTasks.Value;
if (SelectedGroup != Guid.Empty)
tf.TaskGroupToEdit = TaskGroup.GetItem(SelectedGroup);
else
{
if (AyaBizUtils.Right("Object.TaskGroup") < (int)SecurityLevelTypes.ReadWrite)
{
//case 1039 //log.Debug("No task group selected to view and user has no rights to create a new one.");
return;
}
tf.TaskGroupToEdit = TaskGroup.NewItem();
}
tf.ShowDialog();
if (tf.ChangesMade)
{
//case 1999
if (tf.SelectedItemDeleted)
cbWorkorderItemTasks.SelectedItem = cbWorkorderItemTasks.EmptyValueListItem;
Util.FillGZComboBoxWithNameIDList("TaskGroup", cbWorkorderItemTasks, false, Guid.Empty, false);
}
//Added: 02-Aug-2006 so new tasks get refreshed in list
mTaskList = TaskPickList.GetList();
FillTasksValueList();
}
private void cbWorkorderItemTasks_NeedMoreData()
{
//case 1039 //log.Debug("cbWorkorderItemTasks_NeedMoreData");
Util.FillGZComboBoxWithNameIDList("TaskGroup", cbWorkorderItemTasks, false, Guid.Empty, false);
}
private void cbWorkorderItemTasks_EditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
{
//case 1039 //log.Debug("cbWorkorderItemTasks_EditorButtonClick");
//copy tasks selected to workorder item
if (cbWorkorderItemTasks.SelectedItem == null) return;
if ((Guid)cbWorkorderItemTasks.SelectedItem.DataValue != Guid.Empty)
{
Guid Selected = (Guid)cbWorkorderItemTasks.SelectedItem.DataValue;
TaskGroup tg = TaskGroup.GetItem(Selected);
foreach (TaskGroupTask t in tg.Tasks)
{
//Case 319 added condition of active around existing code block
if (t.Active)
{
WorkorderItemTask wit = mCurrentWorkorderItem.Tasks.Add(mCurrentWorkorderItem);
wit.TaskID = t.TaskID;
wit.TaskGroupID = tg.ID;
wit.WorkorderItemTaskCompletionType = WorkorderItemTaskCompletionTypes.Incomplete;
}
}
}
SetTaskRowsHighlight();
bWorkorderChildrenStateChanged = true;
}
#endregion
#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.RootObjectType = RootObjectTypes.Workorder;
d.ExactObjectType = mWorkorder.RootObjectType;//case 1584
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(gridTravel);
Util.FlipFlopSort(gridScheduledUsers);
Util.FlipFlopSort(gridExpense);
Util.FlipFlopSort(gridLoan);
}
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:O.Contract": // ButtonTool
ContractInfoForm CI = new ContractInfoForm();
CI.ContractToEdit = this.mWorkorder.ContractResolved();
CI.ShowDialog();
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();
//case 3193
gridParts.Invalidate();
}
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.MoveWorkorderItem": // ButtonTool
//Is the workorder clean (all changes saved) and valid?
//(this is necessary because the move will not cause a save so changes will be lost to the
//workorder item if it's dirty since the move circumvents the normal save and only moves
//what's stored in the DB Right now, not what's in memory right now)
if (mWorkorder.IsDirty || !mWorkorder.IsValid)
{
MessageBox.Show(Util.LocaleText.GetLocalizedText("Workorder.Label.Error.DirtyOrBrokenRules"), "", MessageBoxButtons.OK, MessageBoxIcon.Stop);
return;
}
//Will there be at least one workorder item once this is moved?
if (gridWorkorderItems.Rows.Count < 2)
{
MessageBox.Show(Util.LocaleText.GetLocalizedText("Workorder.Label.Error.DeleteLastWorkorderItem"), "", MessageBoxButtons.OK, MessageBoxIcon.Stop);
return;
}
WorkorderSelector ws = new WorkorderSelector();
ws.ClientID = mWorkorder.ClientID;
ws.DoNotShowWorkorderID = mWorkorder.ID;
//case 1990
if (mWorkorder.WorkorderType == WorkorderTypes.Quote)
ws.IncludeQuotes = true;
DialogResult result = ws.ShowDialog();
if (result == DialogResult.Cancel) return;
if (ws.SelectedWorkorderID == Guid.Empty) return;
mWorkorder.MoveWorkorderItem(ws.SelectedWorkorderID, mCurrentWorkorderItem.ID);
break;
case "LT:Workorder.Label.Command.CopyWorkorderItem": // ButtonTool
//Is the workorder clean (all changes saved) and valid?
if (mWorkorder.IsDirty || !mWorkorder.IsValid)
{
MessageBox.Show(Util.LocaleText.GetLocalizedText("Workorder.Label.Error.DirtyOrBrokenRules"), "", MessageBoxButtons.OK, MessageBoxIcon.Stop);
return;
}
WorkorderSelector ws2 = new WorkorderSelector();
ws2.ClientID = mWorkorder.ClientID;
ws2.DoNotShowWorkorderID = mWorkorder.ID;
//case 1990
if (mWorkorder.WorkorderType == WorkorderTypes.Quote)
ws2.IncludeQuotes = true;
DialogResult result2 = ws2.ShowDialog();
if (result2 == DialogResult.Cancel) return;
if (ws2.SelectedWorkorderID == Guid.Empty) return;
Workorder.CopyWorkorderItem(ws2.SelectedWorkorderID, mWorkorder.ID, mCurrentWorkorderItem.ID);
break;
case "LT:UnitMeterReading.Label.List": // ButtonTool
//Go to meter reading screen bringing along
//workorder id so that if a new record is created on the meter
//reading screen the workorder ID will be filled in automatically
//this way the user can view or add as they wish from the one button click
UnitMeterReadingForm umrf = new UnitMeterReadingForm();
umrf.UnitID = mCurrentWorkorderItem.UnitID;
umrf.WorkorderItemID = mCurrentWorkorderItem.ID;
umrf.ShowDialog();
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;
//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;
}
case "LT:O.WikiPage":
{
Util.OpenWikiPage(mWorkorder.RootObjectType, mWorkorder.ID, false);//case 1584 was RootObjectTypes.Workorder
break;
}
case "LT:Workorder.Label.GenerateUnit": // case 866
{
//case 1010
gridParts.UpdateData();
//Generate unit from selected part
//convert scheduled user to labor
UltraGridRow r = this.gridParts.ActiveRow;
if (r == null) return;
Unit u = mWorkorder.GenerateUnitFromPart((Guid)r.Cells["ID"].Value);
if (u == null) return;
UnitInfoForm uif = new UnitInfoForm();
uif.UnitToEdit = u;
uif.ShowDialog();
uif.Dispose();
//case 1090 refresh unit list
mClientUnitList = UnitPickList.GetListByClient(mWorkorder.ClientID);
IntializeUnitComboBoxes();
}
break;
case "LT:UI.ToolBar.Customize":
{
SetDesignMode(!bDesignMode);
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");
tbManager.Tools["LT:Workorder.Label.GenerateUnit"].SharedProps.Enabled = mWorkorder.CanGenerateUnit;
}
private void gridScheduledUsers_Enter(object sender, System.EventArgs e)
{
ShowChildToolBar("WorkorderItemScheduledUserToolBar");
}
private void gridTravel_Enter(object sender, System.EventArgs e)
{
ShowChildToolBar("WorkorderItemTravelToolBar");
}
private string mActiveChildToolBarKey = "";
/// <summary>
/// Show the requested child item toolbar and hide all other toolbars
/// </summary>
/// <param name="sToolBarKey"></param>
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 1860 - track if status was autochanged by the biz object itself
Guid workorderStatusBeforeClosing = mWorkorder.WorkorderService.WorkorderStatusID;
//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;
//case 1860
if (workorderStatusBeforeClosing != mWorkorder.WorkorderService.WorkorderStatusID)
cbWorkorderStatusID_NeedMoreData();
AmBinding = true;
this.ckReOpen.Checked = ckClosed.Checked;
AmBinding = false;
//RecordUpdate(RecordActionType.SaveAndExit);
//case 986
RecordUpdate(RecordActionType.SaveOnly);
RestrictUI();
}
}
#endregion
#region PartRequests items grid events / Initialization
private bool bPartRequestsGridIntialized = false;
private void gridPartRequests_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e)
{
if (Util.GlobalSettings.UseInventory == false || bPartRequestsGridIntialized || gridPartRequests.DisplayLayout.Bands[0].Columns.Count == 0) return;
//case 932
//gridPartRequests.Visible = true;
//case 1039 //log.Debug("gridPartRequests_InitializeLayout");
gridPartRequests.DisplayLayout.Override.HeaderClickAction = HeaderClickAction.SortSingle;
gridPartRequests.DisplayLayout.Override.AllowAddNew = AllowAddNew.No;
//case 1334
gridPartRequests.DisplayLayout.ScrollBounds = ScrollBounds.ScrollToFill;
Util.GridPreLocalize("WorkorderItemPartRequest", this.gridPartRequests.DisplayLayout.Bands[0]);
Util.LocalizeHelperSuckOutKeys(this.Name, gridPartRequests);//case 1810
Util.FetchGridLayout("WorkorderItemPartRequests", "", gridPartRequests);
//Hide unwanted workorder item Parts fields in that grid
foreach (UltraGridColumn c in gridPartRequests.DisplayLayout.Bands[0].Columns)
{
c.Hidden = true;
c.CellActivation = Activation.NoEdit;
}
//Show the ones we want to...
gridPartRequests.DisplayLayout.Bands[0].Columns["PartWarehouseID"].Hidden = false;
gridPartRequests.DisplayLayout.Bands[0].Columns["PartID"].Hidden = false;
gridPartRequests.DisplayLayout.Bands[0].Columns["Quantity"].Hidden = false;
gridPartRequests.DisplayLayout.Bands[0].Columns["Received"].Hidden = false;
gridPartRequests.DisplayLayout.Bands[0].Columns["Quantity"].Format = "g29";
gridPartRequests.DisplayLayout.Bands[0].Columns["Received"].Format = "g29";
gridPartRequests.DisplayLayout.Bands[0].Columns["Received"].CellActivation = Activation.Disabled;
gridPartRequests.DisplayLayout.Bands[0].Columns["OnOrder"].Hidden = false;
gridPartRequests.DisplayLayout.Bands[0].Columns["OrderedDate"].Header.Caption = Util.LocaleText.GetLocalizedText("PurchaseOrder.Label.OrderedDate");
gridPartRequests.DisplayLayout.Bands[0].Columns["OrderedDate"].Hidden = false;
gridPartRequests.DisplayLayout.Bands[0].Columns["OrderedDate"].CellActivation = Activation.Disabled;
gridPartRequests.DisplayLayout.Bands[0].Columns["ExpectedReceiveDate"].Header.Caption = Util.LocaleText.GetLocalizedText("PurchaseOrder.Label.ExpectedReceiveDate");
gridPartRequests.DisplayLayout.Bands[0].Columns["ExpectedReceiveDate"].Hidden = false;
gridPartRequests.DisplayLayout.Bands[0].Columns["ExpectedReceiveDate"].CellActivation = Activation.Disabled;
gridPartRequests.DisplayLayout.Bands[0].Columns["PO"].Header.Caption = Util.LocaleText.GetLocalizedText("O.PurchaseOrder");
gridPartRequests.DisplayLayout.Bands[0].Columns["PO"].Hidden = false;
gridPartRequests.DisplayLayout.Bands[0].Columns["PO"].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.Button;
Util.LocalizeGrid(gridPartRequests);
gridPartRequests.DisplayLayout.ValueLists.Clear();
//**************************************************
//Populate value lists
#region ======= Warehouses value list =======
//-------------------------------------------------------------------------------------------------
//Warehouses
ValueList vl = gridPartRequests.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
foreach (PartWarehousePickList.PartWarehousePickListInfo ui in mWarehouseList)
{
if (ui.Active == true)
{
vl.ValueListItems.Add(ui.ID, ui.Name);
}
else
{
ValueListItem vi = vl.ValueListItems.Add(ui.ID, ui.Name);
vi.Appearance.ForeColor = System.Drawing.SystemColors.GrayText;
}
}
//for(int x=0;x<l.Count;x++)
//{
// vl.ValueListItems.Add(new Guid(((DictionaryEntry)l.BindableList[x]).Key.ToString()),
// ((DictionaryEntry)l.BindableList[x]).Value.ToString());
//}
//Bind value lists to correct columns in gridPartRequests
gridPartRequests.DisplayLayout.Bands[0].Columns["PartWarehouseID"].ValueList = gridPartRequests.DisplayLayout.ValueLists["Warehouses"];
//Set column to dropdownlist style so that user can not type an invalid value in a cell
//but must select from the list only
gridPartRequests.DisplayLayout.Bands[0].Columns["PartWarehouseID"].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.DropDownValidate;//Case 96 for autocomplete (was DropDownList)
gridPartRequests.DisplayLayout.Bands[0].Columns["PartWarehouseID"].AutoCompleteMode = Infragistics.Win.AutoCompleteMode.SuggestAppend;
#endregion
#region ======== parts value list ========
//Clear any previous value list from this column
gridPartRequests.DisplayLayout.Bands[0].Columns["PartID"].ValueList = null;
//Add all potential active items
ValueList vlparts = new ValueList();
//Empty not valid but looks better this way when new record is added
//biz object's broken rules will catch any invalid entry anyway
vlparts.ValueListItems.Add(Guid.Empty, Util.NoSelectionString);//Case 318
//fill list with active labor (service) parts
foreach (PartPickList.PartPickListInfo ui in mPartList)
{
if (ui.Active == true)
{
vlparts.ValueListItems.Add(ui.ID, ui.DisplayName(Util.GlobalSettings.DefaultPartDisplayFormat));
}
}
vlparts.SortStyle = ValueListSortStyle.Ascending;
//Add manual items that are inactive but need to be displayed to list
foreach (WorkorderItem wi in mWorkorder.WorkorderItems)
{
foreach (WorkorderItemPart wp in wi.Parts)
{
//Is this workorder item's part ID in the list already?
if (vlparts.FindByDataValue(wp.PartID) != null)
continue;//17-April-2006 was a break; causing the loop to end prematurely
else
{
//Nope, add it to the list manually
ValueListItem vi = vlparts.ValueListItems.Add(wp.PartID, mPartList[wp.PartID].DisplayName(Util.GlobalSettings.DefaultPartDisplayFormat));
vi.Appearance.ForeColor = System.Drawing.SystemColors.GrayText;
}
}
}
//Bind value lists to correct columns in grid
gridPartRequests.DisplayLayout.Bands[0].Columns["PartID"].ValueList = vlparts;
//Set column to dropdownlist style so that user can not type an invalid value in a cell
//but must select from the list only
gridPartRequests.DisplayLayout.Bands[0].Columns["PartID"].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.DropDownValidate;//Case 96 for autocomplete (was DropDownList)
gridPartRequests.DisplayLayout.Bands[0].Columns["PartID"].AutoCompleteMode = Infragistics.Win.AutoCompleteMode.SuggestAppend;
#endregion
//Allow empty string entry on grid
Util.SetTextColumnsNullable(gridPartRequests);
//case 1562
Util.SetAccessOnGrid(!mWorkorder.IsWorkorderItemChildEditable(RootObjectTypes.WorkorderItemPartRequest), gridPartRequests, !mWorkorder.IsWorkorderItemChildDeletable(RootObjectTypes.WorkorderItemPartRequest));
//=========DONE==============
bPartRequestsGridIntialized = true;
}
private void gridPartRequests_BeforeRowsDeleted(object sender, Infragistics.Win.UltraWinGrid.BeforeRowsDeletedEventArgs e)
{
if ((bool)e.Rows[0].Cells["OnOrder"].Value == true)
{
Util.PromptWithIconOKOnlyFromLocaleKey("WorkorderItemPartRequest.Error.NotDeleteableOnOrder", MessageBoxIcon.Stop);
e.Cancel = true;
}
//gridPartRequests.DisplayLayout.Bands[0].Columns["OnOrder"]
}
/// <summary>
/// fixup display if rows deleted
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void gridPartRequests_AfterRowsDeleted(object sender, System.EventArgs e)
{
//case 1039 //log.Debug("gridPartRequests_AfterRowsDeleted");
AdjustPartsDisplay();
}
//case 227
private void gridPartRequests_ClickCellButton(object sender, CellEventArgs e)
{
//case 1105
if (e.Cell.Column.Key == "REMOVE")
gridPartRequests.DisplayLayout.ActiveRow.Delete();
else if (e.Cell.Value != null)
{
//case 3631
GridNameValueCellItem TheValue = (GridNameValueCellItem)e.Cell.Value;
if (TheValue.Value != Guid.Empty)
Util.EditRecord(TheValue);
}
}
#endregion
#region Parts panel sizing and display adjustment
private void pnlParts_SizeChanged(object sender, System.EventArgs e)
{
if (this.gridPartRequests.Visible == true)
{
this.gridPartRequests.Height = pnlParts.Height / 3;
this.gridParts.Height = (pnlParts.Height / 3) * 2;
//this.gridPartRequests.Height=pnlParts.Height/4;
//this.gridParts.Height=(pnlParts.Height/4)*3;
}
}
/// <summary>
/// Ensures that the parts and partrequests are displayed as
/// appropriate
/// </summary>
private void AdjustPartsDisplay()
{
//case 1039 //log.Debug("AdjustPartsDisplay");
if (!mWorkorder.IsServiceWorkorder || Util.GlobalSettings.UseInventory == false || mCurrentWorkorderItem.PartRequests.Count < 1)
{
this.gridPartRequests.Visible = false;
this.gridParts.Dock = DockStyle.Fill;
return;
}
if (Util.GlobalSettings.UseInventory && mCurrentWorkorderItem.PartRequests.Count > 0)
{
this.gridPartRequests.Visible = true;
this.gridParts.Dock = DockStyle.Top;
this.gridPartRequests.Height = pnlParts.Height / 3;
this.gridParts.Height = (pnlParts.Height / 3) * 2;
//this.gridPartRequests.Height=pnlParts.Height/4;
//this.gridParts.Height=(pnlParts.Height/4)*3;
}
}
#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 Loans items grid events / Initialization
private bool bLoanGridIntialized = false;
private void gridLoan_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e)
{
if (bLoanGridIntialized || gridLoan.DisplayLayout.Bands[0].Columns.Count == 0) return;
//case 1562
bool bCanDelete = mWorkorder.IsWorkorderItemChildDeletable(RootObjectTypes.WorkorderItemLoan);
bool bCanEdit = mWorkorder.IsWorkorderItemChildEditable(RootObjectTypes.WorkorderItemLoan);
gridLoan.DisplayLayout.Override.HeaderClickAction = HeaderClickAction.SortSingle;
gridLoan.DisplayLayout.Override.AllowAddNew = AllowAddNew.TemplateOnBottom;
Util.GridPreLocalize("WorkorderItemLoan", this.gridLoan.DisplayLayout.Bands[0]);
Util.LocalizeHelperSuckOutKeys(this.Name, gridLoan);//case 1810
Util.FetchGridLayout("WorkorderItemLoan", "", gridLoan);
//Hide unwanted workorder item Loan fields in that grid
foreach (UltraGridColumn c in gridLoan.DisplayLayout.Bands[0].Columns)
{
c.Hidden = true;
}
//Show the ones we want to...
gridLoan.DisplayLayout.Bands[0].Columns["Charges"].Hidden = false;
gridLoan.DisplayLayout.Bands[0].Columns["Charges"].Format = "c";
gridLoan.DisplayLayout.Bands[0].Columns["Charges"].CellAppearance.TextHAlign = HAlign.Right;
gridLoan.DisplayLayout.Bands[0].Columns["OutDate"].Hidden = false;
if (bCanEdit)
gridLoan.DisplayLayout.Bands[0].Columns["OutDate"].Editor = ccGridDateTimeEditor;
gridLoan.DisplayLayout.Bands[0].Columns["DueDate"].Hidden = false;
if (bCanEdit)
gridLoan.DisplayLayout.Bands[0].Columns["DueDate"].Editor = ccGridDateTimeEditor;
gridLoan.DisplayLayout.Bands[0].Columns["ReturnDate"].Hidden = false;
if (bCanEdit)
gridLoan.DisplayLayout.Bands[0].Columns["ReturnDate"].Editor = ccGridDateTimeEditor;
gridLoan.DisplayLayout.Bands[0].Columns["Notes"].Hidden = false;
gridLoan.DisplayLayout.Bands[0].Columns["Notes"].CellMultiLine = DefaultableBoolean.True;
gridLoan.DisplayLayout.Bands[0].Columns["Notes"].AutoSizeEdit = DefaultableBoolean.True;
gridLoan.DisplayLayout.Bands[0].Columns["Notes"].VertScrollBar = true;
//ID fields
gridLoan.DisplayLayout.Bands[0].Columns["TaxCodeID"].Hidden = false;
gridLoan.DisplayLayout.Bands[0].Columns["LoanItemID"].Hidden = false;
//Case 420
gridLoan.DisplayLayout.Bands[0].Columns["Rate"].Hidden = false;
gridLoan.DisplayLayout.Bands[0].Columns["Quantity"].Hidden = false;
gridLoan.DisplayLayout.Bands[0].Columns["Quantity"].Format = "g29";
Util.LocalizeGrid(gridLoan);
gridLoan.DisplayLayout.ValueLists.Clear();
//**************************************************
//Populate value lists
#region ======== LoanItems value list ========
//Clear any previous value list from this column
gridLoan.DisplayLayout.Bands[0].Columns["LoanItemID"].ValueList = null;
//Add all potential active items
ValueList vlLoanItems = new ValueList();
//Empty not valid but looks better this way when new record is added
//biz object's broken rules will catch any invalid entry anyway
vlLoanItems.ValueListItems.Add(Guid.Empty, Util.NoSelectionString);//Case 318
//fill list with active and available loan items
foreach (LoanItemPickList.LoanItemPickListInfo ui in mLoanItemList)
{
if (ui.Active == true && ui.WorkorderItemLoanID == Guid.Empty)
{
vlLoanItems.ValueListItems.Add(ui.ID, ui.Name + " " + ui.Serial);
}
}
vlLoanItems.SortStyle = ValueListSortStyle.Ascending;
//Add manual items that are inactive but need to be displayed to list
foreach (WorkorderItem wi in mWorkorder.WorkorderItems)
{
foreach (WorkorderItemLoan wp in wi.Loans)
{
//Is this workorder item's part ID in the list already?
if (vlLoanItems.FindByDataValue(wp.LoanItemID) != null)
continue;//17-April-2006 was a break; causing the loop to end prematurely
else
{
//Nope, add it to the list manually
ValueListItem vi = vlLoanItems.ValueListItems.Add(wp.LoanItemID, mLoanItemList[wp.LoanItemID].Name + " " + mLoanItemList[wp.LoanItemID].Serial);
vi.Appearance.ForeColor = System.Drawing.SystemColors.GrayText;
}
}
}
//Bind value lists to correct columns in grid
gridLoan.DisplayLayout.Bands[0].Columns["LoanItemID"].ValueList = vlLoanItems;
//Set column to dropdownlist style so that user can not type an invalid value in a cell
//but must select from the list only
gridLoan.DisplayLayout.Bands[0].Columns["LoanItemID"].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.DropDownValidate;//Case 96 for autocomplete (was DropDownList)
gridLoan.DisplayLayout.Bands[0].Columns["LoanItemID"].AutoCompleteMode = Infragistics.Win.AutoCompleteMode.SuggestAppend;
#endregion
#region ======== Tax Code list ========
//Clear any previous value list from this column
gridLoan.DisplayLayout.Bands[0].Columns["TaxCodeID"].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)
{
//vl.ValueListItems.Add(ui.ID,ui.Name);
//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
gridLoan.DisplayLayout.Bands[0].Columns["TaxCodeID"].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
gridLoan.DisplayLayout.Bands[0].Columns["TaxCodeID"].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.DropDownValidate;//Case 96 for autocomplete (was DropDownList)
gridLoan.DisplayLayout.Bands[0].Columns["TaxCodeID"].AutoCompleteMode = Infragistics.Win.AutoCompleteMode.SuggestAppend;
#endregion
#region ======== Loan item rate list ========
//case 420 this block
//Populate value lists
ValueList vl2 = gridLoan.DisplayLayout.ValueLists.Add("LoanItemRates");
vl2.ValueListItems.Add(LoanItemRates.None, Util.LocaleText.GetLocalizedText("LoanItem.Label.RateNone"));
vl2.ValueListItems.Add(LoanItemRates.Hours, Util.LocaleText.GetLocalizedText("LoanItem.Label.RateHour"));
vl2.ValueListItems.Add(LoanItemRates.HalfDays, Util.LocaleText.GetLocalizedText("LoanItem.Label.RateHalfDay"));
vl2.ValueListItems.Add(LoanItemRates.Days, Util.LocaleText.GetLocalizedText("LoanItem.Label.RateDay"));
vl2.ValueListItems.Add(LoanItemRates.Weeks, Util.LocaleText.GetLocalizedText("LoanItem.Label.RateWeek"));
vl2.ValueListItems.Add(LoanItemRates.Months, Util.LocaleText.GetLocalizedText("LoanItem.Label.RateMonth"));
vl2.ValueListItems.Add(LoanItemRates.Years, Util.LocaleText.GetLocalizedText("LoanItem.Label.RateYear"));
//Bind value lists to correct columns in grid
gridLoan.DisplayLayout.Bands[0].Columns["Rate"].ValueList = gridLoan.DisplayLayout.ValueLists["LoanItemRates"];
//Set column to dropdownlist style so that user can not type an invalid value in a cell
//but must select from the list only
gridLoan.DisplayLayout.Bands[0].Columns["Rate"].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.DropDownValidate;
gridLoan.DisplayLayout.Bands[0].Columns["Rate"].AutoCompleteMode = Infragistics.Win.AutoCompleteMode.SuggestAppend;
#endregion
//Allow empty string entry on grid
Util.SetTextColumnsNullable(gridLoan);
//case 1562
Util.SetAccessOnGrid(!bCanEdit, gridLoan, !bCanDelete);
//=========DONE==============
bLoanGridIntialized = true;
}
/// <summary>
///
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void gridLoan_BeforeRowInsert(object sender, Infragistics.Win.UltraWinGrid.BeforeRowInsertEventArgs e)
{
//case 1039 //log.Debug("gridLoan_BeforeRowInsert");
if (mWorkorder.Closed || mWorkorder.ServiceCompleted) return;
mCurrentWorkorderItem.Loans.Add(mCurrentWorkorderItem);
e.Cancel = true;
bWorkorderChildrenStateChanged = true;
}
private void gridLoan_AfterRowsDeleted(object sender, System.EventArgs e)
{
//case 1039 //log.Debug("gridLoan_AfterRowsDeleted");
bWorkorderChildrenStateChanged = true;
}
/// <summary>
/// Handle users changes and update grid as appropriate
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void gridLoan_AfterCellUpdate(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e)
{
//case 1039 //log.Debug("gridLoan_AfterCellUpdate");
//Case 420 this block
if ("Rate" == e.Cell.Column.Key || "Quantity" == e.Cell.Column.Key)
{
LoanItemRates rateSelected = (LoanItemRates)e.Cell.Row.Cells["Rate"].Value;
decimal qtySelected = (decimal)e.Cell.Row.Cells["Quantity"].Value;
Guid itemID = (Guid)e.Cell.Row.Cells["LoanItemID"].Value;
//do nothing if None rate selected
if (rateSelected == LoanItemRates.None) return;
e.Cell.Row.Cells["Charges"].Value = qtySelected * mLoanItemList.RateValue(itemID, rateSelected); //lookupratehere
}
}
private void gridLoan_BeforeAutoSizeEdit(object sender, Infragistics.Win.UltraWinGrid.CancelableAutoSizeEditEventArgs e)
{
e.StartWidth = pnlLoan.Width - 5;
e.StartHeight = pnlLoan.Height - 20;
e.MaxHeight = pnlLoan.Height - 20;
e.MaxWidth = pnlLoan.Width - 5;
}
private void gridLoan_InitializeRow(object sender, Infragistics.Win.UltraWinGrid.InitializeRowEventArgs e)
{
Util.GridShowBrokenRulesErrorIcons(e);
}
private void gridLoan_MouseEnterElement(object sender, Infragistics.Win.UIElementEventArgs e)
{ Util.GridShowBrokenRulesToolTip(e, tipError); }
private void gridLoan_ClickCellButton(object sender, CellEventArgs e)
{
//case 1105
if (e.Cell.Column.Key == "REMOVE")
gridLoan.DisplayLayout.ActiveRow.Delete();
}
#endregion
#region Accelerator keys
/// <summary>
/// Case 37
/// </summary>
/// <param name="msg"></param>
/// <param name="keyData"></param>
/// <returns></returns>
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
{
//Short circuit:
//Only process modified keystrokes (i.e. when a modifier like ctrl-alt-or shift is also
//being held down
if (ModifierKeys == Keys.None) return base.ProcessCmdKey(ref msg, keyData);
switch (Util.HotKeys(keyData))
{
//Close form
case HotKeyAction.CloseForm:
this.Close();
return true;
}
return base.ProcessCmdKey(ref msg, keyData);
}
#endregion
//********************************************************************************************
}
}