protected void btnSalvar_Click(object sender, EventArgs e) { VeiculoController ctrl = new VeiculoController(); Veiculo v = new Veiculo(); v.Modelo = txtNomeV.Text; v.Cor = txtVCor.Text; v.ClienteId = int.Parse(dropdwClietV.SelectedItem.Value); ctrl.Adicionar(v); }
protected void btnSalvar_Click(object sender, EventArgs e) { Veiculo v = new Veiculo(); v.Modelo = txtModelo.Text; v.Cor = txtCor.Text; VeiculoController ctrl = new VeiculoController(); ctrl.Adicionar(v); }