Jump to content
Fórum Script Brasil
  • 0

Botão Ou Combo De Pesqusia Em Asp + Sql Server


acfelipesilva
 Share

Question

Olá a todos,

Sou bastante novo nessa área de programação, gostaria da ajuda de vocês na elaboração de um rotina de pesquisa onde eu consiga trazer os resultados para o formulário, sem modificar o funcionamento das outras funções, scripts, rotinas, etc...

Vou postar o código-fonte do formulário, como não fui eu que fiz, estou encarregado de fazer a manutenção, e foi solicitado a inclusão de um notão de pesquisa por destino (numero de advogado) nesse form...

Tentei mexer mas sempre dando problema, alguém aí sabe como montar essa rotina????????

Desde já agradeço,

<%@LANGUAGE="vb script:checado()" /><font class="textoss">Arquivo</font>
                </td>                
                </tr>
                <tr>
                    <td ><font class="textoss">Prazo:</font></td>
                    <td align="left"><input name="prazo" type="text" class="textoss" id="prazo" size="10" maxlength="10" onKeyPress="return txtBoxFormat(document.resenhacager, 'prazo', '99/99/9999', event)" onBlur="java script:Valida_data(prazo,prazo,'Anterior','','','')"></td>
                </tr>    
</table>
<br />
<div class="links"  style="position:relative; width:620; height:200;scrollbar-3d-light-color:#ffcc33;scrollbar-arrow-color:#000000;scrollbar-base-color:#333333;scrollbar-dark-shadow-color:#333333;scrollbar-face-color:#C4C4C3;scrollbar-highlight-color:#eeeeee;scrollbar-shadow-color:#ffffff; overflow:auto">
<table width="600"  class="borda" align="center" border="0">
    <tr>
        <td width="2%"><font class="textoss">&nbsp;</font></td>
        <td ><font class="textoss">Matéria</font></td>
        <td ><font class="textoss">Dt. Ent</font></td>        
        <td ><font class="textoss">Processo No</font></td>                            
        <td ><font class="textoss">Vara No</font></td>        
        <td ><font class="textoss">Arquivo - Resenha</font></td>        
        <td ><font class="textoss">Destino</font></td>        
        <td ><font class="textoss">Data Env. Adv.</font></td>        
        <td ><font class="textoss">Vis. p/ Adv.</font></td>        
        <td ><font class="textoss">Dat. Acesso</font></td>        
        <td ><font class="textoss">Prazo</font></td>        
    </tr>
    <% 
    Contador = 0
    IF not sqlC.EOF then
        CorAtu = "#FFFFFF"
        while not sqlC.EOF 
            If contador = 0 then
               contador = 1 %>
            <tr bgcolor="#C2E9A9">
            <%else 
               contador = 0 %>
            <tr bgcolor="#ffffff">
            <%End if %>
                <%
                chave = cstr(sqlC("dtmRes_DatRes")) + "@" + + cstr(sqlC("numRes_NumProc")) + "@" +cstr(sqlC("numRes_NumVar"))
                %>
                <td width="2%"><input style=" border:none;" id="Selecionado" name="Selecionado" type="radio" value="<%=chave%>" name="list" onclick="vb script:window.open('arquivos/<%=sqlC("vchRes_Anexo")%>')" value="<%=sqlC("vchRes_Anexo")%>"><%=sqlC("vchRes_Anexo")%></font></td>
                <td ><font class="textosc" value="<%=sqlC("numRes_EncAdv")%>"><%=sqlC("numRes_EncAdv")%></font></td>
                <%If sqlC("dtmRes_DatEnc") = "01/01/1753" Then %>
                    <td ><font class="textosc" value="<%=sqlC("dtmRes_DatEnc")%>"></font></td>
                <%else %>
                    <td ><font class="textosc" value="<%=sqlC("dtmRes_DatEnc")%>"><%=sqlC("dtmRes_DatEnc")%></font></td>
                <%End If %>
                <%If sqlC("chrRes_StaVis") = "N"  Then %> 
                    <td align=center><font class="textosc" value="N")>NÃO</font></td>        
                <%Else
                    If sqlC("chrRes_StaVis") = "S"  Then%>
                        <td align=center><font class="textosc" value="S")>SIM</font></td>        
                    <%Else%>
                        <td align=center><font class="textosc" value="S")> </font></td>            
                    <%End If %>
                <%End If %>    
                <%If sqlC("dtmRes_DatVis") = "01/01/1753" Then %>
                    <td ><font class="textosc" value="<%=sqlC("dtmRes_DatVis")%>"></font></td>
                <%Else %>
                    <td ><font class="textosc" value="<%=sqlC("dtmRes_DatVis")%>"><%=sqlC("dtmRes_DatVis")%></font></td>
                <%End If %>
                <%If sqlC("dtmRes_Prz") = "01/01/1753" Then %>
                    <td ><font class="textosr"  value="<%=sqlC("dtmRes_Prz")%>"></font></td>
                <%Else 
                    If sqlC("diferenca") <= 2 Then %>                                
                        <td class="textosr"><font  value="<%=sqlC("dtmRes_Prz")%>"><%=sqlC("dtmRes_Prz")%></font></td>        
                    <%else %>    
                        <td class="textosc"><font value="<%=sqlC("dtmRes_Prz")%>"><%=sqlC("dtmRes_Prz")%></font></td>        
                    <%End if %>
                <%End If %>      
            </tr>    
        <%sqlC.moveNext
        wEnd
            Else%>
            
        <tr bgcolor="#C2E9A9">
        <td colspan=11    align=center>
             <font face="Arial, Helvetica, sans-serif" size="1" color="#000000" >Nenhuma informação foi localizada.</font></td>
            </tr>
    <%end if %>

</table>
</div>  
<br />
<div id="mensagem_layer" style="cursor: pointer; position:absolute; width:500px; height:80px; z-index:1; visibility: 
hidden; overflow: hidden; left: 80px; top: 360px; background-color: #F0F9FF; 
layer-background-color: #F0F8FF; border: 1px none #000000;" onClick="consultarADV(document.resenhacager.chave4.value)">
<table width="100%" border="1" cellspacing="0" bordercolorlight="#FFFFFF" bordercolordark="#6495ED">
<tr>    
  <td align="center"><input type="hidden" name="chave4"  class="textoss" id="chave4" size="20" maxlength="30"/>
  <font size="1" face="Verdana"><b>
  O Advogado selecionado foi:<br>
  <%
    'listaADV = "select at_NOME  from sapj2000..vw_advogados_terc where at_usuar_logname = '6990'"
    'set objCmm        = CreateObject("ADODB.Connection")
    'set listaC        = server.CreateObject("ADODB.Recordset")
    'objCmm.Open  Application("strConn")
    'SET listagem = objCmm.Execute (listaADV)
    'response.Write(listagem("at_nome")) 
    'Response.Write ("<br>")
  %>
  <u>fechar</u><br></font>
  </td>
  </tr>
</table>
</div>

<table width="600" align="center">
    <tr>
        <td colspan="10" align="center">
            <input class="bt" onMouseOut="java script:this.className='bt'" style="width:65"  value="Gravar"    name="Gravar" onClick="vb script:this.className='bt'" onMouseOver="java script:this.className='bthover'" style="width:65" type="button" value="Retornar"  name="Retornar" onClick="self.location='inicial.asp'" <%=objScap1.RestObj (55)%>>&nbsp;
        </td>
    </tr>
</table>
      <td align="left"><input type="hidden" name="chave1" class="textoss" id="Chave1" size="20" maxlength="30"></td>
      <td align="left"><input type="hidden" name="chave2" class="textoss" id="chave2" size="20" maxlength="30"></td>
      <td align="left"><input type="hidden" name="chave3" class="textoss" id="chave3" size="20" maxlength="30"></td>
</form>
</body>
</html>

<%
objCmm.close
set objCmm = Nothing
%>

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



  • Forum Statistics

    • Total Topics
      150.2k
    • Total Posts
      647.4k
×
×
  • Create New...