Пример #1
0
        private void btnRunEventLog_Click(object sender, EventArgs e)
        {
            PCRunEventLog pcRunEventLog = pcRestProxy.GetRunEventLog(int.Parse(txtRunID.Text));

            if (pcRunEventLog != null)
            {
                dgvForAll.DataSource     = pcRunEventLog.RecordsList;
                btnRunEventLog.Text      = "pcRunResults received";
                btnRunEventLog.BackColor = Color.Green;
            }
            else
            {
                btnRunEventLog.Text      = "TestData not received";
                btnRunEventLog.BackColor = Color.Red;
            }
        }
Пример #2
0
        public PCRunEventLog GetRunEventLog(int runId)
        {
            PCErrorResponse pcErrorResponse = new PCErrorResponse("", 0);

            try
            {
                return(_pcRestProxy.GetRunEventLog(runId, ref pcErrorResponse));
            }
            catch (Exception e)
            {
                _fileLog.Write(LogMessageType.Error, string.Format("GetRunEventLog failed. Error: " + e.Message));
                if (pcErrorResponse.ErrorCode > 0)
                {
                    _fileLog.Write(LogMessageType.Error, string.Format("GetRunEventLog failed, ExceptionMessage: {0}, ErrorCode: {1}", pcErrorResponse.ExceptionMessage, pcErrorResponse.ErrorCode));
                }
            }
            return(null);
        }