Exemplo n.º 1
0
        protected new void Page_Init(object sender, EventArgs e)
        {
            var account = DZAFCPortal.Utility.UserInfo.Account;
            var user    = new DZAFCPortal.Authorization.BLL.UserAuthorizationBLL().GetUserByAccount(account);

            if (user == null)
            {
                //throw new Exception("当前登录账号未同步到当前系统,请联系管理员添加该账号到当前系统中!");
                Response.Write(String.Format("当前登录账号[{0}]未同步到当前系统,请联系管理员添加该账号到当前系统中!", account));
                Response.End();
            }

            base.Page_Init(sender, e);
        }
Exemplo n.º 2
0
        public void Instance1(MyFriends entity)
        {
            this.ID          = entity.ID;
            this.UserAccount = entity.UserAccount;

            var user = new DZAFCPortal.Authorization.BLL.UserAuthorizationBLL().GetUserByAccount(entity.UserAccount);

            if (user == null)
            {
                this.HeadPhoto       = "/TempPic/bea_person05.png";
                this.UserDisplayName = this.UserAccount + "(不存在)";
            }
            else
            {
                this.HeadPhoto       = "/TempPic/bea_person05.png";
                this.UserDisplayName = user.DisplayName;
            }
        }
Exemplo n.º 3
0
        public void Instance(FriendNewsReply entity)
        {
            //获取用户信息
            var user = new DZAFCPortal.Authorization.BLL.UserAuthorizationBLL().GetUserByAccount(entity.UserAccount);

            this.ID          = entity.ID;
            this.UserAccount = entity.UserAccount;

            if (user == null)
            {
                this.HeadPhoto       = "/TempPic/bea_person05.png";
                this.UserDisplayName = entity.UserAccount;
            }
            else
            {
                this.HeadPhoto       = "/TempPic/bea_person05.png";
                this.UserDisplayName = user.DisplayName;
            }

            this.ReplyContent = entity.ReplyContent;
            this.CreateTime   = entity.CreateTime.ToString("yyyy-MM-dd HH:mm");
        }