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

            [email protected](myEvent);

            context.SubmitChanges();
        }
Exemple #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();
        }
Exemple #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();
        }
Exemple #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));
            }
        }
Exemple #5
0
 private void detach_event(@event entity)
 {
     this.SendPropertyChanging();
     entity.donut1 = null;
 }
Exemple #6
0
 private void attach_event(@event entity)
 {
     this.SendPropertyChanging();
     entity.donut1 = this;
 }
Exemple #7
0
 partial void Deleteevent(@event instance);
Exemple #8
0
 partial void Updateevent(@event instance);
Exemple #9
0
 partial void Insertevent(@event instance);
Exemple #10
0
 private void attach_event(@event entity)
 {
     this.SendPropertyChanging();
     entity.customer1 = this;
 }
 private void attach_event(@event entity)
 {
     this.SendPropertyChanging();
     entity.catalog = this;
 }
Exemple #12
0
        public IEvent GetEvent(int id)
        {
            @event e = [email protected](ev => ev.event_id == id);

            return(Map(e));
        }