Ejemplo n.º 1
0
        public void FindAddressBy(ClubModel club)
        {
            string query = "Select * from adres where zipcode=@zipcode";
            List <KeyValuePair <string, string> > parameters = new List <KeyValuePair <string, string> >();

            parameters.Add(new KeyValuePair <string, string>("zipcode", club.ZipCode));
            DataSet      results = ExecuteQuery(query, parameters);
            AddressModel address = new AddressModel();

            if (results != null && results.Tables[0].Rows.Count > 0)
            {
                address = DataSetParser.DataSetToaddress(results, 0);
            }
            club.AID = address.AID;
        }