Пример #1
0
        async void DeleteClicked(object sender, EventArgs e)
        {
            if (IosUtils.IosUtility.IsReachable())
            {
                IosUtils.IosUtility.showProgressHud("");
                try
                {
                    if (isEdit && notes != null)
                    {
                        var res = await WebServiceMethods.DeleteCrmNotes(notes.NotesId);

                        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);
                }
            }
        }
Пример #2
0
        private async Task <bool> DeleteCRMNotes()
        {
            try
            {
                if (CrossConnectivity.Current.IsConnected)
                {
                    CustomProgressDialog.ShowProgDialog(mActivity,
                                                        GetString(Resource.String.processing_message));
                    bool isDelete = await WebServiceMethods.DeleteCrmNotes(noteObj.NotesId);

                    CustomProgressDialog.HideProgressDialog();
                    return(isDelete);
                }
            }
            catch (Exception ex)
            {
                CustomProgressDialog.HideProgressDialog();
            }
            return(false);
        }