Example #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());
            }
        }
Example #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();
        }
Example #3
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;
                }
                //*************************************************************//
            }
        }
Example #4
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;
        }