private void GetModelByBatchId(HttpContext context) { string batchId = ""; if (null != context.Request.QueryString["batchId"]) { batchId = context.Request.QueryString["batchId"].ToString().Trim(); } BLL.T_Verif_Batch bll_verif_batch = new BLL.T_Verif_Batch(); List <Model.T_Verif_Batch> list = bll_verif_batch.GetModelList(" 1=1 and batchId=" + batchId); Model.T_Verif_Batch model; if (list.Count > 0) { model = list[0]; context.Response.Write(JsonHelper.Object2Json <Model.T_Verif_Batch>(model)); } }
private void GetModelByBatchId(HttpContext context) { string batchId = ""; if (null != context.Request.QueryString["batchId"]) { batchId = context.Request.QueryString["batchId"].ToString().Trim(); } BLL.T_Verif_Batch bll_verif_batch = new BLL.T_Verif_Batch(); List<Model.T_Verif_Batch> list = bll_verif_batch.GetModelList(" 1=1 and batchId="+batchId); Model.T_Verif_Batch model; if (list.Count > 0) { model = list[0]; context.Response.Write(JsonHelper.Object2Json<Model.T_Verif_Batch>(model)); } }