예제 #1
0
        private void ResetPass(string userName)
        {
            string        name   = null;
            SqlConnection conn   = Class.clsData.OpenSqlConnection();
            string        strSql = "SELECT Usename FROM tblNguoidung WHERE Usename = '" + userName + "'";
            SqlCommand    cmd    = new SqlCommand(strSql);

            cmd.CommandType = CommandType.Text;
            cmd.Connection  = conn;
            try
            {
                name = (string)cmd.ExecuteScalar();
                if (name != null)
                {
                    clsData kn = new clsData();
                    kn.StoreNone("proc_Taikhoan_Update", userName, "123456");
                }
            }
            catch (Exception ex)
            {
            }
        }