protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { Session["FCKeditor:UserFilesPath"] = ConfigurationManager.AppSettings["UserFilePath"]; if (CurrentBlock != 0) { //BindData(); DBLayer db = new DBLayer(); DataSet ds = new DataSet(); ds = db.GetHomePageBlock(CurrentBlock); if (ds.Tables[0].Rows.Count > 0) { uiTextBoxEnBlockTitle.Text = ds.Tables[0].Rows[0]["ENBlockTitle"].ToString(); uiTextBoxArBlockTitle.Text = ds.Tables[0].Rows[0]["ArBlockTitle"].ToString(); uiFCKeditorEnContent.Value = Server.HtmlDecode(ds.Tables[0].Rows[0]["ENBlockContent"].ToString()); uiFCKeditorArContent.Value = Server.HtmlDecode(ds.Tables[0].Rows[0]["ARBlockContent"].ToString()); } uiPanelCurrentPages.Visible = false; uiPanelCurrent.Visible = true; } else { uiPanelCurrentPages.Visible = true; uiPanelCurrent.Visible = false; BindData(); } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { DBLayer db = new DBLayer(); DataSet ds = new DataSet(); ds = db.GetHomePageBlock(6); uiLiteralContent.Text = Server.HtmlDecode(ds.Tables[0].Rows[0]["ArBlockContent"].ToString()); } }
protected void uiGridViewHomePageBlocks_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "EditHomePageBlock") { int id = Convert.ToInt32(e.CommandArgument.ToString()); CurrentBlock = id; DBLayer db = new DBLayer(); DataSet ds = new DataSet(); ds = db.GetHomePageBlock(id); if (ds.Tables[0].Rows.Count > 0) { uiTextBoxEnBlockTitle.Text = ds.Tables[0].Rows[0]["ENBlockTitle"].ToString(); uiTextBoxArBlockTitle.Text = ds.Tables[0].Rows[0]["ArBlockTitle"].ToString(); uiFCKeditorEnContent.Value = Server.HtmlDecode(ds.Tables[0].Rows[0]["ENBlockContent"].ToString()); uiFCKeditorArContent.Value = Server.HtmlDecode(ds.Tables[0].Rows[0]["ARBlockContent"].ToString()); } uiPanelCurrentPages.Visible = false; uiPanelCurrent.Visible = true; } }