温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:PowerOA办公自动化系统商业源码
当前文件:
PowerOA/Archives/ArchiveDetail.aspx[14K,2009-6-12 11:52:10],打开代码结构图
PowerOA/Archives/ArchiveDetail.aspx[14K,2009-6-12 11:52:10],打开代码结构图1<%@ Page language="c#" Codebehind="ArchiveDetail.aspx.cs" AutoEventWireup="false" Inherits="OI.Archives.ArchiveDetail" %> 2
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > 3
<HTML> 4
<HEAD> 5
<title>ArchiveDetail</title> 6
<META http-equiv="Content-Type" content="text/html; charset=gb2312"> 7
<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1"> 8
<meta name="CODE_LANGUAGE" Content="C#"> 9
<meta name="vs_defaultClientScript" content="JavaScript"> 10
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5"> 11
<style type="text/css">@import url( ../test.css ); 12
</style> 13
<script language="javascript"> 14
15
function backFun() 16
{ 17
//window.alert ("Now!"); 18
window.history .back (); 19
} 20
function OpenFind(strLink) 21
{ 22
23
window.open(strLink,"AddPerson","top=100,left=100,toolbar=0,,status=1,menubar=0,scrollbars=1,resizable=1,width=500,height=300") 24
} 25
26
function StatusMsg(mString){ 27
StatusBar.innerText=mString; 28
} 29
30
function Load(){ 31
try{ 32
document.getElementById('menu').style.visibility='visible'; 33
webform.WebOffice.ServerPath="<%=mServerUrl%>"; 34
webform.WebOffice.RecordID="<%=mRecordID%>"; 35
webform.WebOffice.Template="<%=mTemplate%>"; 36
webform.WebOffice.FileName="<%=mFileName%>"; 37
webform.WebOffice.FileType="<%=mFileType%>"; 38
webform.WebOffice.EditType="<%=mEditType%>"; 39
webform.WebOffice.UserName="<%=mUserName%>"; 40
webform.WebOffice.WebOpen(); //打开该文档 41
if(webform.WebOffice.EditType!=2) 42
ShowRevision(this); 43
StatusMsg(webform.WebOffice.Status); 44
} 45
catch(e) 46
{ 47
48
} 49
} 50
51
function UnLoad(){ 52
try{ 53
if (!webform.WebOffice.WebClose()){ 54
StatusMsg(webform.WebOffice.Status); 55
}else{ 56
StatusMsg("关闭文档..."); 57
} 58
}catch(e){} 59
} 60
61
function ShowRevision(mObject){ 62
var mFlag=mObject.value; 63
if (mFlag=="显示痕迹"){ 64
mObject.value="隐藏痕迹"; 65
webform.WebOffice.WebShow(true); 66
StatusMsg("显示痕迹..."); 67
}else{ 68
mObject.value="显示痕迹"; 69
webform.WebOffice.WebShow(false); 70
StatusMsg("隐藏痕迹..."); 71
} 72
} 73
74
function LoadDocument(){ 75
StatusMsg("正在打开文档..."); 76
if (!webform.WebOffice.WebOpen()){ 77
StatusMsg(webform.WebOffice.Status); 78
}else{ 79
StatusMsg(webform.WebOffice.Status); 80
} 81
} 82
83
function SaveDocument(){ 84
if (webform.EditType.value=="0"){ 85
alert("你在查看状态,不能保存!"); 86
return false; 87
} 88
if (!webform.WebOffice.WebSave()){ 89
StatusMsg(webform.WebOffice.Status); 90
return false; 91
}else{ 92
StatusMsg(webform.WebOffice.Status); 93
return true; 94
} 95
} 96
97
98
function WebFocus(){ 99
webform.WebOffice.WebFocus(); 100
StatusMsg("文档已刷新..."); 101
} 102
103
function WebOpenVersion(){ 104
webform.WebOffice.WebOpenVersion(); 105
StatusMsg(webform.WebOffice.Status); 106
107
} 108
109
function WebSaveVersion(){ 110
webform.WebOffice.WebSaveVersion(); 111
StatusMsg(webform.WebOffice.Status); 112
113
} 114
115
function LoadBookmarks(){ 116
StatusMsg("正在填充模扳..."); 117
if (!webform.WebOffice.WebLoadBookmarks()){ 118
StatusMsg(webform.WebOffice.Status); 119
}else{ 120
StatusMsg(webform.WebOffice.Status); 121
} 122
} 123
124
function SetBookmarks(vbmName,vbmValue){ 125
if (!webform.WebOffice.WebSetBookmarks(vbmName,vbmValue)){ 126
StatusMsg(webform.WebOffice.Status); 127
}else{ 128
StatusMsg(webform.WebOffice.Status); 129
} 130
} 131
132
function GetBookmarks(vbmName){ 133
var vbmValue; 134
vbmValue=webform.WebOffice.WebGetBookmarks(vbmName); 135
return vbmValue; 136
} 137
138
function WebOpenPrint(){ 139
try{ 140
webform.WebOffice.WebOpenPrint(); 141
StatusMsg(webform.WebOffice.Status); 142
}catch(e){} 143
} 144
145
function WebOpenPageSetup(){ 146
try{ 147
if (webform.WebOffice.FileType==".doc"){ 148
webform.WebOffice.WebObj.Application.Dialogs(178).Show(); 149
}else{ 150
webform.WebOffice.WebObj.Application.Dialogs(7).Show; 151
} 152
}catch(e){ 153
154
} 155
156
} 157
158
function WebOpenPicture(){ 159
try{ 160
webform.WebOffice.WebOpenPicture(); 161
StatusMsg(webform.WebOffice.Status); 162
}catch(e){} 163
} 164
165
function WebOpenSignature(){ 166
try{ 167
webform.WebOffice.WebOpenSignature(); 168
StatusMsg(webform.WebOffice.Status); 169
}catch(e){} 170
} 171
172
function WebShowSignature(){ 173
try{ 174
webform.WebOffice.WebShowSignature(); 175
StatusMsg(webform.WebOffice.Status); 176
}catch(e){} 177
} 178
function WebHideSignature(){ 179
try{ 180
webform.WebOffice.WebhideSignature(); 181
StatusMsg(webform.WebOffice.Status); 182
}catch(e){} 183
} 184
185
function WebCheckSignature(){ 186
try{ 187
var i=webform.WebOffice.WebCheckSignature(); 188
189
StatusMsg(i); 190
}catch(e){} 191
} 192
193
194
function WebOpenBookMarks(){ 195
try{ 196
webform.WebOffice.WebOpenBookmarks(); 197
StatusMsg(webform.WebOffice.Status); 198
}catch(e){} 199
} 200
201
function WebSaveLocalNoMark(){ 202
try{ 203
webform.WebOffice.WebSaveLocal(); 204
StatusMsg(webform.WebOffice.Status); 205
}catch(e){} 206
} 207
208
function WebSaveLocalWithMark(){ 209
try{ 210
webform.WebOffice.WebSaveLocal(); 211
StatusMsg(webform.WebOffice.Status); 212
}catch(e){} 213
} 214
215
function WebOpenLocal(){ 216
try{ 217
webform.WebOffice.WebOpenLocal(); 218
StatusMsg(webform.WebOffice.Status); 219
}catch(e){} 220
} 221
222
function WebSaveAsHtml(){ 223
try{ 224
if (webform.WebOffice.WebSaveAsHtml()) 225
{ 226
webform.HTMLPath.value="HTML/<%=mRecordID%>.htm"; 227
} 228
StatusMsg(webform.WebOffice.Status); 229
}catch(e){} 230
} 231
232
function WebToolsVisible(ToolName,Visible){ 233
try{ 234
webform.WebOffice.WebToolsVisible(ToolName,Visible); 235
StatusMsg(webform.WebOffice.Status); 236
}catch(e){} 237
} 238
239
function WebToolsEnable(ToolName,ToolIndex,Enable){ 240
try{ 241
webform.WebOffice.WebToolsEnable(ToolName,ToolIndex,Enable); 242
StatusMsg(webform.WebOffice.Status); 243
}catch(e){} 244
} 245
246
247
function WebGetWordContent(){ 248
try{ 249
alert(webform.WebOffice.WebObj.Content.Text); 250
}catch(e){} 251
} 252
253
function WebSetWordContent(){ 254
var mText=window.prompt("请输入内容:","测试内容"); 255
if (mText==null){ 256
return (false); 257
} 258
else 259
{ 260
//下面为显示选中的文本 261
//alert(webform.WebOffice.WebObj.Application.Selection.Range.Text); 262
//下面为在当前光标出插入文本 263
webform.WebOffice.WebObj.Application.Selection.Range.InsertAfter (mText+"\n"); 264
//下面为在第一段后插入文本 265
//webform.WebOffice.WebObj.Application.ActiveDocument.Range(1).InsertAfter(mText); 266
} 267
} 268
269
function WebGetExcelContent(){ 270
webform.WebOffice.WebObj.Application.Sheets(1).Select; 271
webform.WebOffice.WebObj.Application.Range("C5").Select; 272
webform.WebOffice.WebObj.Application.ActiveCell.FormulaR1C1 = "126"; 273
webform.WebOffice.WebObj.Application.Range("C6").Select; 274
webform.WebOffice.WebObj.Application.ActiveCell.FormulaR1C1 = "446"; 275
webform.WebOffice.WebObj.Application.Range("C7").Select; 276
webform.WebOffice.WebObj.Application.ActiveCell.FormulaR1C1 = "556"; 277
webform.WebOffice.WebObj.Application.Range("C5:C8").Select; 278
webform.WebOffice.WebObj.Application.Range("C8").Activate; 279
webform.WebOffice.WebObj.Application.ActiveCell.FormulaR1C1 = "=SUM(R[-3]C:R[-1]C)"; 280
webform.WebOffice.WebObj.Application.Range("D8").Select; 281
alert(webform.WebOffice.WebObj.Application.Range("C8").Text); 282
} 283
284
function WebInsertFile(){ 285
webform.WebOffice.WebSetMsgByName("COMMAND","INSERTFILE"); 286
webform.WebOffice.Template="模板一.doc"; 287
if (webform.WebOffice.WebLoadTemplate()){ 288
if (webform.WebOffice.WebInsertFile()){ 289
alert("成功"); 290
}else{ 291
StatusMsg(webform.WebOffice.Status); 292
} 293
}else{ 294
StatusMsg(webform.WebOffice.Status); 295
} 296
} 297
298
function WebUpdateFile(){ 299
if (webform.WebOffice.WebUpdateFile()){ 300
StatusMsg(webform.WebOffice.Status); 301
}else{ 302
StatusMsg(webform.WebOffice.Status); 303
} 304
} 305
306
function WebInportText(){ 307
var mText; 308
webform.WebOffice.WebSetMsgByName("COMMAND","INPORTTEXT"); 309
if (webform.WebOffice.WebSendMessage()){ 310
mText=webform.WebOffice.WebGetMsgByName("CONTENT"); 311
webform.WebOffice.WebObject.Application.Selection.Range.InsertAfter(mText); 312
alert("导入文本成功"); 313
} 314
StatusMsg(webform.WebOffice.Status); 315
} 316
317
318
function WebExportText(){ 319
var mText=webform.WebOffice.WebObject.Content.Text; 320
webform.WebOffice.WebSetMsgByName("COMMAND","EXPORTTEXT"); 321
webform.WebOffice.WebSetMsgByName("CONTENT",mText); 322
if (webform.WebOffice.WebSendMessage()){ 323
alert("导出文本成功"); 324
} 325
StatusMsg(webform.WebOffice.Status); 326
} 327
328
329
</script> 330
331
332
</HEAD> 333
<body bgcolor="#ffffff" onload="Load()" onunload="UnLoad()" MS_POSITIONING="GridLayout"> 334
<form name="webform" method="post" action="DocumentSave.aspx" onsubmit="return SaveDocument();"> 335
<input type=hidden name=RecordID value="<%=mRecordID%>"> <input type=hidden name=Template value="<%=mTemplate%>"> 336
<input type=hidden name=FileType value="<%=mFileType%>"> <input type=hidden name=EditType value="<%=mEditType%>"> 337
<input type=hidden name=HTMLPath value="<%=mHTMLPath%>"> 338
<table width="100%" class="tableframe"> 339
<tr> 340
<td> 341
<table border="1" cellspacing='0' cellpadding='0' width="100%" align="left" class="tableframe"> 342
<tr> 343
<td colspan="4" bgcolor="lightgoldenrodyellow"> 公文属性</td> 344
</tr> 345
<tr> 346
<td align="right" width="20%">标题:</td> 347
<td width="80%" colspan="3"> <asp:Label id="Lbl_Title" runat="server"></asp:Label></td> 348
</tr> 349
<tr bgcolor="#fffaf0"> 350
<td align="right" width="10%" style="HEIGHT: 20px" bgColor="floralwhite">起草人:</td> 351
<td width="40%" style="HEIGHT: 20px" bgColor="floralwhite"> <asp:Label id="Lbl_DraftDepartment" runat="server"></asp:Label></td> 352
<td align="right" width="10%" style="HEIGHT: 20px" bgColor="floralwhite">起草时间:</td> 353
<td width="40%" style="HEIGHT: 20px" bgColor="floralwhite"> <asp:Label id="Lbl_Time" runat="server"></asp:Label><asp:Label id="Lbl_SendDepartment" Width=0 runat="server"></asp:Label></td> 354
</tr> 355
<tr> 356
<td align="right" width="10%">公文类别:</td> 357
<td width="40%"> <asp:Label id="Lbl_DocumentType" runat="server"></asp:Label></td> 358
<td align="right" width="10%">公文类型:</td> 359
<td width="40%"> <asp:Label id="Lbl_DocumentTypeName" runat="server"></asp:Label></td> 360
</tr> 361
<tr bgcolor="#f0a000"> 362
<td align="right" width="10%" bgColor="floralwhite">密级:</td> 363
<td width="40%" bgColor="floralwhite"> <asp:Label id="Lbl_SecretGreadName" runat="server"></asp:Label></td> 364
<td align="right" width="10%" bgColor="floralwhite">紧急程度:</td> 365
<td width="40%" bgColor="floralwhite"> <asp:Label id="Lbl_ExigenceDegreeName" runat="server"></asp:Label></td> 366
</tr> 367
368
<tr bgcolor="#f0a000"> 369
<td align="right" width="10%" bgColor="floralwhite">流程名称:</td> 370
<td width="40%" bgColor="floralwhite"> <asp:Label id="Lbl_StreamName" runat="server"></asp:Label></td> 371
<td align="right" width="10%" bgColor="floralwhite"></td> 372
<td width="40%" bgColor="floralwhite"> </td> 373
</tr> 374
375
</table> 376
</td> 377
</tr> 378
<tr> 379
<td> 380
<table border="1" cellspacing='0' cellpadding='0' width="100%" height="600" align="left" 381
class="tableframe"> 382
<tr> 383
<td colspan="2" bgcolor="lightgoldenrodyellow"> 公文内容</td> 384
</tr> 385
<tr> 386
<!--td align=right valign=top width=64>内容</td--> 387
<td align="right" height="600"> 388
<asp:Panel id="Panel1" runat="server"></asp:Panel> 389
</td> 390
<td height="600" width="100%"> 391
<table border="0" cellspacing='0' cellpadding='0' width='100%' height="600"> 392
<tr> 393
<td bgcolor="menu"> 394
<OBJECT height="100%" width="100%" classid=clsid:3010A4BD-B471-4146-95D8-4927D5C5C79F codebase="../FairyWebOfficeOcx.ocx" name=WebOffice VIEWASTEXT> 395
<PARAM NAME="Visible" VALUE="0"> 396
<PARAM NAME="AutoScroll" VALUE="0"> 397
<PARAM NAME="AutoSize" VALUE="0"> 398
<PARAM NAME="AxBorderStyle" VALUE="1"> 399
<PARAM NAME="Caption" VALUE="FairyWebOffice"> 400
<PARAM NAME="Color" VALUE="2147483663"> 401
<PARAM NAME="Font" VALUE="MS Sans Serif"> 402
<PARAM NAME="KeyPreview" VALUE="0"> 403
<PARAM NAME="PixelsPerInch" VALUE="96"> 404
<PARAM NAME="PrintScale" VALUE="1"> 405
<PARAM NAME="Scaled" VALUE="-1"> 406
<PARAM NAME="DropTarget" VALUE="0"> 407
<PARAM NAME="HelpFile" VALUE=""> 408
<PARAM NAME="DoubleBuffered" VALUE="0"> 409
<PARAM NAME="Enabled" VALUE="-1"> 410
<PARAM NAME="Cursor" VALUE="0"> 411
<PARAM NAME="HelpType" VALUE="0"> 412
<PARAM NAME="HelpKeyword" VALUE=""> 413
<PARAM NAME="ServerPath" VALUE=""> 414
<PARAM NAME="RecordID" VALUE=""> 415
<PARAM NAME="Template" VALUE=""> 416
<PARAM NAME="FileName" VALUE=""> 417
<PARAM NAME="FileType" VALUE=""> 418
<PARAM NAME="EditType" VALUE="0"> 419
<PARAM NAME="UserName" VALUE=""> 420
<PARAM NAME="Model" VALUE="0"> 421
<PARAM NAME="Status" VALUE=""> 422
</OBJECT> 423
</td> 424
</tr> 425
<tr> 426
<td bgcolor="menu" height='20'> 427
<div id="StatusBar">状态栏</div> 428
</td> 429
</tr> 430
</table> 431
</td> 432
</tr> 433
</table> 434
</td> 435
</tr> 436
<tr> 437
<td> 438
<TABLE cellSpacing="0" cellPadding="0" width="58" align="right" border="0"> 439
<TBODY> 440
<TR> 441
<td> 442
<script language=javascript> 443
var MEditType=<%=mEditType%> 444
if(MEditType=="0") 445
{ 446
document.write('<A onclick="WebSaveLocalNoMark()" href="#"><img src="../images/save1.gif" alt="保存正式公文" border="0"></A> '); 447
} 448
else 449
{ 450
451
document.write('<A onclick="WebSaveLocalWithMark()" href="#"><img src="../images/bchj.gif" alt="保存草稿" border="0"></A> '); 452
} 453
</script> 454
</td> 455
<TD ></TD> 456
<TD> <a href="#" onclick=OpenFind('../desktop/StreamDetail.aspx?DocumentID=<% =NDoc%>')><img src=../images/viewnew.gif border=0></a></TD> 457
<TD ></TD> 458
</TR> 459
</TBODY> 460
</TABLE> 461
</td> 462
</tr> 463
</table> 464
<table id="TableIdea" border="1" cellspacing='0' cellpadding='0' width="100%" align="center" 465
class="tableframe"> 466
<tr width="100%"> 467
<td colspan="5" bgcolor="lightgoldenrodyellow" width="100%"> 公文处理意见</td> 468
</tr> 469
470
<% =Lbl_Content %> 471
<tr> 472
<td colspan="4"> 473
<div align="right"><a href="#" onclick="backFun()"><img src="../images/back1.gif" border="0"></a></div> 474
</td> 475
</tr> 476
</table> 477
<div id="menu" style=" position:absolute;visibility:hidden;top:17px;left:8px;width:100%; height::20px; background-color::red"> 478
<table id=table1 border="=0" cellpadding="0"; cellspacing="0"> 479
<tr> 480
<td> 481
</td> 482
</tr> 483
<tr> 484
<td> 485
</td> 486
</tr> 487
</table> 488
<iframe src="javascript:false" style="position::absolute; visibility:inherit;top:0px;left:8px;width:100%;height:20px; z-index:-1; filter='progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)';"> 489
</iframe> 490
</div> 491
</form> 492
</body> 493
</HTML> 494






}