103 lines
4.1 KiB
C#
103 lines
4.1 KiB
C#
using SuperMap.RealEstate.CoreFrameWork;
|
|
using SuperMap.RealEstate.Enums;
|
|
using SuperMap.RealEstate.Launcher_WebSite;
|
|
using SuperMap.RealEstate.Web.UI.WebControls;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Configuration;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using System.Web.UI;
|
|
//using SuperMap.RealEstate.la
|
|
using System.Web.UI.WebControls;
|
|
|
|
namespace SuperMap.RealEstate.SoftWare
|
|
{
|
|
public partial class AppTest : SuperMap.RealEstate.Web.UI.Page
|
|
{
|
|
public string GetEndPointAddressUrl(string ContractKey)
|
|
{
|
|
string _Result = string.Empty;
|
|
try
|
|
{
|
|
_Result = ConfigurationManager.AppSettings[ContractKey];
|
|
if (string.IsNullOrEmpty(_Result))
|
|
_Result = ConfigurationManager.AppSettings["NetworkDeployed_ServicePoint"];
|
|
}
|
|
catch
|
|
{
|
|
_Result = ConfigurationManager.AppSettings["NetworkDeployed_ServicePoint"];
|
|
}
|
|
return _Result;
|
|
}
|
|
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
if (IsPostBack)
|
|
return;
|
|
//Alert(GetEndPointAddressUrl("TestApp"));
|
|
TextBoxExAppName.Items.Add(new ListItemEx("TestApp"));
|
|
TextBoxExAppName.Items.Add(new ListItemEx("ToolKits.CodeGenerator"));
|
|
TextBoxExAppName.Items.Add(new ListItemEx("ToolKits.OracleComparison"));
|
|
TextBoxExAppName.Items.Add(new ListItemEx("ToolKits.OracleSequenceBuilder"));
|
|
TextBoxExAppName.Items.Add(new ListItemEx("ToolKits.OracleTransferBuilder"));
|
|
|
|
TextBoxExArguments.Text = "A=1,B=2";
|
|
TextBoxExPassportGuid.Text = Guid.NewGuid().ToString();
|
|
TextBoxExUserName.Text = "System";
|
|
TextBoxExModule_ID.Text = "";
|
|
TextBoxExProInst_ID.Text = "";
|
|
TextBoxExNowActInst_ID.Text = "";
|
|
DropDownListEx_Type.Items.Add(new ListItemEx( LaunchType.AppRuns.ToString()));
|
|
DropDownListEx_Type.Items.Add(new ListItemEx(LaunchType.Install.ToString()));
|
|
Button3.OnClientClick = GetRedirectClientScript(aaa.ClientID,
|
|
"/SoftWare/Launcher.exe", false, "")+"return false;";
|
|
NewMethod();
|
|
LaunchInfo _LaunchInfo = new LaunchInfo(LaunchType.Install);
|
|
HyperLink2.NavigateUrl = _LaunchInfo.GetUrlProtocol();
|
|
}
|
|
|
|
private void NewMethod()
|
|
{
|
|
LaunchInfo _LaunchInfo = new LaunchInfo((LaunchType)Enum.Parse(typeof(LaunchType),
|
|
DropDownListEx_Type.Value));
|
|
_LaunchInfo.AppName = TextBoxExAppName.SelectedItem.Text;
|
|
_LaunchInfo.Arguments = TextBoxExArguments.Text;
|
|
_LaunchInfo.PassportGuid = TextBoxExPassportGuid.Text;
|
|
_LaunchInfo.UserName = TextBoxExUserName.Text;
|
|
_LaunchInfo.ProInst_ID = TextBoxExProInst_ID.Text;
|
|
_LaunchInfo.Module_ID = TextBoxExModule_ID.Text;
|
|
_LaunchInfo.NowActInst_ID = TextBoxExNowActInst_ID.Text;
|
|
TextBoxEx1.Text = _LaunchInfo.GetUrlProtocol();
|
|
HyperLink1.NavigateUrl= TextBoxEx1.Text;
|
|
}
|
|
|
|
protected void Button1_Click(object sender, EventArgs e)
|
|
{
|
|
NewMethod();
|
|
}
|
|
|
|
protected void Button2_CallBackClick(object sender, Web.UI.WebControls.ClientSetEventArgs e)
|
|
{
|
|
NewMethod();
|
|
e.ExcuteClientScript(GetAlertStr(this.GetRedirectClientScript(
|
|
aaa.ClientID, TextBoxEx1.Text, false, "")));
|
|
e.ExcuteClientScript(this.GetRedirectClientScript(
|
|
aaa.ClientID, TextBoxEx1.Text, false, ""));
|
|
}
|
|
|
|
protected void DropDownListEx_Type_CallBackSetControl(object sender, ClientSetEventArgs e)
|
|
{
|
|
NewMethod();
|
|
e.SetValue(TextBoxEx1);
|
|
e.AddAttribute(HyperLink1.ClientID, "href", TextBoxEx1.Text);
|
|
}
|
|
|
|
protected void TextBoxExAppName_CallBackSetControl(object sender, ClientSetEventArgs e)
|
|
{
|
|
NewMethod();
|
|
e.SetValue(TextBoxEx1);
|
|
e.AddAttribute(HyperLink1.ClientID, "href", TextBoxEx1.Text);
|
|
}
|
|
}
|
|
} |