| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Text;
- using System.Windows.Forms;
- using Core.Mes.ClientFrameWork;
- using System.Configuration;
- namespace ConnectionServer
- {
- public partial class FrmConnection : Form
- {
- public FrmConnection()
- {
- InitializeComponent();
- string url = ConfigurationManager.AppSettings["RemoteServerUrl"];
- ClientCommon._RemotingHelp.InitServerUrlList("ServerCommon", url);
- }
- private void button1_Click(object sender, EventArgs e)
- {
- this.listBox1.Items.Clear();
- for (int i = 0; i < 10; i++)
- {
- string strOut = "";
- object obj = ClientCommon._RemotingHelp.ExecuteMethod("ServerCommon", "Core.Mes.ServerCommon.UserInfoManager", "GetTestData",
- null, out strOut);
- if (strOut != "")
- {
- ShowLog("失败:" + strOut);
- }
- if (obj != null)
- {
- ShowLog("成功:" + strOut);
- //DateTime dtime = Convert.ToDateTime(obj);
- //ShowLog("成功:" + dtime.ToString("yyyy-MM-dd"));
- }
- }
- }
- private void ShowLog(string log)
- {
- this.listBox1.Items.Add(log);
- this.listBox1.SelectedIndex = this.listBox1.Items.Count - 1;
- }
- private void button2_Click(object sender, EventArgs e)
- {
-
-
- string strOut = "";
- object obj = ClientCommon._RemotingHelp.ExecuteMethod("ServerCommon", "Core.Mes.ServerCommon.UserInfoManager", "GetTestData",
- null, out strOut);
- if (strOut != "")
- {
- ShowLog("失败:" + strOut);
- }
-
- }
- }
- }
|