69 lines
2.3 KiB
C#
69 lines
2.3 KiB
C#
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<T> : UserControl<T> 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("<link href=\"/App_Themes/" + Page.StyleSheetTheme + "/StyleSheet.css\" rel=\"stylesheet\" type=\"text/css\" />");
|
|
Response.Write(@"
|
|
<div class=""tipBarError"" style=""padding:10px;"">
|
|
您的账号找不到对应的商家,请联系管理员!
|
|
</div>");
|
|
Response.End();
|
|
return;
|
|
}
|
|
}
|
|
else
|
|
{
|
|
Response.Write("<link href=\"/App_Themes/" + Page.StyleSheetTheme + "/StyleSheet.css\" rel=\"stylesheet\" type=\"text/css\" />");
|
|
Response.Write(@"
|
|
<div class=""tipBarError"" style=""padding:10px;"">
|
|
您的账号不属于商家,如要访问,请联系管理员!
|
|
</div>");
|
|
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();
|
|
}
|
|
}
|