Esempio n. 1
0
        public void ProcessRequest(HttpContext context)
        {
            // context.Response.ContentType = "text/plain";
            //int empid=2;
            //string name="服务员";
            //empid = 1;
            string name = context.Request.QueryString["hotName"].ToString();
            //name="送快递";
            int               empid  = Convert.ToInt32(context.Request.QueryString["empId"].ToString());
            PTJobTableBll     ptbll  = new PTJobTableBll();
            List <PTJobTable> ptlist = ptbll.GetInfoPT(empid, name);
            //context.Response.Write(ptlist);
            JavaScriptSerializer ptjs = new JavaScriptSerializer();
            string ptStr = ptjs.Serialize(ptlist);

            context.Response.Write(ptStr);

            //EmployeeTableBll ebll = new EmployeeTableBll();
            //List<EmployeeTable> elist = ebll.GetInfoE();

            //JavaScriptSerializer ejs = new JavaScriptSerializer();
            //string eStr = ejs.Serialize(elist);
            //context.Response.Write(eStr);

            //PTJobTableBll ptbll = new PTJobTableBll();
            //EmployeeTableBll ebll = new EmployeeTableBll();
            //List<object> all = new List<object>();
            //all.Add(ptbll.GetInfoPT());
            //all.Add(ebll.GetInfoE());
            //JavaScriptSerializer js = new JavaScriptSerializer();
            //string str = js.Serialize(all);
            //context.Response.Write(str);
        }
Esempio n. 2
0
        public void ProcessRequest(HttpContext context)
        {
            JavaScriptSerializer jss   = new JavaScriptSerializer();
            PTJobTableBll        ptBll = new PTJobTableBll();
            PTandCompanyBll      peBll = new PTandCompanyBll();
            StringBuilder        sb    = new StringBuilder();
            List <Object>        index = new List <Object> ();

            index.Add(ptBll.getHotName());
            index.Add(peBll.getHotName());
            try
            {
                jss.Serialize(index, sb);
            }
            catch
            {
                sb.Append("好像出了点错误");
            }

            context.Response.Write(sb.ToString());
        }