public static string deleteProductType(ProductType pt)
        {
            try
            {
                ProductTypeHandler.deleteProductType(pt.ID);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.ToString());
                return("Database update on server failure, please try again!");
            }

            return("");
        }
示例#2
0
        public String deleteAttempt(String targetId)
        {
            String errMsg = validateInputId(targetId);

            if (errMsg == null)
            {
                List <ProductTypes> listProductTypes = productTypeHdlr.getProductType();
                errMsg = validateProductTypeId(targetId, listProductTypes);
                if (errMsg == null)
                {
                    productTypeHdlr.deleteProductType(targetId);
                    return(errMsg);
                }
                ;
            }

            return(errMsg);
        }
示例#3
0
 public static void deleteProductType(int id)
 {
     ProductTypeHandler.deleteProductType(id);
 }