private void GetData() { string strWhere = "1=1"; string year = Request["year"]; string month = Request["month"]; // string areacode = Request["areacode"]; //DataTable dt = new TEnvFillAir30Logic().GetAir30FillData(year, month, areacode); //string json = LigerGridDataToJson(dt, dt.Rows.Count); //Response.ContentType = "application/json;charset=utf-8"; string pointId = Request["pointId"]; //拼写条件语句(注:条件中的列名要与点位上的列名一致) if (year != "") { strWhere += " and YEAR='" + year + "'"; } if (month != "") { strWhere += " and MONTH='" + month + "'"; } if (pointId != "") { strWhere += " and ID='" + pointId + "'"; } DataTable dtShow = new DataTable();//填报表需要显示信息 dtShow = new TEnvFillAir30Logic().CreateShowDT(); CommonLogic com = new CommonLogic(); DataTable dt = com.GetFillData(strWhere, dtShow, "", TEnvPAir30Vo.T_ENV_P_AIR30_TABLE, TEnvPAir30ItemVo.T_ENV_P_AIR30_ITEM_TABLE, TEnvFillAir30Vo.T_ENV_FILL_AIR30_TABLE, TEnvFillAir30ItemVo.T_ENV_FILL_AIR30_ITEM_TABLE, SerialType.T_ENV_FILL_AIR30, SerialType.T_ENV_FILL_AIR30_ITEM, "0"); string json = DataTableToJsonUnsureCol(dt); Response.ContentType = "application/json;charset=utf-8"; Response.Write(json); Response.End(); }
private void GetFillID() { string year = Request["year"]; string month = Request["month"]; TEnvFillAir30Vo envFillAir30Vo = new TEnvFillAir30Vo(); envFillAir30Vo.YEAR = year; envFillAir30Vo.MONTH = month; envFillAir30Vo = new TEnvFillAir30Logic().Details(envFillAir30Vo); string json = "{\"ID\":\"" + envFillAir30Vo.ID + "\",\"STATUS\":\"" + envFillAir30Vo.STATUS + "\"}"; Response.ContentType = "application/json;charset=utf-8"; Response.Write(json); Response.End(); }