Пример #1
0
        protected bool UpdateConsulta()
        {
            if (txt_Exames.Text.Equals("") || txt_Sintomas.Text.Equals("") || txt_Medicacoes.Text.Equals("") || txt_Observacoes.Text.Equals(""))
            {
                lbl_Titulo.Attributes["style"] = "color:maroon;";
                lbl_Titulo.Text = "Preencha todos os campos!";
                return(false);
            }
            String conString = WebConfigurationManager.ConnectionStrings["PP3conexaoBD"].ConnectionString;

            PP3ConexaoBD insertBD = new PP3ConexaoBD();

            insertBD.Connection(conString);
            insertBD.AbrirConexao();
            string update = "";

            if (ck_Reagendar.Checked)
            {
                update = "update Consulta set statusConsulta='REAGENDAR', sintomas='" + txt_Sintomas.Text + "', exames='" + txt_Exames.Text + "', medicacoes='" + txt_Medicacoes.Text + "', observacoes='" + txt_Observacoes.Text + "'  where idConsulta = '" + idConsulta + "'";
            }

            if (!ck_Reagendar.Checked)
            {
                update = "update Consulta set statusConsulta='FINALIZADA', sintomas='" + txt_Sintomas.Text + "', exames='" + txt_Exames.Text + "', medicacoes='" + txt_Medicacoes.Text + "', observacoes='" + txt_Observacoes.Text + "'  where idConsulta = '" + Session["idConsulta"].ToString() + "'";
            }

            insertBD.ExecutaInsUpDel(update);
            return(true);
        }
Пример #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            String conString = WebConfigurationManager.ConnectionStrings["PP3conexaoBD"].ConnectionString;

            PP3ConexaoBD selec = new PP3ConexaoBD();

            selec.Connection(conString);
            selec.AbrirConexao();
            string query = "Select c.idConsulta, m.nome, convert(date, c.dataHora) from consulta as c, paciente as p, medico as m where m.idMedico = c.idMedico and p.idPaciente = c.idPaciente and p.nome = '" + Session["username"] + "' and statusConsulta = 'FINALIZADA' and avaliacao = 'NENHUMA'";
            int    achou = selec.ExecutarConsulta(query);

            if (achou == -1)
            {
                Panel1.Visible = false;
                Panel2.Visible = true;
            }
            else
            {
                IDataReader resultado = selec.RetornaDados(query);
                lbl_medico.Text      = resultado.GetString(1) + " no dia " + resultado.GetDateTime(2).ToString().Substring(0, 10) + "!";
                Panel1.Visible       = true;
                Panel2.Visible       = false;
                idConsulta_Avaliacao = resultado.GetInt32(0).ToString();
                resultado.Close();
            }
        }
Пример #3
0
        protected bool EmailExiste(string email)
        {
            String conString = WebConfigurationManager.ConnectionStrings["PP3conexaoBD"].ConnectionString;

            PP3ConexaoBD acessoBD = new PP3ConexaoBD();

            acessoBD.Connection(conString);
            acessoBD.AbrirConexao();

            string funcao    = Session["cadastro"].ToString();
            String sqlAcesso = "select * from " + funcao + " where email='" + email + "'";

            int achouReg = acessoBD.ExecutarConsulta(sqlAcesso);

            if (achouReg == -1)
            {
                acessoBD.FecharConexao();
                return(false);
            }
            else
            {
                acessoBD.FecharConexao();
                return(true);
            }
        }
Пример #4
0
        protected bool existeConsulta(string dataHora)
        {
            String conString = WebConfigurationManager.ConnectionStrings["PP3conexaoBD"].ConnectionString;

            PP3ConexaoBD acessoBD = new PP3ConexaoBD();

            acessoBD.Connection(conString);
            acessoBD.AbrirConexao();


            String sqlAcesso = "select * from consulta where idMedico = " + ddl_MedicoConsulta.SelectedValue + " and dataHora = '" + dataHora + "'";

            int achouReg = acessoBD.ExecutarConsulta(sqlAcesso);

            if (achouReg == -1)
            {
                acessoBD.FecharConexao();
                return(false);
            }
            else
            {
                acessoBD.FecharConexao();
                return(true);
            }
        }
Пример #5
0
        protected Boolean CadastrarUsuario()
        {
            if ((string.IsNullOrEmpty(txt_Nome.Text)) || (string.IsNullOrEmpty(txt_Email.Text)) || (string.IsNullOrEmpty(txt_Email.Text)) || (string.IsNullOrEmpty(txt_Telefone.Text)) || (string.IsNullOrEmpty(txt_ConfSenha.Text)))
            {
                lbl_Alerta.Text = "Preencha todos os campos!";
                return(false);
            }

            /*  if (!(Regex.IsMatch(txt_Nome.Text, @"^[a-zA-Z]+$")))
             * {
             *    lbl_Alerta.Text = "O Nome deve conter apenas letras!";
             *    return false;
             * }*/

            if (EmailExiste(txt_Email.Text))
            {
                lbl_Alerta.Text += "Este endereço de e-mail já está cadastrado!";
                return(false);
            }

            if (txt_Senha.Text != txt_ConfSenha.Text)
            {
                lbl_Alerta.Text = "As senhas não correspondem!";
                return(false);
            }

            String conString = WebConfigurationManager.ConnectionStrings["PP3conexaoBD"].ConnectionString;

            PP3ConexaoBD insertBD = new PP3ConexaoBD();

            insertBD.Connection(conString);
            insertBD.AbrirConexao();
            string cadastro;

            if (Session["cadastro"].Equals("medico"))
            {
                cadastro = "insert into medico values ('" + txt_Nome.Text + "', '" + txt_Email.Text + "', '" + PP3.App_Start.PP3ConexaoBD.Base64Encode(txt_Senha.Text) + "', '" + txt_Telefone.Text + "' ," + ddl_Especialidades.SelectedValue + ")";
            }

            else if (Session["cadastro"].Equals("paciente"))
            {
                cadastro = "insert into paciente values ('" + txt_Nome.Text + "', '" + txt_Email.Text + "', '" + PP3.App_Start.PP3ConexaoBD.Base64Encode(txt_Senha.Text) + "', '" + txt_Telefone.Text + ")";
            }

            else
            {
                cadastro = "insert into secretaria values ('" + txt_Nome.Text + "', '" + txt_Email.Text + "', '" + PP3.App_Start.PP3ConexaoBD.Base64Encode(txt_Senha.Text) + "', '" + txt_Telefone.Text + "')";
            }


            insertBD.ExecutaInsUpDel(cadastro);
            return(true);
        }
Пример #6
0
        protected void btn_Avaliar_Click(object sender, EventArgs e)
        {
            String       conString = WebConfigurationManager.ConnectionStrings["PP3conexaoBD"].ConnectionString;
            PP3ConexaoBD insertBD  = new PP3ConexaoBD();

            insertBD.Connection(conString);
            insertBD.AbrirConexao();
            string query = "update Consulta set avaliacao = '" + example_movie.SelectedValue + "' where idConsulta = " + idConsulta_Avaliacao;

            insertBD.ExecutaInsUpDel(query);
            insertBD.FecharConexao();
            Response.Redirect("avaliacao.aspx");
        }
Пример #7
0
        protected void btnSolicitar_Click(object sender, EventArgs e)
        {
            String conString = WebConfigurationManager.ConnectionStrings["PP3conexaoBD"].ConnectionString;

            if ((txt_Sintomas.Text.Equals("")) || (txt_Observacoes.Text.Equals("")))
            {
                lblSolicitar.Text = "Preencha todos os campos!";
            }

            PP3ConexaoBD finalizarBD = new PP3ConexaoBD();

            finalizarBD.Connection(conString);
            finalizarBD.AbrirConexao();

            string insertReagendar = "Insert into SolicitacaoDeConsulta values ('" + idPaciente + "', 'SOLICITACAO', '" + txt_Sintomas.Text + "', '" + txt_Exame.Text + "', '" + txt_Medicacao.Text + "', '" + txt_Observacoes.Text + "')";

            finalizarBD.ExecutaInsUpDel(insertReagendar);
            finalizarBD.FecharConexao();
            lblSolicitar.Text = "Consulta solicitada com sucesso! Responderemos via e-mail e telefone em breve!";
        }
Пример #8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            String conString = WebConfigurationManager.ConnectionStrings["PP3conexaoBD"].ConnectionString;

            PP3ConexaoBD selec = new PP3ConexaoBD();

            selec.Connection(conString);
            selec.AbrirConexao();
            string query = "Select p.idPaciente from paciente as p where p.nome = '" + Session["username"] + "'";
            int    achou = selec.ExecutarConsulta(query);

            if (achou == -1)
            {
                lblSolicitar.Text = "Erro de banco de dados.";
            }
            else
            {
                IDataReader resultado = selec.RetornaDados(query);

                idPaciente = resultado.GetInt32(0);
            }
        }
Пример #9
0
        /*     protected void btn_LogarMedico_Click(object sender, EventArgs e)
         *   {
         *       String conString = WebConfigurationManager.ConnectionStrings["PP3conexaoBD"].ConnectionString;
         *
         *       // instanciar a classe conexaoBD
         *       PP3ConexaoBD acessoBD = new PP3ConexaoBD();
         *       acessoBD.Connection(conString);
         *       acessoBD.AbrirConexao();
         *
         *
         *       // checar se o usuario digitou dados para o LOGIN e SENHA
         *       if ((txt_Nome.Text == "") || (txt_SenhaMedico.Text == ""))
         *       {
         *           lbl_Titulo.Attributes["style"] = "color:maroon; font-weight:bold;";
         *           lbl_Titulo.Text = "Preencha todos os campos! Tente novamente!";
         *           acessoBD.FecharConexao();
         *           return;
         *       }
         *
         *       String sqlAcesso = "select * from Medico where nome='" + txt_NomeMedico.Text + "'";
         *
         *       int achouReg = acessoBD.ExecutarConsulta(sqlAcesso);
         *       if (achouReg <= 0)
         *       {
         *           lbl_Titulo.Attributes["style"] = "color:maroon; font-weight:bold;";
         *           lbl_Titulo.Text = "Usuário não encontrado.";
         *           return;
         *       }
         *
         *       sqlAcesso = "select * from Medico where nome='" + txt_NomeMedico.Text + "' and senha='" + PP3.App_Start.PP3ConexaoBD.Base64Encode(txt_SenhaMedico.Text) + "'";
         *       achouReg = acessoBD.ExecutarConsulta(sqlAcesso);
         *       if (achouReg <= 0)
         *       {
         *           lbl_Titulo.Attributes["style"] = "color:maroon; font-weight:bold;";
         *           lbl_Titulo.Text = "Senha incorreta. Por favor, digite novamente";
         *           return;
         *       }
         *
         *       {
         *           // criando variavel de sessao
         *           Session["username"] = txt_NomeMedico.Text;
         *           Session["funcao"] = "medico";
         *           // redirecionar para outra pagina
         *           // Response.Redirect("proximaPagina.aspx");
         *           Response.Redirect("u/medico/index.aspx");
         *       }
         *       acessoBD.FecharConexao();
         *   }
         *
         *   protected void btn_LogarPaciente_Click(object sender, EventArgs e)
         *   {
         *       String conString = WebConfigurationManager.ConnectionStrings["PP3conexaoBD"].ConnectionString;
         *
         *       // instanciar a classe conexaoBD
         *       PP3ConexaoBD acessoBD = new PP3ConexaoBD();
         *       acessoBD.Connection(conString);
         *       acessoBD.AbrirConexao();
         *
         *
         *       // checar se o usuario digitou dados para o LOGIN e SENHA
         *       if ((txt_NomePaciente.Text == "") || (txt_SenhaPaciente.Text == ""))
         *       {
         *           lblTituloPaciente.Attributes["style"] = "color:maroon; font-weight:bold;";
         *           lblTituloPaciente.Text = "Preencha todos os campos! Tente novamente!";
         *           acessoBD.FecharConexao();
         *           return;
         *       }
         *
         *       String sqlAcesso = "select * from Paciente where nome='" + txt_NomePaciente.Text + "'";
         *
         *       int achouReg = acessoBD.ExecutarConsulta(sqlAcesso);
         *       if (achouReg <= 0)
         *       {
         *           lblTituloPaciente.Attributes["style"] = "color:maroon; font-weight:bold;";
         *           lblTituloPaciente.Text = "Usuário não encontrado.";
         *           return;
         *       }
         *
         *       sqlAcesso = "select * from Paciente where nome='" + txt_NomePaciente.Text + "' and senha='" + PP3.App_Start.PP3ConexaoBD.Base64Encode(txt_SenhaPaciente.Text) + "'";
         *       achouReg = acessoBD.ExecutarConsulta(sqlAcesso);
         *       if (achouReg <= 0)
         *       {
         *           lblTituloPaciente.Attributes["style"] = "color:maroon; font-weight:bold;";
         *           lblTituloPaciente.Text = "Senha incorreta. Por favor, digite novamente";
         *           return;
         *       }
         *
         *       {
         *           // criando variavel de sessao
         *           Session["username"] = txt_NomePaciente.Text;
         *           Session["funcao"] = "paciente";
         *           // redirecionar para outra pagina
         *           // Response.Redirect("proximaPagina.aspx");
         *           Response.Redirect("u/paciente/foipaciente.aspx");
         *       }
         *       acessoBD.FecharConexao();
         *   } */


        protected void btn_Entrar_Click(object sender, EventArgs e)
        {
            String conString = WebConfigurationManager.ConnectionStrings["PP3conexaoBD"].ConnectionString;

            // instanciar a classe conexaoBD
            PP3ConexaoBD acessoBD = new PP3ConexaoBD();

            acessoBD.Connection(conString);
            acessoBD.AbrirConexao();


            // checar se o usuario digitou dados para o LOGIN e SENHA
            if ((txt_Login.Text == "") || (txt_Senha.Text == ""))
            {
                lbl_Titulo.Attributes["style"] = "color:maroon; font-weight:bold;";
                lbl_Titulo.Text = "Preencha todos os campos!";
                acessoBD.FecharConexao();
                return;
            }
            String sqlAcesso;

            if (Session["funcao"].Equals("Paciente"))
            {
                sqlAcesso = "select * from Paciente where nome='" + txt_Login.Text + "'";
            }
            else if (Session["funcao"].Equals("ADM"))
            {
                sqlAcesso = "select * from Secretaria where nome='" + txt_Login.Text + "'";
            }
            else
            {
                sqlAcesso = "select * from Medico where nome='" + txt_Login.Text + "'";
            }

            int achouReg = acessoBD.ExecutarConsulta(sqlAcesso);

            if (achouReg <= 0)
            {
                lbl_Titulo.Attributes["style"] = "color:maroon; font-weight:bold;";
                lbl_Titulo.Text = "Usuário não encontrado.";
                return;
            }

            if (Session["funcao"].Equals("Paciente"))
            {
                sqlAcesso = "select * from Paciente where nome='" + txt_Login.Text + "' and senha='" + PP3.App_Start.PP3ConexaoBD.Base64Encode(txt_Senha.Text) + "'";
            }
            else if (Session["funcao"].Equals("ADM"))
            {
                sqlAcesso = "select * from Secretaria where nome='" + txt_Login.Text + "' and senha='" + PP3.App_Start.PP3ConexaoBD.Base64Encode(txt_Senha.Text) + "'";
            }
            else
            {
                sqlAcesso = "select * from Medico where nome='" + txt_Login.Text + "' and senha='" + PP3.App_Start.PP3ConexaoBD.Base64Encode(txt_Senha.Text) + "'";
            }

            achouReg = acessoBD.ExecutarConsulta(sqlAcesso);
            if (achouReg <= 0)
            {
                lbl_Titulo.Attributes["style"] = "color:maroon; font-weight:bold;";
                lbl_Titulo.Text = "Senha incorreta. Por favor, digite novamente";
                return;
            }

            {
                // criando variavel de sessao
                Session["username"] = txt_Login.Text;
                // redirecionar para outra pagina
                // Response.Redirect("proximaPagina.aspx");
                if (Session["funcao"].Equals("Paciente"))
                {
                    Response.Redirect("u/paciente/index.aspx");
                }
                else if (Session["funcao"].Equals("ADM"))
                {
                    Response.Redirect("u/secretario/index.aspx");
                }
                else if (Session["funcao"].Equals("Medico"))
                {
                    Response.Redirect("u/medico/index.aspx");
                }
            }
            acessoBD.FecharConexao();
        }
Пример #10
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                cal_data.SelectedDate = DateTime.Now.Date;

                idCancelar = Request.QueryString["IdCancelar"];
                if (!(idCancelar == null))
                {
                    String conString = WebConfigurationManager.ConnectionStrings["PP3conexaoBD"].ConnectionString;

                    PP3ConexaoBD insertBD = new PP3ConexaoBD();
                    insertBD.Connection(conString);
                    insertBD.AbrirConexao();

                    string update = "update Consulta set statusConsulta='CANCELADA' where idConsulta = '" + idCancelar + "'";

                    insertBD.ExecutaInsUpDel(update);
                }


                idReagendar = Request.QueryString["IdReagendar"];
                if (!(idReagendar == null))
                {
                    String conString = WebConfigurationManager.ConnectionStrings["PP3conexaoBD"].ConnectionString;

                    // PP3ConexaoBD insertBD = new PP3ConexaoBD();
                    // insertBD.Connection(conString);
                    // insertBD.AbrirConexao();

                    // string paciente = "";

                    ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "Pop", "AbrirModal()", true);

                    lbl_Mensagem.Text = "Reagendar consulta:";

                    PP3ConexaoBD acessoBD = new PP3ConexaoBD();
                    acessoBD.Connection(conString);
                    acessoBD.AbrirConexao();

                    string select   = "select m.idMedico as Medico from consulta as c, medico as m where m.idMedico = c.idMedico and c.idConsulta = " + idReagendar.ToString();
                    string idMedico = acessoBD.RetornaDados(select).GetInt32(0).ToString();
                    acessoBD.FecharConexao();

                    PP3ConexaoBD acessoBDPaciente = new PP3ConexaoBD();
                    acessoBDPaciente.Connection(conString);
                    acessoBDPaciente.AbrirConexao();
                    select = "select p.idPaciente as Paciente from consulta as c, Paciente as p where p.idPaciente = c.idPaciente and c.idConsulta = " + idReagendar.ToString();
                    string idPaciente = acessoBDPaciente.RetornaDados(select).GetInt32(0).ToString();
                    acessoBDPaciente.FecharConexao();


                    ddl_MedicoConsulta.SelectedValue = idMedico;
                    ddl_Paciente.SelectedValue       = idPaciente;

                    ddl_MedicoConsulta.Enabled = false;
                    ddl_Paciente.Enabled       = false;


                    //lbl_Mensagem.Attributes["style"] = "color:#009933; font-weight:bold;";
                }

                idAgendar = Request.QueryString["IdAgendar"];
                if (!(idAgendar == null))
                {
                    String conString = WebConfigurationManager.ConnectionStrings["PP3conexaoBD"].ConnectionString;

                    // PP3ConexaoBD insertBD = new PP3ConexaoBD();
                    // insertBD.Connection(conString);
                    // insertBD.AbrirConexao();

                    // string paciente = "";

                    ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "Pop", "AbrirModal()", true);

                    lbl_Mensagem.Text = "Agendar consulta solicitada:";

                    PP3ConexaoBD acessoBD = new PP3ConexaoBD();
                    acessoBD.Connection(conString);
                    acessoBD.AbrirConexao();

                    string select     = "select p.idPaciente as Paciente from Paciente as p, solicitacaodeconsulta as s where p.idPaciente = s.idPaciente and s.idSolicitacao = " + idAgendar.ToString();
                    string idPaciente = acessoBD.RetornaDados(select).GetInt32(0).ToString();
                    acessoBD.FecharConexao();

                    ddl_Paciente.SelectedValue = idPaciente;

                    ddl_Paciente.Enabled = false;


                    //lbl_Mensagem.Attributes["style"] = "color:#009933; font-weight:bold;";
                }
            }

            if (ddl_MedicoAgenda.SelectedIndex != -1)
            {
                //lbl_Medico.Text = ddl_Medico.Items[ddl_Medico.SelectedIndex].Text;
            }

            UpdatePanel1.UpdateMode = UpdatePanelUpdateMode.Conditional;
        }
Пример #11
0
        protected void btn_MarcarConsulta_Click(object sender, EventArgs e)
        {
            String conString = WebConfigurationManager.ConnectionStrings["PP3conexaoBD"].ConnectionString;
            string dataHora  = cal_data.SelectedDate.ToString();

            dataHora  = dataHora.Substring(0, 11);
            dataHora += txt_hora.Text + ":00";

            if (txt_hora.Text.Equals(""))
            {
                lbl_Mensagem.Attributes["style"] = "color:maroon; font-weight:bold;";
                lbl_Mensagem.Text = "Determine uma hora.";
                return;
            }

            if ((txt_hora.Text[0] == '0' && txt_hora.Text[1] < '7') || (txt_hora.Text[0] >= '1' && (txt_hora.Text[1] > '1' && txt_hora.Text[1] < '4')) || (txt_hora.Text[0] >= '1' && txt_hora.Text[1] > '7'))
            {
                lbl_Mensagem.Attributes["style"] = "color:maroon; font-weight:bold;";
                lbl_Mensagem.Text = "A clínica estará fechada este horário.";
                return;
            }

            if (existeConsulta(dataHora))
            {
                lbl_Mensagem.Attributes["style"] = "color:maroon; font-weight:bold;";
                lbl_Mensagem.Text = "Já há uma consulta marcada neste horário com este médico.";
                return;
            }

            DateTime objData = DateTime.Parse(dataHora);

            if (objData <= DateTime.Now)
            {
                lbl_Mensagem.Attributes["style"] = "color:maroon; font-weight:bold;";
                lbl_Mensagem.Text = "Escolha uma data e hora futura.";
                return;
            }

            idReagendar = Request.QueryString["IdReagendar"];
            idAgendar   = Request.QueryString["IdAgendar"];
            if ((idReagendar == null) && (idAgendar == null))
            {
                PP3ConexaoBD insertBD = new PP3ConexaoBD();
                insertBD.Connection(conString);
                insertBD.AbrirConexao();
                string insert = "Insert into Consulta values ( " + ddl_MedicoConsulta.SelectedValue + ", " + ddl_Paciente.SelectedValue + ", '" + dataHora + "', '" + ddl_duracao.Text + "', 'PENDENTE', 'NENHUMA', NULL, NULL, NULL, NULL)";
                insertBD.ExecutaInsUpDel(insert);
                lbl_Mensagem.Attributes["style"] = "color:#009933; font-weight:bold;";
                lbl_Mensagem.Text = "Consulta marcada com sucesso!";
            }

            if (!(idReagendar == null))
            {
                PP3ConexaoBD reagendarBD = new PP3ConexaoBD();
                reagendarBD.Connection(conString);
                reagendarBD.AbrirConexao();

                string finalizarConsulta = "update Consulta set statusConsulta='FINALIZADA' where idConsulta = '" + idReagendar + "'";
                reagendarBD.ExecutaInsUpDel(finalizarConsulta);
                reagendarBD.FecharConexao();


                PP3ConexaoBD finalizarBD = new PP3ConexaoBD();
                finalizarBD.Connection(conString);
                finalizarBD.AbrirConexao();

                string insertReagendar = "Insert into Consulta values ( " + ddl_MedicoConsulta.SelectedValue + ", " + ddl_Paciente.SelectedValue + ", '" + dataHora + "', '" + ddl_duracao.Text + "', 'PENDENTE', 'NENHUMA', NULL, NULL, NULL, NULL)";
                finalizarBD.ExecutaInsUpDel(insertReagendar);
                finalizarBD.FecharConexao();

                lbl_Mensagem.Attributes["style"] = "color:#009933; font-weight:bold;";
                lbl_Mensagem.Text = "Consulta reagendada com sucesso!";
            }

            if (!(idAgendar == null))
            {
                PP3ConexaoBD agendarBD = new PP3ConexaoBD();
                agendarBD.Connection(conString);
                agendarBD.AbrirConexao();

                string finalizarSolicitacao = "update SolicitacaoDeConsulta set statusConsulta='AGENDADA' where idSolicitacao = '" + idAgendar + "'";
                agendarBD.ExecutaInsUpDel(finalizarSolicitacao);
                agendarBD.FecharConexao();


                PP3ConexaoBD finalizarBD = new PP3ConexaoBD();
                finalizarBD.Connection(conString);
                finalizarBD.AbrirConexao();

                string insertAgendar = "Insert into Consulta values ( " + ddl_MedicoConsulta.SelectedValue + ", " + ddl_Paciente.SelectedValue + ", '" + dataHora + "', '" + ddl_duracao.Text + "', 'PENDENTE', 'NENHUMA', NULL, NULL, NULL, NULL)";
                finalizarBD.ExecutaInsUpDel(insertAgendar);
                finalizarBD.FecharConexao();

                lbl_Mensagem.Attributes["style"] = "color:#009933; font-weight:bold;";
                lbl_Mensagem.Text = "Solicitação agendada com sucesso!";
            }

            UpdatePanel1.Update();
        }