Ejemplo n.º 1
0
        public static MePage GetMePage(int mdId)
        {
            MePage      mePage      = null;
            MePageCache mePageCache = (MePageCache) new MePageCache().GetData();
            int         index       = mePageCache.dvMePageBy_MdId.Find(mdId);
            bool        flag        = index >= 0;

            if (flag)
            {
                MePage mePage2 = new MePage();
                mePage = MePageUtils.GetObject(mePageCache.dvMePageBy_MdId[index].Row);
            }
            return(mePage);
        }
Ejemplo n.º 2
0
        protected override void ReadTableData()
        {
            Database database = LogicContext.GetDatabase();
            HSQL     sql      = new HSQL(database);

            sql.Add("SELECT MEPAGE_MDID AS MDID,MEPAGE_COMID AS COMID,WFD_WFBID AS WFBID,WFD_WFID AS WFID,MEPAGE_URL AS PAGEURL,MEPAGE_TYPE");
            sql.Add("FROM MEPAGE");
            sql.Add("LEFT JOIN MODULE ON MODULE_MDID = MEPAGE_MDID");
            sql.Add("LEFT JOIN WFD ON WFD_WFBID = MEPAGE_WFBID");
            sql.Add("WHERE MEPAGE_COMID = MODULE_COMID");
            sql.Add("ORDER BY MDID");
            DataSet dataSet = database.OpenDataSet(sql);
            bool    flag    = dataSet.Tables.Count <= 0;

            if (!flag)
            {
                this.dtMePage = dataSet.Tables[0];
                MePageCache.BuildMePageUrl(this.dtMePage);
                this.dvMePageBy_MdId       = new DataView(this.dtMePage, "", "MDID", DataViewRowState.CurrentRows);
                this.dvMePageBy_MdId_WfbId = new DataView(this.dtMePage, "", "MDID,WFID", DataViewRowState.CurrentRows);
            }
        }