Exemple #1
0
        public async Task <bool> Delete(TaskSubitemWork taskSubitemWork)
        {
            if (await EnsureLogin())
            {
                await MobileService.GetTable <TaskSubitemWork>().DeleteAsync(taskSubitemWork);

                return(true);
            }
            return(false);
        }
Exemple #2
0
        private async Task InsertEntry()
        {
            _currentTaskSubitemWork = new TaskSubitemWork()
            {
                Id            = Guid.NewGuid().ToString(),
                StartDateTime = DateTime.Now,
                EndDateTime   = null,
                TaskSubitemId = _associatedTaskSubitem.Id,
                UserId        = _associatedTaskSubitem.ExecutorId
            };
            await _taskSubitemWorkDataService.Insert(_currentTaskSubitemWork);

            await Refresh();

            if (_associatedTaskSubitem.TaskStatusId == ((int)TaskStatusEnum.NotStarted).ToString())
            {
                _associatedTaskSubitem.TaskStatusId = ((int)TaskStatusEnum.InProgress).ToString();
                await _taskSubitemDataService.UpdateTaskSubitem(_associatedTaskSubitem);
            }
        }