⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 admin_company.asp

📁 个人网站比较简短
💻 ASP
📖 第 1 页 / 共 3 页
字号:
    Response.Write "                        <td class='tdbg5' align='right'  width='12%'>备注:</td>" & vbCrLf
    Response.Write "                        <td colspan='3'><input name='Remark' value='" & Remark & "' type='text' size='35'></td>" & vbCrLf
    Response.Write "                    </tr>" & vbCrLf
    Response.Write "                </table>" & vbCrLf

    Response.Write "            </td>" & vbCrLf
    Response.Write "        </tr>" & vbCrLf
    Response.Write "</table>" & vbCrLf
    Response.Write "<table width='100%' height='40'><tr align='center'><td>"
    Response.Write "    <input type='hidden' name='action' value='SaveModify'><input type='hidden' name='CompanyID' value='" & CompanyID & "'>" & vbCrLf
    Response.Write "    <input type='submit' name='Submit' value='保存修改结果'>" & vbCrLf
    Response.Write "</td></tr></table>"
    Response.Write "</form>" & vbCrLf
    Set rsCompany = Nothing
End Sub


Sub Show()
    Dim CompanyID
    Dim rsCompany, sqlClient
    Dim Country, Province, City, Address, ZipCode
    CompanyID = PE_CLng(Trim(Request("CompanyID")))
    If CompanyID <= 0 Then
        FoundErr = True
        ErrMsg = ErrMsg & "<li>参数不足!</li>"
        Exit Sub
    End If
    Set rsCompany = Conn.Execute("select * from PE_Company where CompanyID=" & CompanyID & "")
    If rsCompany.BOF And rsCompany.EOF Then
        FoundErr = True
        ErrMsg = ErrMsg & "<li>找不到对应的企业信息!</li>"
    Else
        Country = rsCompany("Country")
        Province = rsCompany("Province")
        City = rsCompany("City")
        Address = rsCompany("Address")
        ZipCode = rsCompany("ZipCode")
    End If
    If FoundErr = True Then
        Exit Sub
    End If


    Response.Write "<br><table width='100%'><tr><td align='left'>您现在的位置:<a href='Admin_Company.asp'>企业管理</a>&nbsp;&gt;&gt;&nbsp;查看企业信息:" & rsCompany("CompanyName") & "</td></tr></table>"

    Response.Write "<table width='100%'  border='0' align='center' cellpadding='5' cellspacing='1' class='border'>" & vbCrLf
    Response.Write "        <tr class='tdbg'>" & vbCrLf
    Response.Write "            <td height='100' valign='top'>"
    Response.Write "                <table width='95%' align='center' cellpadding='2' cellspacing='1' bgcolor='#FFFFFF'>" & vbCrLf
    Response.Write "                  <tbody id='Tabs'>" & vbCrLf
    Response.Write "                    <tr class='tdbg'>" & vbCrLf
    Response.Write "                        <td class='tdbg5' align='right'  width='12%'>企业名称:</td>" & vbCrLf
    Response.Write "                        <td width='38%'>" & rsCompany("CompanyName") & "</td>" & vbCrLf
    Response.Write "                        <td class='tdbg5' align='right'  width='12%'>企业编号:</td>" & vbCrLf
    Response.Write "                        <td width='38%'>" & rsCompany("ClientNum") & "</td>" & vbCrLf
    Response.Write "                    </tr>" & vbCrLf
    Response.Write "                    <tr class='tdbg'>" & vbCrLf
    Response.Write "                        <td class='tdbg5' align='right'  width='12%'>国家/地区:</td>" & vbCrLf
    Response.Write "                        <td width='38%'>" & Country & "</td>" & vbCrLf
    Response.Write "                        <td class='tdbg5' align='right'  width='12%'>省/市:</td>" & vbCrLf
    Response.Write "                        <td width='38%'>" & Province & "</td>" & vbCrLf
    Response.Write "                    </tr>" & vbCrLf
    Response.Write "                    <tr class='tdbg'>" & vbCrLf
    Response.Write "                        <td class='tdbg5' align='right' >市/县/区:</td>" & vbCrLf
    Response.Write "                        <td>" & City & "</td>" & vbCrLf
    Response.Write "                        <td class='tdbg5' align='right' >邮政编码:</td>" & vbCrLf
    Response.Write "                        <td>" & ZipCode & "</td>" & vbCrLf
    Response.Write "                    </tr>" & vbCrLf
    Response.Write "                    <tr class='tdbg'>" & vbCrLf
    Response.Write "                        <td class='tdbg5' align='right' >联系地址:</td>" & vbCrLf
    Response.Write "                        <td colspan='3'>" & Address & "</td>" & vbCrLf
    Response.Write "                    </tr>" & vbCrLf
    

    Response.Write "                    <tr class='tdbg'>" & vbCrLf
    Response.Write "                        <td class='tdbg5' align='right' >联系电话:</td>" & vbCrLf
    Response.Write "                        <td>" & rsCompany("Phone") & "</td>" & vbCrLf
    Response.Write "                        <td class='tdbg5' align='right' >传真号码:</td>" & vbCrLf
    Response.Write "                        <td>" & rsCompany("Fax") & "</td>" & vbCrLf
    Response.Write "                    </tr>" & vbCrLf
    
    
    Response.Write "                    <tr class='tdbg'>" & vbCrLf
    Response.Write "                        <td class='tdbg5' align='right'  width='12%'>开户银行:</td>" & vbCrLf
    Response.Write "                        <td width='38%'>" & rsCompany("BankOfDeposit") & "</td>" & vbCrLf
    Response.Write "                        <td class='tdbg5' align='right'  width='12%'>银行帐号:</td>" & vbCrLf
    Response.Write "                        <td width='38%'>" & rsCompany("BankAccount") & "</td>" & vbCrLf
    Response.Write "                    </tr>" & vbCrLf
    Response.Write "                    <tr class='tdbg'>" & vbCrLf
    Response.Write "                        <td class='tdbg5' align='right' >税号:</td>" & vbCrLf
    Response.Write "                        <td>" & rsCompany("TaxNum") & "</td>" & vbCrLf
    Response.Write "                        <td class='tdbg5' align='right' >网址:</td>" & vbCrLf
    Response.Write "                        <td>" & rsCompany("Homepage") & "</td>" & vbCrLf
    Response.Write "                    </tr>" & vbCrLf
    Response.Write "                    <tr class='tdbg'>" & vbCrLf
    Response.Write "                        <td class='tdbg5' align='right' >行业地位:</td>" & vbCrLf
    Response.Write "                        <td>" & GetArrItem(arrStatusInField, rsCompany("StatusInField")) & "</td>" & vbCrLf
    Response.Write "                        <td class='tdbg5' align='right' >公司规模:</td>" & vbCrLf
    Response.Write "                        <td>" & GetArrItem(arrCompanySize, rsCompany("CompanySize")) & "</td>" & vbCrLf
    Response.Write "                    </tr>" & vbCrLf
    Response.Write "                    <tr class='tdbg'>" & vbCrLf
    Response.Write "                        <td class='tdbg5' align='right' >业务范围:</td>" & vbCrLf
    Response.Write "                        <td>" & rsCompany("BusinessScope") & "</td>" & vbCrLf
    Response.Write "                        <td class='tdbg5' align='right' >年销售额:</td>" & vbCrLf
    Response.Write "                        <td>" & rsCompany("AnnualSales") & " 万元</td>" & vbCrLf
    Response.Write "                    </tr>" & vbCrLf
    Response.Write "                    <tr class='tdbg'>" & vbCrLf
    Response.Write "                        <td class='tdbg5' align='right' >经营状态:</td>" & vbCrLf
    Response.Write "                        <td>" & GetArrItem(arrManagementForms, rsCompany("ManagementForms")) & "</td>" & vbCrLf
    Response.Write "                        <td class='tdbg5' align='right' >注册资本:</td>" & vbCrLf
    Response.Write "                        <td>" & rsCompany("RegisteredCapital") & " 万元</td>" & vbCrLf
    Response.Write "                    </tr>" & vbCrLf

    rsCompany.Close
    Set rsCompany = Nothing


    Response.Write "            </td>" & vbCrLf
    Response.Write "        </tr>" & vbCrLf
    Response.Write "</table>" & vbCrLf
    Response.Write "<table width='100%' height='60'><tr align='center'><td>"
    If AdminPurview = 1 Or arrPurview(3) = True Or (arrPurview(2) = True And rsCompany("Owner") = AdminName) Then
        Response.Write "<input type='button' name='modify' value='修改企业信息' onclick=""window.location.href='Admin_Company.asp?Action=Modify&ClientID=" & ClientID & "';"">"
    End If
    If ClientType = 0 And (AdminPurview = 1 Or arrPurview(1) = True) Then
        Response.Write "&nbsp;&nbsp;<input type='button' name='add' value='添加联系人' onclick=""window.location.href='Admin_Contacter.asp?Action=AddContacter&ClientID=" & ClientID & "';"">"
    End If
    If AdminPurview = 1 Or arrPurview(5) = True Then
        Response.Write "&nbsp;&nbsp;<input type='button' name='add' value='添加服务记录' onclick=""window.location.href='Admin_Service.asp?Action=Add&ClientID=" & ClientID & "';"">"
    End If
    If AdminPurview = 1 Or arrPurview(6) = True Then
        Response.Write "&nbsp;&nbsp;<input type='button' name='add' value='添加投诉记录' onclick=""window.location.href='Admin_Complain.asp?Action=Add&ClientID=" & ClientID & "';"">"
    End If
    If AdminPurview = 1 Then
        If PE_CLng(Conn.Execute("select count(0) from PE_User where ClientID=" & ClientID & "")(0)) = 0 Then
            Response.Write "&nbsp;&nbsp;<input type='button' name='Submit' value='添加银行汇款' onClick=""window.location.href='Admin_Company.asp?Action=AddRemit&ClientID=" & ClientID & "'"">"
            Response.Write "&nbsp;&nbsp;<input type='button' name='Submit' value='添加其他收入' onClick=""window.location.href='Admin_Company.asp?Action=AddIncome&ClientID=" & ClientID & "'"">"
            Response.Write "&nbsp;&nbsp;<input type='button' name='Submit' value='添加支出信息' onClick=""window.location.href='Admin_Company.asp?Action=AddPayment&ClientID=" & ClientID & "'"">"
        End If
    End If
    If AdminPurview = 1 Or arrPurview(4) = True Then
        Response.Write "&nbsp;&nbsp;<input type='button' name='modify' value='删除此企业' onclick=""window.location.href='Admin_Company.asp?Action=DelClient&ClientID=" & ClientID & "';"">"
    End If
    Response.Write "</td></tr></table>"

End Sub



Sub SaveCompany()
    Dim ClientID, CompanyName, ClientNum, ClientType, ShortedForm

    ClientID = PE_CLng(Trim(Request.Form("ClientID")))
    ClientType = PE_CLng(Trim(Request.Form("ClientType")))
    ClientNum = Trim(Request.Form("ClientNum"))
    CompanyName = Trim(Request.Form("CompanyName"))
    ShortedForm = Trim(Request.Form("ShortedForm"))

    If CompanyName = "" Then
        FoundErr = True
        ErrMsg = "企业名称不能为空!"
    End If
    If ShortedForm = "" Then
        FoundErr = True
        ErrMsg = "企业简称(助记码)不能为空!"
    End If

    If FoundErr Then
        Exit Sub
    End If

    Dim sqlCompany, rsCompany, CompanyID
    Set rsCompany = Server.CreateObject("adodb.recordset")

    If Action = "SaveAdd" Then
        sqlCompany = "select top 1 * From PE_Company"
        rsCompany.Open sqlCompany, Conn, 1, 3
        rsCompany.addnew
        rsCompany("CompanyID") = GetNewID("PE_Company", "CompanyID")
    Else
        sqlCompany = "select * From PE_Company Where ClientID=" & ClientID & ""
        rsCompany.Open sqlCompany, Conn, 1, 3
        If rsCompany.BOF And rsCompany.EOF Then
            rsCompany.addnew
            rsCompany("CompanyID") = GetNewID("PE_Company", "CompanyID")
        End If
    End If
    If FoundErr Then
        rsCompany.Close
        Set rsCompany = Nothing
        Exit Sub
    End If

    rsCompany("ClientID") = ClientID
    rsCompany("Country") = Trim(Request.Form("Country"))
    rsCompany("Province") = Trim(Request.Form("Province"))
    rsCompany("City") = Trim(Request.Form("City"))
    rsCompany("Address") = Trim(Request.Form("Address"))
    rsCompany("ZipCode") = Trim(Request.Form("ZipCode"))
    rsCompany("Phone") = Trim(Request.Form("Phone"))
    rsCompany("Fax") = Trim(Request.Form("Fax1"))
    rsCompany("HomePage") = Trim(Request.Form("Homepage1"))
    rsCompany("BankOfDeposit") = Trim(Request.Form("BankOfDeposit"))
    rsCompany("BankAccount") = Trim(Request.Form("BankAccount"))
    rsCompany("TaxNum") = Trim(Request.Form("TaxNum"))
    rsCompany("StatusInField") = PE_CLng(Trim(Request.Form("StatusInField")))
    rsCompany("CompanySize") = PE_CLng(Trim(Request.Form("CompanySize")))
    rsCompany("BusinessScope") = Trim(Request.Form("BusinessScope"))
    rsCompany("AnnualSales") = Trim(Request.Form("AnnualSales"))
    rsCompany("ManagementForms") = PE_CLng(Trim(Request.Form("ManagementForms")))
    rsCompany("RegisteredCapital") = Trim(Request.Form("RegisteredCapital"))
    rsCompany.Update
    rsCompany.Close
    Set rsCompany = Nothing

    Call WriteSuccessMsg("保存企业资料成功", "Admin_Company.asp?Action=Show&CompanyID=" & CompanyID)
    
End Sub

%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -