Exemplo n.º 1
0
 public void DeleteSet(FlashCardSet flashCardSet)
 {
     _connection.Delete<FlashCardSet>(flashCardSet.ID);
     string query = "Delete from CardInSet where SetID == ?"; //todo:create query that adds //and make these tables cascade foreign keys
     _connection.Execute(query, flashCardSet.ID);
     _messenger.Publish(new FlashCardSetListChangedMessage(this));
     //todo:add messaging to alert that a set no longer exists
 }
Exemplo n.º 2
0
 public void CreateSet(FlashCardSet set)
 {
     _connection.Insert(set);
     _messenger.Publish(new FlashCardSetListChangedMessage(this));
 }
Exemplo n.º 3
0
 public void RenameSet(FlashCardSet flashCardSet)
 {
     _connection.Update(flashCardSet);
 }
 private void AddToSet(FlashCard card, FlashCardSet flashCardSet)
 {
     var id = _flashCardManager.CreateCard(Card);
        _flashCardManager.AddCardtoSet(id,flashCardSet.ID);
     Close(this);
 }
 private void NavigateToSetDetailsView(FlashCardSet theSet)
 {
     ShowViewModel<FlashCardSetDetailsViewModel> (new Nav(){
             Id = theSet.ID
         });
 }
 private void DoAddCommand()
 {
     if
     (!string.IsNullOrEmpty(NewSetName))
         {
         FlashCardSet set = new FlashCardSet {SetName = NewSetName};
             _flashCardManager.CreateSet(set);
         }
 }