Пример #1
0
 private void btnSelect_Click(object sender, EventArgs e)
 {
     if (browseCustomer == null || browseCustomer.IsDisposed)
     {
         browseCustomer = new BrowseListing(1, this, true);
     }
     browseCustomer.Show();
 }
Пример #2
0
 //show listing to select show
 private void btnSelectShow_Click(object sender, EventArgs e)
 {
     if (showListing == null || showListing.IsDisposed)
     {
         showListing = new BrowseListing(3, this);
     }
     showListing.Show();
     showListing.BringToFront();
 }
Пример #3
0
 //select customer from listing
 private void btnSelectCustomer_Click(object sender, EventArgs e)
 {
     if (browseCustomer == null || browseCustomer.IsDisposed)
     {
         browseCustomer = new BrowseListing(1, this);
     }
     browseCustomer.Show();
     browseCustomer.BringToFront();
 }
Пример #4
0
 private void btnBrowse_Click(object sender, EventArgs e)
 {
     if (listings == null || listings.IsDisposed)
     {
         listings = new BrowseListing(0, this);
     }
     listings.Show();
     listings.BringToFront();
 }
        private void btnSelectCustomer_Click(object sender, EventArgs e)
        {
            if (browseCustomer == null || browseCustomer.IsDisposed)
            {
                browseCustomer = new BrowseListing(1, this);
            }
            browseCustomer.Show();
            browseCustomer.BringToFront();


            //string connectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|\\PineSpringsPottery.accdb";
            //OleDbConnection connection = new OleDbConnection(connectionString);
            ////Open connection if not already
            //if (connection.State == ConnectionState.Closed)
            //{
            //    connection.Open();
            //}
            //try
            //{
            //    string selectStatement = "SELECT StreetAddress, City, State,Zip" + " FROM CUSTOMER WHERE FirstName='" + firstNametextBox3.Text + "' AND LastName='" + lastNameTextBox.Text + "';";
            //    OleDbCommand subSelectCmd = new OleDbCommand(selectStatement, connection);
            //    reader = subSelectCmd.ExecuteReader();
            //    while (reader.Read())
            //    {
            //        string addressOutput = reader["StreetAddress"].ToString();
            //        string cityOutput = reader["City"].ToString();
            //        string State = reader["StreetAddress"].ToString();
            //        string Zip = reader["Zip"].ToString();
            //        listBox1.Items.Add(firstNametextBox3.Text);
            //        listBox1.Items.Add(lastNameTextBox.Text);
            //        listBox1.Items.Add(addressOutput);
            //        listBox1.Items.Add(cityOutput);
            //        listBox1.Items.Add(State);
            //        listBox1.Items.Add(Zip);
            //        listBox1.Items.Add("");
            //    }
            //}
            //catch
            //{
            //    MessageBox.Show("There must be text entered into both textboxes in order to work");
            //}
        }