Exemplo n.º 1
0
        public MV_Exception GuardarCriteriosEvaluacion(TBC_CAMPO_CRITERIO_EVALUACION criterio_evaluacion, int idUsuario)
        {
            var result = new MV_Exception();

            try
            {
                result = H_LogErrorEXC.resultToException(_context.SP_TBC_CAMPO_CRITERIO_EVAL_Insert(criterio_evaluacion.ID_CRITERIO_EVAL_TECNICO, criterio_evaluacion.CAMPO, criterio_evaluacion.PUNTAJE_MAX, idUsuario).FirstOrDefault());
                if (result.IDENTITY == null)
                {
                    throw new Exception(result.ERROR_MESSAGE);
                }
            }
            catch (Exception e)
            {
                H_LogErrorEXC.GuardarRegistroLogError(e);
            }
            return(result);
        }
Exemplo n.º 2
0
        public MV_Exception editarCriteriosEvaluacion(TBC_CAMPO_CRITERIO_EVALUACION criterio_evaluacion, int usuario_actualiza)
        {
            try
            {
                MV_Exception res = H_LogErrorEXC.resultToException(_context.SP_TBC_CAMPO_CRITERIO_EVAL_Update(criterio_evaluacion.ID_CAMPO_CRITERIO_EVAL, criterio_evaluacion.ID_CRITERIO_EVAL_TECNICO, criterio_evaluacion.CAMPO, criterio_evaluacion.PUNTAJE_MAX, usuario_actualiza).FirstOrDefault());

                if (res.IDENTITY == null)
                {
                    throw new Exception(res.ERROR_MESSAGE);
                }

                return(res);
            }
            catch (Exception)
            {
                throw;
            }
        }
Exemplo n.º 3
0
        /// <summary>
        /// Método encargado de obtener la lista de departamentos
        /// </summary>
        /// <returns>Retorna la lista de departamentos</returns>
        public List <TBC_CAMPO_CRITERIO_EVALUACION> ObtenerCriteriosEvaluacion()
        {
            List <TBC_CAMPO_CRITERIO_EVALUACION> list = new List <TBC_CAMPO_CRITERIO_EVALUACION>();
            var result = _context.SP_TBC_CAMPO_CRITERIO_EVAL_SelectAll();


            foreach (var item in result)
            {
                TBC_CAMPO_CRITERIO_EVALUACION tmp = new TBC_CAMPO_CRITERIO_EVALUACION();
                tmp.ID_CAMPO_CRITERIO_EVAL   = item.ID_CAMPO_CRITERIO_EVAL;
                tmp.ID_CRITERIO_EVAL_TECNICO = item.ID_CRITERIO_EVAL_TECNICO;
                tmp.CAMPO       = item.CAMPO;
                tmp.PUNTAJE_MAX = item.PUNTAJE_MAX;
                list.Add(tmp);
            }

            return(list);
        }