/// <summary> /// </summary> /// <param name="opcion"></param> /// <param name="objDatos"></param> /// <param name="objAlumno"></param> /// <returns></returns> public bool ValidarAlumno(int opcion, ref DataSet objDatos, CAlumno objAlumno) { bool ExisteDatos = false; List <SqlParameter> lstParametros = new List <SqlParameter>(); lstParametros.Add(new SqlParameter("@Op", SqlDbType.Int) { Value = opcion }); lstParametros.Add(new SqlParameter("@alu_NumControl", SqlDbType.NVarChar, 50) { Value = objAlumno.alu_NumControl }); lstParametros.Add(new SqlParameter("@alu_Password", SqlDbType.NVarChar, 50) { Value = objAlumno.alu_Password }); lstParametros.Add(new SqlParameter("@alu_Rol", SqlDbType.NVarChar, 50) { Value = objAlumno.alu_Rol }); objDatos = objManagerBD.GetData("PAlumno", lstParametros.ToArray()); if (objDatos.Tables.Count > 0) { ExisteDatos = true; } return(ExisteDatos); }
public bool AutentificarAlumno(int opcion, ref DataSet objDatos, CAlumno objAlumno) { bool ExisteDatos = false; List <SqlParameter> lstParametros = new List <SqlParameter>(); lstParametros.Add(new SqlParameter("@Op", SqlDbType.Int) { Value = opcion }); lstParametros.Add(new SqlParameter("@rol", SqlDbType.Int) { Value = objAlumno.rol }); lstParametros.Add(new SqlParameter("@clave", SqlDbType.VarChar) { Value = objAlumno.clave }); lstParametros.Add(new SqlParameter("@pk_alumno", SqlDbType.Int) { Value = objAlumno.pk_alumno }); objDatos = objManagerBD.GetData(ProcedimientoGeneral, lstParametros.ToArray()); objManagerBD = null; if (objDatos.Tables.Count > 0) { ExisteDatos = true; } return(ExisteDatos); }
public void EmailNotificacion(CConsulta DatosConsulta, CAlumno DatosAlumno)//CAlumno MiAlumno,CEspecialista MiEspecialista,String[] Mensaje) { this.ObjMailConsulta = DatosConsulta; this.objMailAlumno = DatosAlumno; ThreadStart delegado = new ThreadStart(CorrerProceso); Thread hilo = new Thread(delegado); try { hilo.Start(); } catch (Exception) { } }
public bool insertAlumno(int opcion, CAlumno objAlumno) { List <SqlParameter> lstParametros = new List <SqlParameter>(); lstParametros.Add(new SqlParameter("@Op", SqlDbType.Int) { Value = opcion }); lstParametros.Add(new SqlParameter("@alu_NumControl", SqlDbType.VarChar) { Value = objAlumno.alu_NumControl }); lstParametros.Add(new SqlParameter("@alu_Nombre", SqlDbType.VarChar) { Value = objAlumno.alu_Nombre }); lstParametros.Add(new SqlParameter("@alu_ApePaterno", SqlDbType.VarChar) { Value = objAlumno.alu_ApePaterno }); lstParametros.Add(new SqlParameter("@alu_ApeMaterno", SqlDbType.VarChar) { Value = objAlumno.alu_ApeMaterno }); lstParametros.Add(new SqlParameter("@alu_Sexo", SqlDbType.VarChar) { Value = objAlumno.alu_Sexo }); lstParametros.Add(new SqlParameter("@alu_FechaNacimiento", SqlDbType.VarChar) { Value = objAlumno.alu_FechaNacimiento }); lstParametros.Add(new SqlParameter("@alu_Carrera", SqlDbType.VarChar) { Value = objAlumno.alu_Carrera }); //falta objManagerBD = new ManagerBD(); if (objManagerBD.UpdateData("PAlumno", lstParametros.ToArray())) { return(true); } return(false); }
//Metodo de evalua por opcion(opcion) que tipo de consulta hacia el cuestionario se desea seleccionar public bool listarAlumnoCuestionario(ref DataSet objDatos, CAlumno obj, int opcion) { bool ExisteDatos = false; List <SqlParameter> lsParametros = new List <SqlParameter>(); lsParametros.Add(new SqlParameter("@Op", SqlDbType.Int) { Value = opcion }); lsParametros.Add(new SqlParameter("@fk_alumno", SqlDbType.NVarChar, 40) { Value = obj.alu_NumControl }); objDatos = objManagerBD.GetData("MiCuestionario", lsParametros.ToArray()); if (objDatos.Tables.Count > 0) { ExisteDatos = true; } return(ExisteDatos); }
public bool ListarAlumno(int opcion, CAlumno obj, ref DataSet objDatos) //Listar de cualquier forma { List <SqlParameter> lstParametros = new List <SqlParameter>(); bool ExisteDatos = false; lstParametros.Add(new SqlParameter("@Op", SqlDbType.Int) { Value = opcion }); lstParametros.Add(new SqlParameter("@pk_alumno", SqlDbType.Int) { Value = obj.pk_alumno }); objDatos = objManagerBD.GetData(ProcedimientoGeneral, lstParametros.ToArray()); if (objDatos.Tables.Count > 0) { ExisteDatos = true; } return(ExisteDatos); }
public bool cambiarContrasenia(int opcion, CAlumno objAlumno) { List <SqlParameter> lstParametros = new List <SqlParameter>(); lstParametros.Add(new SqlParameter("@Op", SqlDbType.Int) { Value = opcion }); lstParametros.Add(new SqlParameter("@alu_NumControl", SqlDbType.VarChar) { Value = objAlumno.alu_NumControl }); lstParametros.Add(new SqlParameter("@alu_Password", SqlDbType.VarChar) { Value = objAlumno.alu_Password }); objManagerBD = new ManagerBD(); if (objManagerBD.UpdateData("PAlumno", lstParametros.ToArray())) { return(true); } return(false); }
public bool ConfigurarUsuario(int opcion, CAlumno objAlumno) { List <SqlParameter> lstParametros = new List <SqlParameter>(); lstParametros.Add(new SqlParameter("@Op", SqlDbType.Int) { Value = opcion }); lstParametros.Add(new SqlParameter("@alu_NumControl", SqlDbType.VarChar) { Value = objAlumno.alu_NumControl }); lstParametros.Add(new SqlParameter("@alu_Password", SqlDbType.VarChar) { Value = objAlumno.alu_Password }); lstParametros.Add(new SqlParameter("@Noseguro", SqlDbType.VarChar) { Value = objAlumno.Noseguro }); lstParametros.Add(new SqlParameter("@curp", SqlDbType.VarChar) { Value = objAlumno.curp }); //falta objManagerBD = new ManagerBD(); if (objManagerBD.UpdateData("PAlumno", lstParametros.ToArray())) { return(true); } return(false); }
/// <summary> /// Create student /// </summary> /// <param name="opcion"></param> /// <param name="obj"></param> /// <returns></returns> public bool CreateAlumno(int opcion, CAlumno obj) { bool registro = false; try { List <SqlParameter> lstParametros = new List <SqlParameter>(); lstParametros.Add(new SqlParameter("@Op", SqlDbType.Int) { Value = opcion }); lstParametros.Add(new SqlParameter("@pk_alumno", SqlDbType.Int) { Value = obj.pk_alumno }); lstParametros.Add(new SqlParameter("@id", SqlDbType.Int) { Value = obj.id }); lstParametros.Add(new SqlParameter("@clave", SqlDbType.VarChar) { Value = obj.clave }); lstParametros.Add(new SqlParameter("@activo", SqlDbType.VarChar) { Value = obj.activo }); lstParametros.Add(new SqlParameter("@correo", SqlDbType.VarChar) { Value = obj.correo }); lstParametros.Add(new SqlParameter("@nombre", SqlDbType.VarChar) { Value = obj.nombre }); lstParametros.Add(new SqlParameter("@apellidos", SqlDbType.VarChar) { Value = obj.apellidos }); lstParametros.Add(new SqlParameter("@anioIngreso", SqlDbType.VarChar) { Value = obj.anioIngreso }); lstParametros.Add(new SqlParameter("@anioEgreso", SqlDbType.VarChar) { Value = obj.anioEgreso }); lstParametros.Add(new SqlParameter("@estadoPago", SqlDbType.Int) { Value = obj.estadoPago }); lstParametros.Add(new SqlParameter("@facebook", SqlDbType.VarChar) { Value = obj.facebook }); lstParametros.Add(new SqlParameter("@telefono", SqlDbType.VarChar) { Value = obj.telefono }); lstParametros.Add(new SqlParameter("@celular", SqlDbType.VarChar) { Value = obj.celular }); lstParametros.Add(new SqlParameter("@edad", SqlDbType.VarChar) { Value = obj.edad }); lstParametros.Add(new SqlParameter("@sexo", SqlDbType.VarChar) { Value = obj.sexo }); lstParametros.Add(new SqlParameter("@nivel", SqlDbType.VarChar) { Value = obj.nivel }); lstParametros.Add(new SqlParameter("@direccion", SqlDbType.VarChar) { Value = obj.direccion }); lstParametros.Add(new SqlParameter("@FechaNacimiento", SqlDbType.Date) { Value = obj.FechaNacimiento }); objManagerBD = new ManagerBD(); if (objManagerBD.UpdateData(ProcedimientoGeneral, lstParametros.ToArray())) { registro = true; } } catch (Exception) { registro = false; } return(registro); }
public bool Creat(int opcion, CAlumno obj) { List <SqlParameter> lstParametros = new List <SqlParameter>(); lstParametros.Add(new SqlParameter("@Op", SqlDbType.Int) { Value = opcion }); lstParametros.Add(new SqlParameter("@id", SqlDbType.Int) { Value = obj.id }); lstParametros.Add(new SqlParameter("@clave", SqlDbType.VarChar) { Value = obj.clave }); lstParametros.Add(new SqlParameter("@correo", SqlDbType.VarChar) { Value = obj.correo }); lstParametros.Add(new SqlParameter("@nombre", SqlDbType.VarChar) { Value = obj.nombre }); lstParametros.Add(new SqlParameter("@apellidos", SqlDbType.VarChar) { Value = obj.apellidos }); lstParametros.Add(new SqlParameter("@anioIngreso", SqlDbType.VarChar) { Value = obj.anioEgreso }); lstParametros.Add(new SqlParameter("@estadoPago", SqlDbType.Int) { Value = obj.estadoPago }); lstParametros.Add(new SqlParameter("@facebook", SqlDbType.VarChar) { Value = obj.facebook }); lstParametros.Add(new SqlParameter("@telefono", SqlDbType.VarChar) { Value = obj.telefono }); lstParametros.Add(new SqlParameter("@celular", SqlDbType.VarChar) { Value = obj.celular }); lstParametros.Add(new SqlParameter("@sexo", SqlDbType.VarChar) { Value = obj.celular }); lstParametros.Add(new SqlParameter("@nivel", SqlDbType.VarChar) { Value = obj.celular }); lstParametros.Add(new SqlParameter("@direccion", SqlDbType.VarChar) { Value = obj.celular }); lstParametros.Add(new SqlParameter("@FechaNacimiento", SqlDbType.VarChar) { Value = obj.celular }); // objManagerBD = new ManagerBD(); if (objManagerBD.UpdateData(ProcedimientoGeneral, lstParametros.ToArray())) { return(true); } return(false); }