private void btn_addNote_Click(object sender, RoutedEventArgs e) { TVStaffNote rawNote = new TVStaffNote(); TVStaffNote note = new TVStaffNote(); var builder = new StringBuilder(); TvViewStaffNotes staffNotes = new TvViewStaffNotes(dGrid_staffTvNotes); staffNotes.createHeader(); rawNote.Notes = txtBox_notes.Text.ToString(); for (int i = 0; i < txtBox_notes.LineCount; i++) { builder.Append(txtBox_notes.GetLineText(i)); builder.Append(System.Environment.NewLine); } note.Notes = builder.ToString(); if (note.Notes != "") { staffNotes.addNote(note.Notes); txtBox_notes.Clear(); } }
/// <summary> /// Adds a string note to the datagrid /// </summary> /// <param name="note"></param> public void addNote(string note) { TVStaffNote staffNote = new TVStaffNote(); DataGridRow newRow = new DataGridRow(); staffNote.Notes = note; newRow.Item = staffNote; dataGrid.Items.Add(newRow); updateRowHeight(); }
public void intialScheduleLoad() { Repository.ScheduleRepository.LoadTvView(dGrid_staffTvFullscreen, cb_Box, token); TVStaffNote rawNote = new TVStaffNote(); TVStaffNote note = new TVStaffNote(); var builder = new StringBuilder(); TvViewStaffNotes staffNotes = new TvViewStaffNotes(dGrid_staffTvNotesFullscreen); staffNotes.createHeader(); loadNotes(); }