protected void uiLinkButtonOK_Click(object sender, EventArgs e) { Color color = new Color(); if (CurrentColor == null) color.AddNew(); else color = CurrentColor; color.ColorNameEng = uiTextBoxEnName.Text; color.ColorNameAr = uiTextBoxArName.Text; color.ColorCode = uiTextBoxColorCode.Text; color.Save(); ClearFields(); CurrentColor = null; uiPanelEditCat.Visible = false; uiPanelAllCats.Visible = true; BindColors(); }