ComboBox
別のクラスにある配列の PART を設定しようとしています。顧客、在庫、注文を作成するアプリケーションを作成する必要があります。注文フォームで、それぞれ顧客クラスと在庫クラスにある配列から顧客 ID と在庫 ID 情報を取得しようとしています。配列には、顧客 ID、名前、住所、州、郵便番号など、複数の種類の情報が含まれています。在庫 ID、名前、割引額、価格。
これは私の配列が次のように設定されているものです:
public static Customer[] myCustArray = new Customer[100];
public string customerID;
public string customerName;
public string customerAddress;
public string customerState;
public int customerZip;
public int customerAge;
public int totalOrdered;
そして、これは私のコンボボックスが次のように設定されているものです:
public void custIDComboBox_SelectedIndexChanged(object sender, EventArgs e)
{
custIDComboBox.Items.AddRange(Customer.myCustArray);
custIDComboBox.DataSource = Customer.getAllCustomers();
}