/// <summary> /// 导出数据完成事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void perClient_ExportEmployeeCompleted(object sender, ExportEmployeeCompletedEventArgs e) { try { if (result == true) { if (e.Error == null) { if (e.Result != null) { using (Stream stream = dialog.OpenFile()) { stream.Write(e.Result, 0, e.Result.Length); ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("SUCCESSED"), Utility.GetResourceStr("导出成功"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Information); } } else { ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("CAUTION"), Utility.GetResourceStr("没有数据可导出"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation); } } else { ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERRORINFO"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Error); } } RefreshUI(RefreshedTypes.HideProgressBar); } catch (Exception ex) { ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), ex.ToString(), Utility.GetResourceStr("CONFIRM"), MessageIcon.Error); RefreshUI(RefreshedTypes.HideProgressBar); } }
/// <summary> /// 导出数据完成事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void perClient_ExportEmployeeCompleted(object sender, ExportEmployeeCompletedEventArgs e) { try { if (result == true) { if (e.Error == null) { if (e.Result != null) { using (Stream stream = dialog.OpenFile()) { stream.Write(e.Result, 0, e.Result.Length); ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("SUCCESSED"), Utility.GetResourceStr("导出成功"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Information); } } else { ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("CAUTION"), Utility.GetResourceStr("没有数据可导出"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation); } } else { ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERRORINFO"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Error); } } RefreshUI(RefreshedTypes.HideProgressBar); } catch (Exception ex) { ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), ex.ToString(), Utility.GetResourceStr("CONFIRM"), MessageIcon.Error); RefreshUI(RefreshedTypes.HideProgressBar); } }