This commit is contained in:
2019-02-14 18:45:01 +00:00
parent 1dbba7455d
commit 70e8bfdb7e

View File

@@ -3328,7 +3328,7 @@ namespace AyaNova
}
}
#endregion
#endregion
/// <summary>
/// Modify UI elements to go into or out of design mode
@@ -3378,10 +3378,10 @@ namespace AyaNova
private void btnCustomize_Click(object sender, System.EventArgs e)
{
Button b = sender as Button;
Control c=b.Tag as Control;
Control c = b.Tag as Control;
string sHiddenTag = mHideControlsFormName + ":" + c.Name;
//flip current state
bool bWasVisible = b.BackColor==Color.Green;
//flip current state
bool bWasVisible = b.BackColor == Color.Green;
if (bWasVisible)
{
@@ -3419,7 +3419,7 @@ namespace AyaNova
c.Visible = false;
}
foreach (Control c2 in c.Controls)
HideSelectedControls(sFormName,c2);
HideSelectedControls(sFormName, c2);
}
#endregion
@@ -3594,7 +3594,7 @@ namespace AyaNova
int nFootRoom = 16;
this.pnlHeader.Height = 120+nFootRoom;
this.pnlHeader.Height = 120 + nFootRoom;
this.pnlService.Height = 66 + nFootRoom;
this.pnlQuote.Height = 114 + nFootRoom;
//****************************************
@@ -3640,7 +3640,7 @@ namespace AyaNova
if (nCalcHeight > nMaxHeight) nCalcHeight = nMaxHeight;
this.pnlItem.Height = nCalcHeight+nFootRoom;
this.pnlItem.Height = nCalcHeight + nFootRoom;
//gridWorkorderItems.Text="WorkroderItemPanelHeight=" + nCalcHeight.ToString() + " / Totaldisplayheight=" + this.DisplayRectangle.Height.ToString();
//ScrollTemplateRowIntoView();
}
@@ -3876,7 +3876,7 @@ namespace AyaNova
}
if ((AyaBizUtils.Right(RootObjectTypes.WorkorderItemPart) < (int)SecurityLevelTypes.ReadOnly))
btnViewParts.Visible = false;
btnViewParts.Visible = false;
if (AyaBizUtils.Right(RootObjectTypes.WorkorderItemTravel) < (int)SecurityLevelTypes.ReadOnly)
btnViewTravels.Visible = false;
@@ -3943,22 +3943,22 @@ namespace AyaNova
//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)
if (btnViewLabors.Visible)
btnViewLabors.Appearance.Image = NavButtonImage("WorkorderLabor", nSize, (bWoItemIsNull || !mCurrentWorkorderItem.HasLabor));
if(btnViewUnit.Visible)
if (btnViewUnit.Visible)
btnViewUnit.Appearance.Image = NavButtonImage("Unit", nSize, (bWoItemIsNull || !mCurrentWorkorderItem.HasUnit));
if(btnViewParts.Visible)
if (btnViewParts.Visible)
btnViewParts.Appearance.Image = NavButtonImage("Part", nSize, (bWoItemIsNull || !mCurrentWorkorderItem.HasParts));
if(btnViewTravels.Visible)
if (btnViewTravels.Visible)
btnViewTravels.Appearance.Image = NavButtonImage("WorkorderTravel", nSize, (bWoItemIsNull || !mCurrentWorkorderItem.HasTravel));
if(btnViewScheduledUsers.Visible)
if (btnViewScheduledUsers.Visible)
btnViewScheduledUsers.Appearance.Image = NavButtonImage("WorkorderScheduled", nSize, (bWoItemIsNull || !mCurrentWorkorderItem.HasScheduledUsers));
if(btnViewTasks.Visible)
if (btnViewTasks.Visible)
btnViewTasks.Appearance.Image = NavButtonImage("WorkorderTask", nSize, (bWoItemIsNull || !mCurrentWorkorderItem.HasTasks));
if (mWorkorder.IsServiceWorkorder || mWorkorder.IsServiceTemplateWorkorder)
@@ -5337,8 +5337,8 @@ namespace AyaNova
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"));
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;
}
@@ -5509,7 +5509,7 @@ namespace AyaNova
edTemplateDescription.Width = nRightWidth;
//case 3132
ckTemplateFreshPrice.Width = nLeftWidth + nRightWidth-nGap;
ckTemplateFreshPrice.Width = nLeftWidth + nRightWidth - nGap;
//case 58
lblRegionID.Width = nLeftWidth + nRightWidth;
@@ -5626,7 +5626,7 @@ namespace AyaNova
//Size and align controls in Left panel
lblPreparedByID.Width = nLeftWidth - nGap;
cbPreparedByID.Left = nLeftWidth;
cbPreparedByID.Width = nRightWidth+16;
cbPreparedByID.Width = nRightWidth + 16;
//center panel
lblDateApproved.Width = nLeftWidth - nGap;
@@ -6311,7 +6311,7 @@ namespace AyaNova
private void SyncUI()
{
foreach(ToolBase tb in tbManager.Tools)
foreach (ToolBase tb in tbManager.Tools)
{
if (tb.Key != "LT:UI.ToolBar.Customize")
tb.SharedProps.Enabled = !bDesignMode;
@@ -6592,7 +6592,7 @@ namespace AyaNova
dtCloseByDate.GZReadOnly = true;
//case 1898 case 1899
//they *may* be allowed to access it
//they *may* be allowed to access it
if (AyaBizUtils.Right("Object.WorkorderItemUnit") > (int)SecurityLevelTypes.ReadOnly &&
AyaBizUtils.Right("Object.WorkorderItem") > (int)SecurityLevelTypes.ReadOnly)
{
@@ -6880,13 +6880,13 @@ namespace AyaNova
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
// 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;
if (bCanEdit)
gridWorkorderItems.DisplayLayout.Bands[0].Columns["RequestDate"].Editor = ccGridDateTimeEditor;
Util.LocalizeGrid(gridWorkorderItems);
@@ -7347,13 +7347,13 @@ namespace AyaNova
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;
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;
if (bCanEdit)
gridLabor.DisplayLayout.Bands[0].Columns["ServiceStopDate"].Editor = ccGridDateTimeEditor;
gridLabor.DisplayLayout.Bands[0].Columns["ServiceRateID"].Hidden = false;
@@ -7703,7 +7703,7 @@ namespace AyaNova
g.DisplayLayout.Bands[0].Columns["BANK"].Hidden = false;
//case 1617
if(mCachedBankColumnDisplay==null)
if (mCachedBankColumnDisplay == null)
mCachedBankColumnDisplay = ServiceBankCurrentBalanceFetcher.GetItem(unitid, RootObjectTypes.Unit).DisplayBalances;
//case 635
@@ -7717,7 +7717,7 @@ namespace AyaNova
g.DisplayLayout.Bands[0].Columns["BANK"].Hidden = false;
//case 1617
if (mCachedBankColumnDisplay == null)
mCachedBankColumnDisplay =ServiceBankCurrentBalanceFetcher.GetItem(mWorkorderBankableObject.ID, mWorkorderBankableObject.RootObjectType).DisplayBalances;
mCachedBankColumnDisplay = ServiceBankCurrentBalanceFetcher.GetItem(mWorkorderBankableObject.ID, mWorkorderBankableObject.RootObjectType).DisplayBalances;
//Case 635
g.DisplayLayout.Bands[0].Columns["BANK"].Header.ToolTipText = mCachedBankColumnDisplay;
@@ -7944,7 +7944,7 @@ namespace AyaNova
gridTravel.DisplayLayout.Bands[0].Columns["TravelStartDate"].Hidden = mWorkorder.IsTemplate;
if(bCanEdit)
if (bCanEdit)
gridTravel.DisplayLayout.Bands[0].Columns["TravelStartDate"].Editor = ccGridDateTimeEditor;
gridTravel.DisplayLayout.Bands[0].Columns["TravelStopDate"].Hidden = mWorkorder.IsTemplate;
@@ -9117,12 +9117,12 @@ namespace AyaNova
gridScheduledUsers.DisplayLayout.Bands[0].Columns["ServiceRateID"].Hidden = false;
gridScheduledUsers.DisplayLayout.Bands[0].Columns["StartDate"].Hidden = mWorkorder.IsTemplate;
if(bCanEdit)
if (bCanEdit)
gridScheduledUsers.DisplayLayout.Bands[0].Columns["StartDate"].Editor = ccGridDateTimeEditor;
gridScheduledUsers.DisplayLayout.Bands[0].Columns["StopDate"].Hidden = mWorkorder.IsTemplate;
if(bCanEdit)
if (bCanEdit)
gridScheduledUsers.DisplayLayout.Bands[0].Columns["StopDate"].Editor = ccGridDateTimeEditor;
@@ -9306,11 +9306,11 @@ namespace AyaNova
}
else if ("UserID" == e.Cell.Column.Key)
{
if(e.Cell.Value ==null) return;
if (e.Cell.Value == null) return;
Guid gUserID = (Guid)e.Cell.Value;
//case 1140
Util.ShowSchedTechOutsideRegionWarning(gUserID,this.mWorkorder.ClientID);
Util.ShowSchedTechOutsideRegionWarning(gUserID, this.mWorkorder.ClientID);
}
}
@@ -10354,7 +10354,7 @@ namespace AyaNova
break;
case "LT:UI.ToolBar.Customize":
{
SetDesignMode(!bDesignMode);
SetDesignMode(!bDesignMode);
break;
}
@@ -10611,7 +10611,7 @@ namespace AyaNova
mWorkorder.Closed = ckClosed.Checked;
//case 1860
if(workorderStatusBeforeClosing != mWorkorder.WorkorderService.WorkorderStatusID)
if (workorderStatusBeforeClosing != mWorkorder.WorkorderService.WorkorderStatusID)
cbWorkorderStatusID_NeedMoreData();
@@ -10833,8 +10833,13 @@ namespace AyaNova
//case 1105
if (e.Cell.Column.Key == "REMOVE")
gridPartRequests.DisplayLayout.ActiveRow.Delete();
else
Util.EditRecord((GridNameValueCellItem)e.Cell.Value);
else if (e.Cell.Value != null)
{
//case 3631
GridNameValueCellItem TheValue = (GridNameValueCellItem)e.Cell.Value;
if (TheValue.Value != Guid.Empty)
Util.EditRecord(TheValue);
}
}
#endregion
@@ -10932,16 +10937,16 @@ namespace AyaNova
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;
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["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["ReturnDate"].Editor = ccGridDateTimeEditor;
gridLoan.DisplayLayout.Bands[0].Columns["Notes"].Hidden = false;