📄 sendfile.aspx
字号:
<%@ Page language="c#" Codebehind="SendFile.aspx.cs" AutoEventWireup="false" Inherits="OI.SendMessage.SendFile" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>SendFile</title>
<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
<meta content="C#" name="CODE_LANGUAGE" charset ="gb2312">
<meta content="JavaScript" name="vs_defaultClientScript">
<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
<style type="text/css">@import url( ../test.css );
</style>
<script>
function OpenFind(strUrl,ID)
{
if (Form1.RadioButtonListSelectMethod1.checked )
{
window.open(strUrl,"GetDept","top=20,left=100,toolbar=0,,status=1,menubar=0,scrollbars=1,resizable=1,width=500,height=600")
}
else
{
saveAsSendAddDepartment(ID);
}
}
function OpenFinds(strUrl)
{
window.open(strUrl,"GetDept","top=20,left=100,toolbar=0,,status=1,menubar=0,scrollbars=1,resizable=1,width=500,height=600")
}
function saveAsSendAddDepartment(ID)
{
var values=inputdepartment();
if (values ==""|| values==null)
{
}
else
{
i=eval("Form1."+ID +".length") ;
// document.write (values);
eval("Form1."+ID+".options["+i+"]=new Option('"+values+"','"+values+"')");
// alert( 'Form1.'+ID+'.options['+i+']=new Option("'+values+'","'+values+'")');
saveAsSendAddDepartment(ID)
}
}
function deleteDepartment(id)
{
try
{
var i=eval("Form1."+id+".selectedIndex");
eval("Form1."+id+".options["+i+"]=null");
i;
eval("Form1."+id+".options["+i+"].selected=true")
}
catch(er){}
}
/*******************************
*这里的Form1就是其它页面的webform
*,因为在弹出对话框里,写的是Form1,
*并且这个弹出对话框有很多地方使用了,
*所以不能修改。
*
*周建波 2004.3.10
********************************/
function StatusMsg(mString){
StatusBar.innerText=mString;
}
function Load(){
try{
Form1.WebOffice.ServerPath="<%=mServerUrl%>";
Form1.WebOffice.RecordID="<%=mRecordID%>";
Form1.WebOffice.Template="<%=mTemplate%>";
Form1.WebOffice.FileName="<%=mFileName%>";
Form1.WebOffice.FileType="<%=mFileType%>";
Form1.WebOffice.EditType="<%=mEditType%>";
Form1.WebOffice.UserName="<%=mUserName%>";
Form1.WebOffice.WebOpen(); //打开该文档
document.getElementById('menu').style.visibility='visible';
ShowRevision(this);
StatusMsg(Form1.WebOffice.Status);
}
catch(e)
{
}
}
function UnLoad(){
try{
if (!Form1.WebOffice.WebClose()){
StatusMsg(Form1.WebOffice.Status);
}else{
StatusMsg("关闭文档...");
}
}catch(e){}
}
function ShowRevision(mObject){
var mFlag=mObject.value;
if (mFlag=="显示痕迹"){
mObject.value="隐藏痕迹";
Form1.WebOffice.WebShow(true);
StatusMsg("显示痕迹...");
}else{
mObject.value="显示痕迹";
Form1.WebOffice.WebShow(false);
StatusMsg("隐藏痕迹...");
}
}
function LoadDocument(){
StatusMsg("正在打开文档...");
if (!Form1.WebOffice.WebOpen()){
StatusMsg(Form1.WebOffice.Status);
}else{
StatusMsg(Form1.WebOffice.Status);
}
}
function SaveDocument(){
if (Form1.EditType.value=="0"){
alert("你在查看状态,不能保存!");
return false;
}
if (!Form1.WebOffice.WebSave()){
StatusMsg(Form1.WebOffice.Status);
return false;
}else{
StatusMsg(Form1.WebOffice.Status);
return true;
}
}
function WebFocus(){
Form1.WebOffice.WebFocus();
StatusMsg("文档已刷新...");
}
function WebOpenVersion(){
Form1.WebOffice.WebOpenVersion();
StatusMsg(Form1.WebOffice.Status);
}
function WebSaveVersion(){
Form1.WebOffice.WebSaveVersion();
StatusMsg(Form1.WebOffice.Status);
}
function LoadBookmarks(){
StatusMsg("正在填充模扳...");
if (!Form1.WebOffice.WebLoadBookmarks()){
StatusMsg(Form1.WebOffice.Status);
}else{
StatusMsg(Form1.WebOffice.Status);
}
}
function SetBookmarks(vbmName,vbmValue){
if (!Form1.WebOffice.WebSetBookmarks(vbmName,vbmValue)){
StatusMsg(Form1.WebOffice.Status);
}else{
StatusMsg(Form1.WebOffice.Status);
}
}
function GetBookmarks(vbmName){
var vbmValue;
vbmValue=Form1.WebOffice.WebGetBookmarks(vbmName);
return vbmValue;
}
function WebOpenPrint(){
try{
Form1.WebOffice.WebOpenPrint();
StatusMsg(Form1.WebOffice.Status);
}catch(e){}
}
function WebOpenPageSetup(){
try{
if (Form1.WebOffice.FileType==".doc"){
Form1.WebOffice.WebObj.Application.Dialogs(178).Show();
}else{
Form1.WebOffice.WebObj.Application.Dialogs(7).Show;
}
}catch(e){
}
}
function WebOpenPicture(){
try{
Form1.WebOffice.WebOpenPicture();
StatusMsg(Form1.WebOffice.Status);
}catch(e){}
}
function WebOpenSignature(){
try{
Form1.WebOffice.WebOpenSignature();
StatusMsg(Form1.WebOffice.Status);
}catch(e){}
}
function WebShowSignature(){
try{
Form1.WebOffice.WebShowSignature();
StatusMsg(Form1.WebOffice.Status);
}catch(e){}
}
function WebHideSignature(){
try{
Form1.WebOffice.WebhideSignature();
StatusMsg(Form1.WebOffice.Status);
}catch(e){}
}
function WebCheckSignature(){
try{
var i=Form1.WebOffice.WebCheckSignature();
StatusMsg(i);
}catch(e){}
}
function WebOpenBookMarks(){
try{
Form1.WebOffice.WebOpenBookmarks();
StatusMsg(Form1.WebOffice.Status);
}catch(e){}
}
function WebSaveLocal(){
try{
Form1.WebOffice.WebObj.Application.ActiveDocument.AcceptAllRevisions();
Form1.WebOffice.WebSaveLocal();
StatusMsg(Form1.WebOffice.Status);
return true;
}catch(e){
return false;
}
}
function WebOpenLocal(){
try{
Form1.WebOffice.WebOpenLocal();
StatusMsg(Form1.WebOffice.Status);
}catch(e){}
}
function WebSaveAsHtml(){
try{
if (Form1.WebOffice.WebSaveAsHtml())
{
Form1.HTMLPath.value="HTML/<%=mRecordID%>.htm";
}
StatusMsg(Form1.WebOffice.Status);
}catch(e){}
}
function WebToolsVisible(ToolName,Visible){
try{
Form1.WebOffice.WebToolsVisible(ToolName,Visible);
StatusMsg(Form1.WebOffice.Status);
}catch(e){}
}
function WebToolsEnable(ToolName,ToolIndex,Enable){
try{
Form1.WebOffice.WebToolsEnable(ToolName,ToolIndex,Enable);
StatusMsg(Form1.WebOffice.Status);
}catch(e){}
}
function WebGetWordContent(){
try{
alert(Form1.WebOffice.WebObj.Content.Text);
}catch(e){}
}
function WebSetWordContent(){
var mText=window.prompt("请输入内容:","测试内容");
if (mText==null){
return (false);
}
else
{
//下面为显示选中的文本
//alert(Form1.WebOffice.WebObj.Application.Selection.Range.Text);
//下面为在当前光标出插入文本
Form1.WebOffice.WebObj.Application.Selection.Range.InsertAfter (mText+"\n");
//下面为在第一段后插入文本
//Form1.WebOffice.WebObj.Application.ActiveDocument.Range(1).InsertAfter(mText);
}
}
function WebGetExcelContent(){
Form1.WebOffice.WebObj.Application.Sheets(1).Select;
Form1.WebOffice.WebObj.Application.Range("C5").Select;
Form1.WebOffice.WebObj.Application.ActiveCell.FormulaR1C1 = "126";
Form1.WebOffice.WebObj.Application.Range("C6").Select;
Form1.WebOffice.WebObj.Application.ActiveCell.FormulaR1C1 = "446";
Form1.WebOffice.WebObj.Application.Range("C7").Select;
Form1.WebOffice.WebObj.Application.ActiveCell.FormulaR1C1 = "556";
Form1.WebOffice.WebObj.Application.Range("C5:C8").Select;
Form1.WebOffice.WebObj.Application.Range("C8").Activate;
Form1.WebOffice.WebObj.Application.ActiveCell.FormulaR1C1 = "=SUM(R[-3]C:R[-1]C)";
Form1.WebOffice.WebObj.Application.Range("D8").Select;
alert(Form1.WebOffice.WebObj.Application.Range("C8").Text);
}
function WebInsertFile(){
Form1.WebOffice.WebSetMsgByName("COMMAND","INSERTFILE");
Form1.WebOffice.Template="模板一.doc";
if (Form1.WebOffice.WebLoadTemplate()){
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -