Example #1
0
        public void TSaveSubModulo()
        {
            EntSubModulo entModulo = new EntSubModulo
            {
                bActivo       = true,
                bBaja         = false,
                iIdModulo     = 2,
                iIdSubModulo  = 0,
                iIdUsuarioMod = 1,
                sNombre       = "Usuarios"
            };

            BusSubmodulo busSubModulo = new BusSubmodulo();
            var          res          = busSubModulo.BSaveSubModulo(entModulo);
        }
Example #2
0
        public IMDResponse <bool> CCreateSubModulo([FromBody] EntSubModulo entCreateSubModulo)
        {
            IMDResponse <bool> response = new IMDResponse <bool>();

            string metodo = nameof(this.CCreateModulo);

            logger.Info(IMDSerialize.Serialize(67823458338139, $"Inicia {metodo}([FromBody]EntSubModulo entCreateSubModulo)", entCreateSubModulo));

            try
            {
                BusSubmodulo busSubModulo = new BusSubmodulo();
                response = busSubModulo.BSaveSubModulo(entCreateSubModulo);
            }
            catch (Exception ex)
            {
                response.Code    = 67823458122133;
                response.Message = "Ocurrió un error inesperado en el servicio al guardar el submódulo.";

                logger.Error(IMDSerialize.Serialize(67823458338139, $"Error en {metodo}([FromBody]EntSubModulo entCreateSubModulo): {ex.Message}", entCreateSubModulo, ex, response));
            }

            return(response);
        }