Пример #1
0
 public dynamic this[int index]
 {
     get
     {
         ht_sys_config config = _db.ht_sys_config.FirstOrDefault(x => x.id == index);
         return(config != null ? config.xvalue : null);
     }
 }
Пример #2
0
 public dynamic this[string xkey]
 {
     get
     {
         ht_sys_config config = _db.ht_sys_config.FirstOrDefault(x => x.xkey == xkey);
         return(config != null ? config.xvalue : null);
     }
 }
Пример #3
0
        /// <summary>
        /// 站点配置Key验证
        /// </summary>
        /// <param name="context"></param>
        private void site_config_validate(HttpContext context)
        {
            string navname = HTRequest.GetString("param");
            string oldname = HTRequest.GetString("old_name");

            if (string.IsNullOrEmpty(navname))
            {
                context.Response.Write(NavInfo("程序调用名称", "n"));
                return;
            }
            if (String.Equals(navname, oldname, StringComparison.CurrentCultureIgnoreCase))
            {
                context.Response.Write(NavInfo("该名称已被占用", "y"));
                return;
            }
            ht_sys_config nav = _db.ht_sys_config.FirstOrDefault(x => x.xkey == navname);

            context.Response.Write(nav != null
                ? NavInfo("该调用名称已被占用", "n")
                : NavInfo("可以使用", "y"));
        }