/// <summary> /// 更新完成 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void client_UpdateArchivesLendingCompleted(object sender, UpdateArchivesLendingCompletedEventArgs e) { RefreshUI(RefreshedTypes.HideProgressBar); try { if (e.Error == null) { if (e.Result != "") { Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(e.Result)); } else { if (e.UserState.ToString() == "Edit") { Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("SUCCESSED"), Utility.GetResourceStr("MODIFYSUCCESSED")); if (GlobalFunction.IsSaveAndClose(refreshType)) { RefreshUI(refreshType); } else { InitData(); } } else if (e.UserState.ToString() == "Audit") { Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("SUCCESSED"), Utility.GetResourceStr("SUCCESSAUDIT")); } else if (e.UserState.ToString() == "Submit") { Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("SUCCESSED"), Utility.GetResourceStr("SUCCESSSUBMITAUDIT")); } RefreshUI(RefreshedTypes.All); //if (actionFlag == DataActionFlag.SubmitFlow) //{ // actionFlag = DataActionFlag.SubmitComplete; // SumbitFlow(); //} //else //{ // if (actionFlag == DataActionFlag.SubmitComplete) // { // if (action == Action.Add || action == Action.Edit) // { // Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("SUCCESSED"), Utility.GetResourceStr("SUSSESSEDSUBMIT", "ARCHIVELENDING")); // } // else // { // Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("SUCCESSED"), Utility.GetResourceStr("AUDITSUCCESSED", "ARCHIVELENDING")); // } // } // else // { // Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("SUCCESSED"), Utility.GetResourceStr("UPDATESUCCESSED", "ARCHIVELENDING")); // if (GlobalFunction.IsSaveAndClose(refreshType)) // { // RefreshUI(RefreshedTypes.CloseAndReloadData); // } // else // { // InitData(); // } // } // RefreshUI(refreshType); //} } } else { Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), e.Error.Message); } } catch (Exception ex) { Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), ex.ToString()); } }
/// <summary> /// 更新完成 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void client_UpdateArchivesLendingCompleted(object sender, UpdateArchivesLendingCompletedEventArgs e) { RefreshUI(RefreshedTypes.HideProgressBar); try { if (e.Error == null) { if (e.Result != "") { Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(e.Result)); } else { if (e.UserState.ToString() == "Edit") { Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("SUCCESSED"), Utility.GetResourceStr("MODIFYSUCCESSED")); if (GlobalFunction.IsSaveAndClose(refreshType)) { RefreshUI(refreshType); } else { InitData(); } } else if (e.UserState.ToString() == "Audit") { Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("SUCCESSED"), Utility.GetResourceStr("SUCCESSAUDIT")); } else if (e.UserState.ToString() == "Submit") { Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("SUCCESSED"), Utility.GetResourceStr("SUCCESSSUBMITAUDIT")); } RefreshUI(RefreshedTypes.All); //if (actionFlag == DataActionFlag.SubmitFlow) //{ // actionFlag = DataActionFlag.SubmitComplete; // SumbitFlow(); //} //else //{ // if (actionFlag == DataActionFlag.SubmitComplete) // { // if (action == Action.Add || action == Action.Edit) // { // Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("SUCCESSED"), Utility.GetResourceStr("SUSSESSEDSUBMIT", "ARCHIVELENDING")); // } // else // { // Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("SUCCESSED"), Utility.GetResourceStr("AUDITSUCCESSED", "ARCHIVELENDING")); // } // } // else // { // Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("SUCCESSED"), Utility.GetResourceStr("UPDATESUCCESSED", "ARCHIVELENDING")); // if (GlobalFunction.IsSaveAndClose(refreshType)) // { // RefreshUI(RefreshedTypes.CloseAndReloadData); // } // else // { // InitData(); // } // } // RefreshUI(refreshType); //} } } else { Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), e.Error.Message); } } catch (Exception ex) { Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), ex.ToString()); } }