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

📄 edit.asp

📁 功能齐全的oa系统
💻 ASP
字号:
<% option explicit%>
<!-- #include virtual="include/MyFunc.asp" -->
<!-- #include virtual="include/DataEnvi.asp" -->
<!-- #include virtual="Include/Page.asp" -->
<%
	Dim ObjDB
	Dim C
	Dim IntID
	Dim ObjRS,rs,sql
	
	IntID = Request.QueryString("ID")
	
	Set ObjDB = Server.CreateObject("ADODB.Connection")
	OpenDBH ObjDB

	Set C = Server.CreateObject ("CMS2003.DBhandle")
	C.Init(ObjDB)

	If Request.Form.Count > 0 Then
 ' ----------------------------------------判断开始'	
	
  
 if request("_JobBegDate")<>"" then
  if  NOT IsDate(request("_JobBegDate")) then
  
   call MsgBox("必须是日期!","Back","none")
    response.end  
  end if 
  end if
  
 if request("_JobName")="" then
    call MsgBox("名称不能为空!","Back","none")
    response.end  
	 else
		  if Len(request("_JobName"))>20 then
		   call MsgBox("名称超出20个汉字了!","Back","none")
          response.end  
		  end if
  end if
    if request("_JobBrief")<>"" then
 		  if Len(request("_JobBrief"))>500 then
		   call MsgBox("简介超出500个汉字了!","Back","none")
          response.end  
		  end if
  end if
 ' -------------------------------------------判断结束'
'修改		
Set rs = Server.CreateObject("ADODB.Recordset")
  sql="select *  from T_Hrms_Sys_Job Where ID="&IntID
 rs.open sql,ObjDB,3,3
Sql="select Count(*) from T_Hrms_Sys_Job where JobName='" & trim(request("_JobName"))&"'"
      Set ObjRS = ObjDB.Execute(Sql)
      if   trim(rs("JobName"))<>trim(request("_JobName")) then
    if ObjRS(0) = 0 Then
   rs("JobName")=request("_JobName")
    else
       call MsgBox("该名称已经存在了!","Back","none")
       response.end  
  end IF
 end if 
rs("JobBrief")=request("_JobBrief")



if  request("_JobBegDate")<>""  then
if  IsDate (request("_JobBegDate")) then
rs("JobBegDate")=request("_JobBegDate")
end if
end if

rs.update
'添加日志
dim FirstMenu,SecondMenu,Opertion,OTime,OName,OIP,ODesc,OChang
OIP=Request.ServerVariables("REMOTE_ADDR")
OName= Session("AccountName") 
if  isempty(OChang) then
      OChang=""
	  end if

if OName="administrator" then
OName="系统管理员"
end if

call AddLog("系统管理","合同类型","修改",now(),OName ,OIP,"",OChang,ObjDB)

'日志结束
set rs=nothing
ObjDB.Close
Set ObjDB = Nothing
Response.Redirect "list.asp"
End If
   
	Set ObjRS = C.View("Select * From T_Hrms_Sys_Job 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 align="center">名称</td>
      <td><input  name="_JobName" type="text" class=Input id="_JobName" value="<%=ObjRS("JobName")%>" Check=0></td>
    </tr>
    <tr class=Ltr> 
      <td height="23" align="center">简介</td>
      <td><textarea name="_JobBrief" cols="60" rows="10" class="Input" id="_JobBrief" check="0"><%=ObjRS("JobBrief")%></textarea></td>
    </tr>
    <tr class=Ltr> 
      <td align="center">开始时间</td>
      <td>
<label><%=FormatDate(ObjRS("JobBegDate"))%></label></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>
	


<%'------------------------------------------------------------------%>
<%End Sub%>
<%'==================================================================%>

<!-- #include virtual="templet\templet.asp" -->

⌨️ 快捷键说明

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