public static Response UpdateProductType(int id, string name, string desc) { ProductType getName = ProductTypeHandler.GetName(name); if (name.Length < 5) { return(new Response(false, "must consist of 5 characters or more")); } else if (name == "") { return(new Response(false, "must be filled")); } else if (getName != null) { return(new Response(false, "must be unique")); } else if (desc == "") { return(new Response(false, "must be filled")); } else { ProductTypeHandler.UpdateProductType(id, name, desc); return(new Response(true)); } }