Exemplo n.º 1
0
        public void BaseEventCreateTest()
        {
            var eventObj = new Event();

            eventObj.Address          = "yes";
            eventObj.City             = "City";
            eventObj.EventStart       = DateTime.Today;
            eventObj.EventEnd         = DateTime.Now;
            eventObj.Country          = "Sri Lanka";
            eventObj.EventDescription = "dummy content";

            var rtn = eventAccess.CreateBaseEvent(eventObj);

            Assert.IsTrue(rtn.ResultStatus.IsSuccess == true);
        }
Exemplo n.º 2
0
        public ServiceResult <int> CreateEvent(Event eventObj)
        {
            try {
                var eventResult = eventAccess.CreateBaseEvent(eventObj);

                foreach (var ticket in eventObj.EventTicketList)
                {
                    ticket.EventID = eventResult.Result;
                    eventAccess.CreateEventTicket(ticket);
                }
                return(eventResult);
            }
            catch (Exception e) {
                iAppLogManager.WriteLog(e);
                return(new ServiceResult <int>());
            }
        }