public string UpdateEvent(int eventId, string name, DateTime eventdate, string addressStreetName,
                                  string addressStreetNumber, string addressPostalCode, string location, string phone,
                                  string email, string city, string countryCode, Boolean official)
        {
            string  sql = "";
            DataSet drA = null;
            DataSet drL = null;

            LocationConnection locationConnection = new LocationConnection();

            sql = "select location_id from events where id = '" + eventId + "'; ";

            drL = this.Query(sql);
            int locationId = int.Parse(drL.Tables[0].Rows[0][0].ToString());

            // getting the location_address id
            sql = "select address_id from locations where id = '" + locationId + "'; ";

            drA = this.Query(sql);
            int addressId = int.Parse(drA.Tables[0].Rows[0][0].ToString());

            this._UpdateEvent(eventId, name, eventdate, official, locationId);

            locationConnection.UpdateLocation(locationId, location, phone, email, addressId);
            AddressConnection addConn = new AddressConnection();

            addConn.UpdateAddress(addressId, addressStreetName, addressStreetNumber, city, addressPostalCode, countryCode);

            return("");
        }
        public string InsertNewEvent(string name, DateTime eventdate, string addressStreetName,
                                     string addressStreetNumber, string addressPostalCode, string location, string phone,
                                     string email, string city, string countryCode, Boolean official)
        {
            AddressConnection addConn   = new AddressConnection();
            string            addressId = addConn.InsertNewAddress(addressStreetName, addressStreetNumber, city, addressPostalCode, countryCode);

            LocationConnection locationConnection = new LocationConnection();
            string             locationId         = locationConnection.InsertNewLocation(location, phone, email, "" + addressId);

            string eventId = this._InsertEvent(name, eventdate, official, locationId);

            return(eventId);
        }