/// <summary> /// 获取出差方案设置 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void Travelmanagement_GetTravelSolutionByCompanyIDCompleted(object sender, GetTravelSolutionByCompanyIDCompletedEventArgs e) { try { if (e.Error != null && !string.IsNullOrEmpty(e.Error.Message)) { if (e.UserState != null) { Button btn = e.UserState as Button; btn.IsEnabled = true; } ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("TIPS"), Utility.GetResourceStr(e.Error.Message), Utility.GetResourceStr("CONFIRM"), MessageIcon.Information); } if (e.Result != null) { travelsolutions = e.Result;//出差方案 } else { ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("TIPS"), "没有找到对应的出差方案,不能产生出差报销单", Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation); } if (e.PlaneObj != null) { cantaketheplaneline = e.PlaneObj.ToList();//乘坐飞机线路设置 } if (e.StandardObj != null) { takethestandardtransport = e.StandardObj.ToList();//乘坐交通工具设置 } else { ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("TIPS"), "没有获取到交通工具设置,不能产生出差报销单", Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation); } Travelmanagement.GetTravleAreaAllowanceByPostValueAsync(postLevel, travelsolutions.TRAVELSOLUTIONSID, null, e.UserState); } catch (Exception ex) { if (e.UserState != null) { Button btn = e.UserState as Button; btn.IsEnabled = true; } Logger.Current.Log(ex.Message, Category.Debug, Priority.Low); ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("TIPS"), Utility.GetResourceStr("ERRORINFO"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation); } }