Exemplo n.º 1
0
 private void btnAddModel_Click(object sender, EventArgs e)
 {
     try
     {
         Models model = new Models()
         {
             ModelName = txtModelName.Text,
             BrandID   = cmbBrands.SelectedIndex + 1
         };
         ModelsController modelsController = new ModelsController();
         modelsController.AddModels(model);
         txtModelName.Text = string.Empty;
         MessageBox.Show("Model Eklenmiştir !");
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }