public async Task <bool> Delete(TaskSubitemWork taskSubitemWork) { if (await EnsureLogin()) { await MobileService.GetTable <TaskSubitemWork>().DeleteAsync(taskSubitemWork); return(true); } return(false); }
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); } }