示例#1
0
        private void duplocliquePaciente(object sender, EventArgs e)
        {
            limparPainel();
            txtPesqPaciente.Text = "";
            string codigo = exibirPaciente.SelectedItems[0].Text.ToString();

            pacientes     novo              = new pacientes();
            SqlConnection conexao           = new SqlConnection(@"Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=FISIO;Data Source=DESKTOP-1CA9LG5\SQLEXPRESS");
            SqlCommand    preencherPaciente = new SqlCommand("SELECT	nomePaciente AS ' nome', cpf AS 'CPF', Sexo as 'Sexo', Telefone, email AS 'E-Mail', Convênio, numeroConvênio AS 'Numero do Convenio',dataNascimento AS 'Data de nascimento', Endereço, bairro AS 'Bairro', cep AS 'CEP', Cidade FROM PACIENTES WHERE idPaciente = @CODIGO", conexao);

            preencherPaciente.Parameters.Add("@CODIGO", SqlDbType.Int).Value = codigo;
            string nome = "", cpf = "", sexo = "", telefone = "", email = "", convenio = "", numeroconvenio = "", data = "", endereco = "", bairro = "", cep = "", cidade = "";

            conexao.Open();
            SqlDataReader dados = preencherPaciente.ExecuteReader();

            while (dados.Read())
            {
                nome           = Convert.ToString(dados[0].ToString());
                cpf            = dados[1].ToString();
                sexo           = dados[2].ToString();
                telefone       = dados[3].ToString();
                email          = dados[4].ToString();
                convenio       = dados[5].ToString();
                numeroconvenio = dados[6].ToString();
                data           = dados[7].ToString();
                endereco       = dados[8].ToString();
                bairro         = dados[9].ToString();
                cep            = dados[10].ToString();
                cidade         = dados[11].ToString();
            }
            novo.txtPaciente.Text = nome;
            novo.txtCpf.Text      = cpf;
            if (sexo == "M")
            {
                novo.bMasculino.Checked = true;
            }
            else
            {
                novo.bFeminino.Checked = true;
            }
            novo.txtTelefone.Text       = telefone;
            novo.txtEmail.Text          = email;
            novo.txtConvenio.Text       = convenio;
            novo.txtNumeroConvenio.Text = numeroconvenio;
            novo.txtDataNascimento.Text = data;
            novo.txtEndereco.Text       = endereco;
            novo.txtBairro.Text         = bairro;
            novo.txtCep.Text            = cep;
            novo.txtCidade.Text         = cidade;
            novo.sinal.Visible          = true;
            novo.lblCodigo.Text         = codigo;
            painel2.Visible             = true;
            painel2.Controls.Clear();
            novo.sinal.Text = "b";
            painel2.Controls.Add(novo);

            desativa_botoes();
        }
示例#2
0
        private void BtnNovaEvolucao_Click(object sender, EventArgs e)
        {
            fecha_telas();
            pacientes novo = new pacientes();

            painel2.Visible = true;
            painel2.Controls.Add(novo);
            desativa_botoes();
        }
示例#3
0
        private void BtnNovoPaciente_Click(object sender, EventArgs e)
        {
            fecha_telas();
            limparPainel();
            pacientes novo = new pacientes();

            novo.sinal.Text = "a";
            painel2.Visible = true;
            painel2.Controls.Add(novo);
            novo.Show();
            desativa_botoes();
        }