Example #1
0
        private void Arbol()
        {
            TreeView1.ExpandAll();
            TreeNode nodo = new TreeNode();

            TreeView1.Nodes.Clear();
            nodo.Value = "0";
            nodo.Text  = "Antecedentes Familiares";
            TreeView1.Nodes.Add(nodo);
            //   entonces para para cargar el renglon de abajo, dspues de ? de pregunta agregar una variable=valor&otravariable=otrovalor
            int vParentesco = int.Parse(ddlParentesco.SelectedValue.ToString());
            int vCIE10      = DiagnosticoPrincipal.getDiagnostico();
            int vPaciente   = int.Parse(Request["idPaciente"]);

            //nodo.NavigateUrl = "AntecedentesFamiliares.aspx?Parentesco=" + vParentesco.ToString() + "&CIE10=" + vCIE10.ToString() + "&Paciente= " + vPaciente.ToString();
            //nodo.NavigateUrl = "Catastro.aspx?tipo=Habitacion&idHabitacion=" + nodo.Value;
            //nodo.NavigateUrl = "AntecedentesFamiliares.aspx?Parentesco=" + vParentesco.ToString() + "&CIE10=" + vCIE10.ToString() + "&Paciente= " + vPaciente.ToString();
            mostrarNodos(nodo);



            //DataTable dtFamiliarT = new DataTable();
            //dtFamiliarT = SPs.SysParentescoT().GetDataSet().Tables[0];

            //TreeView1.DataSource = dtFamiliarT;
            //TreeView1.DataBind();

            //DataView dataViewHijos = new DataView(dataSetArbol.Tables["SysParentescoT"]);
            //dataViewHijos.RowFilter = dataSetArbol.Tables["TablaArbol"].Columns["IdentificadorPadre"].ColumnName + " = " + indicePadre;
        }
Example #2
0
        protected void btnGuardar_Click(object sender, EventArgs e)
        {
            int vPaciente = int.Parse(Request["idPaciente"]);
            //if ((Page.IsValid) && (!hayError()))
            //{
            //int idVGIDatos = SubSonic.Sugar.Web.QueryString<int>("idVGIDatos");
            SysPacienteAntecedentesFamiliare oDato = new SysPacienteAntecedentesFamiliare();

            oDato.IdPaciente   = vPaciente;
            oDato.IdParentesco = int.Parse(ddlParentesco.SelectedValue.ToString());
            //int i_Cie10 = SIPS.ConsultaAmbulatoria.UserControls.DiagnosticoPrincipal.getObraSocial();
            oDato.IdCie10 = DiagnosticoPrincipal.getDiagnostico();



            oDato.Id = (int.Parse(Request["idPaciente"].ToString()));
            //oDato.IdTurno = 21;
            //oDato.IdPaciente = 318925;

            oDato.IdUsuarioCarga = 1;
            //oDato.IdUsuarioCarga = SSOHelper.CurrentIdentity.Id;
            oDato.FechaCarga = DateTime.Now;

            oDato.Save();
            Arbol();

            //Session["vsVolver"] = "ProsameEdit.aspx";
            //string url = "AntecedentesFamiliares.aspx?vPaciente=" + Request["idPaciente"].ToString().Trim();
            //Response.Redirect(url, false);

            //}
        }
        protected void btnEliminar_Click(object sender, EventArgs e)
        {
            int vParentesco = int.Parse(ddlParentesco.SelectedValue.ToString());
            int vCIE10      = DiagnosticoPrincipal.getDiagnostico();
            int vPaciente   = int.Parse(Request["idPaciente"]);

            SPs.SysPacAntecedentesFamiliaresElimina(vPaciente, vParentesco, vCIE10).Execute();
            Arbol();
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            //super sso

            if (!Page.IsPostBack)
            {
                if (Request["idPaciente"] != null)
                {
                    TreeView1.ExpandAll();
                }
                lbExistenRegistros.Visible = false;

                SysPaciente oPaciente = new SysPaciente(int.Parse(Request["idPaciente"].ToString()));
                lPaciente.Text = oPaciente.Apellido + "  " + oPaciente.Nombre;
                if (oPaciente.IdEstado != 2)
                {
                    ldniPaciente.Text = oPaciente.NumeroDocumento.ToString();
                }
                else
                {
                    ldniPaciente.Text = "Temporal";
                }
                //definir tipo variable
                if (Request["vCie10"] != null)
                {
                    PanelAlta.Visible = true;
                    int vParentesco1 = int.Parse(Request["vParentesco"]);
                    int vCie101      = int.Parse(Request["vCie10"]);
                    ddlParentesco.SelectedValue = int.Parse(Request["vParentesco"]).ToString();
                    DiagnosticoPrincipal.setDiagnosticoPrincipal(vCie101);
                    btnEliminar.Visible = true;

                    //boton eliminar true si
                }


                cargarCombos();
                int vPaciente = int.Parse(Request["idPaciente"]);

                DataTable dtDatosAtecedentes = new DataTable();
                dtDatosAtecedentes = SPs.SysParentescoT(vPaciente).GetDataSet().Tables[0];
                if (dtDatosAtecedentes.Rows.Count != 0) // existe al menos un registro
                {
                    Arbol();
                }
                else
                {
                    lbExistenRegistros.Visible = true;
                }
                Arbol();
                //TablaErrores.Visible = false;
            }
        }
        private void Arbol()
        {
            TreeView1.ExpandAll();
            TreeNode nodo = new TreeNode();

            TreeView1.Nodes.Clear();
            nodo.Value = "0";
            nodo.Text  = "Antecedentes Familiares";
            TreeView1.Nodes.Add(nodo);
            //   entonces para para cargar el renglon de abajo, dspues de ? de pregunta agregar una variable=valor&otravariable=otrovalor
            int vParentesco = int.Parse(ddlParentesco.SelectedValue.ToString());
            int vCIE10      = DiagnosticoPrincipal.getDiagnostico();
            int vPaciente   = int.Parse(Request["idPaciente"].ToString());

            //nodo.NavigateUrl = "AntecedentesFamiliares.aspx?Parentesco=" + vParentesco.ToString() + "&CIE10=" + vCIE10.ToString() + "&Paciente= " + vPaciente.ToString();
            //nodo.NavigateUrl = "Catastro.aspx?tipo=Habitacion&idHabitacion=" + nodo.Value;
            //nodo.NavigateUrl = "AntecedentesFamiliares.aspx?Parentesco=" + vParentesco.ToString() + "&CIE10=" + vCIE10.ToString() + "&Paciente= " + vPaciente.ToString();
            mostrarNodos(nodo);
        }