예제 #1
0
        public void insertPersona(Persona persona, string usuario, ref string mensaje)
        {
            sql.Comando.CommandType = CommandType.StoredProcedure;
            sql.Comando.CommandText = "pa_insertPersona";
            sql.Comando.Parameters.AddWithValue("@RolID", persona.RolID);
            sql.Comando.Parameters.AddWithValue("@TipoIdentificacionID", persona.TipoIdentificacionID);
            sql.Comando.Parameters.AddWithValue("@NumeroIdentificacion", persona.NumeroIdentificacion);
            sql.Comando.Parameters.AddWithValue("@PrimerNombre", persona.PrimerNombre);
            sql.Comando.Parameters.AddWithValue("@SegundoNombre", persona.SegundoNombre);
            sql.Comando.Parameters.AddWithValue("@ApellidoPaterno", persona.ApellidoPaterno);
            sql.Comando.Parameters.AddWithValue("@ApellidoMaterno", persona.ApellidoMaterno);
            sql.Comando.Parameters.AddWithValue("@FechaNacimiento", persona.FechaNacimineto);
            sql.Comando.Parameters.AddWithValue("@Celular", persona.Celular);
            sql.Comando.Parameters.AddWithValue("@CorreoInstitucional", persona.CorreoInstitucional);
            sql.Comando.Parameters.AddWithValue("@CorreoPersonal", persona.CorreoPersonal);
            sql.Comando.Parameters.AddWithValue("@CarreraID", persona.CarreraID);
            sql.Comando.Parameters.AddWithValue("@Usuario", usuario);

            try
            {
                sql.EjecutaQuery(ref mensaje);
            }
            catch (Exception ex)
            {
                mensaje = ex.Message;
            }
        }
예제 #2
0
        public void insertProceso(Proceso proceso, string usuario, ref string mensaje)
        {
            sql.Comando.CommandType = CommandType.StoredProcedure;
            sql.Comando.CommandText = "pa_insertProceso";
            sql.Comando.Parameters.AddWithValue("@PasantiaID", proceso.PasantiaID);
            sql.Comando.Parameters.AddWithValue("@PasanteID", proceso.PasanteID);
            sql.Comando.Parameters.AddWithValue("@TutorID", proceso.TutorID);
            sql.Comando.Parameters.AddWithValue("@InstitucionID", proceso.InstitucionID);
            sql.Comando.Parameters.AddWithValue("@Departamento", proceso.Departamento);
            sql.Comando.Parameters.AddWithValue("@Supervisor", proceso.Supervisor);
            sql.Comando.Parameters.AddWithValue("@CorreoSupervisor", proceso.CorreoSupervisor);
            sql.Comando.Parameters.AddWithValue("@CargoSupervisor", proceso.CargoSupervisor);
            sql.Comando.Parameters.AddWithValue("@FechaInicioPasantia", proceso.FechaInicioPasantias);
            sql.Comando.Parameters.AddWithValue("@FechaFinPasantias", proceso.FechaFinPasantias);
            sql.Comando.Parameters.AddWithValue("@Usuario", usuario);

            try
            {
                sql.EjecutaQuery(ref mensaje);
            }
            catch (Exception ex)
            {
                mensaje = ex.Message;
            }
        }
예제 #3
0
파일: EstadoDAO.cs 프로젝트: Opinfi/OSWAL
        public void insertEstado(Estado estados, string usuario, ref string mensaje)
        {
            sql.Comando.CommandType = CommandType.StoredProcedure;
            sql.Comando.CommandText = "sp_insertEstado";
            sql.Comando.Parameters.AddWithValue("@idEstado", estados.idEstado);
            sql.Comando.Parameters.AddWithValue("@idEstadoTipo", estados.idEstadoTipo = (estados.documentos == true)? "DOCUMENTO" : "PROCESO");
            sql.Comando.Parameters.AddWithValue("@codigo", estados.codigo);
            sql.Comando.Parameters.AddWithValue("@observacion", estados.observacion);
            sql.Comando.Parameters.AddWithValue("@nombre", estados.nombre);
            sql.Comando.Parameters.AddWithValue("@proceso", estados.proceso);
            sql.Comando.Parameters.AddWithValue("@documentos", estados.documentos);
            sql.Comando.Parameters.AddWithValue("@Usuario", usuario);

            try
            {
                sql.AbrirConexion();
                sql.EjecutaQuery(ref mensaje);
            }
            catch (Exception ex)
            {
                mensaje = ex.Message;
            }
            finally
            {
                sql.CerrarConexion();
            }
        }
예제 #4
0
        public void insertProceso(Entidades.Proceso.Proceso proceso, string usuario, ref string mensaje)
        {
            sql.Comando.CommandType = CommandType.StoredProcedure;
            sql.Comando.CommandText = "sp_insertProceso";
            sql.Comando.Parameters.AddWithValue("@IdProceso", proceso.IdProceso);
            sql.Comando.Parameters.AddWithValue("@CodigoProceso", proceso.CodigoProceso = proceso.TipoCorrespondencia = (proceso.TipoCorrespondencia == "Comunicados")? "COM": "ISO");
            sql.Comando.Parameters.AddWithValue("@TipoCorrespondencia", proceso.TipoCorrespondencia);
            sql.Comando.Parameters.AddWithValue("@IdUsuarioOrigen", proceso.IdUsuarioOrigen);
            sql.Comando.Parameters.AddWithValue("@IdUsuarioResponsable", proceso.IdUsuarioResponsable);
            //sql.Comando.Parameters.AddWithValue("@IdUsuarioEjecuta", proceso.IdUsuarioEjecuta);
            sql.Comando.Parameters.AddWithValue("@IdDepartamento", proceso.IdDepartamento);
            sql.Comando.Parameters.AddWithValue("@PorUsuario", proceso.PorUsuario);
            sql.Comando.Parameters.AddWithValue("@PorDepartamento", proceso.PorDepartamento);
            sql.Comando.Parameters.AddWithValue("@TodosUsuarios", proceso.TodosUsuarios);
            sql.Comando.Parameters.AddWithValue("@Detalle", proceso.__Detalle);
            sql.Comando.Parameters.AddWithValue("@FechaCaduca", proceso.FechaCaduca);
            sql.Comando.Parameters.AddWithValue("@EstadoProceso", proceso.EstadoProceso = (proceso.EstadoProceso == 0)? 1 : proceso.EstadoProceso);
            //sql.Comando.Parameters.AddWithValue("@ImagenAdjunta", proceso.ImagenAdjunta);
            //sql.Comando.Parameters.AddWithValue("@BandejaEntradaOrigen", proceso.BandejaEntradaOrigen);
            //sql.Comando.Parameters.AddWithValue("@BandejaSalidaOrigen", proceso.BandejaSalidaOrigen);
            //sql.Comando.Parameters.AddWithValue("@BandejaSalidaDestino", proceso.BandejaSalidaDestino);
            //sql.Comando.Parameters.AddWithValue("@BandejaEntradaDestino", proceso.BandejaEntradaDestino);
            //sql.Comando.Parameters.AddWithValue("@BandejaEliminadaDestino", proceso.BandejaEliminadaDestino);
            //sql.Comando.Parameters.AddWithValue("@BandejaEliminadaOrigen", proceso.BandejaEliminadaOrigen);
            //sql.Comando.Parameters.AddWithValue("@BandejaHistorialDestino", proceso.BandejaHistorialDestino);
            //sql.Comando.Parameters.AddWithValue("@BandejaHistorialOrigen", proceso.BandejaHistorialOrigen);
            //sql.Comando.Parameters.AddWithValue("@ConfirmacionLecturaDestino", proceso.ConfirmacionLecturaDestino);
            //sql.Comando.Parameters.AddWithValue("@ConfirmacionLecturaOrigen", proceso.ConfirmacionLecturaOrigen);
            sql.Comando.Parameters.AddWithValue("@EnviaDocumento", proceso.EnviaDocumento);
            //sql.Comando.Parameters.AddWithValue("@Reverso", proceso.Reverso);
            //sql.Comando.Parameters.AddWithValue("@Estado", proceso.Estado);
            sql.Comando.Parameters.AddWithValue("@Usuario", usuario);

            try
            {
                sql.AbrirConexion();
                sql.EjecutaQuery(ref mensaje);
            }
            catch (Exception ex)
            {
                mensaje = ex.Message;
            }
            finally
            {
                sql.CerrarConexion();
            }
        }
예제 #5
0
        public void insertCarrera(Carrera carrera, string usuario, ref string mensaje)
        {
            sql.Comando.CommandType = CommandType.StoredProcedure;
            sql.Comando.CommandText = "pa_insertCarrera";
            sql.Comando.Parameters.AddWithValue("@Nombre", carrera.Nombre);
            sql.Comando.Parameters.AddWithValue("@FacultadID", carrera.FacultadID);
            sql.Comando.Parameters.AddWithValue("@Usuario", usuario);

            try
            {
                sql.EjecutaQuery(ref mensaje);
            }
            catch (Exception ex)
            {
                mensaje = ex.Message;
            }
        }
예제 #6
0
        public void insertInstitucion(Institucion institucion, string usuario, ref string mensaje)
        {
            sql.Comando.CommandType = CommandType.StoredProcedure;
            sql.Comando.CommandText = "pa_insertInstitucion";
            sql.Comando.Parameters.AddWithValue("@RazonSocial", institucion.RazonSocial);
            sql.Comando.Parameters.AddWithValue("@Ruc", institucion.Ruc);
            sql.Comando.Parameters.AddWithValue("@RepresentanteLegal", institucion.RepresentanteLegal);
            sql.Comando.Parameters.AddWithValue("@Direccion", institucion.Direccion);
            sql.Comando.Parameters.AddWithValue("@Telefono", institucion.Telefono);
            sql.Comando.Parameters.AddWithValue("@Correo", institucion.Correo);
            sql.Comando.Parameters.AddWithValue("@Usuario", usuario);

            try
            {
                sql.EjecutaQuery(ref mensaje);
            }
            catch (Exception ex)
            {
                mensaje = ex.Message;
            }
        }
예제 #7
0
파일: FacultadDAO.cs 프로젝트: Opinfi/OSWAL
        public void insertFacultad(Facultad facultad, string usuario, ref string mensaje)
        {
            sql.Comando.CommandType = CommandType.StoredProcedure;
            sql.Comando.CommandText = "pa_insertFacultad";
            sql.Comando.Parameters.AddWithValue("@Nombre", facultad.Nombre);
            sql.Comando.Parameters.AddWithValue("@Usuario", usuario);

            try
            {
                sql.AbrirConexion();
                sql.EjecutaQuery(ref mensaje);
            }
            catch (Exception ex)
            {
                mensaje = ex.Message;
            }
            finally
            {
                sql.CerrarConexion();
            }
        }
예제 #8
0
        public void insertActividad(Actividad actividad, string usuario, ref string mensaje)
        {
            sql.Comando.CommandType = CommandType.StoredProcedure;
            sql.Comando.CommandText = "pa_insertActividad";
            sql.Comando.Parameters.AddWithValue("@ProcesoID", actividad.ProcesoID);
            sql.Comando.Parameters.AddWithValue("@Descripcion", actividad.Descripcion);
            sql.Comando.Parameters.AddWithValue("@NumeroHoras", actividad.NumeroHoras);

            try
            {
                sql.EjecutaQuery(ref mensaje);
            }
            catch (Exception ex)
            {
                mensaje = ex.Message;
            }
        }