Пример #1
0
        /// <summary>
        /// Reads one or more theme
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        internal List <dynamic> Read(Theme_DTO_Read dto)
        {
            var inputParams = dto.ThmCode == 0
                ? new List <ADO_inputParams>()
                : new List <ADO_inputParams>()
            {
                new ADO_inputParams()
                {
                    name = "@ThmCode", value = dto.ThmCode
                }
            };


            if (dto.LngIsoCode != null)
            {
                inputParams.Add(new ADO_inputParams()
                {
                    name = "@LngIsoCode", value = dto.LngIsoCode
                });
            }

            if (dto.ThmValue != null)
            {
                inputParams.Add(new ADO_inputParams()
                {
                    name = "@ThmValue", value = dto.ThmValue
                });
            }

            var reader = ado.ExecuteReaderProcedure("System_Navigation_Theme_Read", inputParams);

            return(reader.data);
        }
Пример #2
0
        internal bool UpdateExists(Theme_DTO_Read dto)
        {
            var inputParams = new List <ADO_inputParams>()
            {
                new ADO_inputParams()
                {
                    name = "@ThmValue", value = dto.ThmValue
                },
                new ADO_inputParams()
                {
                    name = "@LngIsoCode", value = dto.LngIsoCode
                }
            };
            var reader = ado.ExecuteReaderProcedure("System_Navigation_Theme_Read", inputParams);

            return(reader.data.Find(e => e.ThmValue == dto.ThmValue && e.ThmCode != dto.ThmCode) != null);
        }
Пример #3
0
 internal bool Exists(Theme_DTO_Read dto)
 {
     return(this.Read(dto).Count > 0);
 }