コード例 #1
0
    private void GetFillID()
    {
        string year  = Request["year"];
        string month = Request["month"];

        TEnvFillLakeVo envFillLakeVo = new TEnvFillLakeVo();

        envFillLakeVo.YEAR  = year;
        envFillLakeVo.MONTH = month;

        envFillLakeVo = new TEnvFillLakeLogic().Details(envFillLakeVo);

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

        Response.ContentType = "application/json;charset=utf-8";
        Response.Write(json);
        Response.End();
    }
コード例 #2
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 + "'";
        }

        //填报表需要显示信息(注:这Table里面的第一列数据要与填报表的列名一致)
        DataTable dtShow = new DataTable();

        dtShow = new TEnvFillLakeLogic().CreateShowDT_ZZ();

        CommonLogic com = new CommonLogic();
        DataTable   dt  = com.GetFillData(strWhere,
                                          dtShow,
                                          TEnvPLakeVo.T_ENV_P_LAKE_TABLE,
                                          TEnvPLakeVVo.T_ENV_P_LAKE_V_TABLE,
                                          TEnvPLakeVItemVo.T_ENV_P_LAKE_V_ITEM_TABLE,
                                          TEnvFillLakeVo.T_ENV_FILL_LAKE_TABLE,
                                          TEnvFillLakeItemVo.T_ENV_FILL_LAKE_ITEM_TABLE,
                                          SerialType.T_ENV_FILL_LAKE,
                                          SerialType.T_ENV_FILL_LAKE_ITEM,
                                          "1");

        string json = DataTableToJsonUnsureCol(dt);

        Response.ContentType = "application/json";
        Response.Write(json);
        Response.End();
    }