コード例 #1
0
ファイル: userEdit.aspx.cs プロジェクト: Hizcy/disneybg
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (uid != 0)
            {
                //用户信息赋值
                Weifenxiao.Entity.wx_UserExtEntity model = Weifenxiao.BLL.wx_UsersBLL.GetInstance().GetExtModelByUserId(uid);
                if (model.ParentId == 0)
                {
                    lbUper.Text = "无";
                }
                else
                {
                    Weifenxiao.Entity.wx_UsersEntity pmodel = Weifenxiao.BLL.wx_UsersBLL.GetInstance().GetAdminSingle(model.ParentId);
                    linkView.Visible     = true;
                    linkView.NavigateUrl = "userShow.aspx?uid=" + pmodel.UserId.ToString();
                    lbUper.Text          = pmodel.RealName;
                }

                txtRealName.Text   = model.RealName;
                txtWeixin.Text     = model.Weixin;
                txtPhone.Text      = model.Phone;
                lbAddtime.Text     = model.AddTime.ToString();
                imgAvatar.ImageUrl = model.HeadImgurl;
                lbNickname.Text    = model.NickName;
                //绑定数据
                UserIdentity identity = User.Identity as UserIdentity;


                IList <Weifenxiao.Entity.RolesEntity> list = Weifenxiao.BLL.RolesBLL.GetInstance().GetListByShopId(identity.ShopID);

                ddlRole.DataSource     = list;
                ddlRole.DataTextField  = "Name";
                ddlRole.DataValueField = "RoleId";
                ddlRole.DataBind();

                ddlRole.SelectedValue = model.RoleId.ToString();
            }
        }
    }
コード例 #2
0
ファイル: userShow.aspx.cs プロジェクト: Hizcy/disneybg
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (uid != 0)
            {
                //用户信息赋值
                Weifenxiao.Entity.wx_UserExtEntity model = Weifenxiao.BLL.wx_UsersBLL.GetInstance().GetExtModelByUserId(uid);
                //Weifenxiao.Entity.wx_UsersEntity test = Weifenxiao.BLL.wx_UsersBLL.GetInstance().GetAdminSingle(uid);
                if (model == null)
                {
                    return;
                }
                if (model.ParentId == 0)
                {
                    lbUperdaili.Text = "无";
                }
                else
                {
                    Weifenxiao.Entity.wx_UsersEntity pmodel = Weifenxiao.BLL.wx_UsersBLL.GetInstance().GetAdminSingle(model.ParentId);
                    lbUperdaili.Text = pmodel.RealName;
                }
                lbNickname.Text    = model.NickName;
                imgAvatar.ImageUrl = model.HeadImgurl;
                lbRealname.Text    = model.RealName;
                lbOpenid.Text      = model.OpenId;
                lbAddtime.Text     = model.AddTime.ToString();
                lbPhone.Text       = model.Phone;
                lbWeixinhao.Text   = model.Weixin;
                //基础业绩赋值
                lbYeji.Text    = model.yeji.ToString();
                lbYongjin.Text = model.yongjin.ToString();
                lbTixian.Text  = model.tixian.ToString();

                //下级代理赋值
                lbYijidaili.Text = model.yijidaili.ToString();
                lbErjidaili.Text = model.erjidaili.ToString();
            }
        }
    }