// Update public static void TodoUpdate() { Debug.Print("--- TodoUpdate ---"); // KlasseA ändert Attribute Data.Todos todo = Data.Todos.ReadId(1); todo.Description = "Artikel 1 nach Update"; todo.Update(); }
public Todo_Singleview(Modes mode, Data.Todos todo, Todo_Listview _Listview, Main_Window _Conainter) { InitializeComponent(); this.todo = todo; ChangeMode(mode); FillFields(todo); ListView = _Listview; Container = _Conainter; }
public static Int64 TodoCreateShort() { Data.Todos todo2 = new Data.Todos { Description = "Artikel 2", Done = true, ExpiryDate = DateTime.Today, Colour = "Red", Priority = 1 }; Int64 todo2Id = todo2.Create(); Debug.Print("Artikel erstellt mit Id:" + todo2Id); return(todo2Id); }
// Create public static void TodoCreate() { Debug.Print("--- TodosCreate ---"); // KlasseA Data.Todos todo1 = new Data.Todos(); todo1.Description = "Artikel 1"; todo1.ExpiryDate = DateTime.Today; Int64 todo1Id = todo1.Create(); Debug.Print("Artikel erstellt mit Id:" + todo1Id); }
private void FillFields(Data.Todos todo) { description.Text = todo.Description; deadline.Text = todo.ExpiryDate.ToString(); priority.SelectedIndex = todo.Priority; done.IsChecked = todo.Done; switch (todo.Colour) { case "Red": radioRed.IsChecked = true; break; case "Green": radioGreen.IsChecked = true; break; case "Blue": radioBlue.IsChecked = true; break; } }