Beispiel #1
0
 private void LogsDB_VisibleChanged(object sender, EventArgs e)
 {
     if (this.Visible)
     {
         promptToSave = false;
         //update bindinglist
         studyLogListView           = new BindingListView <StudyLog>(LogData.StudyLogs);
         dataGridViewRef.DataSource = studyLogListView;
         LogsDBView.Sort(LogsDBView.Columns["logsEndDate"], ListSortDirection.Descending);
         LogsDBView.Refresh();
         FilterDialogForm.ClearFilter(FilterDialogForm.FilterDialog);
     }
 }
Beispiel #2
0
        private void NewEntryMenuButton_Click(object sender, EventArgs e)
        {
            AddNewLog.AddNewLogRef.StartPosition = FormStartPosition.CenterScreen;
            DialogResult result = AddNewLog.AddNewLogRef.ShowDialog();

            if (result == DialogResult.OK)
            {
                studyLogListView      = new BindingListView <StudyLog>(LogData.StudyLogs);
                LogsDBView.DataSource = studyLogListView;
                LogsDBView.Refresh();

                promptToSave = true;
                FilterDialogForm.ClearFilter(FilterDialogForm.FilterDialog);
                LogsDBView.Sort(LogsDBView.Columns["logsEndDate"], ListSortDirection.Descending);
            }
            else
            {
                // do nothing
            }
        }