void BuyProduct <AdminMethod>(string username, string prodID, string nulc) { User user; Product product; try { user = GetUser(username); int id = Convert.ToInt32(prodID); product = Stregsystem.GetProductByID(id); BuyTransaction tr = Stregsystem.BuyProduct(user, product); UI.DisplayUserBuysProduct(tr); } catch (UserNotFoundException e) { UI.DisplayUserNotFound(e.username); } catch (InsufficientCreditsException e) { UI.DisplayInsufficientCash(e.user, e.product); } catch (ProductNotActivatedException e) { UI.DisplayProductNotActivated(e.product); } catch (ProductNotFoundException) { UI.DisplayProductNotFound(prodID); } catch (FormatException) { UI.DisplayQuantityMustBeANumber(); } catch (OverflowException) { UI.DisplayQuantityMustBeANumber(); } catch (Exception e) { UI.DisplayGeneralError(e.Message); } }