async void DeleteClicked(object sender, EventArgs e) { if (IosUtils.IosUtility.IsReachable()) { IosUtils.IosUtility.showProgressHud(""); try { if (isEdit && Event != null) { var res = await WebServiceMethods.DeleteEvents(Event.EntryId); IosUtils.IosUtility.hideProgressHud(); if (res) { this.NavigationController.PopViewController(true); } else { IosUtils.IosUtility.showAlertWithInfo(IosUtils.LocalizedString.sharedInstance.GetLocalizedString("LSErrorTitle", "LSErrorTitle"), IosUtils.LocalizedString.sharedInstance.GetLocalizedString("LSUnknownError", "LSErrorTitle")); } } } catch (Exception ex) { IosUtils.IosUtility.hideProgressHud(); IosUtils.IosUtility.showAlertWithInfo(IosUtils.LocalizedString.sharedInstance.GetLocalizedString("LSErrorTitle", "LSErrorTitle"), ex.Message); } } }
private async Task <bool> DeleteCRMNotes() { try { if (CrossConnectivity.Current.IsConnected) { CustomProgressDialog.ShowProgDialog(mActivity, GetString(Resource.String.processing_message)); bool isDelete = await WebServiceMethods.DeleteEvents(eventObj.EntryId); CustomProgressDialog.HideProgressDialog(); return(isDelete); } } catch (Exception ex) { CustomProgressDialog.HideProgressDialog(); } return(false); }