Esempio n. 1
0
        public bool PostBooking(BookingPost bookingPost, string eventUid)
        {
            var eventId = GetEventId(eventUid);

            bookingPost.veranstaltung = eventId;
            if (!CheckIfEventCanBeBooked(Convert.ToInt64(eventId)))
            {
                return(false);
            }

            var userId = new NutzerModel().PostUser(bookingPost.ToUserPost());
            var d      = bookingPost.ToDictionary();

            d.Add("Nutzer", userId.ToString());
            return(DatabaseManager.ExecutePost("Buchungen", d) != -1);
        }
Esempio n. 2
0
        public long PostOrganizer(OrganizerPost organizerPost)
        {
            var id = new NutzerModel().PostUser(organizerPost.ToUserPost());

            if (id == -1)
            {
                return(-1);
            }

            var d = organizerPost.ToDictionary();

            d.Add("Autorisiert", "0");
            d.Add("id", id.ToString());

            var result = DatabaseManager.ExecutePost("Veranstalter", d);



            return(result);
        }