/// <summary> /// Ctor /// </summary> public WorkOrderImportJob() : base() { _jobConfig = new WorkOrderImportJobConfig(); _configUI = new WorkOrderImportJobConfigUI(); _iXML = new IMBXML(); }
/// <summary> /// This method initializes Sage APIs /// </summary> /// <param name="iXML"></param> /// <returns></returns> private bool InitializeSageApi(IMBXML iXML, string dataDrive) { int retVal; // intialize API and error handling retVal = iXML.IntializeAPI(); if (retVal != 0) { this.Log("SMB API failed to initialize. Error code - {0}", retVal); return false; } // Set data drive and error handling retVal = iXML.SetDataDrive(dataDrive); if (retVal != 0) { this.Log("Failed to set data drive. Error code - {0}", retVal); return false; } retVal = iXML.EnableRequests(); if (retVal != 0) { this.Log("Failed to enable request to Sage APIs. Error code - {0}", retVal); return false; } return true; }