/// <summary> /// Use Keyup instead of Keypress as the actual data binding did not yet happen when Keypress is fired /// </summary> public async Task NewTask_Keyup(KeyboardEventArgs e) { if (e.Key == "Enter") { if (!String.IsNullOrEmpty(this.newTaskTitle)) { if (string.IsNullOrEmpty(newTaskTitle)) { return; } var t = new BO.Task(); t.TaskID = 0; // notwendig f�r Server, da der die ID vergibt t.Title = newTaskTitle; t.CategoryID = this.category.CategoryID; t.Importance = BO.Importance.B; t.Created = DateTime.Now; t.Due = null; t.Order = 0; t.Note = ""; t.Done = false; await proxy.CreateTaskAsync(t, am.Token); await ShowTaskSet(this.category); this.newTaskTitle = ""; // SignalR-Nachricht senden await hubConnection.SendAsync("SendTaskListUpdate", user.Identity.Name, this.category.CategoryID); } } }
/// <summary> /// Ereignisbehandlung: Benutzer löscht Aufgabe /// </summary> public async System.Threading.Tasks.Task RemoveTask(BO.Task t) { IJSObjectReference skript = await js.InvokeAsync <IJSObjectReference>("import", "/_content/MiracleListRCL/JSUtil.js"); // Rückfrage (Standard-Browser-Dialog via JS!) //if (!await js.InvokeAsync<bool>("confirmWithLog", "Remove Task #" + t.TaskID + ": " + t.Title + "?", true)) return; // Rückfrage (Bootstrap-Dialog via JS!) obj = DotNetObjectReference.Create(this); await skript.InvokeVoidAsync("confirmBootstrap", obj, t.TaskID, "Remove this Task?<br><br><b>#" + t.TaskID + ": " + t.Title, true); }
private void GetTask(int id) { Util.Log(nameof(GetTask) + ": " + id); this.task = new BL.TaskManager(userID).GetTask(id); Util.Log(this.task); }
public async Task ShowTaskDetail(BO.Task t) { this.task = t; }
public void ShowTaskDetail(BO.Task t) { this.task = t; }