protected void Page_Load(object sender, EventArgs e)
        {
            //DapperBLL.Instabce.InsertRecord(new CICUser { UserName ="******", Password="******", Email="*****@*****.**", PhoneNumber="18818572279" });
            CICUser user = DapperBLL.Instabce.GetUserInfo(new CICUser {
                UserName = "******"
            });

            this.userName.Value    = user.UserName;
            this.password.Value    = user.Password;
            this.email.Value       = user.Email;
            this.phoneNumber.Value = user.PhoneNumber;
        }
Exemplo n.º 2
0
        public CICUser GetUserInfo(CICUser userInfo)
        {
            CICUser user = new CICUser();

            using (IDbConnection conn = HelpClassLib.DataBase.OraHelper.GetSqlConnection())
            {
                string strSql = @" SELECT c.UserId,c.Username, c.PasswordHash AS Password,c.Email,
                                          c.PhoneNumber,c.IsFirstTimeLogin,c.AccessFailedCount,
                                          c.CreationDate,c.IsActive 
                                    FROM CICUser c where c.userName = :userName ";
                user = conn.Query <CICUser>(strSql, userInfo, null, true, null, CommandType.Text).FirstOrDefault();
            }
            return(user);
        }
Exemplo n.º 3
0
        /// <summary>
        /// 插入一条记录
        /// </summary>
        /// <param name="recordModel"></param>
        /// <returns></returns>
        public bool InsertRecord <T>(T recordModel)
        {
            string strSql = @" INSERT INTO CICUser(Username,PasswordHash,Email,PhoneNumber)
                               VALUES(:UserName, :Password,:Email, :PhoneNumber )";
            bool   isTrue = false;

            using (IDbConnection conn = HelpClassLib.DataBase.OraHelper.GetSqlConnection())
            {
                CICUser user = new CICUser();
                user.UserName    = "******";
                user.Password    = "******";
                user.Email       = "*****@*****.**";
                user.PhoneNumber = "13795666243";
                isTrue           = conn.Execute(strSql, recordModel) > 0;
            }
            return(isTrue);
        }
Exemplo n.º 4
0
 public bool InsertRecord(CICUser userInfo)
 {
     return(dal.InsertRecord(userInfo));
 }
Exemplo n.º 5
0
 public CICUser GetUserInfo(CICUser userInfo)
 {
     return(dal.GetUserInfo(userInfo));
 }