예제 #1
0
        public async Task <bool> EditDeleteTime()
        {
            JObject result = await GetJsonFromBodyRequest();

            int      fileId;
            bool     isNeedDelete;
            DateTime date;

            try {
                fileId       = result["fileId"].Value <int>();
                date         = result["dateTime"].Value <DateTime>();
                isNeedDelete = result["isNeedDelete"].Value <bool>();
            } catch {
                return(false);
            }

            _context.EditDeleteTime(fileId, date, isNeedDelete);

            return(true);
        }