private void button2_Click(object sender, EventArgs e) { WCFProxyMSMQ objWCF = new WCFProxyMSMQ(); IMsgService client = objWCF.GetProxy <IMsgService>(1); client.WriteMsg(txtInfo.Text.Trim()); MessageBox.Show("发送成功C"); }
private void button1_Click(object sender, EventArgs e) { WCFProxyMSMQ objWCF = new WCFProxyMSMQ(); ILogService client = objWCF.GetProxy <ILogService>(1); LogInfo loginfo = new LogInfo(); loginfo.ID = Guid.NewGuid().ToString(); loginfo.Info = txtInfo.Text.Trim(); loginfo.CreateDate = DateTime.Now; client.SendMessageB(loginfo, 1); MessageBox.Show("发送成功B"); }
protected void btnSend_Click(object sender, EventArgs e) { WCFProxyMSMQ objWCF = new WCFProxyMSMQ(); ILogService client = objWCF.GetProxy <ILogService>(); LogInfo loginfo = new LogInfo(); loginfo.ID = Guid.NewGuid().ToString(); loginfo.Info = txtInfo.Text.Trim(); loginfo.CreateDate = DateTime.Now; client.SendMessage(loginfo); Response.Write("发送成功"); }