/// <summary> /// 新增完成 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void client_AddArchivesLendingCompleted(object sender, AddArchivesLendingCompletedEventArgs e) { RefreshUI(RefreshedTypes.HideProgressBar); try { if (e.Error == null) { if (e.Result != "") { Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(e.Result)); } else { Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("SUCCESSED"), Utility.GetResourceStr("ADDDATASUCCESSED")); if (GlobalFunction.IsSaveAndClose(refreshType)) { RefreshUI(refreshType); } else { FormTypeAction = FormTypes.Edit; action = Action.Edit; this.lendingID = lendingArchives.LENDARCHIVESID; InitData(); EntityBrowser entBrowser = this.FindParentByType<EntityBrowser>(); entBrowser.FormType = FormTypes.Edit; RefreshUI(RefreshedTypes.AuditInfo); RefreshUI(RefreshedTypes.All); } //HtmlPage.Window.Alert("新增借阅记录成功!"); //if (actionFlag == DataActionFlag.SubmitFlow) //{ // client.GetLendingListByLendingIdAsync(lendingArchives.LENDARCHIVESID); // //actionFlag = DataActionFlag.SubmitComplete; // //SumbitFlow(); //} //else //{ // if (GlobalFunction.IsSaveAndClose(refreshType)) // { // RefreshUI(RefreshedTypes.CloseAndReloadData); // } // else // { // //Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("SUCCESSED"), Utility.GetResourceStr("ADDSUCCESSED", "ARCHIVELENDING")); // this.action = Action.Edit; // this.lendingID = lendingArchives.LENDARCHIVESID; // InitData(); // } //} } } else { //HtmlPage.Window.Alert(e.ToString()); 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_AddArchivesLendingCompleted(object sender, AddArchivesLendingCompletedEventArgs e) { RefreshUI(RefreshedTypes.HideProgressBar); try { if (e.Error == null) { if (e.Result != "") { Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(e.Result)); } else { Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("SUCCESSED"), Utility.GetResourceStr("ADDDATASUCCESSED")); if (GlobalFunction.IsSaveAndClose(refreshType)) { RefreshUI(refreshType); } else { FormTypeAction = FormTypes.Edit; action = Action.Edit; this.lendingID = lendingArchives.LENDARCHIVESID; InitData(); EntityBrowser entBrowser = this.FindParentByType <EntityBrowser>(); entBrowser.FormType = FormTypes.Edit; RefreshUI(RefreshedTypes.AuditInfo); RefreshUI(RefreshedTypes.All); } //HtmlPage.Window.Alert("新增借阅记录成功!"); //if (actionFlag == DataActionFlag.SubmitFlow) //{ // client.GetLendingListByLendingIdAsync(lendingArchives.LENDARCHIVESID); // //actionFlag = DataActionFlag.SubmitComplete; // //SumbitFlow(); //} //else //{ // if (GlobalFunction.IsSaveAndClose(refreshType)) // { // RefreshUI(RefreshedTypes.CloseAndReloadData); // } // else // { // //Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("SUCCESSED"), Utility.GetResourceStr("ADDSUCCESSED", "ARCHIVELENDING")); // this.action = Action.Edit; // this.lendingID = lendingArchives.LENDARCHIVESID; // InitData(); // } //} } } else { //HtmlPage.Window.Alert(e.ToString()); Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), e.Error.Message); } } catch (Exception ex) { Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), ex.ToString()); } }