private void RestaurantsButton_Click(object sender, EventArgs e)
        {
            Hide();
            var SRM = new SysAdminRestaurantsMenu(UserId);

            SRM.ShowDialog();
        }
        private void DeleteRestaurantButton_Click(object sender, EventArgs e)
        {
            var dialogResult = MessageBox.Show("Are you sure you want to delete " + RestaurantName + "?",
                                               "Delete Restaurant", MessageBoxButtons.YesNo);

            if (dialogResult == DialogResult.Yes)
            {
                var restaurant = StaticAccessor.DB.GetRestaurant(RestaurantId);
                restaurant.Deleted = true;
                StaticAccessor.DB.UpdateRestaurant(restaurant);

                var restaurantOwner = StaticAccessor.DB.GetUser(restaurant.OwnerId);
                restaurantOwner.RestaurantId = 0;
                StaticAccessor.DB.UpdateUser(restaurantOwner);

                Hide();
                var SARM = new SysAdminRestaurantsMenu(AdminId);
                SARM.ShowDialog();
            }
            else if (dialogResult == DialogResult.No)
            {
            }
        }
 private void BackButton_Click(object sender, EventArgs e)
 {
     if (sysAdmin)
     {
         if (newRestaurant)
         {
             Hide();
             var SRM = new SysAdminRestaurantsMenu(AdminId);
             SRM.ShowDialog();
         }
         else
         {
             Hide();
             var SVR = new SysViewRestaraunt(AdminId, RestaurantId);
             SVR.ShowDialog();
         }
     }
     else
     {
         Hide();
         var RM = new RestAdminMainMenu(AdminId, RestaurantId);
         RM.ShowDialog();
     }
 }