Esempio n. 1
0
 private static void ConvertTime(FaultRecordService.time startTime, DateTime startTime1)
 {
     startTime.day     = startTime1.Day;
     startTime.hour    = startTime1.Hour;
     startTime.minute  = startTime1.Minute;
     startTime.month   = startTime1.Month;
     startTime.msecond = startTime1.Millisecond;
     startTime.second  = startTime1.Second;
     startTime.year    = startTime1.Year;
 }
Esempio n. 2
0
        private void btnLineQuery_Click(object sender, EventArgs e)
        {
            int    FRrtn   = -1;
            string FRerror = "";

            try
            {
                雷电定位测试工具.FaultRecordService.FaultRecordServiceService FRService = new FaultRecordService.FaultRecordServiceService();
                雷电定位测试工具.FaultRecordService.time           startTime            = new FaultRecordService.time(); // tbxWaveStartTime.Text;
                雷电定位测试工具.FaultRecordService.time           endTime          = new FaultRecordService.time();     // tbxWaveStartTime.Text;
                雷电定位测试工具.FaultRecordService.faultRecordRtn FRfaultRecordRtn = new FaultRecordService.faultRecordRtn();

                DateTime startTime1 = Convert.ToDateTime(tbxWaveStartTime.Text);
                DateTime endTime1   = Convert.ToDateTime(tbxWaveEndTime.Text);
                writeLog("datetime类型 startTime1" + startTime1.ToString() + "endTime1" + endTime1.ToString(), DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffffff"));

                try
                {
                    ConvertTime(startTime, startTime1);
                    ConvertTime(endTime, endTime1);
                }
                catch (Exception ex)
                {
                    writeLog("异常" + ex.ToString(), DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffffff"));
                }

                writeLog("***time类型 startTime" + startTime.ToString() + "endtime" + endTime.ToString(), DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffffff"));

                FRfaultRecordRtn = FRService.getFaultRecordByStationName(tbxdeviceOneName.Text, startTime, endTime);
                //FRService.getFaultRecordByDeviceOneName(tbxdeviceOneName.Text, startTime, endTime);
                // FRService.getFaultRecordByStationName(tbxdeviceOneName.Text, startTime, endTime);

                //FRrtn = FRService.getFaultRecordByStationName(tbxdeviceOneName.Text, startTime, endTime).rtn;
                //FRerror = FRService.getFaultRecordByStationName(tbxdeviceOneName.Text, startTime, endTime).error;
                //FRfaultRecordRtn.faultRecords = FRService.getFaultRecordByStationName(tbxdeviceOneName.Text, startTime, endTime).faultRecords;

                FRrtn   = FRfaultRecordRtn.rtn;
                FRerror = FRfaultRecordRtn.error;
                writeLog(FRrtn.ToString() + FRerror.ToString(), DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffffff"));


                writeLog(FRfaultRecordRtn.faultRecords.Length.ToString(), DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffffff"));

                for (int i = 0; i < FRfaultRecordRtn.faultRecords.Length; i++)
                {
                    writeLog("返回rtn:" + FRrtn.ToString() + "返回error:" + FRerror + "返回faultRecordRtn" + "编号" + FRfaultRecordRtn.faultRecords[i].id.ToString() + "一次设备名" + FRfaultRecordRtn.faultRecords[i].deviceOneName.ToString() + "故障时间毫秒值" + FRfaultRecordRtn.faultRecords[i].faultTime.month.ToString() + "主站名" + FRfaultRecordRtn.faultRecords[i].stationName.ToString() + "录波器名" + FRfaultRecordRtn.faultRecords[i].recorderName.ToString() + "故障相别" + FRfaultRecordRtn.faultRecords[i].phase.ToString() + "故障测距" + FRfaultRecordRtn.faultRecords[i].location.ToString(), DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffffff"));
                }
            }
            catch (Exception ex)
            {
                writeLog("异常" + ex.ToString(), DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffffff"));
            }
            // FRerror = FRService.getFaultRecordByDeviceOneName(tbxdeviceOneName.Text,,).error;
            //FaultRecordServiceService.getFaultRecordByDeviceOneName()
        }
Esempio n. 3
0
 /// <remarks/>
 public void getFaultRecordByRecorderNameAsync(string arg0, time arg1, time arg2, object userState)
 {
     if ((this.getFaultRecordByRecorderNameOperationCompleted == null))
     {
         this.getFaultRecordByRecorderNameOperationCompleted = new System.Threading.SendOrPostCallback(this.OngetFaultRecordByRecorderNameOperationCompleted);
     }
     this.InvokeAsync("getFaultRecordByRecorderName", new object[] {
         arg0,
         arg1,
         arg2
     }, this.getFaultRecordByRecorderNameOperationCompleted, userState);
 }
Esempio n. 4
0
 /// <remarks/>
 public void getFaultRecordByRecorderNameAsync(string arg0, time arg1, time arg2)
 {
     this.getFaultRecordByRecorderNameAsync(arg0, arg1, arg2, null);
 }
Esempio n. 5
0
        public faultRecordRtn getFaultRecordByRecorderName([System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] string arg0, [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] time arg1, [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] time arg2)
        {
            object[] results = this.Invoke("getFaultRecordByRecorderName", new object[] {
                arg0,
                arg1,
                arg2
            });

            return((faultRecordRtn)(results[0]));
        }
Esempio n. 6
0
 /// <remarks/>
 public void getFaultRecordByMainstationNameAsync(string arg0, time arg1, time arg2)
 {
     this.getFaultRecordByMainstationNameAsync(arg0, arg1, arg2, null);
 }