示例#1
0
        private void SalesManagerForm_Load(object sender, EventArgs e)
        {
            textBoxCustomerID.Enabled = false; // Disable CustomerID textBox
            comboBoxSearch.Items.Add("CustomerID");
            comboBoxSearch.Items.Add("CustomerName");
            comboBoxSearch.Items.Add("City");
            comboBoxSearch.Items.Add("PostalCode");
            comboBoxSearch.Items.Add("PhoneNumber");
            comboBoxSearch.Items.Add("FaxNumber");

            comboBoxSearch.Text = comboBoxSearch.Items[0] as string;

            SalesManager salesManager = new SalesManager();

            this.dsProject = salesManager.CreateDataSetTable(this.dsProject, this.dtCustomer);

            salesManager.ReadData(this.dsProject, this.dtCustomer);

            dataGridViewDisplay.DataSource = dtCustomer;
        }