示例#1
0
        private bool _updDtaCtaCorreoDocente(string strCodCarrera, string strCtaCorreo)
        {
            bool ban = false;

            try{
                ProxySeguro.DatosUsuario        du        = new ProxySeguro.DatosUsuario();
                WSDatosUsuario.dtstDatosDocente dsDocente = du.GetDatosDocente(this._addGuionCedula(this.per_numCedula),
                                                                               strCodCarrera);

                DataRow dtaDocentes = dsDocente.Tables["Docentes"].Rows[0];

                if (dsDocente.Docentes.Rows.Count > 0)
                {
                    dtaDocentes["strEmail"] = strCtaCorreo;

                    //  Actualizo informacion de correo del docente en carrera
                    du.updDatosCorreoDocente(dsDocente,
                                             strCodCarrera);

                    ban = true;
                }
            }catch (Exception ex) {
                ban = false;
                Errores err = new Errores();
                err.SetError(ex, "_udpCorreoDocente");
            }

            return(ban);
        }
示例#2
0
        private bool _esUsuarioOASis()
        {
            bool ban = false;

            try{
                SitioWebOasis.ProxySeguro.Seguridad seg = new ProxySeguro.Seguridad();
                ProxySeguro.DatosUsuario            du  = new ProxySeguro.DatosUsuario();
                string periodoVigente = this._getPeriodoVigente();

                //  GESTIONA EL ROL DE UN USUARIO REGISTRADO
                bool blnUsuarioValido = seg.AutenticarUsuario(this._addGuionCedula(this.per_numCedula),
                                                              "e",
                                                              periodoVigente,
                                                              out this._dsUsuarioOASis);

                ban = (this._dsUsuarioOASis.Carreras.Rows.Count > 0)? true
                                                                    : false;
            }
            catch (Exception ex) {
                ban = false;
                Errores err = new Errores();
                err.SetError(ex, "_registrarDireccionEstudiante");
            }

            return(ban);
        }
示例#3
0
        private string _cantidadEstudiantesMatriculados(string periodoVigente, string strCodAsignatura, string strCodNivel, string strCodParalelo)
        {
            string dtaEstMatriculados = string.Empty;
            Int16  tem  = default(Int16);
            Int16  temd = default(Int16);
            Int16  temp = default(Int16);

            try {
                ProxySeguro.DatosUsuario du = new ProxySeguro.DatosUsuario();
                DataSet dsEstMatriculados   = (DataSet)du.GetNumEstudiantesMatriculadosMateria(this.UsuarioActual.CarreraActual.Codigo.ToString(),
                                                                                               periodoVigente,
                                                                                               strCodAsignatura,
                                                                                               strCodNivel,
                                                                                               strCodParalelo);

                if (dsEstMatriculados.Tables[0].Rows.Count > 0)
                {
                    tem  = Convert.ToInt16(dsEstMatriculados.Tables[0].Compute("SUM(cantidad)", "").ToString());
                    temd = Convert.ToInt16(dsEstMatriculados.Tables[0].Compute("SUM(cantidad)", "strCodEstado = 'DEF'").ToString());
                    string rstEmp = dsEstMatriculados.Tables[0].Compute("SUM(cantidad)", "strCodEstado <> 'DEF'").ToString();
                    temp = (string.IsNullOrEmpty(rstEmp))   ? default(Int16)
                                                            : Convert.ToInt16(rstEmp.ToString());
                }

                dtaEstMatriculados = (tem == temd)
                                        ? tem.ToString()
                                        : temd.ToString() + " / " + tem;
            } catch (Exception ex) {
                dtaEstMatriculados = string.Empty;
                Errores err = new Errores();
                err.SetError(ex, "_cantidadEstudiantesMatriculados");
            }

            return(dtaEstMatriculados);
        }
        private string _getUltimoPeriodoEstudiante()
        {
            string ultimoPeriodo = "";

            try{
                ProxySeguro.DatosUsuario du = new ProxySeguro.DatosUsuario();
                ultimoPeriodo = du.getUltimoPeriodoEstudiante(  this.UsuarioActual.CarreraActual.Codigo.ToString(),
                                                                this.UsuarioActual.Cedula.ToString());
            }catch (Exception ex){
                Errores err = new Errores();
                err.SetError(ex, "_getUltimoPeriodoEstudiante - Usuario: " + UsuarioActual.Cedula.ToString() + " / " + UsuarioActual.CarreraActual.ToString() + " / " + UsuarioActual.CarreraActual.Codigo.ToString());
            }

            return ultimoPeriodo;
        }
示例#5
0
        private WSDatosUsuario.dtstDatosCursosCarrera _getCursosCarrera()
        {
            WSDatosUsuario.dtstDatosCursosCarrera dsCC = new dtstDatosCursosCarrera();

            try
            {
                ProxySeguro.DatosUsuario du = new ProxySeguro.DatosUsuario();
                dsCC = du.getCursosCarrera(UsuarioActual.CarreraActual.Codigo.ToString(),
                                           _dsPeriodoVigente.Periodos.Rows[0]["strCodigo"].ToString());
            }catch (Exception ex)
            {
                Errores err = new Errores();
                err.SetError(ex, "_getCursosCarrera");
            }

            return(dsCC);
        }
        public string getNivelEstudiante()
        {
            string nivel = "Sin Nivel";
            string rstNivel = "-1";

            try{
                ProxySeguro.DatosUsuario du = new ProxySeguro.DatosUsuario();
                nivel = du.getNivelEstudiantePeriodo(   this.UsuarioActual.CarreraActual.Codigo.ToString(),
                                                        this.UsuarioActual.CarreraActual.codUsuario.ToString(),
                                                        this.periodoEstudiante.ToString());

                rstNivel = (nivel == "Sin Definir") ? "-1"
                                                    : nivel;
            }
            catch (Exception ex)
            {
                Errores err = new Errores();
                err.SetError(ex, "_getNivelEstudiante - Usuario: " + UsuarioActual.Cedula.ToString() + " / " + UsuarioActual.CarreraActual.ToString() + " / " + UsuarioActual.CarreraActual.Codigo.ToString());
            }

            return rstNivel;
        }
示例#7
0
        private bool _udpCorreoEstudiante(string strCtaCorreo)
        {
            bool ban = false;

            try{
                ProxySeguro.DatosUsuario           du           = new ProxySeguro.DatosUsuario();
                WSDatosUsuario.dtstDatosEstudiante dsEstudiante = du.GetDatosEstudiante(this._addGuionCedula(this.per_numCedula));

                if (dsEstudiante.Estudiantes.Rows.Count > 0)
                {
                    DataRow dtaEstudiante = dsEstudiante.Tables["Estudiantes"].Rows[0];
                    dtaEstudiante["strEmail"] = strCtaCorreo;
                    du.SetDatosEstudiante(dsEstudiante);

                    ban = true;
                }
            }catch (Exception ex) {
                Errores err = new Errores();
                err.SetError(ex, "_udpCorreoEstudiante");
            }

            return(ban);
        }