コード例 #1
0
        private async Task <bool> EliminarRoles(int Id)
        {
            ApiCall api          = new ApiCall(Session);
            var     resultclient = await api.DeleteAsync("/api/Rol/" + Id);

            return(resultclient.IsSuccessStatusCode);
        }
コード例 #2
0
        public async Task <ActionResult> DeleteConfirmed(int id)
        {
            ApiCall api    = new ApiCall(Session);
            var     result = await api.DeleteAsync("/api/Institucion/" + id);

            if (result.IsSuccessStatusCode)
            {
                return(RedirectToAction("Index"));
            }
            bitacora.AgregarBitacora("Institucion", "Delete", "No se elimino", Session["US"].ToString(), 2);
            return(HttpNotFound());
        }