Ejemplo n.º 1
0
    private void GetDataFromServer()
    {
        try
        {
            string LastEdndent      = "....";
            int    MaxNumberofPosts = 30;
            int    MaxDescriptions  = 500;
            string strBlogURL       = string.Empty;

            RSSReaderSettingValueController  con         = new RSSReaderSettingValueController();
            List <RSSReaderSettingValueInfo> objSettings = con.GetAllRssSettings(GetPortalID, Int32.Parse(SageUserModuleID), GetCurrentCultureName);
            if (objSettings != null)
            {
                int i = 0;
                foreach (RSSReaderSettingValueInfo rsSeting in objSettings)
                {
                    switch (rsSeting.SettingKey)
                    {
                    case "DisplayTitle":
                        litTitle.Text = rsSeting.SettingValue;
                        break;

                    case "LastEdndent":
                        LastEdndent = rsSeting.SettingValue;
                        break;

                    case "MaxNumberofPosts":
                        if (rsSeting.SettingValue != string.Empty)
                        {
                            MaxNumberofPosts = Int32.Parse(rsSeting.SettingValue);
                        }
                        break;

                    case "MaxDescriptionsLength":
                        if (rsSeting.SettingValue != string.Empty)
                        {
                            MaxDescriptions = Int32.Parse(rsSeting.SettingValue);
                        }
                        break;

                    case "RssURL":
                        strBlogURL = rsSeting.SettingValue;
                        break;
                    }
                    i++;
                    if (i > 5)
                    {
                        break;
                    }
                }
            }

            string strRssContent = ProcessRSSItem(strBlogURL, MaxNumberofPosts, MaxDescriptions, LastEdndent);
            litBlogContnent.Text = strRssContent;
        }
        catch (Exception ex)
        {
            ProcessException(ex);
        }
    }
Ejemplo n.º 2
0
    private void GetDataFromServer()
    {
        try
        {
            string LastEdndent = "....";
            int MaxNumberofPosts = 30;
            int MaxDescriptions = 500;
            string strBlogURL = string.Empty;

            RSSReaderSettingValueController con = new RSSReaderSettingValueController();
            List<RSSReaderSettingValueInfo> objSettings = con.GetAllRssSettings(GetPortalID, Int32.Parse(SageUserModuleID), GetCurrentCultureName);
            if (objSettings != null)
            {
                int i = 0;
                foreach (RSSReaderSettingValueInfo rsSeting in objSettings)
                {
                    switch (rsSeting.SettingKey)
                    {
                        case "DisplayTitle":
                            litTitle.Text = rsSeting.SettingValue;
                            break;
                        case "LastEdndent":
                            LastEdndent = rsSeting.SettingValue;
                            break;
                        case "MaxNumberofPosts":
                            if (rsSeting.SettingValue != string.Empty)
                            {
                                MaxNumberofPosts = Int32.Parse(rsSeting.SettingValue);
                            }
                            break;
                        case "MaxDescriptionsLength":
                            if (rsSeting.SettingValue != string.Empty)
                            {
                                MaxDescriptions = Int32.Parse(rsSeting.SettingValue);
                            }
                            break;
                        case "RssURL":
                            strBlogURL = rsSeting.SettingValue;
                            break;
                    }
                    i++;
                    if (i > 5)
                    {
                        break;
                    }
                }
            }

            string strRssContent = ProcessRSSItem(strBlogURL, MaxNumberofPosts, MaxDescriptions, LastEdndent);
            litBlogContnent.Text = strRssContent;
        }
        catch (Exception ex)
        {
            ProcessException(ex);
        }
    }
Ejemplo n.º 3
0
    private void LoadAllSettings()
    {
        try
        {
            RSSReaderSettingValueController  con         = new RSSReaderSettingValueController();
            List <RSSReaderSettingValueInfo> objSettings = con.GetAllRssSettings(GetPortalID, Int32.Parse(SageUserModuleID), GetCurrentCultureName);
            if (objSettings != null)
            {
                foreach (RSSReaderSettingValueInfo rsSeting in objSettings)
                {
                    switch (rsSeting.SettingKey)
                    {
                    case "DisplayTitle":
                        txtDisplayTitle.Text    = rsSeting.SettingValue;
                        hdnDisplayTitleID.Value = rsSeting.RSSReaderSettingValueID.ToString();
                        break;

                    case "LastEdndent":
                        txtLastEdndent.Text    = rsSeting.SettingValue;
                        hdnLastEdndentID.Value = rsSeting.RSSReaderSettingValueID.ToString();
                        break;

                    case "MaxNumberofPosts":
                        txtMaxNumberofPosts.Text    = rsSeting.SettingValue;
                        hdnMaxNumberofPostsID.Value = rsSeting.RSSReaderSettingValueID.ToString();
                        break;

                    case "MaxDescriptionsLength":
                        txtMaxDescriptionsLength.Text    = rsSeting.SettingValue;
                        hdnMaxDescriptionsLengthID.Value = rsSeting.RSSReaderSettingValueID.ToString();
                        break;

                    case "RssURL":
                        txtRssURL.Text    = rsSeting.SettingValue;
                        hdnRssURLID.Value = rsSeting.RSSReaderSettingValueID.ToString();
                        break;
                    }
                }
            }
        }
        catch (Exception ex)
        {
            ProcessException(ex);
        }
    }
Ejemplo n.º 4
0
    private void LoadAllSettings()
    {
        try
        {
            RSSReaderSettingValueController con = new RSSReaderSettingValueController();
            List<RSSReaderSettingValueInfo> objSettings = con.GetAllRssSettings(GetPortalID, Int32.Parse(SageUserModuleID), GetCurrentCultureName);
            if (objSettings != null)
            {
                foreach (RSSReaderSettingValueInfo rsSeting in objSettings)
                {
                    switch (rsSeting.SettingKey)
                    {
                        case "DisplayTitle":
                            txtDisplayTitle.Text = rsSeting.SettingValue;
                            hdnDisplayTitleID.Value = rsSeting.RSSReaderSettingValueID.ToString();
                            break;
                        case "LastEdndent":
                            txtLastEdndent.Text = rsSeting.SettingValue;
                            hdnLastEdndentID.Value = rsSeting.RSSReaderSettingValueID.ToString();
                            break;
                        case "MaxNumberofPosts":
                            txtMaxNumberofPosts.Text = rsSeting.SettingValue;
                            hdnMaxNumberofPostsID.Value = rsSeting.RSSReaderSettingValueID.ToString();
                            break;
                        case "MaxDescriptionsLength":
                            txtMaxDescriptionsLength.Text = rsSeting.SettingValue;
                            hdnMaxDescriptionsLengthID.Value = rsSeting.RSSReaderSettingValueID.ToString();
                            break;
                        case "RssURL":
                            txtRssURL.Text = rsSeting.SettingValue;
                            hdnRssURLID.Value = rsSeting.RSSReaderSettingValueID.ToString();
                            break;
                    }
                }
            }
        }
        catch (Exception ex)
        {
            ProcessException(ex);
        }

    }