Beispiel #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.";
            }
        }
Beispiel #2
0
        protected void lbtnCreateAccountArtist_Click(object sender, EventArgs e)
        {
            Account artType = new Account();

            artType.password    = txtArtistConfirm.Text;
            artType.accountType = "artist";
            artType.firstName   = txtArtistFName.Text;
            artType.lastName    = txtArtistLName.Text;
            artType.email       = txtArtistEmail.Text;
            artType.PhoneNumber = txtArtistPhone.Text;

            NewAccount(artType);

            NewAccountService.Artist artist = new NewAccountService.Artist();

            artist.artist_FName  = txtArtistFName.Text;
            artist.artist_LName  = txtArtistLName.Text;
            artist.email         = txtArtistEmail.Text;
            artist.phoneNumber   = txtArtistPhone.Text;
            artist.company       = txtArtistCompany.Text;
            artist.rating        = Convert.ToDecimal("0.0");
            artist.certification = txtArtistCert.Text;
            artist.city          = txtArtistCity.Text;
            artist.state         = txtArtistState.Text;
            artist.zipcode       = txtArtistZipcode.Text;
            artist.streetAddress = txtArtistStreetAddress.Text;
            artist.address2      = txtArtistAddress2.Text;

            NewAccountService.NewAccount proxy = new NewAccountService.NewAccount();

            if (proxy.AddArtist(artist))
            {
                DataSet userData = procedure.getaccountidfromemail(txtArtistEmail.Text);
                //Email verificationEmail = new Email();
                //string receiveremail = txtCustomerEmail.Text;
                //string senderEmail = "*****@*****.**";
                //string subject = "Verify your account";
                int account = int.Parse(userData.Tables[0].Rows[0]["Account_ID"].ToString());

                //string body = "Please refer to this URL to confirm your account creation. http://localhost:63822/verification.aspx?ID=" + account;
                //verificationEmail.SendMail(receiveremail, senderEmail, subject, body);

                Response.Redirect("verification.aspx?ID=" + account);
                lblStoreName.Text = "Artist Account was created successfully!";
            }
            else
            {
                lblStoreName.Text = "Account was not created D:";
            }
        }
Beispiel #3
0
        protected void lbtnCreateAccountCustomer_Click(object sender, EventArgs e)
        {
            Account custAccount = new Account();

            custAccount.password    = txtConfirmPass.Text;
            custAccount.accountType = "customer";
            custAccount.firstName   = txtCustomerFName.Text;
            custAccount.lastName    = txtCustomerLName.Text;
            custAccount.email       = txtCustomerEmail.Text;
            custAccount.phoneNumber = txtCustomerPhone.Text;

            NewAccount(custAccount);

            NewAccountService.Account customer = new NewAccountService.Account();

            customer.firstName   = txtCustomerFName.Text;
            customer.lastName    = txtCustomerLName.Text;
            customer.email       = txtCustomerEmail.Text;
            customer.phoneNumber = txtCustomerPhone.Text;


            NewAccountService.NewAccount proxy = new NewAccountService.NewAccount();

            if (proxy.AddCustomer(customer))
            {
                DataSet userData = procedure.getaccountidfromemail(txtCustomerEmail.Text);
                //Email verificationEmail = new Email();
                //string receiveremail = txtCustomerEmail.Text;
                //string senderEmail = "*****@*****.**";
                //string subject = "Verify your account";
                int account = int.Parse(userData.Tables[0].Rows[0]["Account_ID"].ToString());

                //string body = "Please refer to this URL to confirm your account creation. http://localhost:63822/verification.aspx?ID=" + account;
                //verificationEmail.SendMail(receiveremail, senderEmail, subject, body);

                Response.Redirect("verification.aspx?ID=" + account);
                lblStoreName.Text = "Customer Account was created successfully!";
            }
            else
            {
                lblStoreName.Text = "Account was not created D:";
            }
        }
        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.";
            }
        }
Beispiel #5
0
        public void NewAccount(Account account)
        {
            NewAccountService.Account AccountInfo = new NewAccountService.Account();

            AccountInfo.password    = account.password;
            AccountInfo.accountType = account.accountType;
            AccountInfo.firstName   = account.firstName;
            AccountInfo.lastName    = account.lastName;
            AccountInfo.email       = account.email;
            AccountInfo.phoneNumber = account.phoneNumber;

            NewAccountService.NewAccount proxy = new NewAccountService.NewAccount();

            if (proxy.AddAccount(AccountInfo))
            {
                lblStoreName.Text = "Account was created successfully!";
            }
            else
            {
                lblStoreName.Text = "Account was not created D:";
            }
        }
Beispiel #6
0
        protected void lbtnCreateAccountArtist_Click(object sender, EventArgs e)
        {
            Account artType = new Account();

            artType.password    = txtArtistConfirm.Text;
            artType.accountType = "artist";
            artType.firstName   = txtArtistFName.Text;
            artType.lastName    = txtArtistLName.Text;
            artType.email       = txtArtistEmail.Text;
            artType.PhoneNumber = txtArtistPhone.Text;

            NewAccount(artType);

            NewAccountService.Artist artist = new NewAccountService.Artist();

            artist.artist_FName  = txtArtistFName.Text;
            artist.artist_LName  = txtArtistLName.Text;
            artist.email         = txtArtistEmail.Text;
            artist.phoneNumber   = txtArtistPhone.Text;
            artist.company       = txtArtistCompany.Text;
            artist.rating        = Convert.ToDecimal("0.0");
            artist.certification = txtArtistCert.Text;
            artist.city          = txtArtistCity.Text;
            artist.state         = txtArtistState.Text;
            artist.zipcode       = txtArtistZipcode.Text;
            artist.streetAddress = txtArtistStreetAddress.Text;
            artist.address2      = txtArtistAddress2.Text;

            NewAccountService.NewAccount proxy = new NewAccountService.NewAccount();

            if (proxy.AddArtist(artist))
            {
                lblStoreName.Text = "Artist Account was created successfully!";
            }
            else
            {
                lblStoreName.Text = "Account was not created D:";
            }
        }