private void GetSummary()
    {
        string pointId = Request["pointId"];

        DataTable dt = new TEnvFillNoiseFunctionSummaryLogic().SelectByTable(new TEnvFillNoiseFunctionSummaryVo()
        {
            POINT_CODE = pointId
        });

        string json = LigerGridDataToJson(dt, dt.Rows.Count);

        Response.ContentType = "application/json;charset=utf-8";
        Response.Write(json);
        Response.End();
    }
Exemplo n.º 2
0
    private void GetFillID()
    {
        string year  = Request["year"];
        string quter = Request["quter"];

        TEnvFillNoiseFunctionSummaryVo envFillNoiseFunctionSummaryVo = new TEnvFillNoiseFunctionSummaryVo();

        envFillNoiseFunctionSummaryVo.YEAR  = year;
        envFillNoiseFunctionSummaryVo.QUTER = quter;

        envFillNoiseFunctionSummaryVo = new TEnvFillNoiseFunctionSummaryLogic().Details(envFillNoiseFunctionSummaryVo);

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

        Response.ContentType = "application/json;charset=utf-8";
        Response.Write(json);
        Response.End();
    }
    private void SaveData()
    {
        bool   result     = true;
        string ID         = Request["id"];
        string updateName = Request["updateName"];
        string value      = Request["value"];
        string PointID    = Request["pointId"];

        //判断列名是不包含'@',如果包含表示编辑填报表数据时的保存数据,否则表示编辑汇总表时的保存
        if (updateName.Contains("@"))
        {
            CommonLogic com = new CommonLogic();

            result = com.UpdateCommonFill(updateName, value, ID, "");

            if (result)
            {
                string[] str = updateName.Split('@');
                //如果更新保存的值是LEQ时,则更新功能区噪声汇总表数据
                if (str[2].ToUpper().TrimEnd().TrimStart() == "LEQ")
                {
                    int n = new TEnvFillNoiseFunctionSummaryLogic().UpdateFunctionSummary(PointID, str[1].ToString());
                }
            }
        }
        else
        {
            if (new TEnvFillNoiseFunctionSummaryLogic().UpdateSummary(ID, updateName, value) > 0)
            {
                result = true;
            }
            else
            {
                result = false;
            }
        }

        Response.ContentType = "application/json";
        Response.Write("{\"result\":\"" + (result ? "success" : "fail") + "\"}");
        Response.End();
    }