惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Engineering at Meta
Engineering at Meta
博客园_首页
H
Help Net Security
WordPress大学
WordPress大学
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
罗磊的独立博客
博客园 - 三生石上(FineUI控件)
B
Blog
I
InfoQ
SecWiki News
SecWiki News
T
Tailwind CSS Blog
Spread Privacy
Spread Privacy
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
V
Vulnerabilities – Threatpost
N
Netflix TechBlog - Medium
P
Palo Alto Networks Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Vercel News
Vercel News
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
K
Kaspersky official blog
M
MIT News - Artificial intelligence
S
Schneier on Security
T
Threat Research - Cisco Blogs
F
Fortinet All Blogs
Cyberwarzone
Cyberwarzone
Scott Helme
Scott Helme
aimingoo的专栏
aimingoo的专栏
Martin Fowler
Martin Fowler
MyScale Blog
MyScale Blog
The Cloudflare Blog
Recent Announcements
Recent Announcements
Security Latest
Security Latest
G
GRAHAM CLULEY
IT之家
IT之家
Y
Y Combinator Blog
The Last Watchdog
The Last Watchdog
腾讯CDC
Google DeepMind News
Google DeepMind News
V
V2EX
S
Securelist
TaoSecurity Blog
TaoSecurity Blog
B
Blog RSS Feed
S
SegmentFault 最新的问题
博客园 - 叶小钗
P
Proofpoint News Feed
云风的 BLOG
云风的 BLOG
Project Zero
Project Zero
G
Google Developers Blog
Google DeepMind News
Google DeepMind News
F
Full Disclosure

博客园 - 凌寒飘香

bat 结束进程 mysql 行转列 ASP.NET连接Oracle数据库的步骤详解(转) mysql event mysql安装出现error Nr.1045 (转) windows服务(installutil.exe)报错。异常来自 HRESULT:0x80131515 NSIS堆栈 Push,Pop用法详解(转) bat,copy 文件 js ,String.format gridview模板页面调用js函数 执行带out参数的存储过程sql 无线网络配置 readexcel jquery.validate.min.js 打印配置 无线路由设置 pmi id 查询 天龙八部,小师妹,李沧海,齐御风 Windows Server 2008开机取消必须输入密码登录系统,不要按CTRL+ALT+DEL”,
jquery getJSON
凌寒飘香 · 2014-02-10 · via 博客园 - 凌寒飘香

        function onNodeClick(data) {
            //只能选择体检分组
            if (data.GroupType == 1) {
                $("#<%=hidOrgId.ClientID%>").val(data.Id);
                $("#<%=hidOrgName.ClientID%>").val(data.Text);
                $("#<%=txtGroup.ClientID%>").val(data.Text);
                $("#divCheckUpTree").dialog("close");


                $("#<%=ddlDrs.ClientID %>").html("");
                var url = "AjaxHelper.ashx?validatorType=GetDoctorByOrgId&orgID=" + data.Id;
                $.getJSON(url, function (json) {
                    //debugger
                    if (json != null) {
                        $.each(json, function (i) {
                            $("#<%=ddlDrs.ClientID %>").append($("<option></option>").val(json[i].DrID).html(json[i].DrName))
                        });
                    }

                });

                $("#<%=ddlDrs.ClientID %>").append($("<option selected='true'></option>").val("-1").html("请选择"))
//                $("<option></option>").val("").html("").appendTo("#<%=ddlDrs.ClientID %>");

            }
        }

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Xys.Remp.Enterprise.Services.Interface;
using Xys.Remp.Enterprise.Entity;
using Xys.Remp.Core;
using Xys.Remp.Security;
using System.Web.SessionState;
using Xys.Remp.Enterprise.Common;
using RempWeb = Xys.Remp.Web;
using System.Text;
using Xys.Remp.Serialize.Json;
namespace Xys.Stroke.Web.Archives
{
    public class AjaxHelper : IHttpHandler, IRequiresSessionState
    {

        public void ProcessRequest(HttpContext context)
        {
            string validatorType = RempWeb.ComUtils.GetQueryStringToString("validatorType");
            if (validatorType != string.Empty)
            {
                if (validatorType == "GetDoctorByOrgId")
                {
                    int? orgID = RempWeb.ComUtils.GetQueryStringToInt("orgID");
                    if (orgID.HasValue)
                    {
                        OrganizationInfo orgInfo = ServiceFactory.GetService<IOpenOrganizationService>().GetFirstParentOrgByGroupId((int)orgID);
                        if (orgInfo != null)
                        {
                            List<DoctorInfo> doctorList = ServiceFactory.GetService<IOpenDoctorService>().GetDoctorListAndUnderByOrgId((int)orgInfo.OrgID, true);
                            if (doctorList.Count > 0)
                            {
                                //StringBuilder sb = new StringBuilder();
                                //sb.Append("[");
                                //foreach (DoctorInfo doctor in doctorList)
                                //{
                                //    sb.Append("{\"ID\":\"" + doctor.ID + "\",\"Name\":\"" + doctor.DrName + "\"},");
                                //}

                                //sb.Remove(sb.Length - 1, 1);
                                //sb.Append("]");
                               
                                ResponseValidatorValue(context,doctorList.JsonSerialize());
                            }
                            else
                            {
                                ResponseValidatorValue(context, "");
                            }
                        }
                    }
                }
                //else if (validatorType == "")
                //{
                //}

            }
        }

        public void ResponseValidatorValue(HttpContext context, string validatorValue)
        {
            context.Response.Expires = 0;
            context.Response.Buffer = true;
            context.Response.ExpiresAbsolute = DateTime.Now.AddSeconds(-1);
            context.Response.AddHeader("pragma", "no-cache");
            context.Response.CacheControl = "no-cache";
            context.Response.ClearContent();
            context.Response.ContentType = ("text/plain");
            context.Response.Cache.SetCacheability(HttpCacheability.NoCache);
            context.Response.Write(validatorValue);
            context.Response.Flush();
            context.Response.End();
        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}