Esempio n. 1
0
    private void GetData()
    {
        string strWhere = "1=1";
        string year     = Request["year"];
        string month    = Request["month"];
        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 TEnvFillDustLogic().CreateShowDT();

        CommonLogic com = new CommonLogic();
        DataTable   dt  = com.GetFillData(strWhere,
                                          dtShow,
                                          "",
                                          TEnvPointDustVo.T_ENV_POINT_DUST_TABLE,
                                          TEnvPDustItemVo.T_ENV_P_DUST_ITEM_TABLE,
                                          TEnvFillDustVo.T_ENV_FILL_DUST_TABLE,
                                          TEnvFillDustItemVo.T_ENV_FILL_DUST_ITEM_TABLE,
                                          SerialType.T_ENV_FILL_DUST,
                                          SerialType.T_ENV_FILL_DUST_ITEM,
                                          "0");
        string json = DataTableToJsonUnsureCol(dt);

        //DataTable dtAllItem = new DataTable();//动态监测项目信息
        //DataTable dt = new TEnvFillDustLogic().GetDustFillData(year, month, ref dtAllItem, pointId,SerialType.T_ENV_FILL_DUST, SerialType.T_ENV_FILL_DUST_ITEM);

        // string json = DataTableToJsonUnsureCol(dt, dtAllItem,"T_ENV_FILL_DUST_ITEM@");
        Response.ContentType = "application/json;charset=utf-8";
        Response.Write(json);
        Response.End();
    }
Esempio n. 2
0
    private void GetFillID()
    {
        string year  = Request["year"];
        string month = Request["month"];

        TEnvFillDustVo envFillDustVo = new TEnvFillDustVo();

        envFillDustVo.YEAR  = year;
        envFillDustVo.MONTH = month;

        envFillDustVo = new TEnvFillDustLogic().Details(envFillDustVo);

        string json = "{\"ID\":\"" + envFillDustVo.ID + "\",\"STATUS\":\"" + envFillDustVo.STATUS + "\"}";

        Response.ContentType = "application/json;charset=utf-8";
        Response.Write(json);
        Response.End();
    }