示例#1
0
        protected void btnLocationSearch_Click(object sender, EventArgs e)
        {
            NewAccountService.NewAccount proxy = new NewAccountService.NewAccount();

            ArrayList artists = new ArrayList(proxy.GetArtistByZip(txtLocationArtist.Text.ToString()));

            //foreach (Artist artist in artists)
            //{
            //    int accountid = int.Parse(Request.QueryString["ID"]);
            //    int artistID = artist.artist_ID;
            //    string redirectLink = "GetArtistProfile.aspx?ID="+accountid+ "&artistID="+artistID;
            //    artists.Add(redirectLink);

            //}


            //gvArtist.DataSource = artists;
            //gvArtist.DataBind();
            rptsearchResults.DataSource = artists;
            rptsearchResults.DataBind();

            if (artists.Count == 0)
            {
                lblNoresults.Text = "No results found.";
            }
        }
        protected void btnLocationSearch_Click(object sender, EventArgs e)
        {
            NewAccountService.NewAccount proxy = new NewAccountService.NewAccount();

            NewAccountService.Artist artist = proxy.GetArtistByZip(txtLocationArtist.Text);

            if (artist != null)
            {
                lblArtistFName.Text = artist.artist_FName;
                lblArtistLName.Text = artist.artist_LName;
                lblCompany.Text     = artist.company;
                lblCity.Text        = artist.city;
                lblState.Text       = artist.state;
            }
            else
            {
                lblArtistFName.Text = "Nothing.";
            }
        }