Ejemplo n.º 1
0
        public async Task <string> DeleteAsync(int Id)
        {
            BooleanResult result = new BooleanResult();

            var item = await _service.GetByIdAsync(Id);

            if (item == null)
            {
                result.Data = false;
            }
            else
            {
                await _scheduleCenter.DeleteJobAsync(item.Name, item.Group);

                result = await _service.DeleteAsync(Id);
            }
            return(JsonHelper.ObjectToJSON(result));
        }