/// ------------------------------------------------------------------------------------------------

        #region public Functions

        /// ------------------------------------------------------------------------------------------------
        ///
        /// ------------------------------------------------------------------------------------------------
        /// ------------------------------------------------------------------------------------------------
        /// Name		OnDelete
        ///
        /// <summary>	Delete's the row on the click event
        /// </summary>
        /// <param name="sRiActionParagraph"> </param>
        /// <remarks>
        /// </remarks>
        /// ------------------------------------------------------------------------------------------------

        public async void OnDelete(SRiActionParagraph sRiActionParagraph)
        {
            if (await DisplayAlert("Delete", "Do you want to delete this item?", "Yes", "No"))
            {
                Paralist.Remove(sRiActionParagraph);
                RefreshList();
                if (Paralist.Count == 0)
                {
                    IsEditable = false;
                }
            }
        }
Ejemplo n.º 2
0
        /// ------------------------------------------------------------------------------------------------

        /// ------------------------------------------------------------------------------------------------
        #region public Functions



        /// ------------------------------------------------------------------------------------------------
        ///
        /// ------------------------------------------------------------------------------------------------
        /// ------------------------------------------------------------------------------------------------
        /// Name		OnDelete
        ///
        /// <summary>	Delete's the row on the click event
        /// </summary>
        /// <param name="sRiActionParagraph"> </param>
        /// <remarks>
        /// </remarks>
        /// ------------------------------------------------------------------------------------------------

        public async void OnDelete(SRiActionParagraph sRiActionParagraph)
        {
            try
            {
                if (await LockScreen.ToDisplayAlert(this, "Delete", "Do you want to delete this item?", "Yes", "No"))
                {
                    Paralist.Remove(sRiActionParagraph);
                    OnEditPropertyChanged();
                    if (Paralist.Count == 0)
                    {
                        IsEditable     = false;
                        IsCellEditable = false;
                        Tblvw_StandardParagraph.IsVisible = false;
                    }
                }
            }
            catch (Exception ex)
            {
                LogTracking.LogTrace(ex.ToString());
            }
        }