📄 addnew.asp
字号:
<% option explicit%>
<!-- #include virtual="include/DataEnvi.asp" -->
<!-- #include virtual="include/Page.asp" -->
<!-- #include virtual="include/SelectValue.asp" -->
<%
Dim objDB,ObjRS,ObjRSOne
Dim C,i,ID, BeginTime, EndTime
Dim StrSQL,ConferenceID
Set ObjDB = Server.CreateObject("ADODB.Connection")
OpenDB ObjDB
Set ObjRS = Server.CreateObject ("ADODB.RecordSet")
ID = Request.Form("ID")
If ID <> "" then
ID = Cint(ID)
Set C = Server.CreateObject("CMS2003.DBHandle")
BeginTime = Request.Form("_BegDate") & Request.Form("_BegHour") & Request.Form("_BegMinute")
EndTime = Request.Form("_FinDate") & Request.Form("_FinHour") & Request.Form("_FinMinute")
BeginTime=Replace(BeginTime,"-","")
EndTime=Replace(EndTime,"-","")
'Response.Write BeginTime
'Response.Write "<BR>"
'Response.Write EndTime
'Response.End
if CDbl(BeginTime) > CDbl(EndTime) then
%>
<script language=javascript>
alert("会议开始时间大于结束时间,请重新输入!")
window.history.back();
</script>
<%
Response.End
end if
C.Init(ObjDB)
call C.Edit(ID,"_","t_OA_Work_Conference")
strSQL = "Update t_OA_Work_Conference set Isvalid=1 where ID =" & ID
ObjDB.Execute(strSQL)
If Request.Form("isAttach") = "1" then
strSQL = "Update t_OA_Work_Conference_Attach set Isvalid=1 Where ConID = " & ID & " And IsUpSuccess = 1"
objDB.Execute(strSQL)
End If
Response.Redirect ("List.asp")
ObjDB.Close
Set ObjDB = Nothing
Else
StrSQL = "Select * from t_OA_Work_Conference where 1=1"
ObjRS.Open StrSQL,ObjDB,1,3
ObjRS.AddNew
ObjRS("Subject") = 1
ObjRS("Creator") = 1
ObjRS("BegDate") = 2010-12-12
ObjRS("BegHour") = 1
ObjRS("BegMinute") = 1
ObjRS("FinDate") = 2010-12-13
ObjRS("FinHour") = 1
ObjRS("FinMinute") = 1
ObjRS.Update
ConferenceID = ObjRS("ID")
ObjRS.Close
ObjDB.Close
Set ObjDB = Nothing
End if
Sub Main
%>
<Script language=javascript>
function EditAttach()
{
var r =window.showModalDialog("../../Attach/Index.asp?IDs=" + document.forms[0]._Attachs.value + "&BasePath=ComMessage&R=" + Math.random(),"AttachWin","dialogHeight=240px,dialogWidth=420px,resizable=No,status=1,scrollbars=1");
if(r!=null)
{
ReturnAttachs(r)
}
}
function ReturnAttachs(v)
{
document.forms[0].AttachsShow.value = v[0]
document.forms[0]._Attachs.value = v[1]
}
function SelectAccountIDs(FormID,FormName)
{
var r =window.showModalDialog("../../Account/Index.asp?IDs=" + FormID.value + "&R=" + Math.random(),"AccountWin","dialogHeight=400px;dialogWidth=200px;resizable=No;status=1;scrollbars=1");
if(r!=null)
{
FormID.value = r[0]
FormName.value = r[1]
}
}
</Script>
<form action="" method="post" onsubmit="return(CheckForm(this))" id=form1 name=form1>
<table class=Ltable cellspacing=1 cellpadding=3>
<input type=hidden name=ID value=<%=ConferenceID%>>
<tr class=LHtr>
<td width="15%">新增会议</td>
<td width="85%"> </td>
<tr class=Ltr>
<td>会议主题</td>
<td>
<input type="text" size=37 class=Input Check=1 Show="会议主题" name="_Subject" size="20"></td>
</tr>
<tr class=Ltr>
<td>发起人</td>
<td>
<input name=A_AccountIDs0 value="" type=hidden>
<input type="text" size=37 class=Input Check=1 Show="发起人" name="_Creator" size="20"><input type=button class=Button value="选 择.." onclick="SelectAccountIDs(A_AccountIDs0,_Creator)" id=button1 name=button1>
</td>
</tr>
<tr class=Ltr>
<td>会议开始时间</td>
<td>
<input type="text" class=Input3 Check=1 Show="开始日期" readonly name="_BegDate" onclick="InputDate(this)" value="<%=Date()%>" size="20">
<Select class=Select Check=1 Show="小时" Name=_BegHour>
<%
For i = 0 to 23
%>
<option Value=<%If i<10 Then Response.Write "0"%><%=i%> <%If i=Hour(now) Then Response.Write " selected "%>><%If i<10 Then Response.Write "0"%><%=i%>
<%
next
%>
</select>:<Select class=Select Check=1 Show="分钟" Name=_BegMinute>
<%
For i = 0 to 59
%>
<option Value=<%If i<10 Then Response.Write "0"%><%=i%> <%If i=Minute(now) Then Response.Write " selected "%>><%If i<10 Then Response.Write "0"%><%=i%>
<%
next
%>
</select></td>
</tr>
<tr class=Ltr>
<td>会议结束时间</td>
<td>
<input type="text" class=Input3 Check=1 Show="结束日期" name="_FinDate" readonly onclick="InputDate(this)" value="<%=Date()%>" size="20">
<Select class=Select Check=1 Show="小时" Name=_FinHour>
<%
For i = 0 to 23
%>
<option Value=<%If i<10 Then Response.Write "0"%><%=i%> <%If i=Hour(now) Then Response.Write " selected "%>><%If i<10 Then Response.Write "0"%><%=i%>
<%
next
%>
</select>:<Select class=Select Check=1 Show="分钟" Name=_FinMinute>
<%
For i = 0 to 59
%>
<option Value=<%If i<10 Then Response.Write "0"%><%=i%> <%If i=Minute(now) Then Response.Write " selected "%>><%If i<10 Then Response.Write "0"%><%=i%>
<%
next
%>
</select></td>
</tr>
<tr class=Ltr>
<td>与会者</td>
<td>
<input name=A_AccountIDs value="" type=hidden>
<input type="text" size=37 class=Input Check=1 Show="与会者" name="_Attender" size="20"><input type=button class=Button value="选 择.." onclick="SelectAccountIDs(A_AccountIDs,_Attender)" id=button1 name=button1><input type="button" class=Button value="发送通知" onclick="window.open('../../../OA/MSN/SendToIDs.asp?IDs='+A_AccountIDs.value+'&Msg=[会议通知]\\n会议主题:'+_Subject.value+'\\n会议时间:'+_BegDate.value+' '+_BegHour.value+':'+_BegMinute.value,'SendToIDs','width=355,height=235')" id=button1 name=button1>
</td>
</tr>
<tr class=Ltr>
<td>主持人</td>
<td>
<input name=A_AccountIDs2 value="" type=hidden>
<input type="text" size=37 class=Input Check=0 Show="主持人" name="_Master" size="20"><input type=button class=Button value="选 择.." onclick="SelectAccountIDs(A_AccountIDs2,_Master)" id=button1 name=button1></td>
</tr>
<tr class=Ltr>
<td>报告人</td>
<td>
<input name=A_AccountIDs3 value="" type=hidden>
<input type="text" size=37 class=Input Check=0 Show="报告人" name="_Reporter" size="20"><input type=button class=Button value="选 择.." onclick="SelectAccountIDs(A_AccountIDs3,_Reporter)" id=button1 name=button1></td>
</tr>
<tr class=Ltr>
<td>会议地点</td>
<td>
<input type="text" size=37 class=Input Check=1 Show="会议地点" name="_Address" size="20"></td>
</tr>
<tr class=Ltr>
<td valign=top>会议描述</td>
<td>
<textarea rows=10 cols=27 class=textarea Check=0 Show="会议描述" name="_Des" rows="1" cols="20" ></textarea></td>
</tr>
<tr class=Ltr>
<td>附件</td>
<td><input name=_Attachs type=hidden class=Input>
<input name=AttachsShow disabled size=37 class=Input size="20"><input type=button value="编辑附件" class=button onclick="EditAttach()" id=button3 name=button3>
</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="history.go(-1)" id=button1 name=button1>
</td>
<td>
</td>
</tr>
</table>
</form>
<%
End Sub
%>
<!-- #include file="Templet.asp" -->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -