示例#1
0
        private static void SaveEventCustomerResult(long eventId, long customerId, long uploadedBy)
        {
            var eventCustomerResultRepository = new EventCustomerResultRepository();
            var eventCustomerResult           = eventCustomerResultRepository.GetByCustomerIdAndEventId(customerId, eventId);

            if (eventCustomerResult == null)
            {
                eventCustomerResult = new EventCustomerResult
                {
                    CustomerId           = customerId,
                    EventId              = eventId,
                    DataRecorderMetaData =
                        new DataRecorderMetaData(uploadedBy, DateTime.Now, null)
                };
                eventCustomerResultRepository.Save(eventCustomerResult);
            }
        }
        private EventCustomerResult SaveEventCustomerResult(long eventId, long customerId, long uploadedBy, EventCustomerResult eventCustomerResult)
        {
            var eventCustomerResultRepository = new EventCustomerResultRepository();

            if (eventCustomerResult == null)
            {
                eventCustomerResult = new EventCustomerResult
                {
                    CustomerId           = customerId,
                    EventId              = eventId,
                    DataRecorderMetaData =
                        new DataRecorderMetaData(uploadedBy, DateTime.Now, null)
                };
                eventCustomerResult = eventCustomerResultRepository.Save(eventCustomerResult);
            }

            return(eventCustomerResult);
        }