Example #1
0
        private void anadir_tmtos_Click(object sender, EventArgs e)
        {
            GridRow tupla = (GridRow)sgrid_tmtos.ActiveRow;

            if (tupla != null)
            {
                if (sgrid_tmtos2.PrimaryGrid.Columns.Count == 0)
                {
                    GridColumnCollection columnas = sgrid_tmtos.PrimaryGrid.Columns;
                    foreach (GridColumn columna in columnas)
                    {
                        sgrid_tmtos2.PrimaryGrid.Columns.Add(new GridColumn(columna.Name));
                    }
                }

                GridCellCollection c = tupla.Cells;

                if (!esta_agregado(c[0].ToString()))
                {
                    GridRow nueva = new GridRow(c[0].Value.ToString(), c[1].Value.ToString(), c[2].Value.ToString(), c[3].Value.ToString(),
                                                c[4].Value.ToString(), c[5].Value.ToString(), c[6].Value.ToString());

                    sgrid_tmtos2.PrimaryGrid.Rows.Add((GridElement)nueva);
                }
                else
                {
                    mensaje_error("Ya se ha agregado el mismo medicamento.");
                }
            }
        }
Example #2
0
        private void aceptar_Click(object sender, EventArgs e)
        {
            GridRow            tupla  = (GridRow)sgrid_tr.ActiveRow;
            GridCellCollection celdas = tupla.Cells;

            if (tupla != null)
            {
                codigo = celdas[0].Value.ToString();
            }
        }
Example #3
0
        private void cancela_c_Click(object sender, EventArgs e)
        {
            GridRow tupla = (GridRow)sgrid_citas.ActiveRow;

            if (tupla != null)
            {
                GridCellCollection celdas = tupla.Cells;
                String[]           fecha  = celdas[2].Value.ToString().Split(' ');
                SC.eliminacion_detalle("CITA", celdas[0].Value.ToString(), "'" + fecha[0].ToString() + "'");
            }
        }
Example #4
0
        private void mod_m_MouseMove(object sender, MouseEventArgs e)
        {
            if (consultorio_m.SelectedIndex != -1)
            {
                GridRow            tupla  = (GridRow)sgrid_medicos.ActiveRow;
                GridCellCollection celdas = tupla.Cells;

                this.consultorio_m.Text = celdas[1].Value.ToString();
                consultorio_m.Enabled   = false;
            }
        }
Example #5
0
        //Interfaz medicamentos

        private void sgrid_mt_RowClick(object sender, GridRowClickEventArgs e)
        {
            GridRow            tupla  = (GridRow)e.GridRow;
            GridCellCollection celdas = tupla.Cells;

            this.compuesto_mt.Text    = celdas[2].Value.ToString();
            this.tipo_mt.Text         = celdas[1].Value.ToString();
            this.presentacion_mt.Text = celdas[3].Value.ToString();
            this.contenido_mt.Text    = celdas[4].Value.ToString();
            this.via_admon_mt.Text    = celdas[5].Value.ToString();
            this.cbp_mt.Text          = celdas[6].Value.ToString();
            this.existencias_mt.Value = Convert.ToInt32(celdas[7].Value.ToString());
        }
Example #6
0
        //Interfaz pacientes

        private void sgrid_pacientes_RowClick(object sender, GridRowClickEventArgs e)
        {
            GridRow            tupla  = (GridRow)e.GridRow;
            GridCellCollection celdas = tupla.Cells;

            this.consultorio_p.Text = celdas[2].Value.ToString();
            this.nombre_p.Text      = celdas[3].Value.ToString();
            this.app_p.Text         = celdas[4].Value.ToString();
            this.apm_p.Text         = celdas[5].Value.ToString();
            this.fn_p.Text          = celdas[6].Value.ToString();
            this.edad_p.Text        = celdas[7].Value.ToString();
            this.sexo_p.Text        = celdas[8].Value.ToString();
        }
Example #7
0
        private void sgrid_pr_RowClick(object sender, GridRowClickEventArgs e)
        {
            GridRow tupla = (GridRow)e.GridRow;

            if (tupla != null)
            {
                GridCellCollection celdas      = tupla.Cells;
                String             codigo      = celdas[2].Value.ToString();
                String             consultorio = celdas[1].Value.ToString();
                //sgrid_pr.PrimaryGrid.Rows.Clear();
                if (codigo != "")
                {
                    SC.llena_detalle_tratamiento(codigo, consultorio, sgrid_mr, sgrid_rmtos);
                }
                else
                {
                    mensaje_error("Antes de editar una receta debe\nasignar un tratamiento al paciente.");
                }
            }
        }
Example #8
0
        //Interfaz medicos

        private void sgrid_medicos_RowClick(object sender, GridRowClickEventArgs e)
        {
            GridRow            tupla  = (GridRow)e.GridRow;
            GridCellCollection celdas = tupla.Cells;

            this.nombre_m.Text       = celdas[2].Value.ToString();
            this.app_m.Text          = celdas[3].Value.ToString();
            this.apm_m.Text          = celdas[4].Value.ToString();
            this.consultorio_m.Text  = celdas[1].Value.ToString();
            this.especialidad_m.Text = celdas[6].Value.ToString();

            if (celdas[5].Value.ToString() == "Matutino")
            {
                this.turnom_m.Checked = true;
            }
            else
            {
                this.turnov_m.Checked = true;
            }
        }
Example #9
0
        private void modifica_t_Click_1(object sender, EventArgs e)
        {
            GridRow tupla = (GridRow)sgrid_tratamientos.ActiveRow;

            if (tupla != null)
            {
                GridCellCollection tratamiento = tupla.Cells;
                List <String>      ids_med     = new List <string>();

                codigo_tm          = tratamiento[0].Value.ToString();
                nombre_t.Text      = tratamiento[1].Value.ToString();
                descripcion_t.Text = tratamiento[2].Value.ToString();
                sgrid_tmtos2.PrimaryGrid.Rows.Clear();

                if (sgrid_tmtos2.PrimaryGrid.Columns.Count == 0)
                {
                    GridColumnCollection columnas = sgrid_tmtos.PrimaryGrid.Columns;
                    foreach (GridColumn columna in columnas)
                    {
                        sgrid_tmtos2.PrimaryGrid.Columns.Add(new GridColumn(columna.Name));
                    }
                }

                med_aux = new List <string>();

                foreach (GridRow medicamento in sgrid_det_med.PrimaryGrid.Rows)
                {
                    GridCellCollection m = medicamento.Cells;
                    med_aux.Add(m[1].Value.ToString());
                    GridRow nueva = new GridRow(m[1].Value.ToString(), "", m[2].Value.ToString(), m[3].Value.ToString(), m[4].Value.ToString(),
                                                m[5].Value.ToString(), m[6].Value.ToString());

                    sgrid_tmtos2.PrimaryGrid.Rows.Add((GridElement)nueva);
                }

                sgrid_det_med.PrimaryGrid.Rows.Clear();
                alta_t.Text = "Confirmar";
                stc_tratamiento.SelectedTab = sti_control_t;
                modifica_tm = true;
            }
        }
Example #10
0
File: Grid.cs Project: myko/Eternia
 public Grid()
 {
     Rows = new List<Size>();
     Columns = new List<Size>();
     Cells = new GridCellCollection(this);
 }
Example #11
0
        /// <summary>
        /// Creates a new GridRow
        /// </summary>
        public GridRow()
        {
            SetState(Rs.AllowEdit, true);
            SetState(Rs.Visible, true);

            _Cells = new GridCellCollection();
            _Cells.CollectionChanged += CellsCollectionChanged;
        }