Esempio n. 1
0
        public GetValorDefectoNombreVariablePlantillaCorreoResponse GetValorDefectoNombreVariablePlantillaCorreo(int PlantillaId, string nombreVariablePlantillaCorreo)
        {
            var response = new GetValorDefectoNombreVariablePlantillaCorreoResponse();

            try
            {
                var valor = _correoPlantillaVariableRepository.GetOne(x => x.PlantillaId == PlantillaId && x.NombreVariable.ToUpper() == nombreVariablePlantillaCorreo.ToString().ToUpper() && x.IsActivo == true);
                if (valor != null)
                {
                    response.VarlorDefecto = valor.ValorDefecto;
                }
                else
                {
                    response.VarlorDefecto = null;
                }

                response.IsValid = true;
            }
            catch (Exception ex)
            {
                response.IsValid      = false;
                response.ErrorMessage = ex.Message;
            }
            return(response);
        }