protected override ResultStatus Export() { if (!StartExport()) { return(ResultStatus.Fail); } MessageDisplay message = new MessageDisplay(); string saveFilePath = PbFunc.wf_copy_file(_ProgramID, "43033"); try { b43033 = new B43033(saveFilePath, emStartDate.Text, emEndDate.Text); ShowMsg("43033-股票類(ETF)期貨價格及現貨資料 轉檔中..."); message.OutputShowMessage = b43033.Wf43033(); if (string.IsNullOrEmpty(message.OutputShowMessage)) { ShowMsg("轉檔有錯誤!"); if (File.Exists(saveFilePath)) { File.Delete(saveFilePath); } return(ResultStatus.Fail); } } catch (Exception ex) { ShowMsg("轉檔有錯誤!"); if (File.Exists(saveFilePath)) { File.Delete(saveFilePath); } WriteLog(ex); return(ResultStatus.Fail); } finally { EndExport(); } return(ResultStatus.Success); }
public void Wf43033Test() { string msgText = b43033.Wf43033(); Assert.IsNotNull(msgText); }