/// <summary> /// 创建IBLL实例对象 /// </summary> /// <returns></returns> public static EyouSoft.IBLL.CompanyStructure.ICompanyAffiche CreateInstance() { EyouSoft.IBLL.CompanyStructure.ICompanyAffiche op = null; if (op == null) { op = ComponentFactory.Create <EyouSoft.IBLL.CompanyStructure.ICompanyAffiche>(); } return(op); }
/// <summary> /// 初始化 /// </summary> private void InitPage() { EyouSoft.Model.CompanyStructure.CompanyAfficheType?ComAfficheType = null; CompanyID = this.SiteUserInfo.CompanyID; intPageIndex = Utils.GetInt(Request.QueryString["Page"], 1); if (this.SiteUserInfo.CompanyRole.RoleItems.Length > 0) { switch (this.SiteUserInfo.CompanyRole.RoleItems[0]) { case EyouSoft.Model.CompanyStructure.CompanyType.车队: ComAfficheType = EyouSoft.Model.CompanyStructure.CompanyAfficheType.车队新闻; break; case EyouSoft.Model.CompanyStructure.CompanyType.购物店: ComAfficheType = EyouSoft.Model.CompanyStructure.CompanyAfficheType.购物点新闻; break; case EyouSoft.Model.CompanyStructure.CompanyType.景区: ComAfficheType = EyouSoft.Model.CompanyStructure.CompanyAfficheType.景区新闻; break; case EyouSoft.Model.CompanyStructure.CompanyType.酒店: ComAfficheType = EyouSoft.Model.CompanyStructure.CompanyAfficheType.酒店新闻; break; case EyouSoft.Model.CompanyStructure.CompanyType.旅游用品店: ComAfficheType = EyouSoft.Model.CompanyStructure.CompanyAfficheType.旅游用品新闻; break; } EyouSoft.IBLL.CompanyStructure.ICompanyAffiche Ibll = EyouSoft.BLL.CompanyStructure.CompanyAffiche.CreateInstance(); IList <EyouSoft.Model.CompanyStructure.CompanyAffiche> AfficheList = Ibll.GetList(intPageSize, intPageIndex, ref intRecordCount, CompanyID, ComAfficheType, null, null, null); rptSupplyManage_NewsList.DataSource = AfficheList; rptSupplyManage_NewsList.DataBind(); Ibll = null; AfficheList = null; if (rptSupplyManage_NewsList.Items.Count < 1) { NoData.Visible = true; } } this.ExportPageInfo1.intRecordCount = intRecordCount; this.ExportPageInfo1.CurrencyPage = intPageIndex; this.ExportPageInfo1.intPageSize = intPageSize; this.ExportPageInfo1.PageLinkURL = Request.ServerVariables["SCRIPT_NAME"].ToString() + "?"; }