示例#1
0
        /// <summary>
        /// Update a customer event
        /// </summary>
        /// <param name="customerEvent">Customer Event</param>
        public void UpdateCustomerEvent(CameleoCustomerEvent customerEvent)
        {
            if (customerEvent == null)
            {
                throw new ArgumentNullException("customerevent");
            }

            _customerEventRepository.Update(customerEvent);


            //event notification
            _eventPublisher.EntityUpdated(customerEvent);
        }
示例#2
0
 public CameleoCustomerEventViewModel(CameleoCustomerEvent pCustomerEvent, string pCustomerUserName, string pAcceptedStatusString)
 {
     Id               = pCustomerEvent.Id;
     EventUserId      = pCustomerEvent.EventUserId;
     CustomerId       = pCustomerEvent.CustomerId;
     CustomerUserName = pCustomerUserName;
     Paid             = pCustomerEvent.Paid;
     Accepted         = pCustomerEvent.Accepted;
     AcceptedStatus   = pCustomerEvent.AcceptedStatus;
     AcceptedImageUse = pCustomerEvent.AcceptedImageUse;
     CreatedOnUtc     = pCustomerEvent.CreatedOnUtc;
     Result           = "";
 }
示例#3
0
        /// <summary>
        /// Inserts a customer event
        /// </summary>
        /// <param name="eventUserId">Event user identifier</param>
        /// <param name="customerId">Customer identifier</param>
        public void InsertCustomerEvent(int eventUserId, int customerId)
        {
            var tmpCustomerEvent = new CameleoCustomerEvent();

            tmpCustomerEvent.CustomerId       = customerId;
            tmpCustomerEvent.EventUserId      = eventUserId;
            tmpCustomerEvent.Accepted         = false;
            tmpCustomerEvent.AcceptedStatus   = (int)AcceptedStatus.ToBeCompleted;
            tmpCustomerEvent.AcceptedImageUse = false;
            tmpCustomerEvent.Paid             = false;
            tmpCustomerEvent.CreatedOnUtc     = DateTime.Now;

            _customerEventRepository.Insert(tmpCustomerEvent);

            //event notification
            _eventPublisher.EntityInserted(tmpCustomerEvent);
        }