Esempio n. 1
0
        public void DeleteEvent(int id)
        {
            @event myEvent = [email protected](@event => @event.event_id == id);

            [email protected](myEvent);

            context.SubmitChanges();
        }
Esempio n. 2
0
        public void AddRestockEvent(DateTime timestamp, int amount, int catalogId, int userId)
        {
            @event newevent = new @event
            {
                event_id          = [email protected]() + 1,
                event_timestamp   = timestamp,
                event_is_stocking = false,
                event_amount      = amount,
                catalog_id        = catalogId,
                user_id           = userId
            };

            [email protected](newevent);
            context.SubmitChanges();
        }
Esempio n. 3
0
        public void AddEvent(int id, DateTime timestamp, bool isStocking, int amount, int catalogId, int userId)
        {
            @event newevent = new @event
            {
                event_id          = id,
                event_timestamp   = timestamp,
                event_is_stocking = isStocking,
                event_amount      = amount,
                catalog_id        = catalogId,
                user_id           = userId
            };

            [email protected](newevent);
            context.SubmitChanges();
        }
Esempio n. 4
0
        private IEvent Map(@event e)
        {
            if (e == null)
            {
                return(null);
            }

            if (e.event_is_stocking)
            {
                return(new RestockEvent(e.event_id, e.event_timestamp, e.event_amount, e.catalog_id, e.user_id));
            }
            else
            {
                return(new BuyEvent(e.event_id, e.event_timestamp, e.event_amount, e.catalog_id, e.user_id));
            }
        }
Esempio n. 5
0
 private void detach_event(@event entity)
 {
     this.SendPropertyChanging();
     entity.donut1 = null;
 }
Esempio n. 6
0
 private void attach_event(@event entity)
 {
     this.SendPropertyChanging();
     entity.donut1 = this;
 }
Esempio n. 7
0
 partial void Deleteevent(@event instance);
Esempio n. 8
0
 partial void Updateevent(@event instance);
Esempio n. 9
0
 partial void Insertevent(@event instance);
Esempio n. 10
0
 private void attach_event(@event entity)
 {
     this.SendPropertyChanging();
     entity.customer1 = this;
 }
 private void attach_event(@event entity)
 {
     this.SendPropertyChanging();
     entity.catalog = this;
 }
Esempio n. 12
0
        public IEvent GetEvent(int id)
        {
            @event e = [email protected](ev => ev.event_id == id);

            return(Map(e));
        }