Esempio n. 1
0
        internal bool GetTaskIsDone(Task task, out int score)
        {
            var taskAssignedTo = this.data.TaskAssignedToRelationship.FirstOrDefault(p => p.TaskId == task.TaskId && p.PersonUserId == this.data.User.UserId);

            if (taskAssignedTo == null)
            {
                //Fehlerfall Silent lösen, sollte eigentlich nie vorkommen, außer wenn eine einem Nutzer zugewiesene Aufgabe sich verändert und
                //die App über Push gestartet wird.
                if (System.Diagnostics.Debugger.IsAttached)
                {
                    System.Diagnostics.Debugger.Break();
                }

                taskAssignedTo = new TaskAssignedTo()
                {
                    TaskId = task.TaskId, IsDone = false, PersonUserId = this.data.User.UserId, Score = 200
                };
            }

            score = taskAssignedTo.Score;
            return(taskAssignedTo.IsDone);
        }
Esempio n. 2
0
        internal bool GetTaskIsDone(Task task, out int score)
        {
            var taskAssignedTo = this.data.TaskAssignedToRelationship.FirstOrDefault(p => p.TaskId == task.TaskId && p.PersonUserId == this.data.User.UserId);

            if (taskAssignedTo == null)
            {
                //Fehlerfall Silent lösen, sollte eigentlich nie vorkommen, außer wenn eine einem Nutzer zugewiesene Aufgabe sich verändert und
                //die App über Push gestartet wird.
                if (System.Diagnostics.Debugger.IsAttached)
                    System.Diagnostics.Debugger.Break();

                taskAssignedTo = new TaskAssignedTo() { TaskId = task.TaskId, IsDone = false, PersonUserId = this.data.User.UserId, Score = 200 };
            }

            score = taskAssignedTo.Score;
            return taskAssignedTo.IsDone;
        }
Esempio n. 3
0
 internal async void RemoveTaskAssignedTo(TaskAssignedTo item)
 {
     await this.mobileService.GetTable<TaskAssignedTo>().DeleteAsync(item);
 }
Esempio n. 4
0
 internal async void UpdateTaskAssignedTo(TaskAssignedTo item)
 {
     await this.mobileService.GetTable<TaskAssignedTo>().UpdateAsync(item);
 }
Esempio n. 5
0
 internal async void AddTaskAssignedTo(TaskAssignedTo item)
 {
     await this.mobileService.GetTable<TaskAssignedTo>().InsertAsync(item);
 }
Esempio n. 6
0
 internal async void RemoveTaskAssignedTo(TaskAssignedTo item)
 {
     await this.mobileService.GetTable <TaskAssignedTo>().DeleteAsync(item);
 }
Esempio n. 7
0
 internal async void UpdateTaskAssignedTo(TaskAssignedTo item)
 {
     await this.mobileService.GetTable <TaskAssignedTo>().UpdateAsync(item);
 }
Esempio n. 8
0
 internal async void AddTaskAssignedTo(TaskAssignedTo item)
 {
     await this.mobileService.GetTable <TaskAssignedTo>().InsertAsync(item);
 }