Esempio n. 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                int pid = 0;
                if (Request.QueryString["pid"] != null)
                {
                    try
                    {
                        pid = Convert.ToInt32(Request.QueryString["pid"].ToString());
                    }
                    catch (Exception ex)
                    {
                        pid = 0;
                    }
                }

                if (pid == 0)
                {
                    Response.Redirect("~/Default.aspx");
                }
                else
                {
                    Pages page = new Pages();
                    page.LoadByPrimaryKey(pid);
                    uiLabelTitle.Text = page.TitleArabic;
                    uiLiteralContent.Text = Server.HtmlDecode(page.ContentArabic);
                }
            }
        }
Esempio n. 2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         int pid = 1;
         Pages page = new Pages();
         page.LoadByPrimaryKey(pid);
         uiLiteralContent.Text = Server.HtmlDecode(page.ContentArabic);
     }
 }
Esempio n. 3
0
 protected void uiGridViewPages_RowCommand(object sender, GridViewCommandEventArgs e)
 {
     if (e.CommandName == "EditPage")
     {
         Pages objData = new Pages();
         objData.LoadByPrimaryKey(Convert.ToInt32(e.CommandArgument.ToString()));
         CurrentPage = objData;
         uiTextBoxArTitle.Text = objData.TitleArabic;
         uiFCKeditorContent.Value = Server.HtmlDecode(objData.ContentArabic);
         uiPanelViewAllPages.Visible = false;
         uiPanelEdit.Visible = true;
     }
 }