|
楼主 |
发表于 2005-12-27 15:19:51
|
显示全部楼层
<%@ Page language="c#" Codebehind="Business.aspx.cs" AutoEventWireup="false" Inherits="OfficeManage.Business" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>Business业务架构平台</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</HEAD>
<BODY leftmargin="0" topmargin="0">
<OBJECT id="BusinessX" codeBase="BusinessX.CAB#version=3,0,5,2122" height="100%" hspace="0"
width="100%" align="center" vspace="0" classid="clsid:B557E10A-2EA2-46C9-8F5F-3A3C9D471AE9" VIEWASTEXT>
<ARAM NAME="Visible" VALUE="0">
<ARAM NAME="AutoScroll" VALUE="0">
<ARAM NAME="AutoSize" VALUE="0">
<ARAM NAME="AxBorderStyle" VALUE="0">
<ARAM NAME="Caption" VALUE="Business">
<ARAM NAME="Color" VALUE="2147483653">
<ARAM NAME="Font" VALUE="宋体">
<ARAM NAME="KeyPreview" VALUE="0">
<ARAM NAME="ixelsPerInch" VALUE="96">
<PARAM NAME="PrintScale" VALUE="1">
<PARAM NAME="Scaled" VALUE="-1">
<PARAM NAME="DropTarget" VALUE="0">
<PARAM NAME="HelpFile" VALUE="">
<PARAM NAME="DoubleBuffered" VALUE="0">
<PARAM NAME="Enabled" VALUE="-1">
<PARAM NAME="Cursor" VALUE="0">
<PARAM NAME="HelpType" VALUE="1">
<PARAM NAME="HelpKeyword" VALUE="">
<PARAM NAME="ServerURL" VALUE="">
<PARAM NAME="MultiWindow" VALUE="0">
<PARAM NAME="ThreadIdle" VALUE="0">
<PARAM NAME="IdleInterval" VALUE="133">
</OBJECT>
<span runat="server" id="objBusiness"></span>
</BODY>
</HTML>
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Configuration;
using System.Security.Cryptography;
using System.IO;
namespace OfficeManage
{
/// <summary>
/// Business 的摘要说明。
/// </summary>
public class Business : System.Web.UI.Page
{
protected System.Web.UI.HtmlControls.HtmlGenericControl objBusiness;
private void Page_Load(object sender, System.EventArgs e)
{
string user_id="wangb";
if(!Page.IsPostBack)
{
//
objBusiness.InnerHtml="<script type=\"text/javascript\">";
objBusiness.InnerHtml+="document.title = BusinessX.DisplayName;";
objBusiness.InnerHtml+="BusinessX.ServerURL = \""+ConfigurationSettings.AppSettings["ServerURL"].ToString()+"\";";
//objBusiness.InnerHtml+="BusinessX.ShowSplash();";
objBusiness.InnerHtml+="BusinessX.UpdateVersion();";
objBusiness.InnerHtml+="BusinessX.Init();";
//objBusiness.InnerHtml+="BusinessX.CloseSplash();";
objBusiness.InnerHtml+="BusinessX.Logon(\""+user_id+"\",\"\");";
objBusiness.InnerHtml+="BusinessX.Run(\"\", \"\", \"\", \"\");";
objBusiness.InnerHtml+="document.title = BusinessX.DisplayName;";
objBusiness.InnerHtml+="</script>";
}
}
static public string Decrypt(Byte[] input, string password)
{
TripleDESCryptoServiceProvider des = new TripleDESCryptoServiceProvider();
PasswordDeriveBytes derive = new PasswordDeriveBytes(password,null);
byte[] IV = new Byte[8];
byte[] Key= derive.CryptDeriveKey("TripleDES", "SHA1", 0, IV);
des.Mode = CipherMode.ECB;
MemoryStream ms =
new System.IO.MemoryStream(input);
CryptoStream cryptostream =
new CryptoStream(ms,des.CreateDecryptor(Key,IV),CryptoStreamMode.Read);
System.IO.StreamReader sr =
new StreamReader(cryptostream,System.Text.Encoding.Unicode);
return sr.ReadToEnd();
}
#region Web 窗体设计器生成的代码
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: 该调用是 ASP.NET Web 窗体设计器所必需的。
//
InitializeComponent();
base.OnInit(e);
}
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion
}
} |
|