Exemplo n.º 1
0
        public User_table LoginUser(string UserPhone = "", string Userpwd = "")
        {
            string sql   = $"select * from User_table where UserPhone='{UserPhone}' AND UserPwd='{Userpwd}'";
            var    model = DLH_DBHelper.GetList <User_table>(sql).FirstOrDefault();

            return(model);
        }
Exemplo n.º 2
0
        public int AddUser(User_table u)
        {
            var Pwd = u.UserPwd;

            var UserPwd = MD5Helper.MD5(Pwd);

            string sql = $"INSERT INTO User_table VALUES(NULL,'{u.UserPhone}', '{u.UserName}','{UserPwd}',{u.UserAge},'{u.UserID_card}','{u.User_Avatar}')";

            return(DLH_DBHelper.CMD(sql));
        }