コード例 #1
0
        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);
        }
コード例 #2
0
        public string InsertNewAthlete(string firstName, string lastName, string fathersName, string sex,
                                       DateTime dateOfBirth,
                                       string primaryPhoneNo, string secondaryPhoneNo, string email,
                                       string addressStreetName, string addressStreetNumber, string addressPostalCode, string countryCode, string City,
                                       string rank, string localClubId)
        {
            AddressConnection addConn   = new AddressConnection();
            string            addressId = addConn.InsertNewAddress(addressStreetName, addressStreetNumber, City, addressPostalCode, countryCode);

            string personId = this.insertNewPerson(firstName, lastName, fathersName, sex, dateOfBirth,
                                                   primaryPhoneNo, secondaryPhoneNo, email, "" + addressId);

            this._InsertAthlete(personId, rank, localClubId);

            return(personId);
        }
コード例 #3
0
        public string InsertNewCLub(string name, string phone, string email, string logosource, string addressStreetName, string addressStreetNumber, string addressPostalCode, string countryCode, string City)
        {
            //FileStream fs = new FileStream(logosource, FileMode.Open, FileAccess.Read);
            //BinaryReader binr = new BinaryReader(new BufferedStream(fs));
            //byte[] logoinbites = binr.ReadBytes(Convert.ToInt32(fs.Length));

            ImageConverter    ic        = new ImageConverter();
            AddressConnection addConn   = new AddressConnection();
            string            addressId = addConn.InsertNewAddress(addressStreetName, addressStreetNumber, City, addressPostalCode, countryCode);

            sql = "insert into Clubs (name, phone, email, logo, address_id, country_code) values (" +
                  "'" + name + "', " +
                  "'" + phone + "', " +
                  "'" + email + "', " +
                  "'" + ic.ToByteTable(logosource) + "' , " +
                  "'" + addressId + "', " +
                  "'" + countryCode + "' " +
                  ")";
            this.NonQuery(sql);

            return("");
        }