コード例 #1
0
ファイル: StaticPage.cs プロジェクト: RahulAras007/StayBazar
        public CLayer.StaticPage GetPage(long pageId)
        {
            string    sql = "Select * From staticpage Where PageId=" + pageId.ToString();
            DataTable dt  = Connection.GetSQLTable(sql);

            CLayer.StaticPage result = null;
            if (dt.Rows.Count > 0)
            {
                DataRow dr = dt.Rows[0];
                result             = new CLayer.StaticPage();
                result.PageId      = Connection.ToLong(dr["PageId"]);
                result.City        = Connection.ToString(dr["City"]);
                result.Location    = Connection.ToString(dr["Location"]);
                result.PageTitle   = Connection.ToString(dr["PageTitle"]);
                result.Description = Connection.ToString(dr["Description"]);

                result.FileName = Connection.ToString(dr["FileName"]);
                result.Image    = Connection.ToString(dr["Image"]);

                result.ShowInWidget = Connection.ToBoolean(dr["ShowInWidget"]);
                result.RootFolder   = Connection.ToString(dr["RootFolder"]);
            }
            return(result);
        }