Esempio n. 1
0
        public bool  Remove(T item)
        {
            dynamic a      = item;
            var     ApiUrl = uri + "?id=" + a.Id;

            try
            {
                if (ResourcesBase.MessageAsk("Yakin Hapus Data ?"))
                {
                    Client client   = new Client();
                    var    response = client.ClientContext.DeleteAsync(ApiUrl).Result;
                    if (response.IsSuccessStatusCode)
                    {
                        list.Remove(item);
                        OnChangeSource(item);
                        return(true);
                    }
                    else
                    {
                        return(false);
                    }
                }
                else
                {
                    return(false);
                }
            }
            catch (Exception ex)
            {
                ResourcesBase.ShowMessageError(ex.Message);
                return(false);
            }
        }
Esempio n. 2
0
        private void DeleteCommandAction(object obj)
        {
            var sure = ResourcesBase.MessageAsk("Yakin Hapus Data ?");

            if (sure)
            {
            }
        }