public void GetDateByID(HttpContext context) { string callback = context.Request["jsoncallback"]; string OrderID = context.Request["OrderID"]; //序列化 System.Web.Script.Serialization.JavaScriptSerializer jss = new System.Web.Script.Serialization.JavaScriptSerializer(); EmsModel.PlanExperiment mod = new EmsBLL.PlanExperiment().GetEmsModel(Convert.ToInt32(OrderID)); //输出Json HttpContext.Current.Response.Write(callback + "({\"result\":" + jss.Serialize(mod) + "})"); HttpContext.Current.Response.End(); }
/// <summary> /// 获得实验数据- 用于日历 /// </summary> /// <returns></returns> public void GetExperiment_Calendar(HttpContext context) { string callback = context.Request["jsoncallback"]; string isStatus = context.Request["isStatus"]; EmsBLL.PlanExperiment BLeci = new EmsBLL.PlanExperiment(); List <EmsModel.View_Calendar_Land> List = BLeci.GetDataFroDateTime(DateTime.Now.ToString("yyyy-MM-dd"), isStatus); System.Web.Script.Serialization.JavaScriptSerializer jss = new System.Web.Script.Serialization.JavaScriptSerializer(); //jss.Serialize(ModelExperiment); context.Response.Write(callback + "({\"result\":" + jss.Serialize(List) + "})"); context.Response.End(); }