I have been attempting to refresh the dashboard when a job number is entered into the job number field. I have created an event and found code to refresh it but I am having a Maincontroller reference issue.
## Error Detail ##
============
##!Message:##! --------compile errors------------
Error: CS1061 - line 486 (485) - 'Ice.UI.App.JobCompletion.V_WebcoMfg_JobCompleteExOpsMtl_1ViewDetailPanel2.V_WebcoMfg_JobCompleteExOpsMtl_1ViewDetailPanel2CodeBehind' does not contain a definition for 'csm' and no extension method 'csm' accepting a first argument of type 'Ice.UI.App.JobCompletion.V_WebcoMfg_JobCompleteExOpsMtl_1ViewDetailPanel2.V_WebcoMfg_JobCompleteExOpsMtl_1ViewDetailPanel2CodeBehind' could be found (are you missing a using directive or an assembly reference?)
Error: CS0117 - line 507 (506) - 'Ice.UI.App.JobCompletion.MainController' does not contain a definition for 'AppControlPanel'
Error: CS0117 - line 507 (506) - 'Ice.UI.App.JobCompletion.MainController' does not contain a definition for 'MainToolManager'
** Compile Failed. **
using System;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Windows.Forms;
using Ice.BO;
using Ice.UI;
using Ice.Lib;
using Ice.Adapters;
using Ice.Lib.Customization;
using Ice.Lib.ExtendedProps;
using Ice.Lib.Framework;
using Ice.Lib.Searches;
using Ice.UI.FormFunctions;
using Infragistics.Shared;
using Infragistics.Win;
using Infragistics.Win.UltraWinGrid;
using System.Diagnostics;
using System.Reflection;
public static class Script
{
// ** Wizard Insert Location - Do Not Remove 'Begin/End Wizard Added Module Level Variables' Comments! **
// Begin Wizard Added Module Level Variables **
// End Wizard Added Module Level Variables **
// Add Custom Module Level Variables Here **
public static void InitializeCustomCode()
{
// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Variable Initialization' lines **
// Begin Wizard Added Variable Initialization
// End Wizard Added Variable Initialization
// Begin Wizard Added Custom Method Calls
{
txtJobHeadTop_JobNum = (EpiTextBox)Script.csm.GetNativeControlReference("0de08ffe-5863-415b-b876-2e3bccdbf3e4");
Script.txtJobHeadTop_JobNum.Leave += new System.EventHandler(Script.txtJobHeadTop_JobNum_Leave);
}
// End Wizard Added Custom Method Calls
}
public static void DestroyCustomCode()
{
// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Object Disposal' lines **
// Begin Wizard Added Object Disposal
// End Wizard Added Object Disposal
// Begin Custom Code Disposal
Script.txtJobHeadTop_JobNum.Leave -= new System.EventHandler(Script.txtJobHeadTop_JobNum_Leave);
txtJobHeadTop_JobNum = null;
// End Custom Code Disposal
}
private static void txtJobHeadTop_JobNum_Leave(object sender, System.EventArgs args)
{
MainController.AppControlPanel.HandleToolClick("RefreshTool", new Infragistics.Win.UltraWinToolbars.ToolClickEventArgs(MainController.MainToolManager.Tools["RefreshTool"], null));
}
}