コード例 #1
0
        public ActionResult ChangeName(Member member)
        {
            if (memberSQL.CheckForNameCase(member.DisplayName))
            {
                ModelState.AddModelError("changename-error", "That name already exists");
                return(RedirectToAction("OwnInfo"));
            }
            memberSQL.ChangeName(member.DisplayName, member.ID);
            Session["member"] = memberSQL.GetMemberByID(member.ID);
            TempData["msg"]   = "name_changed";

            return(RedirectToAction("OwnInfo"));
        }
コード例 #2
0
ファイル: MemberBLL.cs プロジェクト: jackjet870/cms
        /// <summary>
        /// 根据会员ID获取会员
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public Member GetMember(int memberID)
        {
            Member m = null;

            dal.GetMemberByID(memberID, reader =>
            {
                if (reader.HasRows)
                {
                    m = reader.ToEntity <Member>();
                }
            });
            return(m);
        }
コード例 #3
0
 public Members GetMember(int memberID)
 {
     return(_memberDAL.GetMemberByID(memberID));
 }