Пример #1
0
        public void DeleteTable()
        {
            if (SelectedTable == null)
            {
                Message.Show("No Item Is Selected");
                return;
            }

            if (_tableDataModel.DeleteTable(SelectedTable.Id))
            {
                Tables.Remove(SelectedTable);
                return;
            }

            Message.Show("Failed");
        }
Пример #2
0
 public void DeleteItem()
 {
     if (SelectedMenuItem == null)
     {
         Message.Show("No Item Is Selected");
     }
     else
     {
         if (_menuDataModel.DeleteItem(SelectedMenuItem.Id))
         {
             AllMenuItems.Remove(SelectedMenuItem);
             MenuItems.Remove(SelectedMenuItem);
         }
         else
         {
             Message.Show("Failed");
         }
     }
 }