void personClient_ExportEmployeeCollectsReportsCompleted(object sender, ExportEmployeeCollectsReportsCompletedEventArgs e) { 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); } } loadbar.Stop(); }
void personClient_ExportEmployeeCollectsReportsCompleted(object sender, ExportEmployeeCollectsReportsCompletedEventArgs e) { 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); } } loadbar.Stop(); }