Esempio n. 1
0
        private void btnCallAddBizMessage_Click(object sender, RoutedEventArgs e)
        {
            MonitoringServiceClient msc = new MonitoringServiceClient();

            var rawMessage = new RmsReportMonitoringRaw();

            rawMessage.ClientCode       = txtClientCode.Text;
            rawMessage.DeviceCode       = txtDeviceCode.Text;
            rawMessage.MessageGroupCode = txtMessageGroupCode.Text;
            rawMessage.Message          = txtMessage.Text;
            rawMessage.MessageDateTime  = DateTime.Now;

            if (!string.IsNullOrEmpty(txtMonitoringProfileDeviceID.Text.Trim()))
            {
                rawMessage.MonitoringProfileDeviceId = Convert.ToInt32(txtMonitoringProfileDeviceID.Text);
            }

            rawMessage.MessageRemark = string.IsNullOrEmpty(txtMessageRemark.Text) ? null : txtMessageRemark.Text;

            msc.AddBusinessMessage(rawMessage);
        }
Esempio n. 2
0
        private void btnCallAddWebsiteMessage_Click(object sender, RoutedEventArgs e)
        {
            MonitoringServiceClient msc = new MonitoringServiceClient();

            var rawMessage = new RmsReportMonitoringRaw();

            rawMessage.ClientCode       = txtClientCode.Text;
            rawMessage.MessageGroupCode = txtMessageGroupCode.Text;
            rawMessage.Message          = txtMessage.Text;
            rawMessage.MessageDateTime  = DateTime.Now;

            if (!string.IsNullOrEmpty(txtWebsiteMonitoringID.Text.Trim()))
            {
                rawMessage.WebsiteMonitoringId = Convert.ToInt32(txtWebsiteMonitoringID.Text);
            }

            rawMessage.MessageRemark = string.IsNullOrEmpty(txtMessageRemark.Text) ? null : txtMessageRemark.Text;
            List <RmsReportMonitoringRaw> list = new List <RmsReportMonitoringRaw>();

            list.Add(rawMessage);
            msc.AddWebsiteMessage(list);
        }