Ejemplo n.º 1
0
        /// <summary>
        /// call SOAP function get DER
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void getButton_Click(object sender, EventArgs e)
        {
            DERMSInterface.CIM cs = new DERMSInterface.CIM(_cim);

            try
            {
                // call SOAP Get DER
                string[] results = cs.requestDERGroupMembers(_group.Mrid);

                // takes list of DER members, add new lines and display to our result text box
                System.Text.StringBuilder buffer = new StringBuilder();
                if (results != null)
                {
                    foreach (string s in results)
                    {
                        buffer.Append(s + Environment.NewLine);
                    }
                }
                this.resultText.Text = buffer.ToString();

                logControl1.addEntry(LogControl.entryType.OK, "Message Sent...", cs.LastMessageSent);
                logControl1.addEntry(LogControl.entryType.OK, "Message Received...", cs.LastMessageReceived);
            }
            catch (Exception ex)
            {
                if (cs.LastMessageSent.Length > 0)
                {
                    logControl1.addEntry(LogControl.entryType.OK, "Message Sent...", cs.LastMessageSent);
                }
                logControl1.addEntry(LogControl.entryType.FAIL, "Exception...", ex.ToString());
            }
        }
Ejemplo n.º 2
0
 public void TestMethod4()
 {
     DERMSInterface.CIM c     = DERMSInterface.CIM.loadConfigFile("testConfig.xml");
     String[]           derms = c.requestDERGroupMembers("1234-5678");
     Console.WriteLine("xml : " + c.LastMessageSent + c.LastMessageReceived);
     Assert.IsTrue(c.LastMessageSent.Length > 100);
     Assert.IsTrue(c.LastMessageReceived.Length > 100);
     Assert.IsNotNull(derms);
     Assert.AreEqual(derms.Length, 1);
     Assert.IsTrue(derms[0].Equals("name1"));
 }
Ejemplo n.º 3
0
        /// <summary>
        /// call SOAP function get DER
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void getButton_Click(object sender, EventArgs e)
        {
            DERMSInterface.CIM cs = new DERMSInterface.CIM(_cim);

            try
            {
                // call SOAP Get DER
                string[] results = cs.requestDERGroupMembers(_group.Mrid);

                // takes list of DER members, add new lines and display to our result text box
                System.Text.StringBuilder buffer = new StringBuilder();
                if (results != null)
                {
                    foreach (string s in results)
                        buffer.Append(s + Environment.NewLine);
                }
                this.resultText.Text = buffer.ToString();

                logControl1.addEntry(LogControl.entryType.OK, "Message Sent...", cs.LastMessageSent);
                logControl1.addEntry(LogControl.entryType.OK, "Message Received...", cs.LastMessageReceived);
            }
            catch (Exception ex)
            {
                if (cs.LastMessageSent.Length > 0)
                    logControl1.addEntry(LogControl.entryType.OK, "Message Sent...", cs.LastMessageSent);
                logControl1.addEntry(LogControl.entryType.FAIL, "Exception...", ex.ToString());
            }
        }