private Grupos LlenaClase()
        {
            Grupos Grupo = new Grupos();

            Grupo.GrupoId     = Convert.ToInt32(GrupoIDnumericUpDown.Value);
            Grupo.Fecha       = FechadateTimePicker.Value;
            Grupo.Descripcion = DescripciontextBox.Text;
            Grupo.grupos      = Convert.ToInt32(GruposnumericUpDown.Value);
            Grupo.Cantidad    = Convert.ToInt32(CantidadnumericUpDown.Value);
            Grupo.Integrantes = Convert.ToInt32(IntegrantesnumericUpDown.Value);
            Grupo.Comentarios = ComentariostextBox.Text;


            foreach (DataGridViewRow item in DetalledataGridView.Rows)
            {
                Grupo.AgregarDetalle(
                    ToInt(item.Cells["Id"].Value),
                    ToInt(item.Cells["GrupoId"].Value),
                    ToInt(item.Cells["PersonaId"].Value),
                    ToInt(item.Cells["Cargo"].Value),
                    ToInt(item.Cells["Cantidad"].Value)
                    );
            }
            return(Grupo);
        }
        // -------------------

        private Grupos LlenaClase()
        {
            Grupos grupo = new Grupos();

            grupo.GrupoId = Convert.ToInt32(IdnumericUpDown.Value);
            grupo.Fecha   = fechaDateTimePicker.Value;

            //Agregar cada linea del Grid al detalle
            foreach (DataGridViewRow item in detalleDataGridView.Rows)
            {
                grupo.AgregarDetalle(
                    ToInt(item.Cells["Id"].Value),
                    ToInt(item.Cells["GrupoId"].Value),
                    ToInt(item.Cells["PersonaId"].Value),
                    item.Cells["Cargo"].ToString()
                    );
            }
            return(grupo);
        }
Example #3
0
        private Grupos LlenaClase()
        {
            Grupos Grupo = new Grupos();

            Grupo.GrupoId = Convert.ToInt32(GrupoIdnumericUpDown.Value);
            Grupo.Fecha   = FechadateTimePicker.Value;

            //Agregar cada linea del Grid al detalle
            foreach (DataGridViewRow item in DescripciontextBox.Rows)
            {
                Grupo.AgregarDetalle(
                    ToInt(item.Cells["Id"].Value),
                    ToInt(item.Cells["GruposId"].Value),
                    ToInt(item.Cells["PersonasId"].Value),
                    ToInt(item.Cells["Cargo"].Value)
                    );
            }
            return(Grupo);
        }
        private Grupos LlenaClase()
        {
            Grupos grupo = new Grupos();

            grupo.GrupoId     = Convert.ToInt32(idNumericUpDown.Value);
            grupo.Fecha       = Fecha_dateTimePicker.Value.Date;
            grupo.Comentarios = Comentarios_textBox.Text;

            //agregar cada linea al grid del detalle
            foreach (DataGridViewRow item in DetalleDataGridView.Rows)
            {
                grupo.AgregarDetalle(
                    ToInt(item.Cells["Id"].Value),
                    ToInt(item.Cells["GrupoId"].Value),
                    ToInt(item.Cells["PersonaId"].Value),
                    ToInt(item.Cells["Cargo"].Value).ToString()
                    );
            }

            return(grupo);
        }
Example #5
0
        private Grupos LlenaClase()
        {
            Grupos grupos = new Grupos();

            grupos.GruposId    = Convert.ToInt32(IDNumericUpDown.Value);
            grupos.Descripcion = DescripcionTextBox.Text;
            grupos.Fecha       = FechaDateTimePicker.Value;
            grupos.Cantidad    = Convert.ToInt32(CantidadTextBox.Text);
            grupos.Gruposs     = Convert.ToInt32(GruposTextBox.Text);

            //Agregar cada linea del Grid al detalle
            foreach (DataGridViewRow item in DetalledataGridView.Rows)
            {
                grupos.AgregarDetalle(
                    ToInt(item.Cells["Id"].Value),
                    ToInt(item.Cells["GrupoId"].Value),
                    ToInt(item.Cells["PersonaId"].Value)
                    );
            }
            return(grupos);
        }