private async void DoSubmitAsync(object obj) { if (FormQuery != null && FormQuery.Id > 0) { if (String.IsNullOrEmpty(Response)) { MessageBox.Show("Please Add Your Message . ."); return; } try { var result = await RestHub.Submit(FormQuery.Id, Response); if (result.UserObject != null && (bool)result.UserObject) { ClearQuery.Execute(this); MessageBox.Show(result.StatusMessage); RefreshQueries.Execute(this); } else { MessageBox.Show("Can't Submitting Query . ."); } } catch (Exception ex) { AppErrorBox.ShowErrorMessage("Error while Submitting Query . .", ex.ToString()); } } else { MessageBox.Show("Please save query or select already created query to proceed . ."); } }