protected override bool BeforeLoad() { AlbumTypeID = Common.Common.NoHtml(Request.QueryString["ID"].ToString()); //取站点信息 DAL.SYS.AccountDAL dalAccount = new DAL.SYS.AccountDAL(); DAL.Album.AlbumDAL dalAlbum = new DAL.Album.AlbumDAL(); DataSet dsAccount = dalAlbum.GetAccountData(AlbumTypeID); if (null != dsAccount && dsAccount.Tables.Count > 0 && dsAccount.Tables[0].Rows.Count > 0) { SiteCode = dsAccount.Tables[0].Rows[0]["SiteCode"].ToString(); SiteID = dsAccount.Tables[0].Rows[0]["ID"].ToString(); } return(base.BeforeLoad()); }
protected override void AddTempData(JinianNet.JNTemplate.TemplateContext context) { //取站点信息 DAL.SYS.AccountDAL dalAccount = new DAL.SYS.AccountDAL(); DAL.Album.AlbumDAL dalAlbum = new DAL.Album.AlbumDAL(); //取站点相册列表 DataSet dsAlbumType = dalAlbum.GetAlbumTypeList(SiteCode); List <PA_AlbumType> liAlbumType = new List <PA_AlbumType>(); if (null != dsAlbumType && dsAlbumType.Tables.Count > 0 && dsAlbumType.Tables[0].Rows.Count > 0) { foreach (DataRow row in dsAlbumType.Tables[0].Rows) { PA_AlbumType model = DataConvert.DataRowToModel <PA_AlbumType>(row); liAlbumType.Add(model); } } context.TempData["AlbumTypelist"] = liAlbumType; }