using SuperMap.RealEstate.ServiceModel; using SuperMap.RealEstate.Web.UI; using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace SuperMap.RealEstate.HighWay.Running.Business.UI { public class UserControlsEx : UserControl where T : IBusinessModel, new() { protected override void OnInit(EventArgs e) { try { //获得用户权限 SuperMap.RealEstate.Seller.Storage.Business.RTSELLERPASSPORT _RTSELLERPASSPORT = new SuperMap.RealEstate.Seller.Storage.Business.RTSELLERPASSPORT(); _RTSELLERPASSPORT.AddSearchParameter("USER_ID", Page.PassportInfo.ID); if (_RTSELLERPASSPORT.Search()) { _SELLER = _RTSELLERPASSPORT.GetSeller(); if (_SELLER == null) { Response.Write(""); Response.Write(@"
您的账号找不到对应的商家,请联系管理员!
"); Response.End(); return; } } else { Response.Write(""); Response.Write(@"
您的账号不属于商家,如要访问,请联系管理员!
"); Response.End(); return; //throw new Exception(""); } } catch (Exception ex) { throw ex; } base.OnInit(e); } public UserControlsEx() { } public SuperMap.RealEstate.Seller.Storage.Business.SELLER SELLER { get { return _SELLER; } } private SuperMap.RealEstate.Seller.Storage.Business.SELLER _SELLER = new SuperMap.RealEstate.Seller.Storage.Business.SELLER(); } }