protected void uiButtonUpdate_Click(object sender, EventArgs e) { DBLayer db = new DBLayer(); if (CurrentNews != 0) { db.UpdateNews(CurrentNews, uiTextBoxEnNewsTitle.Text, uiTextBoxArNewsTitle.Text, Server.HtmlEncode(uiFCKeditorEnContent.Value), Server.HtmlEncode(uiFCKeditorArContent.Value),DateTime.Now); } else { db.AddNews(uiTextBoxEnNewsTitle.Text, uiTextBoxArNewsTitle.Text, Server.HtmlEncode(uiFCKeditorEnContent.Value), Server.HtmlEncode(uiFCKeditorArContent.Value),DateTime.Now); } uiPanelCurrentNews.Visible = true; uiPanelCurrent.Visible = false; ClearFields(); BindData(); }