Beispiel #1
0
        public bool Update()
        {
            try
            {
                DAL.WFBSEntities user = new DAL.WFBSEntities();
                DAL.USUARIO      us   = user.USUARIO.First(b => b.RUT == this.Rut);

                us.NOMBRE          = this.Nombre;
                us.ID_AREA         = this.Id_Area;
                us.ID_PERFIL       = this.Id_Perfil;
                us.SEXO            = this.Sexo;
                us.JEFE_RESPECTIVO = this.Jefe;
                us.PASSWORD        = this.Password;
                us.OBSOLETO        = this.Obsoleto;

                user.SaveChanges();
                user = null;
                return(true);
            }
            catch (Exception ex)
            {
                Log.Logger.log("No se pudo Actualizar el Usuario: " + ex.ToString());
                return(false);
            }
        }
        /// <summary>
        /// Crea una entidad Competencia.
        /// </summary>
        /// <returns>Retorna un valor bool acorde a la ejecucion satisfactoria del metodo</returns>
        public bool Create()
        {
            try
            {
                DAL.WFBSEntities compe = new DAL.WFBSEntities();
                DAL.COMPETENCIA  com   = new COMPETENCIA();

                com.ID_COMPETENCIA        = this._competencia.ID_COMPETENCIA;
                com.NOMBRE                = this._competencia.NOMBRE;
                com.DESCRIPCION           = this._competencia.DESCRIPCION;
                com.SIGLA                 = this._competencia.SIGLA;
                com.OBSOLETA              = this._competencia.OBSOLETA;
                com.NIVEL_OPTIMO_ESPERADO = this._competencia.NIVEL_OPTIMO_ESPERADO;
                com.PREGUNTA_ASOCIADA     = this._competencia.PREGUNTA_ASOCIADA;

                compe.COMPETENCIA.Add(com);
                compe.SaveChanges();
                compe = null;
                return(true);
            }
            catch (Exception ex)
            {
                Log.Logger.log("No se pudo Agregar la Competencia: " + ex.ToString());
                return(false);
            }
        }
        /// <summary>
        /// Actualiza una entidad Usuario.
        /// </summary>
        /// <returns>Retorna un valor bool acorde a la ejecucion satisfactoria del metodo</returns>
        public bool Update()
        {
            try
            {
                DAL.WFBSEntities user = new DAL.WFBSEntities();
                DAL.USUARIO      us   = user.USUARIO.First(b => b.RUT == this._usuario.RUT);

                us.NOMBRE             = this._usuario.NOMBRE;
                us.ID_PERFIL_DE_CARGO = this._usuario.ID_PERFIL_DE_CARGO;
                us.ID_PERFIL          = this._usuario.ID_PERFIL;
                us.SEXO            = this._usuario.SEXO;
                us.JEFE_RESPECTIVO = this._usuario.JEFE_RESPECTIVO;
                us.PASSWORD        = this._usuario.PASSWORD;
                us.OBSOLETO        = this._usuario.OBSOLETO;

                user.SaveChanges();
                user = null;
                return(true);
            }
            catch (Exception ex)
            {
                Log.Logger.log("No se pudo Actualizar el Usuario: " + ex.ToString());
                return(false);
            }
        }
        public bool Create(List <Area> areasSelec)
        {
            try
            {
                DAL.WFBSEntities    perfilesDC = new DAL.WFBSEntities();
                DAL.PERFIL_DE_CARGO pc         = new PERFIL_DE_CARGO();

                string areas = string.Empty;
                pc.OBSOLETO    = this.Obsoleto;
                pc.DESCRIPCION = this.descripcion;
                foreach (Area a in areasSelec)
                {
                    areas = areas + a.Id_area.ToString() + ",";
                }
                pc.ID_AREAS = areas;

                perfilesDC.PERFIL_DE_CARGO.Add(pc);
                perfilesDC.SaveChanges();
                perfilesDC = null;
                return(true);
            }
            catch (Exception ex)
            {
                Log.Logger.log("No se pudo Agregar el Perfil de Cargo: " + ex.ToString());
                return(false);
            }
        }
        /// <summary>
        /// Crea una entidad Área.
        /// </summary>
        /// <returns>Retorna un valor bool acorde a la ejecucion satisfactoria del metodo</returns>
        public bool Create()
        {
            try
            {
                DAL.WFBSEntities modelo = new DAL.WFBSEntities();
                DAL.EVALUACION   ev     = new DAL.EVALUACION();

                PeriodoEvaluacion          pe   = new PeriodoEvaluacion();
                PeriodoEvaluacionOperacion peOp = new PeriodoEvaluacionOperacion(pe);

                ev.ID_EVALUACION             = this._evaluacion.ID_EVALUACION;
                ev.ID_AREA                   = this._evaluacion.ID_AREA;
                ev.ID_PERIODO_EVALUACION     = peOp.periodoEvaluacionActivo();
                ev.ID_COMPETENCIA            = this._evaluacion.ID_COMPETENCIA;
                ev.RUT_EVALUADO              = this._evaluacion.RUT_EVALUADO;
                ev.RUT_EVALUADOR             = this._evaluacion.RUT_EVALUADOR;
                ev.NOTA_ESPERADA_COMPETENCIA = this._evaluacion.NOTA_ESPERADA_COMPETENCIA;
                ev.FECHA_CONTESTA_ENCUESTA   = this._evaluacion.FECHA_CONTESTA_ENCUESTA;
                ev.NOTA_ENCUESTA             = this._evaluacion.NOTA_ENCUESTA;
                ev.ID_TIPO_EVALUACION        = this._evaluacion.ID_TIPO_EVALUACION;
                modelo.EVALUACION.Add(ev);
                modelo.SaveChanges();
                modelo = null;
                return(true);
            }
            catch (Exception ex)
            {
                Log.Logger.log("No se pudo Agregar la evaluación:" + ex.ToString());
                return(false);
            }
        }
        /// <summary>
        /// Crea una entidad Área.
        /// </summary>
        /// <param name="comSelec">Recibe un parametro Lista de tipo Competencia</param>
        /// <returns>Retorna un valor bool acorde a la ejecucion satisfactoria del metodo</returns>
        public bool Insert(List <Competencia> comSelec)
        {
            try
            {
                DAL.WFBSEntities modelo = new DAL.WFBSEntities();
                DAL.AREA         ar     = new AREA();
                DAL.COMPETENCIA  c      = new COMPETENCIA();

                ar.ID_AREA     = this._area.ID_AREA;
                ar.NOMBRE      = this._area.NOMBRE;
                ar.ABREVIACION = this._area.ABREVIACION;
                ar.OBSOLETA    = this._area.OBSOLETA;

                modelo.AREA.Add(ar);
                foreach (Competencia item in comSelec)
                {
                    c = modelo.COMPETENCIA.First(b => b.ID_COMPETENCIA == item.ID_COMPETENCIA);
                    ar.COMPETENCIA.Add(c);
                }
                modelo.AREA.Add(ar);
                modelo.SaveChanges();
                modelo = null;
                return(true);
            }
            catch (Exception ex)
            {
                Log.Logger.log("No se pudo Agregar el Área:" + ex.ToString());
                return(false);
            }
        }
Beispiel #7
0
        public bool Create()
        {
            try
            {
                DAL.WFBSEntities evaluacion = new DAL.WFBSEntities();
                DAL.EVALUACION   ev         = new DAL.EVALUACION();

                ev.ID_EVALUACION             = this.id_evaluacion;
                ev.ID_AREA                   = this.id_area;
                ev.ID_COMPETENCIA            = this.id_competencia;
                ev.ID_PERIODO_EVALUACION     = this.id_periodo_evaluacion;
                ev.ID_TIPO_EVALUACION        = this.id_tipo_evaluacion;
                ev.NOTA_ENCUESTA             = this.nota_encuesta;
                ev.NOTA_ESPERADA_COMPETENCIA = this.nota_esperada;
                ev.RUT_EVALUADO              = this.rut_evaluado;
                ev.RUT_EVALUADOR             = this.rut_evaluador;
                ev.FECHA_CONTESTA_ENCUESTA   = this.fecha_contesta;

                evaluacion.EVALUACION.Add(ev);
                evaluacion.SaveChanges();
                evaluacion = null;
                return(true);
            }
            catch (Exception ex)
            {
                Log.Logger.log("No se pudo Agregar evaluación: " + ex.ToString());
                return(false);
            }
        }
Beispiel #8
0
        /// <summary>
        /// Inserta en la base de datos un perfil de cargo
        /// </summary>
        /// <param name="areasSelec"> Recibe un parametro del tipo entidad Área</param>
        /// <returns>Retorna un valor bool acorde a la ejecucion satisfactoria del metodo</returns>
        public bool Insert(List <Area> areasSelec)
        {
            try
            {
                DAL.WFBSEntities    modelo = new DAL.WFBSEntities();
                DAL.PERFIL_DE_CARGO p      = new PERFIL_DE_CARGO();
                DAL.AREA            a      = new AREA();
                p.DESCRIPCION = this._perfildeCargo.DESCRIPCION;
                p.OBSOLETO    = this._perfildeCargo.OBSOLETO;
                modelo.PERFIL_DE_CARGO.Add(p);
                foreach (Area areaselec in areasSelec)
                {
                    a = modelo.AREA.First(b => b.ID_AREA == areaselec.ID_AREA);
                    p.AREA.Add(a);
                }

                modelo.PERFIL_DE_CARGO.Add(p);
                modelo.SaveChanges();
                modelo = null;
                return(true);
            }
            catch (Exception ex)
            {
                Log.Logger.log("No se pudo Agregar el Perfil de Cargo: " + ex.ToString());
                return(false);
            }
        }
Beispiel #9
0
        //Crea una nueva instancia de WFBSentities y almacena en esta la nueva instancia de modelo competencia
        public bool Create()
        {
            try
            {
                DAL.WFBSEntities compe = new DAL.WFBSEntities();
                DAL.COMPETENCIA  com   = new COMPETENCIA();

                com.ID_COMPETENCIA        = this.Id_competencia;
                com.NOMBRE                = this.Nombre;
                com.DESCRIPCION           = this.Descripcion;
                com.SIGLA                 = this.Sigla;
                com.OBSOLETA              = this.Obsoleta;
                com.NIVEL_OPTIMO_ESPERADO = this.Nivel_Optimo;
                com.PREGUNTA_ASOCIADA     = this.Pregunta_Asociada;

                compe.COMPETENCIA.Add(com);
                compe.SaveChanges();
                compe = null;
                return(true);
            }
            catch (Exception ex)
            {
                Log.Logger.log("No se pudo Agregar la Competencia: " + ex.ToString());
                return(false);
            }
        }
        public bool Update(List <Area> areasSelec)
        {
            string areas = string.Empty;

            try
            {
                DAL.WFBSEntities    perfilesDC = new DAL.WFBSEntities();
                DAL.PERFIL_DE_CARGO pc         = perfilesDC.PERFIL_DE_CARGO.First(p => p.ID_PERFIL_DE_CARGO == this.Id_PC);
                pc.ID_PERFIL_DE_CARGO = this.id_perfil_de_cargo;
                pc.DESCRIPCION        = this.descripcion;
                pc.OBSOLETO           = this.Obsoleto;
                foreach (Area a in areasSelec)
                {
                    areas = areas + a.Id_area.ToString() + ",";
                }
                pc.ID_AREAS = areas;
                perfilesDC.SaveChanges();
                perfilesDC = null;
                return(true);
            }
            catch (Exception ex)
            {
                Log.Logger.log("No se pudo Actualizar el Perfil de Cargo: " + ex.ToString());
                return(false);
            }
        }
Beispiel #11
0
        /// <summary>
        /// Modifica en la base de datos un perfil de cargo
        /// </summary>
        /// <param name="areasSelec"> Recibe un parametro del tipo entidad Área</param>
        /// <returns>Retorna un valor bool acorde a la ejecucion satisfactoria del metodo</returns>
        public bool Actualize(List <Area> areasSelec)
        {
            string areas = string.Empty;

            try
            {
                DAL.WFBSEntities    modelo = new DAL.WFBSEntities();
                DAL.PERFIL_DE_CARGO p      = modelo.PERFIL_DE_CARGO.First(pc => pc.ID_PERFIL_DE_CARGO == this._perfildeCargo.ID_PERFIL_DE_CARGO);
                DAL.AREA            a      = new AREA();
                var AreasBDD = CommonBC.ModeloWFBS.AREA;
                p.ID_PERFIL_DE_CARGO = this._perfildeCargo.ID_PERFIL_DE_CARGO;
                p.DESCRIPCION        = this._perfildeCargo.DESCRIPCION;
                p.OBSOLETO           = this._perfildeCargo.OBSOLETO;
                foreach (AREA item in AreasBDD)
                {
                    var delete = modelo.AREA.First(b => b.ID_AREA == item.ID_AREA);
                    p.AREA.Remove(delete);
                    modelo.SaveChanges();
                }

                foreach (Area areaselec in areasSelec)
                {
                    a = modelo.AREA.First(b => b.ID_AREA == areaselec.ID_AREA);
                    p.AREA.Add(a);
                }

                modelo.SaveChanges();
                modelo = null;
                return(true);
            }
            catch (Exception ex)
            {
                Log.Logger.log("No se pudo Actualizar el Perfil de Cargo: " + ex.ToString());
                return(false);
            }
        }
        /// <summary>
        /// Actualiza una entidad Área.
        /// </summary>
        /// <param name="comSelec">Recibe un parametro Lista de tipo Competencia</param>
        /// <returns>Retorna un valor bool acorde a la ejecucion satisfactoria del metodo</returns>
        public bool Actualize(List <Competencia> comSelec)
        {
            string areas = string.Empty;

            try
            {
                DAL.WFBSEntities modelo = new DAL.WFBSEntities();
                DAL.AREA         p      = modelo.AREA.First(pc => pc.ID_AREA == this._area.ID_AREA);
                DAL.COMPETENCIA  a      = new COMPETENCIA();
                var ComBDD = CommonBC.ModeloWFBS.COMPETENCIA;
                p.ID_AREA  = this._area.ID_AREA;
                p.NOMBRE   = this._area.NOMBRE;
                p.OBSOLETA = this._area.OBSOLETA;
                foreach (COMPETENCIA item in ComBDD)
                {
                    var delete = modelo.COMPETENCIA.First(b => b.ID_COMPETENCIA == item.ID_COMPETENCIA);
                    p.COMPETENCIA.Remove(delete);
                    modelo.SaveChanges();
                }

                foreach (Competencia item in comSelec)
                {
                    a = modelo.COMPETENCIA.First(b => b.ID_COMPETENCIA == item.ID_COMPETENCIA);
                    p.COMPETENCIA.Add(a);
                }

                modelo.SaveChanges();
                modelo = null;
                return(true);
            }
            catch (Exception ex)
            {
                Log.Logger.log("No se pudo Actualizar el Área: " + ex.ToString());
                return(false);
            }
        }
Beispiel #13
0
        public bool Delete()
        {
            try
            {
                DAL.WFBSEntities evaluacion = new DAL.WFBSEntities();
                DAL.EVALUACION   ev         = evaluacion.EVALUACION.First(b => b.ID_EVALUACION == this.id_evaluacion);

                evaluacion.SaveChanges();
                evaluacion = null;
                return(true);
            }
            catch (Exception ex)
            {
                Log.Logger.log("No se pudo Desactivar la Área: " + ex.ToString());
                return(false);
            }
        }
 public bool Delete()
 {
     try
     {
         DAL.WFBSEntities    perfilesDC = new DAL.WFBSEntities();
         DAL.PERFIL_DE_CARGO pc         = perfilesDC.PERFIL_DE_CARGO.First(p => p.ID_PERFIL_DE_CARGO == this.id_perfil_de_cargo);
         // pcargo.OBSOLETA = 1;
         pc.OBSOLETO = 1;
         perfilesDC.SaveChanges();
         perfilesDC = null;
         return(true);
     }
     catch (Exception ex)
     {
         Log.Logger.log("No se pudo Desactivar el Perfil de Cargo: " + ex.ToString());
         return(false);
     }
 }
Beispiel #15
0
        public bool Delete()
        {
            try
            {
                DAL.WFBSEntities habi = new DAL.WFBSEntities();
                DAL.HABILIDAD    hab  = habi.HABILIDAD.First(h => h.ID_HABILIDAD == this.Id_Habilidad);

                habi.HABILIDAD.Remove(hab);
                habi.SaveChanges();
                habi = null;
                return(true);
            }
            catch (Exception ex)
            {
                Log.Logger.log("No se pudo Eliminar la Habilidad: " + ex.ToString());
                return(false);
            }
        }
        /// <summary>
        /// Desactiva una entidad Usuario.
        /// </summary>
        /// <returns>Retorna un valor bool acorde a la ejecucion satisfactoria del metodo</returns>
        public bool Delete()
        {
            try
            {
                DAL.WFBSEntities user = new DAL.WFBSEntities();
                DAL.USUARIO      us   = user.USUARIO.First(b => b.RUT == this._usuario.RUT);

                us.OBSOLETO = 1;

                user.SaveChanges();
                user = null;
                return(true);
            }
            catch (Exception ex)
            {
                Log.Logger.log("No se pudo Desactivar el Usuario: " + ex.ToString());
                return(false);
            }
        }
        /// <summary>
        /// Desactiva una entidad Competencia.
        /// </summary>
        /// <returns>Retorna un valor bool acorde a la ejecucion satisfactoria del metodo</returns>
        public bool Delete()
        {
            try
            {
                DAL.WFBSEntities compe = new DAL.WFBSEntities();
                DAL.COMPETENCIA  com   = compe.COMPETENCIA.First(c => c.ID_COMPETENCIA == this._competencia.ID_COMPETENCIA);

                com.OBSOLETA = 1;
                compe.SaveChanges();
                compe = null;

                return(true);
            }
            catch (Exception ex)
            {
                Log.Logger.log("No se pudo Desactivar la Competencia: " + ex.ToString());
                return(false);
            }
        }
        public bool Delete()
        {
            try
            {
                DAL.WFBSEntities       periodo = new DAL.WFBSEntities();
                DAL.PERIODO_EVALUACION pe      = periodo.PERIODO_EVALUACION.First(b => b.ID_PERIODO_EVALUACION == this.idPeriodo);

                pe.VIGENCIA = 0;

                periodo.SaveChanges();
                periodo = null;
                return(true);
            }
            catch (Exception ex)
            {
                Log.Logger.log("No se pudo Desactivar el Periodo de Evaluación: " + ex.ToString());
                return(false);
            }
        }
        /// <summary>
        /// Desactiva una entidad Área.
        /// </summary>
        /// <returns>Retorna un valor bool acorde a la ejecucion satisfactoria del metodo</returns>
        public bool Delete()
        {
            try
            {
                DAL.WFBSEntities area = new DAL.WFBSEntities();
                DAL.AREA         ar   = area.AREA.First(c => c.ID_AREA == this._area.ID_AREA);

                ar.OBSOLETA = 1;

                area.SaveChanges();
                area = null;
                return(true);
            }
            catch (Exception ex)
            {
                Log.Logger.log("No se pudo Desactivar el Área: " + ex.ToString());
                return(false);
            }
        }
        /// <summary>
        /// Actualiza una entidad Área.
        /// </summary>
        /// <returns>Retorna un valor bool acorde a la ejecucion satisfactoria del metodo</returns>
        public bool Update()
        {
            try
            {
                DAL.WFBSEntities area = new DAL.WFBSEntities();
                DAL.AREA         ar   = area.AREA.First(b => b.ID_AREA == this._area.ID_AREA);

                ar.NOMBRE      = this._area.NOMBRE;
                ar.ID_AREA     = this._area.ID_AREA;
                ar.ABREVIACION = this._area.ABREVIACION;
                ar.OBSOLETA    = this._area.OBSOLETA;

                area.SaveChanges();
                area = null;
                return(true);
            }
            catch (Exception ex)
            {
                Log.Logger.log("No se pudo Actualizar el Área: " + ex.ToString());
                return(false);
            }
        }
Beispiel #21
0
        /// <summary>
        /// Actualiza una entidad Habilidad.
        /// </summary>
        /// <returns>Retorna un valor bool acorde a la ejecucion satisfactoria del metodo</returns>
        public bool Update()
        {
            try
            {
                DAL.WFBSEntities habi = new DAL.WFBSEntities();
                DAL.HABILIDAD    hab  = habi.HABILIDAD.First(h => h.ID_HABILIDAD == this._habilidad.ID_HABILIDAD);

                hab.ID_HABILIDAD         = this._habilidad.ID_HABILIDAD;
                hab.ID_COMPETENCIA       = this._habilidad.ID_COMPETENCIA;
                hab.NOMBRE               = this._habilidad.NOMBRE;
                hab.ORDEN_ASIGNADO       = this._habilidad.ORDEN_ASIGNADO;
                hab.ALTERNATIVA_PREGUNTA = this._habilidad.ALTERNATIVA_PREGUNTA;

                habi.SaveChanges();
                habi = null;
                return(true);
            }
            catch (Exception ex)
            {
                Log.Logger.log("No se pudo Actualizar la Habilidad: " + ex.ToString());
                return(false);
            }
        }
Beispiel #22
0
        //Crea una nueva instancia de WFBSentities y almacena en esta la nueva instancia de modelo habilidad
        public bool Create()
        {
            try
            {
                DAL.WFBSEntities habi = new DAL.WFBSEntities();
                DAL.HABILIDAD    hab  = new HABILIDAD();
                hab.ID_HABILIDAD         = this.Id_Habilidad;
                hab.ID_COMPETENCIA       = this.Id_Competencia;
                hab.NOMBRE               = this.Nombre;
                hab.ORDEN_ASIGNADO       = this.Orden_Asignado;
                hab.ALTERNATIVA_PREGUNTA = this.Alternativa_Pregunta;

                habi.HABILIDAD.Add(hab);
                habi.SaveChanges();
                habi = null;
                return(true);
            }
            catch (Exception ex)
            {
                Log.Logger.log("No se pudo Agregar la Habilidad: " + ex.ToString());
                return(false);
            }
        }
        /// <summary>
        /// Crea una entidad Área.
        /// </summary>
        /// <returns>Retorna un valor bool acorde a la ejecucion satisfactoria del metodo</returns>
        public bool Create()
        {
            try
            {
                DAL.WFBSEntities area = new DAL.WFBSEntities();
                DAL.AREA         ar   = new AREA();

                ar.ID_AREA     = this._area.ID_AREA;
                ar.NOMBRE      = this._area.NOMBRE;
                ar.ABREVIACION = this._area.ABREVIACION;
                ar.OBSOLETA    = this._area.OBSOLETA;

                area.AREA.Add(ar);
                area.SaveChanges();
                area = null;
                return(true);
            }
            catch (Exception ex)
            {
                Log.Logger.log("No se pudo Agregar el Área:" + ex.ToString());
                return(false);
            }
        }
Beispiel #24
0
        public bool Create()
        {
            try
            {
                DAL.WFBSEntities auditoria = new DAL.WFBSEntities();
                DAL.AUDITORIA    au        = new DAL.AUDITORIA();

                au.ID_AUDITORIA  = this.id_auditoria;
                au.IP_CONEXION   = this.ip_conexion;
                au.RUT           = this.rut;
                au.FECHA_INGRESO = this.fecha;

                auditoria.AUDITORIA.Add(au);
                auditoria.SaveChanges();
                auditoria = null;
                return(true);
            }
            catch (Exception ex)
            {
                Log.Logger.log("No se pudo Agregar la Auditoría:" + ex.ToString());
                return(false);
            }
        }
        public bool Update()
        {
            try
            {
                DAL.WFBSEntities       periodo = new DAL.WFBSEntities();
                DAL.PERIODO_EVALUACION pe      = periodo.PERIODO_EVALUACION.First(b => b.ID_PERIODO_EVALUACION == this.idPeriodo);

                pe.ID_PERIODO_EVALUACION = this.idPeriodo;
                pe.FECHA_INICIO          = this.fechaInicio;
                pe.VIGENCIA = this.vigencia;
                pe.PORCENTAJE_EVALUACION     = this.porcentajeE;
                pe.PORCENTAJE_AUTOEVALUACION = this.porcentajeAE;

                periodo.SaveChanges();
                periodo = null;
                return(true);
            }
            catch (Exception ex)
            {
                Log.Logger.log("No se pudo Actualizar el Periodo de Evaluación: " + ex.ToString());
                return(false);
            }
        }
Beispiel #26
0
        /// <summary>
        /// Crea un registro en la tabla Auditoria de la BD.
        /// </summary>
        /// <returns>Retorna un valor bool acorde a la ejecucion satisfactoria del metodo</returns>
        public bool Create()
        {
            try
            {
                DAL.WFBSEntities modelo = new DAL.WFBSEntities();
                DAL.AUDITORIA    au     = new DAL.AUDITORIA();

                au.ID_AUDITORIA  = _auditoria.ID_AUDITORIA;
                au.FECHA_INGRESO = _auditoria.FECHA_INGRESO;
                au.IP_CONEXION   = _auditoria.IP_CONEXION;
                au.RUT           = _auditoria.RUT;

                modelo.AUDITORIA.Add(au);
                modelo.SaveChanges();
                modelo = null;
                return(true);
            }
            catch (Exception ex)
            {
                Log.Logger.log("No se pudo Agregar la auditoría:" + ex.ToString());
                return(false);
            }
        }
Beispiel #27
0
        /// <summary>
        /// Crea una entidad Periodo.
        /// </summary>
        /// <returns>Retorna un valor bool acorde a la ejecucion satisfactoria del metodo</returns>
        public bool Create()
        {
            try
            {
                DAL.WFBSEntities       periodo = new DAL.WFBSEntities();
                DAL.PERIODO_EVALUACION pe      = new PERIODO_EVALUACION();

                pe.ID_PERIODO_EVALUACION = this._periodoEvaluacion.ID_PERIODO_EVALUACION;
                pe.FECHA_INICIO          = this._periodoEvaluacion.FECHA_INICIO;
                pe.VIGENCIA = this._periodoEvaluacion.VIGENCIA;
                pe.PORCENTAJE_EVALUACION     = this._periodoEvaluacion.PORCENTAJE_EVALUACION;
                pe.PORCENTAJE_AUTOEVALUACION = this._periodoEvaluacion.PORCENTAJE_AUTOEVALUACION;

                periodo.PERIODO_EVALUACION.Add(pe);
                periodo.SaveChanges();
                periodo = null;
                return(true);
            }
            catch (Exception ex)
            {
                Log.Logger.log("No se pudo Agregar el Periodo de Evaluación: " + ex.ToString());
                return(false);
            }
        }