/// <summary> /// 更新完成事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void client_UpdateRandomGroupPersonListCompleted(object sender, UpdateRandomGroupPersonListCompletedEventArgs e) { if (e.Error != null && e.Error.Message != "") { if (e.Error.Message == "Repetition") { //Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("REPETITIONTWOPARAS", "RANDOMGROUPNAME")); ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("CAUTION"), Utility.GetResourceStr("REPETITIONTWOPARAS", "RANDOMGROUPNAME"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation); } else { //Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(e.Error.Message)); ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERRORINFO"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Error); } } else { //将添加列表合并到抽查组列表 foreach (T_HR_RAMDONGROUPPERSON ent in addList) { // 1s 冉龙军 // 暂不处理错误 // 1e try { groupPersonList.Add(ent); } catch { } } //清楚添加列表 addList.Clear(); //从抽查组列表中删除删除列表的集合 foreach (T_HR_RAMDONGROUPPERSON ent in delList) { // 1s 冉龙军 // 暂不处理错误 // 1e try { groupPersonList.Remove(ent); } catch { } } //清楚删除列表 delList.Clear(); //Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("SUCCESSED"), Utility.GetResourceStr("SAVESUCCESSED", "RANDOMGROUPPERSON")); ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("SUCCESSED"), Utility.GetResourceStr("SAVESUCCESSED", "RANDOMGROUPPERSON"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Information); if (isClose) { RefreshUI(RefreshedTypes.CloseAndReloadData); } else { RefreshUI(RefreshedTypes.All); } } }
/// <summary> /// 更新完成事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void client_UpdateRandomGroupPersonListCompleted(object sender, UpdateRandomGroupPersonListCompletedEventArgs e) { if (e.Error != null && e.Error.Message != "") { if (e.Error.Message == "Repetition") { //Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("REPETITIONTWOPARAS", "RANDOMGROUPNAME")); ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("CAUTION"), Utility.GetResourceStr("REPETITIONTWOPARAS", "RANDOMGROUPNAME"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation); } else { //Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(e.Error.Message)); ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERRORINFO"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Error); } } else { //将添加列表合并到抽查组列表 foreach (T_HR_RAMDONGROUPPERSON ent in addList) { // 1s 冉龙军 // 暂不处理错误 // 1e try { groupPersonList.Add(ent); } catch { } } //清楚添加列表 addList.Clear(); //从抽查组列表中删除删除列表的集合 foreach (T_HR_RAMDONGROUPPERSON ent in delList) { // 1s 冉龙军 // 暂不处理错误 // 1e try { groupPersonList.Remove(ent); } catch { } } //清楚删除列表 delList.Clear(); //Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("SUCCESSED"), Utility.GetResourceStr("SAVESUCCESSED", "RANDOMGROUPPERSON")); ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("SUCCESSED"), Utility.GetResourceStr("SAVESUCCESSED", "RANDOMGROUPPERSON"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Information); if (isClose) RefreshUI(RefreshedTypes.CloseAndReloadData); else RefreshUI(RefreshedTypes.All); } }