public void UpdateCategory(Category c) { CategoryC inter = new CategoryC(); inter.DeleteCategory(c.id); inter.InsertCategory(c); }
public void CreateCategory(Category c) { if (c.name == "") { throw new Exception("The Category Name Is Empty"); } if (c.mainC == "") { throw new Exception("The Main Category Is Empty"); } CategoryC inter = new CategoryC(); if (inter.searchIfEx(c.name, c.kind)) { throw new Exception("This Category Already Exist"); } inter.InsertCategory(c); }