using System; using System.Collections.Generic; using System.Linq; using System.Web; namespace VRS.Handler.ZHC { /// /// Task_Material_Get 的摘要说明 /// public class Task_Material_Get : BasePage, IHttpHandler { DataService.BLL.zhc_task bll_task = new DataService.BLL.zhc_task(); DataService.BLL.zhc_task_material bll_task_material = new DataService.BLL.zhc_task_material(); DataService.BLL.admin_log log = new DataService.BLL.admin_log(); public override void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/plain"; string taskId = context.Request.Params["task_id"]; if (string.IsNullOrEmpty(taskId)) { context.Response.Write(GetJsonWithCode(APICode.Fail, "参数task_id不能为空!")); context.Response.End(); } var task_model = bll_task.GetModel(taskId); if (null == task_model) { context.Response.Write(GetJsonWithCode(APICode.Fail, "任务不存在!,参数task_id:" + taskId)); context.Response.End(); } var proc_list = bll_task_material.GetListOrderbyPosition(string.Format("taskId= '{0}' ", taskId)); var obj = new { task_model.taskId, task_model.taskName, task_model.taskType, task_model.taskEquipment, material = proc_list }; context.Response.Write(GetJsonWithCode(APICode.Success, obj)); context.Response.End(); } public new bool IsReusable { get { return false; } } } }