Exemplo n.º 1
0
    private void GetFillID()
    {
        string year  = Request["year"];
        string month = Request["month"];

        TEnvFillOffshoreVo envFillOffshoreVo = new TEnvFillOffshoreVo();

        envFillOffshoreVo.YEAR  = year;
        envFillOffshoreVo.MONTH = month;

        envFillOffshoreVo = new TEnvFillOffshoreLogic().Details(envFillOffshoreVo);

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

        Response.ContentType = "application/json;charset=utf-8";
        Response.Write(json);
        Response.End();
    }
Exemplo n.º 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 + "'";
        }
        //DataTable dt = new TEnvFillOffshoreLogic().GetOffShoreFillData(year, month, pointId);
        //string json = DataTableToJsonUnsureCol(dt, "_unSure");
        //Response.ContentType = "application/json";
        DataTable dtShow = new DataTable();//填报表需要显示信息

        dtShow = new TEnvFillOffshoreLogic().CreateShowDT();

        CommonLogic com = new CommonLogic();
        DataTable   dt  = com.GetFillData(strWhere,
                                          dtShow,
                                          "",
                                          TEnvPointOffshoreVo.T_ENV_POINT_OFFSHORE_TABLE,
                                          TEnvPointOffshoreItemVo.T_ENV_POINT_OFFSHORE_ITEM_TABLE,
                                          TEnvFillOffshoreVo.T_ENV_FILL_OFFSHORE_TABLE,
                                          TEnvFillOffshoreItemVo.T_ENV_FILL_OFFSHORE_ITEM_TABLE,
                                          SerialType.T_ENV_FILL_OFFSHORE,
                                          SerialType.T_ENV_FILL_OFFSHORE_ITEM,
                                          "0");
        string json = DataTableToJsonUnsureCol(dt);

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