Ejemplo n.º 1
0
        private void NuevosEstudiosCate_Load(object sender, EventArgs e)
        {
            DataTable table = new DataTable();

            Capa_Negocio.CN_Paciente objforma = new Capa_Negocio.CN_Paciente();
            table = objforma.Vistas("Categorias");
            for (int x = 0; x < table.Rows.Count; x++)
            {
                cmbxCategorias.Items.Add(table.Rows[x].ItemArray[0].ToString());
            }
        }
Ejemplo n.º 2
0
        private void Estudios_Load(object sender, EventArgs e)
        {
            //Llenar combobox con lo tipos de impresoras para seleccionar uno//
            PrintDocument prtdoc = new PrintDocument();

            usuario = null;
            string strDefaultPrinter = prtdoc.PrinterSettings.PrinterName;

            foreach (String strPrinter in PrinterSettings.InstalledPrinters)
            {
                comboBox1.Items.Add(strPrinter);
                if (strPrinter == strDefaultPrinter)
                {
                    comboBox1.SelectedIndex = comboBox1.Items.IndexOf(strPrinter);
                }
            }
            //***************************************************************//
            lbnombre.Text  = datos[1];
            lbpaterno.Text = datos[2];
            lbmaterno.Text = datos[3];
            lbnss.Text     = datos[5];
            MostrarEstudios();
            Capa_Negocio.CN_Paciente objforma = new Capa_Negocio.CN_Paciente();
            table = objforma.Vistas("Categorias");
            Inicio formulario = null;

            //Encontrar al usuario actual
            foreach (Form frm in Application.OpenForms)
            {
                if (frm.GetType() == typeof(Inicio))
                {
                    formulario = (Inicio)frm;
                    break;
                }
                else
                {
                }
            }
            bandera = new Boolean[9];
            for (int x = 0; x < 9; x++)
            {
                bandera[x] = true;
            }
            usuario = formulario.UsuarioActual;
            Capa_Negocio.Generar_Formato.CalcularRuta();
            //llenar listcheckboxes
            llenarlistasCheck();
        }
        private void Blanco_Load(object sender, EventArgs e)
        {
            Inicio formulario = null;

            foreach (Form frm in Application.OpenForms)
            {
                if (frm.GetType() == typeof(Inicio))
                {
                    formulario = (Inicio)frm;
                    break;
                }
                else
                {
                }
            }
            Capa_Negocio.CN_Paciente datos = new Capa_Negocio.CN_Paciente();
            labelUsuario.Text = datos.UsuarioActual(formulario.UsuarioActual);
        }
Ejemplo n.º 4
0
        private void button1_Click(object sender, EventArgs e)
        {
            int x = 0; //Contador de estudios
            int y = 0; //Contador de estudios que si se seleccionaron

            cN_ = new Capa_Negocio.CN_Paciente();
            //----------------------Datos del medico----------------------------------//
            Capa_AccesoDatos.UsuarioLogin medicos = new Capa_AccesoDatos.UsuarioLogin();
            medico = medicos.infomed(usuario);
            //-------------------------------------------------------------------------//
            //-------------------------imprimir por lista--------------------------------//
            MultiplesListas();
            MessageBox.Show(Capa_Negocio.Generar_Formato.ImpresioEnLista(comboBox1.SelectedItem.ToString(), medico, datos, Contadores,
                                                                         ListaPIR, ListaPINR, ListaServicios, ListaPIRA, ListaSPRA, ListaOtros, checkBoxNota.Checked));
            //---------------------------------------------------------------------------//
            MostrarEstudios();
            Cambiostate();
            Desmarcar();
        }
Ejemplo n.º 5
0
 private void btnGuardar_Click(object sender, EventArgs e)
 {
     if (txtEstudio.Text != "" && cmbxCategorias.SelectedItem != null)
     {
         Capa_Negocio.CN_Paciente cN = new Capa_Negocio.CN_Paciente();
         if (MessageBox.Show("Agregar Estudio '" + txtEstudio.Text + "' a la categoria '" + categoria() + "', ¿estas seguro?", "Advertencia",
                             MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes)
         {
             cN.GuardaEstudio(txtEstudio.Text, cmbxCategorias.SelectedIndex + 1);
         }
         llenarList();
         txtEstudio.Text = "";
         txtEstudio.Focus();
     }
     else
     {
         MessageBox.Show("Agregar nombre del estudio nuevo y seleccionar una categoria", "Faltan datos", MessageBoxButtons.OK, MessageBoxIcon.Information);
         txtEstudio.Focus();
     }
 }
Ejemplo n.º 6
0
 private void btnBorrar_Click(object sender, EventArgs e)
 {
     if (lisatadeestudios.CheckedItems.Count != 0)
     {
         Capa_Negocio.CN_Paciente cN_ = new Capa_Negocio.CN_Paciente();
         int x = 0;
         for (x = 0; x < lisatadeestudios.Items.Count; x++)
         {
             if (lisatadeestudios.GetItemChecked(x))
             {
                 if (MessageBox.Show("Eliminar Estudio '" + lisatadeestudios.Items[x].ToString() + "' de la categoria '" + categoria() + "', ¿estas seguro? Se eliminara este dato de pacientes previos", "Advertencia",
                                     MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes)
                 {
                     cN_.BorrarEstudio(lisatadeestudios.Items[x].ToString());
                 }
             }
         }
         llenarList();
     }
     else
     {
         MessageBox.Show("Seleccione una categoria y algun elemento de la lista", "Faltan datos", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Ejemplo n.º 7
0
 private void MostrarEstudios()//Método para vizualizar los registros de la DB
 {
     Capa_Negocio.CN_Paciente objforma = new Capa_Negocio.CN_Paciente();
     dataestudiosr.DataSource = objforma.Estudios(Convert.ToInt16(datos[0]));
 }
Ejemplo n.º 8
0
        private void llenarlistasCheck()
        {
            //***********************Llenar los checkboxes*******************************//
            int x = 11;

            for (int i = 0; i < x; i++)
            {
                switch (i)
                {
                case 1:
                    Capa_Negocio.CN_Paciente objforma1 = new Capa_Negocio.CN_Paciente();
                    table = objforma1.Vistas("Est_PIR");
                    for (int j = 0; j < table.Rows.Count; j++)
                    {
                        checkedListBox1.Items.Add(table.Rows[j].ItemArray[0].ToString());
                    }
                    break;

                case 2:
                    Capa_Negocio.CN_Paciente objforma2 = new Capa_Negocio.CN_Paciente();
                    table = objforma2.Vistas("Est_PINR");
                    for (int j = 0; j < table.Rows.Count; j++)
                    {
                        checkedListBox2.Items.Add(table.Rows[j].ItemArray[0].ToString());
                    }
                    break;

                case 3:
                    Capa_Negocio.CN_Paciente objforma3 = new Capa_Negocio.CN_Paciente();
                    table = objforma3.Vistas("Ser_PI");
                    for (int j = 0; j < table.Rows.Count; j++)
                    {
                        checkedListBox3.Items.Add(table.Rows[j].ItemArray[0].ToString());
                    }
                    break;

                case 4:
                    Capa_Negocio.CN_Paciente objforma4 = new Capa_Negocio.CN_Paciente();
                    table = objforma4.Vistas("Ser_2P");
                    for (int j = 0; j < table.Rows.Count; j++)
                    {
                        checkedListBox4.Items.Add(table.Rows[j].ItemArray[0].ToString());
                    }
                    break;

                case 5:
                    Capa_Negocio.CN_Paciente objforma5 = new Capa_Negocio.CN_Paciente();
                    table = objforma5.Vistas("Ser_Otros");
                    for (int j = 0; j < table.Rows.Count; j++)
                    {
                        checkedListBox5.Items.Add(table.Rows[j].ItemArray[0].ToString());
                    }
                    break;

                case 6:
                    Capa_Negocio.CN_Paciente objforma6 = new Capa_Negocio.CN_Paciente();
                    table = objforma6.Vistas("Radio_PI");
                    for (int j = 0; j < table.Rows.Count; j++)
                    {
                        checkedListBox6.Items.Add(table.Rows[j].ItemArray[0].ToString());
                    }
                    break;

                case 7:
                    Capa_Negocio.CN_Paciente objforma7 = new Capa_Negocio.CN_Paciente();
                    table = objforma7.Vistas("Radio_2P");
                    for (int j = 0; j < table.Rows.Count; j++)
                    {
                        checkedListBox7.Items.Add(table.Rows[j].ItemArray[0].ToString());
                    }
                    break;

                case 8:
                    Capa_Negocio.CN_Paciente objforma8 = new Capa_Negocio.CN_Paciente();
                    table = objforma8.Vistas("Pre_Op");
                    for (int j = 0; j < table.Rows.Count; j++)
                    {
                        checkedListBox8.Items.Add(table.Rows[j].ItemArray[0].ToString());
                    }
                    break;

                case 9:
                    Capa_Negocio.CN_Paciente objforma9 = new Capa_Negocio.CN_Paciente();
                    table = objforma9.Vistas("Donador");
                    for (int j = 0; j < table.Rows.Count; j++)
                    {
                        checkedListBox9.Items.Add(table.Rows[j].ItemArray[0].ToString());
                    }
                    break;

                case 10:
                    Capa_Negocio.CN_Paciente objforma10 = new Capa_Negocio.CN_Paciente();
                    table = objforma10.Vistas("Especiales");
                    for (int j = 0; j < table.Rows.Count; j++)
                    {
                        checkedListBox10.Items.Add(table.Rows[j].ItemArray[0].ToString());
                    }
                    break;
                }
                //*************************************************************//
            }
        }
Ejemplo n.º 9
0
 private void MostrarPa()//Método para vizualizar los registros de la DB
 {
     Capa_Negocio.CN_Paciente objforma = new Capa_Negocio.CN_Paciente();
     Lista.DataSource = objforma.MostrarPaci();
 }
Ejemplo n.º 10
0
 private void MostrarEstudios(string nss)//Método para vizualizar los registros de la DB
 {
     Capa_Negocio.CN_Paciente objforma = new Capa_Negocio.CN_Paciente();
     dataestudiosp.DataSource = objforma.Estudios(nss);
 }
 private void MostrarPa()//Método para vizualizar los registros de la DB
 {
     objforma                 = new Capa_Negocio.CN_Paciente();
     Lista.DataSource         = objforma.MostrarPaci();
     Lista.Columns[0].Visible = false;
 }
Ejemplo n.º 12
0
        private void llenarList()
        {
            DataTable table = new DataTable();

            lisatadeestudios.Items.Clear();
            Capa_Negocio.CN_Paciente objforma = new Capa_Negocio.CN_Paciente();
            if (cmbxCategorias.SelectedIndex == 0)
            {
                table = objforma.Vistas("Est_PIR");
            }
            else
            {
                if (cmbxCategorias.SelectedIndex == 1)
                {
                    table = objforma.Vistas("Est_PINR");
                }
                else
                {
                    if (cmbxCategorias.SelectedIndex == 2)
                    {
                        table = objforma.Vistas("Ser_PI");
                    }
                    else
                    {
                        if (cmbxCategorias.SelectedIndex == 3)
                        {
                            table = objforma.Vistas("Ser_2P");
                        }
                        else
                        {
                            if (cmbxCategorias.SelectedIndex == 4)
                            {
                                table = objforma.Vistas("Ser_Otros");
                            }
                            else
                            {
                                if (cmbxCategorias.SelectedIndex == 5)
                                {
                                    table = objforma.Vistas("Radio_PI");
                                }
                                else
                                {
                                    if (cmbxCategorias.SelectedIndex == 6)
                                    {
                                        table = objforma.Vistas("Radio_2P");
                                    }
                                    else
                                    {
                                        if (cmbxCategorias.SelectedIndex == 7)
                                        {
                                            table = objforma.Vistas("Pre_Op");
                                        }
                                        else
                                        {
                                            if (cmbxCategorias.SelectedIndex == 8)
                                            {
                                                table = objforma.Vistas("Donador");
                                            }
                                            else
                                            {
                                                if (cmbxCategorias.SelectedIndex == 9)
                                                {
                                                    table = objforma.Vistas("Especiales");
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }

            for (int x = 0; x < table.Rows.Count; x++)
            {
                lisatadeestudios.Items.Add(table.Rows[x].ItemArray[0].ToString());
            }
            for (int i = 0; i < lisatadeestudios.Items.Count; i++)
            {
                lisatadeestudios.SetItemChecked(i, false);
            }
            btnBorrar.Visible = true;
        }