コード例 #1
0
    protected void LoadGeneric()
    {
        MainContentGeneric generic_X = new MainContentGeneric();
        DataSet dsgeneric_X = new DataSet();
        StringBuilder sb = new StringBuilder();
        Main_MasterPage main = (Main_MasterPage)Page.Master;

        //---
        dsgeneric_X = generic_X.Get_GenericX_By_Id(Convert.ToInt32(GeneId));
        foreach (DataTable table in dsgeneric_X.Tables)
        {
            foreach (DataRow row in table.Rows)
            {
                sb.AppendLine("<div class=\"mainAbout\">");
                    sb.AppendLine("<h1>" + row["GeneXTitle"].ToString() + "</h1>");
                    main._site_breadLink += "<li class=\"last\"><a href=\"#\" onClick=\"return false;\"><strong>" + row["GeneXTitle"].ToString() + "</strong></a></li>";
                    Main_MasterPage m = (Main_MasterPage)Page.Master;
                    m.pageTitleBar = row["GeneXTitle"].ToString() + " - " + m.pageTitleBar;
                    string path = "";
                    if (!Regex.IsMatch(row["GeneXImage"].ToString(), @"^(ft|htt)p(s?)://([\w-]+\.)+[\w-]+(/[\w- ./]*)+\.(?:gif|jpg|jpeg|png|GIF|JPEG|JPG|PNG|Gif|Jpg|Jpeg|Png)$"))
                    {
                        path = Global.globalSiteImagesPath + "/";
                    }
                if (row["GeneXImage"].ToString() != "")
                    sb.AppendLine("<img src=\"" + path + row["GeneXImage"].ToString() + "\" alt=\"" + row["GeneXTitle"].ToString() + "\" title=\"" + row["GeneXTitle"].ToString() + "\" style=\"float: right; margin: 0px 0px 5px 5px;\">");
                        pageName = row["GeneXTitle"].ToString();
                    sb.AppendLine(row["GeneXContent"].ToString());
                sb.AppendLine("</div>");
            }
        }

        PlaceHolder_Generic_X.Controls.Add(new LiteralControl(sb.ToString()));

        sb = null;
        generic_X = null;
        dsgeneric_X = null;
    }
コード例 #2
0
 protected void load_landing_page()
 {
     DataSet data = new DataSet();
     MainContentGeneric generic_X = new MainContentGeneric();
     string id_lp = xtractNums(linktopage);
     id_landing_page_global = id_lp;
     if (id_lp != "")
     {
         int id_landing_page = Convert.ToInt32(id_lp);
         data = new DataSet();
         data = generic_X.Get_GenericX_By_Id(id_landing_page);
         foreach (DataTable table in data.Tables)
         {
             foreach (DataRow row in table.Rows)
             {
                 landingPageTitle = row["GeneXTitle"].ToString();
                 landingPageContent = row["GeneXContent"].ToString();
                 landingPageImage = row["GeneXImage"].ToString();
             }
             add_edit_landing_page1 = "Edit ";
             has_landing_page = true;
         }
     }
 }
コード例 #3
0
    private void load_landing_page(ref DataSet data)
    {
        MainContentGeneric generic_X = new MainContentGeneric();

        int id_landing_page = -1;
        string id_lp = "";
        if (txtLink1 != null)
        {
            id_lp = xtractNums(txtLink1);
            if (id_lp != "")
            {
                id_landing_page = Convert.ToInt32(id_lp);
                idLandingPage1 = id_landing_page;
                data = new DataSet();
                data = generic_X.Get_GenericX_By_Id(id_landing_page);
                foreach (DataTable table in data.Tables)
                {
                    foreach (DataRow row in table.Rows)
                    {
                        txt_gen_page_title_1 = row["GeneXTitle"].ToString();
                        txt_gen_page_content_1 = row["GeneXContent"].ToString();
                        txt_gen_page_image_1 = row["GeneXImage"].ToString();
                    }
                    add_edit_landing_page1 = "Edit ";
                    has_landing_page1 = true;
                }
            }
        }
        if (txtLink2 != null)
        {
            id_lp = xtractNums(txtLink2);
            if (id_lp != "")
            {
                id_landing_page = Convert.ToInt32(id_lp);
                idLandingPage2 = id_landing_page;
                data = new DataSet();
                data = generic_X.Get_GenericX_By_Id(id_landing_page);
                foreach (DataTable table in data.Tables)
                {
                    foreach (DataRow row in table.Rows)
                    {
                        txt_gen_page_title_2 = row["GeneXTitle"].ToString();
                        txt_gen_page_content_2 = row["GeneXContent"].ToString();
                        txt_gen_page_image_2 = row["GeneXImage"].ToString();
                    }
                    add_edit_landing_page2 = "Edit ";
                    has_landing_page2 = true;
                }
            }
        }
    }
コード例 #4
0
 private void load_landing_page(ref DataSet data, MainContentGeneric generic_X)
 {
     string id_lp = xtractNums(linktopage1);
     id_landing_page_global = id_lp;
     if (id_lp != "")
     {
         int id_landing_page = Convert.ToInt32(id_lp);
         data = new DataSet();
         data = generic_X.Get_GenericX_By_Id(id_landing_page);
         foreach (DataTable table in data.Tables)
         {
             foreach (DataRow row in table.Rows)
             {
                 TitleGen = row["GeneXTitle"].ToString();
                 ContGen = row["GeneXContent"].ToString();
                 Gen_Image = row["GeneXImage"].ToString();
             }
             has_landing_page = true;
         }
     }
 }
コード例 #5
0
 protected string load_landing_page_Title(string url)
 {
     string contentLoaded = "";
     DataSet data = new DataSet();
     MainContentGeneric generic_X = new MainContentGeneric();
     string id_lp = xtractNums(url);
     if (id_lp != "")
     {
         int id_landing_page = Convert.ToInt32(id_lp);
         data = new DataSet();
         data = generic_X.Get_GenericX_By_Id(id_landing_page);
         foreach (DataTable table in data.Tables)
         {
             foreach (DataRow row in table.Rows)
             {
                 contentLoaded = row["GeneXTitle"].ToString();
             }
         }
     }
     return contentLoaded;
 }