?????????????????
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class _Default : System.Web.UI.Page
{
public const string MQNAME1 = "ManageTest1";
public const string MQNAME2 = "ManageTest2";
public readonly MQHelp MQHELP = new MQHelp();
protected void Page_Load(object sender?? EventArgs e)
{
if (!IsPostBack)
{
List<string> list = new MQHelp().GetALLQueue(MQNAME1);
list.ForEach(s => ddlQueueList.Items.Add(new ListItem(s)));
}
}
protected void Button1_Click(object sender?? EventArgs e)
{
Button but = sender as Button;
switch (but.Text)
{
case "??????":
MQHELP.CreateQueue(MQNAME1?? txtQueue.Text.Trim());
break;
case "???????":
MQHELP.DelQueue(MQNAME1?? txtQueue.Text.Trim());
break;
case "??????":
MQHELP.WriteMessage(MQNAME1?? ddlQueueList.SelectedValue?? txtMessage.Text.Trim());
break;
case "??????":
Literal1.Text = MQHELP.ReadMessage(MQNAME1?? ddlQueueList.SelectedValue);
break;
case "?????????":
MQHELP.CreateQueue(txtTMName.Text?? txtTName.Text.Trim()?? true);
break;
case "??????????":
MQHELP.DelQueue(txtTMName.Text?? txtTName.Text.Trim());
break;
case "?????????":
MQHELP.CreateRemoteQueue(txtRMName.Text?? txtRQName.Text?? txtRMTName.Text?? txtRMTQName.Text?? txtRTQName.Text);
break;
case "??????????":
MQHELP.CreateChannelBySend(txtCMName.Text?? txtCCName.Text?? txtCTName.Text?? txtCip.Text);
break;
case "??????????":
MQHELP.CreateChannelByReceive(txtCMName.Text?? txtCCName.Text);
break;
default:
break;
}
}
}