Ejemplo n.º 1
0
        /// <summary>
        /// 查詢站點下的所有網頁
        /// </summary>
        /// <param name="bp"></param>
        /// <returns></returns>
        public List<SitePage> GetPage(SitePage bp)
        {
            try
            {
                return _BannerPageDao.GetPage(bp);
            }
            catch (Exception ex)
            {

                throw new Exception("SitePageMgr-->GetPage-->" + ex.Message, ex);
            }
        }
Ejemplo n.º 2
0
        public HttpResponseBase GetPage()
        {
            List<SitePage> store = new List<SitePage>();
            string json = string.Empty;
            try
            {
                SitePage bp = new SitePage();

                _sitePageMg = new SitePageMgr(mySqlConnectionString);
                store = _sitePageMg.GetPage(bp);

                json = "{success:true,data:" + JsonConvert.SerializeObject(store, Formatting.Indented) + "}";
            }
            catch (Exception ex)
            {
                Log4NetCustom.LogMessage logMessage = new Log4NetCustom.LogMessage();
                logMessage.Content = string.Format("TargetSite:{0},Source:{1},Message:{2}", ex.TargetSite.Name, ex.Source, ex.Message);
                logMessage.MethodName = System.Reflection.MethodBase.GetCurrentMethod().Name;
                log.Error(logMessage);
                json = "{success:true,data:[]}";
            }
            this.Response.Clear();
            this.Response.Write(json);
            this.Response.End();
            return this.Response;

        }
Ejemplo n.º 3
0
        /// <summary>
        /// 查詢站點下的所有網頁
        /// </summary>
        /// <param name="bp"></param>
        /// <returns></returns>
        public List<SitePage> GetPage(SitePage bp)
        {
            bp.Replace4MySQL();
            string strSql = string.Format("select page_id,page_name from site_page where  page_status=1 ");

            try
            {
                return _accessMySql.getDataTableForObj<SitePage>(strSql);
            }
            catch (Exception ex)
            {
                throw new Exception("SitePageDao-->GetPage-->" + ex.Message + strSql.ToString(), ex);
            }
        }