/// <summary>
 /// Add update page.
 /// </summary>
 /// <param name="objPage">Object of PageEntity class.</param>
 public void AddUpdatePages(PageEntity objPage)
 {
     try
     {
         PageDataProvider objProvider = new PageDataProvider();
         objProvider.AddUpdatePages(objPage);
     }
     catch (Exception e)
     {
         throw e;
     }
 }
        /// <summary>
        /// Add update page.
        /// </summary>
        /// <param name="objPage">Object of PageEntity class.</param>
        public int AddUpdatePages(PageEntity objPage)
        {
            int pageID = 0;

            try
            {
                PageDataProvider objProvider = new PageDataProvider();
                pageID = objProvider.AddUpdatePages(objPage);
                //For SEO Meta Data
                if (objPage.PageID == 0 && objPage.IsAdmin == false)
                {
                    List <SEOMetaValues> metaValues = new List <SEOMetaValues>();
                    SEOMetaValues        title      = new SEOMetaValues();
                    title.SEOMetaTagTypeID = 1;
                    title.MetaTagContent   = objPage.PageName;
                    metaValues.Add(title);

                    SEOMetaValues desc = new SEOMetaValues();
                    desc.SEOMetaTagTypeID = 2;
                    desc.MetaTagContent   = objPage.Description;
                    metaValues.Add(desc);

                    SEOMetaValues image = new SEOMetaValues();
                    image.SEOMetaTagTypeID = 4;
                    image.MetaTagContent   = string.Empty;
                    metaValues.Add(image);

                    SEOMetaValues type = new SEOMetaValues();
                    type.SEOMetaTagTypeID = 5;
                    type.MetaTagContent   = string.Empty;
                    metaValues.Add(type);

                    SEOController seoContrl = new SEOController();
                    seoContrl.SaveSEOMetaTag(pageID, metaValues, objPage.PortalID, objPage.AddedBy);
                }
            }
            catch (Exception e)
            {
                throw e;
            }
            return(pageID);
        }
 public void AddUpdatePages(PageEntity objPage)
 {
     try
     {
         PageDataProvider objProvider = new PageDataProvider();
         objProvider.AddUpdatePages(objPage);
     }
     catch (Exception e)
     {
         throw e;
     }
 }