示例#1
0
        public static void ucMessageWorkingErrorAdded(WorkingErrorAddedEventArgs eventArgs, IDomainDataProvider dataProvider)
        {
            DataCollectFacade dataCollectFacade = new DataCollectFacade(dataProvider);

            string userCode      = ApplicationService.Current().UserCode;
            string resCode       = ApplicationService.Current().LoginInfo.Resource.ResourceCode;
            string segCode       = ApplicationService.Current().LoginInfo.Resource.SegmentCode;
            string ssCode        = ApplicationService.Current().LoginInfo.Resource.StepSequenceCode;
            string shiftTypeCode = ApplicationService.Current().LoginInfo.Resource.ShiftTypeCode;

            string errorMessageCode = string.Empty;

            if (eventArgs.ErrorMessage.Type == MessageType.Error)
            {
                errorMessageCode = eventArgs.ErrorMessage.Body;
            }
            if (eventArgs.ErrorMessage.Exception != null)
            {
                errorMessageCode = eventArgs.ErrorMessage.Exception.Message;
            }

            dataCollectFacade.LogWorkingError(userCode, resCode, segCode, ssCode, shiftTypeCode,
                                              WorkingErrorFunctionType.CS, eventArgs.Function, eventArgs.InputContent, errorMessageCode, eventArgs.ErrorText);
        }
示例#2
0
 private void ucMessageInfo_WorkingErrorAdded(object sender, WorkingErrorAddedEventArgs e)
 {
     CSHelper.ucMessageWorkingErrorAdded(e, this.DataProvider);
 }