public void ClearLogData() { if (LogCollection != null) { LogCollection.Clear(); } }
public void RefreshLogList(DatePicker datePicker) { try { DateTime selectedDate = (DateTime)datePicker.SelectedDate; if (selectedDate != null) { List <Log> logList = DataController.GetInstance.GetLog(selectedDate); lc = Application.Current.Resources["LogCollection"] as LogCollection; lc.Clear(); foreach (Log log in logList) { lc.Add(log); } Application.Current.Resources["LogCollection"] = lc; } } catch (MySqlException ex) { MessageBox.Show(ex.Message); } }