protected void Btn_medico_Click(object sender, EventArgs e) { DataSet ds = new DataSet(); ds = objmedico.consulta_medico(Txt_Medico.Text); if (Txt_Paciente.Text.Trim() == "") { LblMensaje.Text = "Digite la Identificacion del medico"; Txt_Paciente.Focus(); } else { if (ds.Tables[0].Rows.Count == 0) { LblMensaje.Text = "El medico no esta registrado"; Txt_Paciente.Focus(); } else { LblMensaje.Text = ""; LblNomMedico.Text = ds.Tables[0].Rows[0]["Nom_Medico"].ToString(); LblEspMedico.Text = ds.Tables[0].Rows[0]["Especialidad"].ToString(); Txt_Valor.Enabled = true; Txt_Valor.Focus(); Txt_Observaciones.Enabled = true; Btn_Guardar.Enabled = true; } } }
/// <summary> /// Finalizando Ordem de serviço (Botão). /// </summary> private void finalizarToolStripMenuItem_Click(object sender, EventArgs e) { if (!String.IsNullOrEmpty(Txt_IDPesquisa.Text)) { String saida = ControllerOrdemServico.FinalizarOS(PreencherTrabalho()); MessageBox.Show(saida, "Informação", MessageBoxButtons.OK, MessageBoxIcon.Information); Txt_IDPesquisa.Items.Clear(); Txt_Descricao.Clear(); Txt_Valor.Clear(); atualizarListaDeOS(); } else { MessageBox.Show("Escolha uma ordem de serviço!", "Erro", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void Btm_Limpar_Click(object sender, EventArgs e) { Txt_Valor.Clear(); }