Beispiel #1
0
 private void DeleteBillByAccount(string billName)
 {
     for (int i = billProvider.Items.Count - 1; i >= 0; --i)
     {
         if (billProvider.Items[i].AccountName == billName)
         {
             billProvider.DeleteItem(billProvider.Items[i]);
         }
     }
 }
        public void Remove(Staff staff, Course course)
        {
            try
            {
                var id             = $"{course.Id}_{staff.Id}";
                var rosterToDelete = _databaseProvider.GetItem <LocalData.StaffCourseRoster, string>(id);

                _databaseProvider.DeleteItem(rosterToDelete);
            }
            catch (LocalStorageException)
            {
                throw;
            }
            catch (Exception ex)
            {
                throw new DataRepositoryException($"An error occurred while an attempt was made to remove a staff-course with course id {course.Id} and staff id {staff.Id}.", ex);
            }
        }
Beispiel #3
0
 private void DeleteBill() => billProvider.DeleteItem(bill);