private void btnSalvar_Click(object sender, EventArgs e) { TipoServico tis = new TipoServico(); TipoServicoController tsc = new TipoServicoController(); tis.Nome = txtServico.Text; tis.status = true; tsc.trataRequisicao(btnSalvar.Text, tis); this.Close(); }
private void btnSalvar_Click(object sender, EventArgs e) { TipoServicoController tsc = new TipoServicoController(); ts.Id = id; ts.Nome = txtServico.Text; if (cmbStatus.Text == "Ativo") { ts.status = true; } else { ts.status = false; } tsc.trataRequisicao(btnSalvar.Text, ts); this.Close(); }