从通用实体类CommonEntity中移除Membership相关代码,Membership将有XCode支持。 升级Web为.Net 4.0,该模版不再支持.Net 2.0,页面aspx.cs代码将可以使用C# 4.0语法
nnhy authored at 2015-05-08 15:59:01
864.00 B
X
using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using NewLife.CommonEntity;
using XCode.Membership;

public partial class Admin_SelectAdmin : MyEntityList
{
    protected override void OnPreLoad(EventArgs e)
    {
        Manager.ValidatePermission = false;

        base.OnPreLoad(e);
    }

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            lblmsg.Text = Request["Name"];
        }

        Type type = ManageProvider.Provider.UserType;
        ods.TypeName = type.FullName;
        ods.DataObjectTypeName = type.FullName;

        type = ManageProvider.Provider.GetService<IRole>().GetType();
        odsRole.TypeName = type.FullName;
        odsRole.DataObjectTypeName = type.FullName;
    }
}