protected void uiGridViewNews_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "EditNews") { ArNews objData = new ArNews(); objData.LoadByPrimaryKey(Convert.ToInt32(e.CommandArgument.ToString())); CurrentArNews = objData; uiTextBoxArTitle.Text = objData.ArTitle; uiTextBoxEnTitle.Text = objData.EnTitle; uiFCKeditorArBody.Value = Server.HtmlDecode(objData.ArBody); uiFCKeditorEnBody.Value = Server.HtmlDecode(objData.EnBody); //uiDropDownListCategory.SelectedValue = objData.CategoryID.ToString(); uiTextBoxEnBreif.Text = objData.EnBrief; uiTextBoxArBrief.Text = objData.ArBrief; //uiTextBoxDate.Text = ds.Tables[0].Rows[0]["CreatedDate"].ToString(); uiPanelViewNews.Visible = false; uiPanelEdit.Visible = true; } else if (e.CommandName == "DeleteNews") { ArNews objData = new ArNews(); objData.LoadByPrimaryKey(Convert.ToInt32(e.CommandArgument.ToString())); objData.MarkAsDeleted(); objData.Save(); CurrentArNews = null; BindData(); } }