public string usp_getpasswd (string passstr, ref string retpswd)
{ string retpswdNew = ""; SqlParameter[] Parms = { new SqlParameter("@passstr", SqlDbType.VarChar, 100), new SqlParameter("@retpswd", SqlDbType.VarChar, 100) }; Parms[0].Value = passstr; Parms[1].Direction = ParameterDirection.Output; try { Conn.OpenConn(); Dr = Conn.procExecuteReader("usp_getpasswd", Parms); while (Dr.Read()) { } } finally { Dr.Close(); Dr.Dispose(); Conn.CloseConn(); } retpswdNew = Convert.ToString(Parms[1].Value.ToString()); return retpswdNew;//返回密文 }
string newPwd=new D_man_worker().usp_getpasswd(password, ref pwd