Exemplo n.º 1
0
 ///
 /// <summary>
 /// Default constructor.
 /// </summary>
 /// <param name="inDesignMode">Flag which indicates if the control is being drawn on the Workspace Designer. (Use this flag to determine if code should perform any logic on the workspace record)</param>
 /// <param name="RecordContext">The current workspace record context.</param>
 public RepairOrderAddIn(bool inDesignMode, IRecordContext RecordContext, bool isEnabledEditing)
 {
     // do nothing so framework won't throw exception once it gets to GetControl
     if (!ConfigurationSetting.configVerbPerfect && ConfigurationSetting.loginUserIsAdmin)
     {
         // do nothing
     }
     else
     {
         _recordContext        = RecordContext;
         this.isEnabledEditing = isEnabledEditing;
         if (_recordContext != null)
         {
             _recordContext.DataLoaded += _recordContext_DataLoaded;
             //Add saving/saved events
             _recordContext.Saving += _recordContext_Saving;
             _recordContext.Saved  += _recordContext_Saved;
         }
         _repairOrderControl = new RepairOrderInformationControl(inDesignMode, isEnabledEditing);
     }
 }
Exemplo n.º 2
0
 ///
 /// <summary>
 /// Default constructor.
 /// </summary>
 /// <param name="inDesignMode">Flag which indicates if the control is being drawn on the Workspace Designer. (Use this flag to determine if code should perform any logic on the workspace record)</param>
 /// <param name="RecordContext">The current workspace record context.</param>
 public RepairOrderAddIn(bool inDesignMode, IRecordContext RecordContext, bool isEnabledEditing)
 {
     // do nothing so framework won't throw exception once it gets to GetControl
     if (!ConfigurationSetting.configVerbPerfect && ConfigurationSetting.loginUserIsAdmin)
     {
         // do nothing
     }
     else
     {
         _recordContext = RecordContext;
         this.isEnabledEditing = isEnabledEditing;
         if (_recordContext != null)
         {
             _recordContext.DataLoaded += _recordContext_DataLoaded;
             //Add saving/saved events
             _recordContext.Saving += _recordContext_Saving;
             _recordContext.Saved += _recordContext_Saved;
         }
         _repairOrderControl = new RepairOrderInformationControl(inDesignMode, isEnabledEditing);
     }
 }