public async void OnDeleteClicked(object sender, EventArgs args)
        {
            try
            {
                bool accepted = await DisplayAlert("Confirm", "Are you Sure ?", "Yes", "No");

                if (accepted)
                {
                    productCRUD.DeleteProduct(selproducts);
                }
                await DisplayAlert("Sucess", "Data is Deleted Successfully", "OK");

                await Navigation.PushAsync(new Stocks());
            }
            catch (Exception ex)
            {
                string error = ex.ToString();
                await DisplayAlert("Sorry...", "Something went wrong. Try after sometime.", "OK");
            }
        }
Esempio n. 2
0
 public JsonResult EliminarProducto(string productName)
 {
     poperations.DeleteProduct(productName);
     return(Json(true));
 }