private void GetReminderCollectionByDate(DateTime?dateTime) { this.ShowProgressBar = true; this.SearchDateTime = null; this.SearchDateTime = dateTime; Task.Factory.StartNew(() => { this.Entity = dateTime.HasValue ? ReminderAction.GetReminders(this.DBConnectionString, dateTime.Value) : ReminderAction.GetReminders(this.DBConnectionString); this.ShowProgressBar = false; }); }
//private void FindNextAvailableAppointmentTime() //{ // try // { // if (this.AppointmentCollection != null && // this.AppointmentCollection.InternalList.Any(x => x.BeginTime == this.Entity.BeginTime)) // { // this.Entity.BeginTime = this.Entity.BeginTime.AddMinutes(30); // FindNextAvailableAppointmentTime(); // } // } // catch (Exception exception) // { // NLogLogger.LogError(exception, TitleResources.Error, ExceptionResources.ExceptionOccured, // ExceptionResources.ExceptionOccuredLogDetail); // } //} private void GetReminders(DateTime dateTime) { try { Task.Factory.StartNew(() => { this.ReminderList = ReminderAction.GetReminders(this.DBConnectionString, dateTime); }); } catch (Exception exception) { NLogLogger.LogError(exception, TitleResources.Error, ExceptionResources.ExceptionOccured, ExceptionResources.ExceptionOccuredLogDetail); } }