protected void Continuar_Click(object sender, DirectEventArgs e)
        {
            List <docente> d_registrado = (new docente()).get_docente(NumDocumento.Text).DataTableToList <docente>();

            if (d_registrado.Count > 0)
            {
                // X.Msg.Info("Inscripcion existente", "Ya existe una inscripción con este numero de documento.").Show();
                ShowContinueMsg();
            }
            else
            {
                docente d = new docente()
                {
                    dcnt_nombres             = Nombres.Text,
                    dcnt_apellido1           = Apellido1.Text,
                    dcnt_apellido2           = Apellido2.Text,
                    dcnt_num_lb_militar      = Libreta.Text,
                    dcnt_fecha_nac           = Convert.ToDateTime(FechaNacimiento.Text),
                    dcnt_direccion_resi      = Direccion.Text,
                    dcnt_num_tel_fijo        = TelFijo.Text,
                    dcnt_num_tel_movil       = TelMovil.Text,
                    dcnt_email               = Correo.Text,
                    tpdc_idtipodocumento     = Convert.ToInt32(TipoDocumentoSelect.Value),
                    dcnt_num_doc             = NumDocumento.Text,
                    cidd_idciudad_actual     = Convert.ToInt32(CiudadActual.Value),
                    pais_idpais_nacionalidad = Convert.ToInt32(NacionalidadSelect.Value),
                    cidd_idciudad_exp_doc    = Convert.ToInt32(CiudadExpedicionSelect.Value)
                };

                if (d.insert_docente())
                {
                    d_registrado = (new docente()).get_docente(NumDocumento.Text).DataTableToList <docente>();
                    if (d_registrado.Count > 0)
                    {
                        if (PrepararCompetencias(d_registrado[0].dcnt_iddocente))
                        {
                            X.Msg.Info("Datos personales registrados.", "Informacion personal registrada.").Show();

                            competencia compete = (new competencia()).get_competencia_docente(d_registrado[0].dcnt_iddocente).DataTableToList <competencia>()[0];

                            Session[_CONST.SESSION_INFO_DOCENTE]     = d_registrado[0];
                            Session[_CONST.SESSION_NUM_DOC]          = d_registrado[0].dcnt_num_doc;
                            Session[_CONST.SESSION_ID_DOCENTE]       = d_registrado[0].dcnt_iddocente;
                            Session[_CONST.SESSION_INFO_COMPETENCIA] = compete;

                            Response.Redirect("../Competencias/Personal/CrearDetalle.aspx");
                        }
                    }
                    else
                    {
                        X.Msg.Info("Upps!!", ":( Ha ocurido un error al Consultar tus datos.").Show();
                    }
                }
                else
                {
                    X.Msg.Info("Error", ":( Ha ocurido un error al registrar tus datos.").Show();
                }
            }
        }
示例#2
0
 public string update_competencia(competencia obj)
 {
     if (obj_competencia.update_competencia(obj))
     {
         return("U200");
     }
     else
     {
         return("U500");
     }
 }
示例#3
0
 public string insert_competencia(competencia obj)
 {
     if (obj_competencia.insert_competencia(obj))
     {
         return("I200");
     }
     else
     {
         return("I500");
     }
 }
示例#4
0
        public async Task<IActionResult> OnGetAsync(int? id)
        {
            if (id == null)
            {
                return NotFound();
            }

            competencia = await _context.competencia.SingleOrDefaultAsync(m => m.IdCompetencia == id);

            if (competencia == null)
            {
                return NotFound();
            }
            return Page();
        }
示例#5
0
        public async Task <IActionResult> OnPostAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            competencia = await _context.competencia.FindAsync(id);

            if (competencia != null)
            {
                _context.competencia.Remove(competencia);
                await _context.SaveChangesAsync();
            }

            return(RedirectToPage("./Index"));
        }
示例#6
0
        public competencia[] data()
        {
            DataTable dt = obj_competencia.get_competencia();
            DataRow   row;

            competencia[] competencias = null;
            if (dt.Rows.Count > 0)
            {
                competencias = new competencia[dt.Rows.Count];
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    row             = dt.Rows[i];
                    competencias[i] = new competencia(Convert.ToInt64(row["cptc_idcompetencia"].ToString()), row["cptc_nombre"].ToString(), row["cptc_descripcion"].ToString(), row["cptc_fechainicio"].ToString(), row["cptc_limiteinscripciones"].ToString(), Convert.ToInt32(row["cptc_participantes"].ToString()), Convert.ToInt32(row["cptc_cupos"].ToString()), Convert.ToInt32(row["smlr_idsemillero"].ToString()), row["cptc_fechafin"].ToString(), row["cptc_fechapublicacion"].ToString(), row["cptc_mostrardesde"].ToString(), row["cptc_mostrarhasta"].ToString());
                }
            }
            return(competencias);
        }