Example #1
0
        public override void BeforeSave()
        {
            base.BeforeSave();

            if (Id == 0)
            {
                var e = Provider.Database.Read<EventContact>("EventId={0} AND ContactId={1}", EventId, ContactId);
                if (e != null) {
                    this.Id = e.Id;
                    this.State = e.State;
                }
            }
        }
Example #2
0
        public override void BeforeSave()
        {
            base.BeforeSave();

            if (Id == 0)
            {
                var e = Provider.Database.Read <EventContact>("EventId={0} AND ContactId={1}", EventId, ContactId);
                if (e != null)
                {
                    this.Id    = e.Id;
                    this.State = e.State;
                }
            }
        }