Ir para conteúdo
Fórum Script Brasil
  • 0

Conflito De Browser


raphanasc

Pergunta

Ola,

Tenho um ERP rodando aqui na empresa... e o problema é o seguinte:

Se alguém deixar 2 browsers aberto mas por exemplo 1 browser com o cliente X e outro browser com o cliente Y e clicar em atualizar no X ele atualiza o X e todos os dados do Y são atualizados para os dados do X é como se tivesse 2 clientes X. perco todos os dados do cliente Y.

alguém tem alguma ideia pra resolver isso???

ABS

Link para o comentário
Compartilhar em outros sites

5 respostass a esta questão

Posts Recomendados

  • 0

Não sei se era isso que você queria mas ai vai o codigo de uma pagina de cadastro de cliente.

Preciso proibir o usuario de acessar essa pagina 2x ou + ao mesmo tempo...(ex ao mesmo tempo seria 2 browser ou 2 abas do browser).

Caso ele já esteja acessando a página dar alguma msg de que não pode acessar ou algo do tipo.

<!--#include file="../net/conn.net"-->
<!--#include file="../net/utilitarios.net"-->
<!--#include file="../net/util_per.net"-->
<%
Session("QueryString") = ""
if ( Not VerificaPermissaoBD( Session("Id_Login"), 4, "CLI01" ) ) then
    response.Redirect("../net/msg.asp?Msg=Usuário sem permissão no Modulo Cliente !!!")
end if
Dim aDados( 11,1 )
if ( Request.QueryString("Opcao") = "2" ) then
    Call ConexaoSistema()
    
    agSql = " select top 1 ctc_int_id_contato, ctc_int_data_cadastro from t_contato where cli_int_id_cliente = '" & Request.QueryString("Id_Cliente") & "' order by ctc_int_data_cadastro desc "
    
    set rsAg = cConexao.Execute ( agSql )
    dim id_contato
    if ( Not RsAg.Eof ) then 
    id_contato = rsAg("ctc_int_id_contato")
    end if

    cSql = "Select Cli_Int_Id_Cliente, Cli_Var_Razao_Social, Cli_Var_Fantasia, Cli_Char_Tipo_Pessoa, Cli_Var_CNPJ, Sgc_Int_Id_Segmento_Mercado, "
    cSql = cSql & "Cli_Var_IE, Cli_Var_CCM, Cli_Dec_Limite_Credito, Sts_Int_Id_Status, Ven_Int_id_Vendedor, Tpc_Int_Id_Tipo_Cliente, "
    cSql = cSql & "Cli_Char_Ddd, Cli_Var_Telefone, Cli_Var_Ramal, Cli_Var_Fax, Cli_Var_Ramal_Fax, Cli_Var_Home_Page, Cli_Text_Obs, "
    cSql = cSql & "Cli_Text_Obs_Cadastro, Cli_Char_Flag_Cadastro, Cli_Int_Data_Cadastro, Cli_Int_Data_Sistema, Cli_char_flag_sm "
    cSql = cSql & " from t_cliente "
    cSql = cSql & " where Cli_Int_Id_Cliente = '" & Request.QueryString("Id_Cliente") & "'"
    Set RsCliente = cConexao.Execute( cSql )
    if ( Not RsCliente.Eof ) then 
        Session("Cad_Id_Cliente") = RsCliente("Cli_Int_Id_Cliente")
        nTpc_Int_Id_Tipo_Cliente = RsCliente("Tpc_Int_Id_Tipo_Cliente")
        nSgc_Int_Id_Segmento_Mercado = RsCliente("Sgc_Int_Id_Segmento_Mercado")
        nVen_Int_id_Vendedor = RsCliente("Ven_Int_id_Vendedor") 
        Session("Id_Vendedor_Cliente") = RsCliente("Ven_Int_id_Vendedor") 
        aDados( 11,1 ) = nVen_Int_id_Vendedor
        nSts_Int_Id_Status = RsCliente("Sts_Int_Id_Status")
        Session("Status_Cliente") = nSts_Int_Id_Status
        cCli_Var_Razao_Social = RsCliente("Cli_Var_Razao_Social")
        Session("Cad_Razao_Social") = RsCliente("Cli_Var_Razao_Social")
        cCli_Var_Fantasia = RsCliente("Cli_Var_Fantasia") 
        cCli_Var_CCM = RsCliente("Cli_Var_CCM") 
        cCli_Var_CNPJ = RsCliente("Cli_Var_CNPJ") 
        aDados( 1,1 ) = RsCliente("Cli_Var_CNPJ") 
        cCli_Var_IE = RsCliente("Cli_Var_IE") 
        aDados( 2,1 ) = RsCliente("Cli_Var_IE") 
        cCli_Char_Ddd = RsCliente("Cli_Char_Ddd") 
        aDados( 3,1 ) = RsCliente("Cli_Char_Ddd") 
        cCli_Var_Telefone = RsCliente("Cli_Var_Telefone") 
        aDados( 4,1 ) = RsCliente("Cli_Var_Telefone") 
        cCli_Var_Ramal = RsCliente("Cli_Var_Ramal") 
        aDados( 5,1 ) = RsCliente("Cli_Var_Ramal") 
        cCli_Var_Fax = RsCliente("Cli_Var_Fax") 
        aDados( 6,1 ) = RsCliente("Cli_Var_Fax") 
        cCli_Var_Ramal_Fax = RsCliente("Cli_Var_Ramal_Fax") 
        aDados( 7,1 ) = RsCliente("Cli_Var_Ramal_Fax") 
        nCli_Dec_Limite_Credito = RsCliente("Cli_Dec_Limite_Credito")
        aDados( 8,1 ) = RsCliente("Cli_Dec_Limite_Credito") 
        if ( Request.QueryString("TipoPessoa") = Empty ) then
            cTipoPessoa = RsCliente("Cli_Char_Tipo_Pessoa")
        else
            cTipoPessoa = Request.QueryString("TipoPessoa")
        end if
        cCli_Char_Tipo_Pessoa = RsCliente("Cli_Char_Tipo_Pessoa") 
        aDados( 9,1 ) = RsCliente("Cli_Char_Tipo_Pessoa") 
        cCli_Var_Home_Page = RsCliente("Cli_Var_Home_Page") 
        aDados( 10,1 ) = RsCliente("Cli_Var_Home_Page") 
        Session("aDados") = aDados
        cCli_Text_Obs = RsCliente("Cli_Text_Obs") 
        cCli_Text_Obs_Cadastro = RsCliente("Cli_Text_Obs_Cadastro") 
        
        dCli_Int_Data_Cadastro = RsCliente("Cli_Int_Data_Cadastro") 
        dCli_Int_Data_Sistema = RsCliente("Cli_Int_Data_Sistema") 
        
        cCli_char_flag_sm = RsCliente("Cli_char_flag_sm") 
    end if 
    RsCliente.Close : Set RsCliente = Nothing
    RsAg.Close : Set RsAg = Nothing

    Call FechaConexaoSistema()
else
    if ( Request.QueryString("TipoPessoa") = Empty ) then
        cTipoPessoa = "J"
    else
        cTipoPessoa = Request.QueryString("TipoPessoa")
    end if    
    Session("Cad_Id_Cliente") = "0"
    nSts_Int_Id_Status = 3
    if ( Request.QueryString("Id_Status") = 8 ) then nSts_Int_Id_Status = CInt( Request.QueryString("Id_Status") )
    if ( Request.QueryString("Id_Status") = 8 ) then cDesativaStatus = "disabled=""disabled"""
    nTpc_Int_Id_Tipo_Cliente = 2
end if
call ConexaoSistema()
jSql = "select log_int_id_login from t_login where ven_int_id_vendedor = (select ven_int_id_vendedor from t_cliente where cli_int_id_cliente ='" & Request.QueryString("Id_Cliente") & "')" 
Set RsValidaVendedor = cConexao.Execute( jSql )
if (not RsValidaVendedor.EOF ) then 
Vvendedor = RsValidaVendedor("log_int_id_login")
else 
Vvendedor = 0
end if
RsValidaVendedor.Close : Set RsValidaVendedor = nothing
call FechaConexaoSistema()

call ConexaoSistema()
bSql = "select ven_int_id_vendedor from t_login where log_int_id_login = " & Session("Id_Login")
Set RsIdVendedor = cConexao.Execute( bSql )
IdVendedor = RsIdVendedor("ven_int_id_vendedor")
RsIdVendedor.Close : Set RsIdVendedor = nothing
call FechaConexaoSistema()
%>
<html>
<head>
<title>ERP</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="../css/estilo.css" rel="stylesheet" type="text/css">
<!--#Include File="../net/javascript.net"-->
<script type="text/javascript" language="JavaScript1.2" src="../net/stm31.js"></script>
</head>
<body>
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td align="center" valign="top">
      <table width="980" border="2" cellpadding="0" cellspacing="0" bordercolor="#006699">
        <tr>
          <td>
              <!--#Include File="../net/header.net"-->
          </td>
        </tr>
        <tr bgcolor="#CCD6E0">
          <td height="23"> 
              <!--#Include File="../net/menu.net"-->
          </td>
        </tr>
        <tr>
          <td height="350" valign="top" bgcolor="#f5f5f5"> 
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td height="23" class="Texto_Navegacao"><a href="../home.asp">Home</a> &gt;
                  <%if ( Session("Status_Cliente")  = "8" or Session("Status_Cliente")  = "9" or Session("Status_Cliente")  = "10" ) then%>
                  <a href="con_fornecedor.asp"> Consulta Fornecedor </a> &gt; Cadastro de Fornecedor
                  <%else%>
                  <a href="con_cliente.asp"> Consulta Cliente </a> &gt; Cadastro de Cliente
                  <%end if%>
                </td>
              </tr>
              <tr> 
                <td height="23" align="center" class="Texto_Titulo">
                <%if ( Session("Status_Cliente")  = "8" or Session("Status_Cliente")  = "9" or Session("Status_Cliente")  = "10" ) then%>
                Cadastro de Fornecedor
                <%else%>
                Cadastro de Cliente
                <%end if%>
                </td>
              </tr>
              <tr> 
                  <%cJavascript = "return valida(this,'')"%>
                <td align="center"><form action="arquivo_utilitarios.asp?Opcao=4&Opcao2=<%=Request.QueryString("Opcao")%>&Id_Cliente=<%=Session("Cad_Id_Cliente")%>" method="post" name="form1" target="_self" onSubmit="<%=cJavascript%>">
                    <table width="980" border="0" cellpadding="2" cellspacing="2" bordercolor="#FFFFFF" bgcolor="#dcdcdc" class="FundoCadastroAlteracao">
                      <% if Session("Cad_Id_Cliente") <> "0" then%>
                      <tr> 
                        <td height="24" class="TextoFormulario">C&oacute;digo 
                          do Cliente </td>
                        <td class="TextoCampoFormulario"> <%=Session("Cad_Id_Cliente")%></td>
                        <td colspan="2" class="TextoFormulario">&nbsp;</td>
                      </tr>
                      <%end if%>
                      <tr> 
                        <td colspan="4" class="TextoFormulario"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                            <%if Request.QueryString("Opcao")<>1 then %>
                            <tr> 
                              <td width="99" height="18" class="TextoFormulario">Cadastro 
                                em :</td>
                              <td width="122" class="TextoCampoFormulario"><%=MontaData3( dCli_Int_Data_Cadastro )%></td>
                              <td width="103" class="TextoFormulario">Alterado 
                                em :</td>
                              <td class="TextoCampoFormulario"> 
                                <%
                            Call ConexaoSistema()
                            cSql = "select top 10 Seg_Var_Nome_Login, Seg_Date_horas from t_Seguranca where seg_var_descricao like '% Nº " & Session("Cad_Id_Cliente") & "' "
                            cSql = cSql & "and seg_var_modulo_acessado = 'Modulo Cliente' "
                            cSql = cSql & "order by seg_int_id_seguranca desc"
                            Set RsSeg = cConexao.Execute( cSql )
                            if (RsSeg.Eof ) then
                            %>
                            <%=("Sem alterações")%>
                            <%else%>
                                <select name="select" class="TextoCampoFormulario">
                                  <%Do While ( Not RsSeg.Eof )%>
                                  <option><%=RsSeg("Seg_Var_Nome_Login")%> - <%=RsSeg("Seg_Date_horas")%></option>
                                  <%RsSeg.MoveNext : Loop%>
                                </select> 
                                <%
                            end if
                            RsSeg.Close : Set RsSeg = Nothing : Call FechaConexaoSistema()
                            %>
                              </td>
                            </tr>
                            <%end if%>
                          </table></td>
                      </tr>
                      <tr> 
                        <td class="TextoFormulario">Tipo Pessoa</td>
                        <td colspan="2" class="TextoCampoFormulario"> 
                          <%if Request.QueryString("Opcao") = "2" then%>
                          <%if cTipoPessoa = "F" then %>
                          Pessoa Física 
                          <%elseif cTipoPessoa = "J" then %>
                          Pessoa Jurídica 
                          <%end if%>
                          <%elseif Request.QueryString("Opcao") = "1" then%>
                          <select name="Cli_Char_Tipo_Pessoa" class="TextoCampoFormulario" id="select5" onChange="document.location.href = this.form.Cli_Char_Tipo_Pessoa.options[this.form.Cli_Char_Tipo_Pessoa.selectedIndex].value2">
                            <option value="F" value2="cad_alt_cliente.asp?Opcao=<%=Request.QueryString("Opcao")%>&Id_Cliente=<%=Request.QueryString("Id_Cliente")%>&TipoPessoa=F" <%if cTipoPessoa = "F" then%>selected<%end if%>>Pessoa 
                            Fisica</option>
                            <option value="J" value2="cad_alt_cliente.asp?Opcao=<%=Request.QueryString("Opcao")%>&Id_Cliente=<%=Request.QueryString("Id_Cliente")%>&TipoPessoa=J" <%if cTipoPessoa = "J" then%>selected<%end if%>>Pessoa 
                            Juridica</option>
                          </select> 
                          <%end if
                          %>
                        </td>
                        <td align="right" class="TextoCampoFormulario"><span class="TextoFormulario">Status</span> 
                          <%if   Request.QueryString("Opcao") = 1 or ( Request.QueryString("Opcao") = 2  and _
                               ( VerificaPermissaoBD( Session("Id_Login"), 1, "CLI06" ) ) or VerificaPermissaoBD( Session("Id_Login"), 2, "CLI06" )  or Vvendedor = 0  or IdVendedor = Session("Id_Vendedor_Cliente")  ) then%>
                          <%if ( cDesativaStatus <> Empty ) then%>
                          <input type="hidden" value="<%=nSts_Int_Id_Status%>" name="Sts_Int_Id_Status"> 
                          <%end if%>
                          <select name="Sts_Int_Id_Status" <%=cDesativaStatus%>  class="TextoCampoFormulario" id="select2" Opcao="select" Campo="Status Cliente">
                          <%
                            Call ConexaoSistema()
                            cSql = "Select Sts_Int_Id_Status, Sts_Var_Descricao, Sts_Char_Cliente from t_status "
                            cSql = cSql & "where Sts_Char_Cliente = " & "'T'" & "order by Sts_Var_Descricao"
                            Set RsCliente = cConexao.Execute( cSql )
                            if ( Not RsCliente.Eof ) then
                            Do While ( Not RsCliente.Eof )
                            %>
                            <option value="<%=RsCliente("Sts_Int_Id_Status")%>" <%if ( CInt( nSts_Int_Id_Status ) = RsCliente("Sts_Int_Id_Status") ) then%>selected<%end if%>><%=RsCliente("Sts_Var_Descricao")%></option>
                            <%
                            RsCliente.MoveNext
                            Loop
                            end if
                            RsCliente.Close : Set RsCliente = Nothing : Call FechaConexaoSistema()
                            %>
                          </select> 
                          <%else%>
                          <%
                            Call ConexaoSistema()
                            cSql = "Select Sts_Int_Id_Status, Sts_Var_Descricao from t_status where Sts_Int_Id_Status = '" & nSts_Int_Id_Status & "'"
                            Set RsStatus = cConexao.Execute( cSql )
                            if ( Not RsStatus.Eof ) then
                            %>
                          <%if ( VerificaPermissao( Session("Id_Login"), 4, "CLI06" ) ) then%>
                          <%=RsStatus("Sts_Var_Descricao")%> <input type="hidden" name="Sts_Int_Id_Status" value="<%=RsStatus("Sts_Int_Id_Status")%>"> 
                          <%else%>
                          Sem Permissão para visualizar !!! 
                          <%if Request.QueryString("Opcao") = 1 then%>
                          <input type="hidden" name="Sts_Int_Id_Status" value="<%=nSts_Int_Id_Status%>"> 
                          <%end if%>
                          <%end if%>
                          <%
                            end if
                            RsStatus.Close : Set RsStatus = nothing : Call FechaConexaoSistema()
                            %>
                          <%end if%>
                        </td>
                      </tr>
                      <tr> 
                        <td width="121" class="TextoFormulario">Raz&atilde;o Social</td>
                        <td colspan="3" class="TextoFormulario"> <input name="Cli_Var_Razao_Social" type="text" c class="TextoCampoFormulario" id="Cli_Var_Razao_Social" value="<%=cCli_Var_Razao_Social%>" size="50" maxlength="100" Opcao="texto" Campo="Razão Social"> 
                          <a href="busca_cliente.asp?Opcao_Busca=1" target="_self"><img src="../img_sistema/botao/botao_lupa.gif" width="16" height="16" border="0"> 
                          Procura Cliente</a> </td>
                      </tr>
                      <tr> 
                        <td class="TextoFormulario">Nome Fantasia</td>
                        <td colspan="3" class="TextoCampoFormulario"> <input name="Cli_Var_Fantasia" type="text" c class="TextoCampoFormulario" id="Cli_Var_Fantasia" value="<%=cCli_Var_Fantasia%>" size="50" maxlength="100" Opcao="texto" Campo="Nome Fantasia"> 
                        </td>
                      </tr>
                      <tr> 
                        <td class="TextoFormulario">Tipo Cliente</td>
                        <td colspan="2" class="TextoFormulario"> 
                          <%if ( VerificaPermissaoBD( Session("Id_Login"), 1, "CLI12" ) or VerificaPermissaoBD( Session("Id_Login"), 2, "CLI12" ) or ( Vvendedor = 0 ) ) then%>
                          <select name="Tpc_Int_id_Tipo_Cliente"  class="TextoCampoFormulario" id="select4" Opcao="select" Campo="Tipo Cliente">
                            <option value="" <%if ( nTpc_Int_id_Tipo_Cliente = Empty ) then%>selected<%end if%>>&nbsp;</option>
                            <%
                            Call ConexaoSistema()
                            cSql = "Select Tpc_Int_id_Tipo_Cliente, Tpc_Var_Descricao from t_tipo_Cliente order by Tpc_Var_Descricao"
                            Set RsTipo_Cliente = cConexao.Execute( cSql )
                            if ( Not RsTipo_Cliente.Eof ) then
                            Do While ( Not RsTipo_Cliente.Eof )
                            %>
                            <option value="<%=RsTipo_Cliente("Tpc_Int_id_Tipo_Cliente")%>" <%if ( nTpc_Int_id_Tipo_Cliente = RsTipo_Cliente("Tpc_Int_id_Tipo_Cliente") ) then%>selected<%end if%>><%=RsTipo_Cliente("Tpc_Var_Descricao")%></option>
                            <%
                            RsTipo_Cliente.MoveNext
                            Loop
                            end if
                            RsTipo_Cliente.Close : Set RsTipo_Cliente = nothing : Call FechaConexaoSistema()
                            %>
                          </select> 
                          <%elseif ( VerificaPermissaoBD( Session("Id_Login"), 4, "CLI12" ) ) then%>
                          <%
                          Call ConexaoSistema()
                          cSql = "Select Tpc_Int_id_Tipo_Cliente, Tpc_Var_Descricao from t_tipo_Cliente where Tpc_Int_id_Tipo_Cliente = '" & nTpc_Int_id_Tipo_Cliente & "'"
                          Set RsTipo_Cliente = cConexao.Execute( cSql )
                          if ( Not RsTipo_Cliente.Eof ) then
                          %>
                          <%=RsTipo_Cliente("Tpc_Var_Descricao")%> 
                          <%
                          end if
                          RsTipo_Cliente.Close : Set RsTipo_Cliente = nothing : Call FechaConexaoSistema()
                          %>
                          <input type="hidden" name="Tpc_Int_id_Tipo_Cliente" value="<%=nTpc_Int_id_Tipo_Cliente%>"> 
                          <%else%>
                          Sem Permissão para visualizar !!! 
                          <input type="hidden" name="Tpc_Int_id_Tipo_Cliente" value="<%=nTpc_Int_id_Tipo_Cliente%>"> 
                          <%end if%>
                        </td>
                        <td width="422" class="TextoFormulario">&nbsp;</td>
                      </tr>
                      <tr> 
                        <td class="TextoFormulario">Vendedor</td>
                        <td colspan="3" class="TextoCampoFormulario"> 
                          <% if  Request.QueryString("Opcao") = 1  or (  Request.QueryString("Opcao") = 2  and  VerificaPermissaoBD( Session("Id_Login"), 2, "CLI04" ) ) or Vvendedor = 0  or  IdVendedor = Session("Id_Vendedor_Cliente")  then                      
                          %>
                          <select name="Ven_Int_Id_Vendedor" class="TextoCampoFormulario" id="select" Opcao="texto" Campo="Vendedor">
                            <option value="" <%if ( nVen_Int_id_Vendedor = Empty ) then%>selected<%end if%>>&nbsp;</option>
                            <%
                            Call ConexaoSistema()
                            cSql = "Select Ven_Int_Id_Vendedor, Ven_Var_Nome from t_vendedor "
'                            if ( Request.QueryString("Opcao") = 1 ) then
                                cSql = cSql & "where sts_int_id_status = '1' "
'                            end if
                            cSql = cSql & "order by Ven_Var_Nome"
                            Set RsCliente = cConexao.Execute( cSql )
                            if ( Not RsCliente.Eof ) then
                            Do While ( Not RsCliente.Eof )
                            %>
                            <option value="<%=RsCliente("Ven_Int_Id_Vendedor")%>" <%if ( nVen_Int_id_Vendedor = RsCliente("Ven_Int_Id_Vendedor") ) then%>selected<%end if%>><%=RsCliente("Ven_Var_Nome")%></option>
                            <%
                            RsCliente.MoveNext
                            Loop
                            end if
                            
                            RsCliente.Close : Set RsCliente = nothing : Call FechaConexaoSistema()
                            %>
                          </select> 
                          <%else%>
                          <%
                            Call ConexaoSistema()
                            cSql = "Select Ven_Int_Id_Vendedor, Ven_Var_Nome from t_vendedor where Ven_Int_Id_Vendedor = '" & nVen_Int_id_Vendedor & "'"
                            Set RsVendedor = cConexao.Execute( cSql )
                            if ( Not RsVendedor.Eof ) then
                            %>
                          <%if ( VerificaPermissao( Session("Id_Login"), 4, "CLI04" ) ) then%>
                          <%=RsVendedor("Ven_Var_Nome")%> 
                          <%else%>
                          Sem Permissão para visualizar !!! 
                          <%end if%>
                          <%
                            RsVendedor.MoveNext
                            end if
                            RsVendedor.Close : Set RsVendedor = nothing : Call FechaConexaoSistema()
                            %>
                          <%end if%>
                        </td>
                      </tr>
                      <tr> 
                        <td class="TextoFormulario">Segmento Mercado</td>
                        <td colspan="3" class="TextoCampoFormulario"><select name="Sgc_Int_Id_Segmento_Mercado"  class="TextoCampoFormulario" id="select" Opcao="select" Campo="Segmento Mercado">
                            <option value="" <%if ( nSgc_Int_Id_Segmento_Mercado = Empty ) then%>selected<%end if%>>&nbsp;</option>
                            <%
                            Call ConexaoSistema()
                            cSql = "Select Sgc_Int_Id_Segmento_Mercado, Sgc_Var_Descricao from t_segmento_mercado order by Sgc_Var_Descricao"
                            Set RsSegmento = cConexao.Execute( cSql )
                            if ( Not RsSegmento.Eof ) then
                            Do While ( Not RsSegmento.Eof )
                            %>
                            <option value="<%=RsSegmento("Sgc_Int_Id_Segmento_Mercado")%>" <%if ( nSgc_Int_Id_Segmento_Mercado = RsSegmento("Sgc_Int_Id_Segmento_Mercado") ) then%>selected<%end if%>><%=RsSegmento("Sgc_Var_Descricao")%></option>
                            <%
                            RsSegmento.MoveNext
                            Loop
                            end if
                            RsSegmento.Close : Set RsSegmento = nothing : Call FechaConexaoSistema()
                            %>
                          </select> </td>
                      </tr>
                      <%if (cTipoPessoa = "J") then 
                      if nSts_Int_Id_Status <> 8 then 
                      if ( Request.QueryString("Opcao") = "1" ) then%>
                      <tr> 
                        <td class="TextoFormulario">CNPJ</td>
                        <td width="180" class="TextoFormulario"> <input type="text" maxlength="18" class="TextoCampoFormulario" name="Cli_Var_CNPJ" Campo="CNPJ" Opcao="cnpj" value="<%=cCli_Var_CNPJ%>"> 
                          <a href="http://www.receita.fazenda.gov.br/PessoaJuridica/CNPJ/cnpjreva/Cnpjreva_Solicitacao.asp" target="_blank">Verifica 
                          CNPJ</a></td>
                        <td width="21" class="TextoFormulario">IE </td>
                        <td class="TextoCampoFormulario"><input name="Cli_Var_Ie" type="text" class="TextoCampoFormulario" id="Cli_Var_IE" value="<%=cCli_Var_IE%>" size="25" maxlength="20"></td>
                      </tr>
                      <%elseif ( Request.QueryString("Opcao") = "2" ) then%>
                      <tr> 
                        <td class="TextoFormulario">CNPJ</td>
                        <td width="180" class="TextoCampoFormulario"><%=cCli_Var_CNPJ%></td>
                        <td class="TextoFormulario">IE</td>
                        <td class="TextoCampoFormulario"><input name="Cli_Var_Ie" type="text" class="TextoCampoFormulario" id="Cli_Var_Ie" value="<%=cCli_Var_IE%>" size="25" maxlength="20"></td>
                      </tr>
                      <%end if%>
                      <%else%>
                      <input type="hidden" name="Cli_Var_CNPJ" value="0">
                      <%end if%>
                      <%elseif (cTipoPessoa = "F") then 
                      if ( Request.QueryString("Opcao") = "1" ) then%>
                      <tr> 
                        <td class="TextoFormulario">CPF </td>
                        <td width="180" class="TextoCampoFormulario"> <input type="text" maxlength="18" class="TextoCampoFormulario" name="Cli_Var_CNPJ" Campo="CPF" Opcao="cpf" value="<%=cCli_Var_CNPJ%>"></td>
                        <td class="TextoFormulario">RG </td>
                        <td class="TextoCampoFormulario"><input name="Cli_Var_IE" type="text" class="TextoCampoFormulario" id="Cli_Var_IE" value="<%=cCli_Var_IE%>" size="25" maxlength="20"></td>
                      </tr>
                      <%elseif ( Request.QueryString("Opcao") = "2" ) then%>
                      <tr> 
                        <td class="TextoFormulario">CPF</td>
                        <td width="180" class="TextoCampoFormulario"><%=cCli_Var_CNPJ%></td>
                        <td class="TextoFormulario">RG </td>
                        <td class="TextoCampoFormulario"> <%=cCli_Var_IE%> <input type="hidden" name="Cli_Var_IE" value="<%=cCli_Var_IE%>"> 
                        </td>
                      </tr>
                      <%end if%>
                      <%end if%>
                      <tr> 
                        <td class="TextoFormulario">CCM<br> </td>
                        <td colspan="3" class="TextoFormulario"><input name="Cli_Var_CCM" type="text" class="TextoCampoFormulario" id="Cli_Var_CCM" value="<%=cCli_Var_CCM%>" size="25" maxlength="20"></td>
                      </tr>
                      <tr> 
                        <td class="TextoFormulario">Limite de Cr&eacute;dito<br> 
                        </td>
                        <td colspan="3" class="TextoFormulario"> 
                          <%if ( Request.QueryString("Opcao") = 1 ) or ( ( Request.QueryString("Opcao") = 2 ) and ( VerificaPermissaoBD( Session("Id_Login"), 2, "CLI05" ) ) or ( Vvendedor = 0 )  ) then%>
                          <input name="Cli_Dec_Limite_Credito" type="text" class="TextoCampoFormulario" id="Cli_Dec_Limite_Credito" value="<%=nCli_Dec_Limite_Credito%>" size="25" maxlength="12"></td>
                        <%else%>
                        <%if ( VerificaPermissaoBD( Session("Id_Login"), 4, "CLI05" ) ) then%>
                        <%=nCli_Dec_Limite_Credito%> 
                        <input name="Cli_Dec_Limite_Credito" type="hidden" id="Cli_Dec_Limite_Credito" value="<%=nCli_Dec_Limite_Credito%>">
                        <%else%>
                        <input name="Cli_Dec_Limite_Credito" type="hidden" id="Cli_Dec_Limite_Credito" value="<%=nCli_Dec_Limite_Credito%>">
                        Sem Permissão para visualizar !!! 
                        <%end if%>
                        <%end if%>
                      </tr>
                      <%if ( Request.QueryString("Opcao") = 1 ) or ( Session("Id_Vendedor") = nVen_Int_id_Vendedor ) or ( ValidaUsuario( nVen_Int_id_Vendedor, Session("Id_Vendedor") ) or ( Vvendedor = 0 ) ) then%>
                      <tr> 
                        <td class="TextoFormulario">DDD</td>
                        <td colspan="3" class="TextoFormulario"><table width="500" border="0" cellspacing="0" cellpadding="0">
                            <tr> 
                              <td><input name="Cli_Char_DDD" type="text" class="TextoCampoFormulario" id="Cli_Char_DDD" value="<%=cCli_Char_DDD%>" size="4" maxlength="3" Opcao="texto" Campo="DDD"></td>
                              <td class="TextoFormulario">Telefone 
                                <input name="Cli_Var_Telefone" type="text" class="TextoCampoFormulario" id="Cli_Var_Telefone" value="<%=cCli_Var_Telefone%>" size="12" maxlength="15" Opcao="texto" Campo="Telefone"> 
                              </td>
                              <td class="TextoFormulario">Ramal 
                                <input name="Cli_Var_Ramal" type="text" class="TextoCampoFormulario" id="Cli_Var_Ramal" value="<%=cCli_Var_Ramal%>" size="4" maxlength="5"> 
                              </td>
                              <td class="TextoFormulario">Fax 
                                <input name="Cli_Var_Fax" type="text" class="TextoCampoFormulario" id="Cli_Var_Fax" value="<%=cCli_Var_Fax%>" size="12" maxlength="15"> 
                              </td>
                              <td class="TextoFormulario">Ramal 
                                <input name="Cli_Var_Ramal_Fax" type="text" class="TextoCampoFormulario" id="Cli_Var_Ramal_Fax" value="<%=cCli_Var_Ramal_Fax%>" size="4" maxlength="5"> 
                              </td>
                            </tr>
                          </table></td>
                      </tr>
                      <%elseif ( VerificaPermissaoBD( Session("Id_Login"), 4, "CLI07" ) or ( Vvendedor = 0 ) ) then%>
                      <%if ( VerificaPermissaoBD( Session("Id_Login"), 2, "CLI07" ) or ( Vvendedor = 0 ) ) then%>
                      <tr> 
                        <td class="TextoFormulario">DDD</td>
                        <td colspan="3" class="TextoFormulario"><table width="500" border="0" cellspacing="0" cellpadding="0">
                            <tr> 
                              <td><input name="Cli_Char_DDD" type="text" class="TextoCampoFormulario" id="Cli_Char_DDD" value="<%=cCli_Char_DDD%>" size="4" maxlength="3" Opcao="texto" Campo="DDD"></td>
                              <td class="TextoFormulario">Telefone 
                                <input name="Cli_Var_Telefone" type="text" class="TextoCampoFormulario" id="Cli_Var_Telefone" value="<%=cCli_Var_Telefone%>" size="12" maxlength="15" Opcao="texto" Campo="Telefone"> 
                              </td>
                              <td class="TextoFormulario">Ramal 
                                <input name="Cli_Var_Ramal" type="text" class="TextoCampoFormulario" id="Cli_Var_Ramal" value="<%=cCli_Var_Ramal%>" size="4" maxlength="5"> 
                              </td>
                              <td class="TextoFormulario">Fax 
                                <input name="Cli_Var_Fax" type="text" class="TextoCampoFormulario" id="Cli_Var_Fax" value="<%=cCli_Var_Fax%>" size="12" maxlength="15"> 
                              </td>
                              <td class="TextoFormulario">Ramal 
                                <input name="Cli_Var_Ramal_Fax" type="text" class="TextoCampoFormulario" id="Cli_Var_Ramal_Fax" value="<%=cCli_Var_Ramal_Fax%>" size="4" maxlength="5"> 
                              </td>
                            </tr>
                          </table></td>
                      </tr>
                      <%else%>
                      <tr> 
                        <td class="TextoFormulario">DDD</td>
                        <td colspan="3" class="TextoFormulario"><table width="500" border="0" cellspacing="0" cellpadding="0">
                            <tr> 
                              <td class="TextoFormulario"><%=cCli_Char_DDD%></td>
                              <td class="TextoFormulario">Telefone <%=cCli_Var_Telefone%> 
                              </td>
                              <td class="TextoFormulario">Ramal <%=cCli_Var_Ramal%> 
                              </td>
                              <td class="TextoFormulario">Fax <%=cCli_Var_Fax%> 
                              </td>
                              <td class="TextoFormulario">Ramal <%=cCli_Var_Ramal_Fax%> 
                              </td>
                            </tr>
                          </table></td>
                      </tr>
                      <%end if%>
                      <%end if%>
                      <tr> 
                        <td class="TextoFormulario"> Home Page</td>
                        <td colspan="3"><input name="Cli_Var_Home_Page" type="text" class="TextoCampoFormulario" id="Cli_Var_Home_Page" value="<%=cCli_Var_Home_Page%>" size="50" maxlength="256"></td>
                      </tr>
                      <tr> 
                        <td class="TextoFormulario">Servi&ccedil;o Mensal</td>
                        <td class="TextoFormulario"><input type="checkbox" name="cli_char_flag_sm" value="T" <%if ( cCli_char_flag_sm = "T" ) then%>checked<%end if%>></td>
                        <td class="TextoFormulario">&nbsp;</td>
                        <td class="TextoFormulario">&nbsp;</td>
                      </tr>
                      <tr> 
                        <td class="TextoFormulario">Obs</td>
                        <td colspan="3"><textarea name="Cli_Text_Obs" cols="70" rows="4" wrap="VIRTUAL" class="TextoCampoFormulario" id="Cli_Text_Obs" c="c" opcao="texto" campo="Comiss&atilde;o"><%=cCli_Text_Obs%></textarea></td>
                      </tr>
                      <tr> 
                        <td class="TextoFormulario">Obs Cadastro</td>
                        <td colspan="3"><textarea name="Cli_Text_Obs_Cadastro" cols="70" rows="4" wrap="VIRTUAL" class="TextoCampoFormulario" id="Cli_Text_Obs_Cadastro"><%=cCli_Text_Obs_Cadastro%></textarea> 
                        </td>
                      </tr>
                      <%if ( Request.QueryString("Opcao") = "2" ) then%>
                      <tr> 
                        <td colspan="4" align="center" class="TextoFormulario"><table width="700" border="0" cellspacing="0" cellpadding="0">
                            <tr> 
                              <td width="178" class="TextoFormulario"> 
                                <%if ( Session("Id_Vendedor") = nVen_Int_id_Vendedor ) or ( ValidaUsuario( nVen_Int_id_Vendedor, Session("Id_Vendedor") ) or ( VerificaPermissaoBD( Session("Id_Login"), 4, "CLI07" ) ) or ( Vvendedor = 0 ) ) then%>
                                <a href="con_cotacao_mercadoria_cliente.asp"> 
                                <img src="../img_sistema/botao/botao_visualiza_cotacao.gif" width="21" height="21" border="0"> 
                                Ver Cota&ccedil;&atilde;o</a> 
                                <%else%>
                                &nbsp; 
                                <%end if%>
                              </td>
                              <td width="232" valign="middle" class="TextoFormulario"> 
                                <%if ( Session("Id_Vendedor") = nVen_Int_id_Vendedor ) or ( ValidaUsuario( nVen_Int_id_Vendedor, Session("Id_Vendedor") ) or ( VerificaPermissaoBD( Session("Id_Login"), 4, "CLI07" ) ) or ( Vvendedor = 0 )  ) then%>
                                <a href="con_posicao_cr_cliente.asp"> <img src="../img_sistema/botao/botao_posicao_financeira.gif" width="21" height="21" border="0"> 
                                Posi&ccedil;&atilde;o Financeira </a> 
                                <%else%>
                                &nbsp; 
                                <%end if%>
                              </td>
                              <td width="290" valign="middle" class="TextoFormulario"> 
                                <%if ( Session("Id_Vendedor") = nVen_Int_id_Vendedor ) or ( ValidaUsuario( nVen_Int_id_Vendedor, Session("Id_Vendedor") ) or ( VerificaPermissaoBD( Session("Id_Login"), 4, "CLI07" ) ) or ( Vvendedor = 0 ) ) then%>
                                <a href="con_orcamento_cliente.asp"> <img src="../img_sistema/botao/botao_visualiza_cotacao.gif" width="21" height="21" border="0"> 
                                Ver Or&ccedil;amento Servi&ccedil;os</a> 
                          
                              </td>
                            </tr>
                          </table></td>
                      </tr>
                      <tr align="center"> 
                        <td colspan="4" class="TextoFormulario"><table width="700" border="0" cellspacing="0" cellpadding="0">
                            <tr> 
                              <td class="TextoFormulario"><a href="con_servicos_mensais.asp"><img src="../img_sistema/botao/botao_servicos_mensais.gif" width="30" height="31" border="0">Servi&ccedil;os 
                                Mensais</a> </td>
                            </tr>
                          </table></td>
                      </tr>
                            <%else%>
                                &nbsp; 
                                <%end if%>
                      <%end if%>
                      <%if ( Request.QueryString("Opcao") <> "2" ) then%>
                      <%if ( VerificaPermissaoBD( Session("Id_Login"), 1, "CLI01" ) ) then%>
                      <tr align="center"> 
                        <td colspan="4"><input name="imageField" type="image" src="../img_sistema/botao/botao_inclusao.gif" width="34" height="32" border="0"></td>
                      </tr>
                      <%end if%>
                      <%else%>
                      <%if ( Session("Id_Vendedor") = nVen_Int_id_Vendedor ) or ( ValidaUsuario( nVen_Int_id_Vendedor, Session("Id_Vendedor") ) or ( VerificaPermissaoBD( Session("Id_Login"), 4, "CLI07" ) )or ( Vvendedor = 0 ) ) then%>
                      <tr align="center"> 
                        <td colspan="2" class="TextoFormulario"><a href="con_End_Cliente.asp?Id_Cliente=<%=Session("Cad_Id_Cliente")%>"><img src="../img_sistema/botao/botao_cliente_endereco.gif" width="24" height="28" border="0">Endere&ccedil;o</a></td>
                        <% if id_contato <> "" then %>
                        <td colspan="1" class="TextoFormulario"><a href="../cliente/cad_Alt_agenda.asp?Opcao=1&Id_Contato=<%=id_contato%>"><img src="../img_sistema/botao/botao_agenda.gif" width="28" height="28" border="0">Agenda</a></td>
                          <%end if%>    
                        <td colspan="1" class="TextoFormulario"><a href="con_contato.asp?Id_Cliente=<%=Session("Cad_Id_Cliente")%>"><img src="../img_sistema/botao/botao_cliente_contato.gif" width="28" height="28" border="0">Contato</a></td>
                      </tr>
                      <%end if%>
                      <%if ( VerificaPermissaoBD( Session("Id_Login"), 2, "CLI01" ) or ( Vvendedor = 0 ) ) then%>
                      <tr align="center"> 
                        <td colspan="4"><input name="imageField" type="image" src="../img_sistema/botao/botao_alteracao.gif" width="34" height="32" border="0"></td>
                      </tr>
                      <%end if%>
                      <%end if%>
                    </table>
                  </form></td>
              </tr>
            </table>
            
          </td>
        </tr>
        <tr>
              <!--#Include File="../net/footer.net"-->
        </tr>
      </table>
    </td>
  </tr>
</table>
</body>
</html>
<% 



if ( Request.QueryString("Opcao") ) = 2 then%>
<%Call ConexaoSistema()%>
<%if Verifica_Integridade_Cliente(Session("Cad_Id_Cliente"),false) = "EC" then%>
<script language="JavaScript">
    alert("Cadastro de cliente incompleto !!!\n" + "Cadastre um ENDEREÇO e um CONTATO !!!");
</script>
<%elseif Verifica_Integridade_Cliente(Session("Cad_Id_Cliente"),false) = "E" then%>
<script language="JavaScript">
    alert("Cadastro de cliente incompleto !!!\n" + "Cadastre um ENDEREÇO !!!");
</script>
<%elseif Verifica_Integridade_Cliente(Session("Cad_Id_Cliente"),false) = "C" then%>
<script language="JavaScript">
    alert("Cadastro de cliente incompleto !!!\n" + "Cadastre um CONTATO !!!");
</script>
<%end if%>

<% 
Call FechaConexaoSistema()%>
<%end if%>

Link para o comentário
Compartilhar em outros sites

Participe da discussão

Você pode postar agora e se registrar depois. Se você já tem uma conta, acesse agora para postar com sua conta.

Visitante
Responder esta pergunta...

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emoticons são permitidos.

×   Seu link foi incorporado automaticamente.   Exibir como um link em vez disso

×   Seu conteúdo anterior foi restaurado.   Limpar Editor

×   Você não pode colar imagens diretamente. Carregar ou inserir imagens do URL.



  • Estatísticas dos Fóruns

    • Tópicos
      152,2k
    • Posts
      651,9k
×
×
  • Criar Novo...