/// <summary> /// Modifier une note en base /// </summary> /// <param name="n">Note à modifier</param> public void ModifierNote(Note n) { // TODO : ajouter des contrôles sur la note (exemple : vérification de champ, etc.) NoteCommand nc = new NoteCommand(contexte); nc.Modifier(n); }
/// <summary> /// Ajouter une note en base /// </summary> /// <param name="n">Note à ajouter</param> /// <returns>identifiant de la nouvelle note</returns> public int AjouterNote(Note n) { // TODO : ajouter des contrôles sur la note (exemple : vérification de champ, etc.) NoteCommand nc = new NoteCommand(contexte); return(nc.Ajouter(n)); }
public DetailEleveVM(Eleve e) { _id = e.Id; _noteCommand = new NoteCommand(new ProNetDbContext()); _nom = e.Nom; _prenom = e.Prenom; _moyenne = (from n in e.Notes select n.NoteValue).Average(); _nbAbsences = (from a in e.Absences select a).Count(); }
private void ExecuteCommand(NoteCommand command) { switch (command) { case NoteCommand.Save: _noteServices.SaveNote(TxtTitle.Text, TxtContent.Text); break; case NoteCommand.GetToday: case NoteCommand.GetLastTwo: case NoteCommand.GetLastFive: _notes = _noteServices.GetNotes((short)command); break; } }
private void SerializeIf(NoteCommand cmd) { byte noteVal = (byte)(cmd.Note % 12); sbyte oct = (sbyte)(cmd.Note / 12); oct--; if (oct == -1) { sb.AppendFormat("{0}m1_if {1}, {2}\n", noteNames[noteVal], cmd.Velocity, cmd.Duration); } else { sb.AppendFormat("{0}{1}_if {2}, {3}\n", noteNames[noteVal], oct, cmd.Velocity, cmd.Duration); } }
public MainViewModel() { ExitCommand = new ExitCommand(); NoteBookCommand = new NoteBookCommand(this); NoteCommand = new NoteCommand(this); NoteBookCollection = new ObservableCollection <NoteBook>(); NotesCollection = new ObservableCollection <Notes>(); //LoginVM loginvm = new LoginVM(); LoginVM.HasLoggedIn += Loginvm_HasLoggedIn; IsEditing = false; IsEditingNote = false; StartEditingCommand = new StartEditingCommand(this); HasEditedCommand = new HasEditedCommand(this); DeleteNoteCommand = new DeleteNoteCommand(this); DeleteNoteBookCommand = new DeleteNoteBookCommand(this); StartEditingNoteCommand = new StartEditingNoteCommand(this); HasEditedNoteCommand = new HasEditedNoteCommand(this); //getNotes(); }
public DetailEleve() { InitializeComponent(); _noteCommand = new NoteCommand(new ProNetDbContext()); }
/// <summary> /// Supprimer une note en base /// </summary> /// <param name="noteID">Identifiant de la note à supprimer</param> public void SupprimerNote(int noteID) { NoteCommand nc = new NoteCommand(contexte); nc.Supprimer(noteID); }
/// <summary> /// Supprime une note /// </summary> /// <param name="noteId">Identifiant de la note</param> public void DeleteNote(int noteId) { NoteCommand noteCommand = new NoteCommand(monContexte); noteCommand.Delete(noteId); }
/// <summary> /// Modifie une note /// </summary> /// <param name="note">Entité <see cref="Note"/></param> public void EditNote(Note note) { NoteCommand noteCommand = new NoteCommand(monContexte); noteCommand.Edit(note); }
/// <summary> /// Ajoute une note /// </summary> /// <param name="note">Entité <see cref="Note"/></param> public void AddNote(Note note) { NoteCommand noteCommand = new NoteCommand(monContexte); noteCommand.Add(note); }
public int AddNote(Note note) { NoteCommand nc = new NoteCommand(contexte); return(nc.Ajouter(note)); }
public int SupprimerNote(int id) { NoteCommand nc = new NoteCommand(context); return(nc.Supprimer(id)); }
public int AjouterNote(Note n) { NoteCommand nc = new NoteCommand(context); return(nc.Ajouter(n)); }
public static void AppendInvoke(NoteCommand command) { commandStack.Push(command); command.Execute(); redoStack.Clear(); }
public void ModifierNote(Note n) { NoteCommand nc = new NoteCommand(contexte); nc.Modifier(n); }