How to Save Category and Delete Category in same Function

How to Save Category and Delete Category in same Function