private void CheckDuplicateCategory(int updateId) { Category category = new Category() { Id = updateId, CategoryName = categoryName }; bool check = categoryManage.CheckDuplecateUpdateCategory(category); if (!check) { MessageBox.Show("Already Exists This Category"); } else { Update(category); categoryTextBox.Clear(); } }