📄 edit.asp
字号:
<% option explicit%>
<!-- #include virtual="include/DataEnvi.asp" -->
<!-- #include virtual="Include/Page.asp" -->
<%
Dim C,conn,rs,RSGtype,StrSQL
Dim IntID
Dim ObjRS,ObjRSType,ObjRSTypeSelect,SQLSTR
IntID = Request.QueryString("ID")
if Cint(IntID)=0 Then
Response.Write "<script language=javascript>alert('请选择要查看的客户类型');history.back();</script>"
Response.End
End if
Set conn=Server.CreateObject("ADODB.Connection")
OpenDBCrm( conn )
Set C = Server.CreateObject ("CMS2003.DBhandle")
C.Init(conn)
If Request.Form.Count > 0 Then
If Trim(Request("_Gindustry"))="" then
Response.Write "<script language=javascript>alert('请填写客户类型');history.back();</script>"
Response.End
End if
StrSQL="select * from T_CRM_Guest_industry Where Gindustry='"&Trim(Request("_Gindustry"))&"'"
Set ObjRS=conn.Execute(StrSQL)
If Not(ObjRS.Eof and ObjRS.Bof) Then
ObjRS.close
Set ObjRS=Nothing
conn.close
Set conn=Nothing
Response.Write "<script language=javascript>alert('已添加过该行业类型,请重新填写');history.back();</script>"
Response.End
End if
IntID = Request.Form("ID")
Call C.Edit(IntID,"_","T_CRM_Guest_industry")
conn.Close
Set conn = Nothing
Response.Redirect "list.asp"
End If
Set ObjRS = C.View("Select * From T_CRM_Guest_industry Where ID = " & IntID)
%>
<%'==================================================================%>
<%Sub Main%>
<%'------------------------------------------------------------------%>
<form action="" method="post" onsubmit="return(CheckForm(this))" id=form1 name=form1>
<input type=hidden name=ID value="<%=Request.QueryString("ID")%>">
<table class=Ltable cellspacing=1 cellpadding=3>
<tr class=LHtr align="middle">
<td width="15%">修改客户类型信息</td>
<td width="85%"> </td>
</tr>
<tr class=Ltr>
<td>选择客户行业</td>
<td>
<%
set rs=server.createobject("adodb.recordset")
Set rs = conn.Execute("select * from T_CRM_Guest_type")
if rs.eof and rs.bof then
Response.Write "请先添加行业信息"
else
set RSGtype=server.createobject("adodb.recordset")
Set RSGtype = conn.Execute("select * from T_CRM_Guest_type Where ID="&cint(ObjRS("Gtype_ID")))
%>
<select name="_Gtype_ID" >
<option selected value="<%=RSGtype("ID")%>"><%=trim(RSGtype("Gtype"))%></option>
<%
dim selclass
do while not rs.eof
if rs("ID")=RSGtype("ID") Then
else
%>
<option value="<%=rs("ID")%>"><%=trim(rs("Gtype"))%></option>
<% End if
rs.movenext
loop
RSGtype.close
set RSGtype=Nothing
end if
rs.close
%>
</select>
</td>
</tr>
<tr class=Ltr>
<td>客户类型</td>
<td><input type="text" class=Input Check=1 Show="客户类型" " name="_Gindustry" value="<%=ObjRS("Gindustry")%>"> </td>
</tr>
</table>
<table cellspacing=1 cellpadding=3>
<tr>
<td>
<input type="submit" name="Submit" class=Button value="提 交"><input type="button" class=Button value="取 消" onclick="doList()" id=button1 name=button1></td>
<td></td>
</tr>
</table>
</FORM>
<%
conn.Close
Set conn=Nothing
End Sub
%>
<!-- #include virtual="templet\templet.asp" -->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -