protected void ShowError(AppException ex, string title) { Deployment.Current.Dispatcher.BeginInvoke(() => { MessageBoxResult result = T360ViewUtlity.Handle(CultureManager.Instance, ex, title); if (result == MessageBoxResult.OK || result == MessageBoxResult.None) { SetFocus(); } if (T360ErrorCodes.AppSessionExpired.Equals(ex.ErrorCodes[0].Code)) { RedirectToLogin(); } }); }
protected void ShowError(AppException ex) { if (ex.ErrorCodes.Count == 1 && T360ErrorCodes.UnableToConnectServer.Equals(ex.ErrorCodes[0].Code)) { ShowError(ex, "Network Error"); return; } if (ex.ErrorCodes.Count == 1 && T360ErrorCodes.AppSessionExpired.Equals(ex.ErrorCodes[0].Code)) { ShowError(ex, "Session Expired"); return; } Deployment.Current.Dispatcher.BeginInvoke(() => { MessageBoxResult result = T360ViewUtlity.Handle(CultureManager.Instance, ex); if (result == MessageBoxResult.OK || result == MessageBoxResult.None) { SetFocus(); } }); }