Exemplo n.º 1
0
 public CompanyData(string name, bool isMainCompany, CompanyAddress address, List <CompanyCar> cars)
 {
     this.CompanyName   = name;
     this.IsMainCompany = isMainCompany;
     this.address       = address;
     this.cars          = cars;
 }
Exemplo n.º 2
0
        private void SaveButton_Click(object sender, RoutedEventArgs e)
        {
            CompanyAddress newAdd = new CompanyAddress(txtStreet.Text, int.Parse(txtnumber.Text));

            CompanyData data = new CompanyData(int.Parse(idTextBox.Text), saveNowTextBox.Text, false, newAdd, null);

            if (isMainCompanyCheckBox.IsChecked == true)
            {
                data.IsMainCompany = true;
            }
            else
            {
                data.IsMainCompany = false;
            }
            companyData.Add(data);
        }