private void buttonAddNewChassis_Click(object sender, EventArgs e) { var chassisCode = textBoxChassisCode.Text; var chassisName = textBoxChassisName.Text; if (!FieldsCompleted(chassisName, chassisCode)) { labelAddChassis.Text = @"Must complete mandatory fields."; } else { buttonAddNewChassis.Enabled = true; Sasiu sasiu = new Sasiu() { CodSasiu = chassisCode, Denumire = chassisName }; _carService.AddChassis(sasiu); labelAddChassis.Text = @"Chassis added."; labelAddChassis.Visible = true; } }
public void AddChassis(Sasiu sasiu) { _api.AddChassis(sasiu); }