示例#1
0
        // Populate form with existing data
        private void setTextBoxText()
        {
            // Get Dictionary containing data for specific customer selected
            selectedCustomer = DataInterface.getCustomerInfo(CustomerMainForm.selectedCustomerID);

            // Set the values of each control to the corresponding data
            customerIDTextBox.Text         = selectedCustomer["ID"].ToString();
            customerNameTextBox.Text       = selectedCustomer["Name"].ToString();
            customerAddressTextBox.Text    = selectedCustomer["Address"].ToString();
            customerAddress2TextBox.Text   = selectedCustomer["Address2"].ToString();
            customerZipCodeTextBox.Text    = selectedCustomer["ZipCode"].ToString();
            customerPhoneTextBox.Text      = selectedCustomer["Phone"].ToString();
            customerCityTextBox.Text       = selectedCustomer["City"].ToString();
            customerCountryTextBox.Text    = selectedCustomer["Country"].ToString();
            customerActiveCheckBox.Checked = (bool)selectedCustomer["Active"];
        }