protected void uiLinkButtonOK_Click(object sender, EventArgs e) { ItemCategories cat = new ItemCategories (); if (CurrentCat == null) cat.AddNew(); else cat = CurrentCat; cat.Name = uiTextBoxName.Text; cat.Description = uiTextBoxDesc.Text; cat.Save(); ClearFields(); CurrentCat = null; uiPanelEditCat.Visible = false; uiPanelAllCats.Visible = true; BindCats(); }