private void btnConfirmarArea_Click(object sender, EventArgs e) { try { TB_AREATableAdapter bd = new TB_AREATableAdapter(); int area = int.Parse(tbArea.Text); bd.AtualizaArea((int)tbEnfemreiro.SelectedValue, area); TB_MICROAREATableAdapter Microareabd = new TB_MICROAREATableAdapter(); DataTable tabela = Microareabd.RetornaMicroareas(area); tbMicroarea.Items.Clear(); foreach (DataRow linha in tabela.Rows) { tbMicroarea.Items.Add(linha["NUM_MICROAREA"].ToString()); } tbArea.Enabled = false; tbEnfemreiro.Enabled = false; btnConfirmarArea.Enabled = false; GbMicroarea.Visible = true; tbMicroarea.SelectedIndex = 0; tbMicroarea_TextChanged(sender, e); } catch (Exception err) { MessageBox.Show(err.Message); } }
public AREA() { Enfermeiro = new FUNCIONARIO(); Medico = new FUNCIONARIO(); BDArea = new TB_AREATableAdapter(); }