private string GetPoint()
    {
        string    type       = Request["type"];       //监测类别
        string    year       = Request["year"];       //年度
        string    searchType = Request["searchType"]; //查询类型
        string    half       = Request["half"];       //半年
        string    quarter    = Request["quarter"];    //季度
        string    month      = Request["month"];      //月度
        string    Select     = string.Empty;
        string    TableName  = string.Empty;
        string    Where      = string.Empty;
        string    MonthWhere = string.Empty;
        DataTable dt         = new DataTable();
        string    strDes     = string.Empty;

        string months = getMonths(searchType, half, quarter, month, ref strDes);

        switch (type)
        {
        case "EnvRiver":     //河流
            Select    = "distinct SECTION_CODE CODE,SECTION_NAME NAME";
            TableName = "T_ENV_P_RIVER a inner join T_ENV_P_RIVER_V b on(a.ID=b.SECTION_ID)";
            Where     = "YEAR='" + year + "' " + (months == "" ? "" : "and MONTH in(" + months + ")") + " and IS_DEL='0'";
            dt        = new FillQryLogic().GetPointInfo(Select, TableName, Where);
            break;

        case "EnvDrinking":     //地下饮用水
            Select    = "distinct POINT_CODE CODE,POINT_NAME NAME";
            TableName = "T_ENV_P_DRINK_UNDER";
            Where     = "YEAR='" + year + "' " + (months == "" ? "" : "and MONTH in(" + months + ")") + " and IS_DEL='0'";
            dt        = new FillQryLogic().GetPointInfo(Select, TableName, Where);
            break;

        case "EnvReservoir":     //湖库
            Select    = "distinct SECTION_CODE CODE,SECTION_NAME NAME";
            TableName = "T_ENV_P_LAKE a inner join T_ENV_P_LAKE_V b on(a.ID=b.SECTION_ID)";
            Where     = "YEAR='" + year + "' " + (months == "" ? "" : "and MONTH in(" + months + ")") + " and IS_DEL='0'";
            dt        = new FillQryLogic().GetPointInfo(Select, TableName, Where);
            break;

        default:
            dt.Columns.Add("CODE", typeof(String));
            dt.Columns.Add("NAME", typeof(String));
            break;
        }

        //加入全部
        DataRow dr = dt.NewRow();

        dr["NAME"] = "--全部--";
        dt.Rows.InsertAt(dr, 0);
        string json = DataTableToJson(dt);

        return(json);
    }
Exemple #2
0
    private string GetData()
    {
        string StartDate = Request["startdate"];
        string EndDate   = Request["enddate"];

        DataTable dt = new DataTable();

        dt = new FillQryLogic().GetAirAvgData(StartDate, EndDate);

        string json = DataTableToJsonUnsureCol(dt);

        return(json);
    }
Exemple #3
0
    private string GetData()
    {
        string StartDate = Request["startdate"];
        string EndDate   = Request["enddate"];
        string PointCode = Request["pointcode"];

        DataTable dt = new DataTable();

        dt = new FillQryLogic().GetAirPointPullutionData(StartDate, EndDate, PointCode);

        string json = DataTableToJsonUnsureCol(dt);

        return(json);
    }
Exemple #4
0
    private string GetData()
    {
        string    type       = Request["type"];       //监测类别
        string    year       = Request["year"];       //年度
        string    searchType = Request["searchType"]; //查询类型
        string    half       = Request["half"];       //半年
        string    quarter    = Request["quarter"];    //季度
        string    month      = Request["month"];      //月度
        string    point      = Request["point"];      //监测点
        DataTable dt         = new DataTable();
        string    strDes     = string.Empty;

        string months = getMonths(searchType, half, quarter, month, ref strDes);

        dt = new FillQryLogic().GetDataInfo(type, year, months, point, strDes);

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

        return(json);
    }
Exemple #5
0
    private string GetPoint()
    {
        string StartDate = Request["startdate"];
        string EndDate   = Request["enddate"];

        string    Select    = string.Empty;
        string    TableName = string.Empty;
        string    Where     = "1=1";
        DataTable dt        = new DataTable();

        Select    = "distinct POINT_CODE CODE, POINT_NAME NAME";
        TableName = "T_ENV_P_AIR";

        if (StartDate.Length > 0 && EndDate.Length > 0)
        {
            StartDate = DateTime.Parse(StartDate).ToString("yyyy-MM-01");
            EndDate   = DateTime.Parse(EndDate).ToString("yyyy-MM-01");
            Where    += " and CAST(YEAR+'-'+MONTH+'-01' as DATETIME) between '" + StartDate + "' and '" + EndDate + "' and IS_DEL='0'";
        }
        else if (StartDate.Length > 0 && EndDate.Length == 0)
        {
            StartDate = DateTime.Parse(StartDate).ToString("yyyy-MM-01");
            Where    += " and CAST(YEAR+'-'+MONTH+'-01' as DATETIME) >='" + StartDate + "' and IS_DEL='0'";
        }
        else if (StartDate.Length == 0 && EndDate.Length > 0)
        {
            EndDate = DateTime.Parse(EndDate).ToString("yyyy-MM-01");
            Where  += " and CAST(YEAR+'-'+MONTH+'-01' as DATETIME) <='" + EndDate + "' and IS_DEL='0'";
        }

        dt = new FillQryLogic().GetPointInfo(Select, TableName, Where);

        //加入全部
        DataRow dr = dt.NewRow();

        dr["NAME"] = "--全部--";
        dt.Rows.InsertAt(dr, 0);
        string json = DataTableToJson(dt);

        return(json);
    }
    private string GetData()
    {
        string    type       = Request["type"];       //监测类别
        string    year       = Request["year"];       //年度
        string    searchType = Request["searchType"]; //查询类型
        string    half       = Request["half"];       //半年
        string    quarter    = Request["quarter"];    //季度
        string    month      = Request["month"];      //月度
        string    point      = Request["point"];      //监测点
        string    river_id   = Request["river_id"];   //河流ID
        DataTable dt         = new DataTable();
        string    strDes     = string.Empty;

        string months = getMonths(searchType, half, quarter, month, ref strDes);

        dt = new FillQryLogic().GetFillEvalData(type, year, months, point, river_id);

        string json = DataTableToJsonUnsureCol(dt);

        return(json);
    }
Exemple #7
0
    private string GetPoint()
    {
        string    type       = Request["type"];       //监测类别
        string    year       = Request["year"];       //年度
        string    searchType = Request["searchType"]; //查询类型
        string    half       = Request["half"];       //半年
        string    quarter    = Request["quarter"];    //季度
        string    month      = Request["month"];      //月度
        string    Select     = string.Empty;
        string    TableName  = string.Empty;
        string    Where      = string.Empty;
        string    MonthWhere = string.Empty;
        DataTable dt         = new DataTable();
        string    strDes     = string.Empty;

        string months = getMonths(searchType, half, quarter, month, ref strDes);

        switch (type)
        {
        case "EnvRiver":     //河流
            Select    = "distinct SECTION_CODE CODE,SECTION_NAME NAME";
            TableName = "T_ENV_P_RIVER a inner join T_ENV_P_RIVER_V b on(a.ID=b.SECTION_ID)";
            Where     = "YEAR='" + year + "' " + (months == "" ? "" : "and MONTH in(" + months + ")") + " and IS_DEL='0'";
            dt        = new FillQryLogic().GetPointInfo(Select, TableName, Where);
            break;

        case "AreaNoise":     //区域环境噪声
            Select    = "distinct POINT_CODE CODE,POINT_NAME NAME";
            TableName = "T_ENV_P_NOISE_AREA";
            Where     = "YEAR='" + year + "' " + (months == "" ? "" : "and MONTH in(" + months + ")") + " and IS_DEL='0'";
            dt        = new FillQryLogic().GetPointInfo(Select, TableName, Where);
            break;

        case "EnvRoadNoise":     //道路交通噪声
            Select    = "distinct POINT_CODE CODE,POINT_NAME NAME";
            TableName = "T_ENV_P_NOISE_ROAD";
            Where     = "YEAR='" + year + "' " + (months == "" ? "" : "and MONTH in(" + months + ")") + " and IS_DEL='0'";
            dt        = new FillQryLogic().GetPointInfo(Select, TableName, Where);
            break;

        case "FunctionNoise":     //功能区噪声
            Select    = "distinct POINT_CODE CODE,POINT_NAME NAME";
            TableName = "T_ENV_P_NOISE_FUNCTION";
            Where     = "YEAR='" + year + "' " + (months == "" ? "" : "and MONTH in(" + months + ")") + " and IS_DEL='0'";
            dt        = new FillQryLogic().GetPointInfo(Select, TableName, Where);
            break;

        case "EnvAir":       //环境空气
            Select    = "distinct POINT_CODE CODE,POINT_NAME NAME";
            TableName = "T_ENV_P_AIR";
            Where     = "YEAR='" + year + "' " + (months == "" ? "" : "and MONTH in(" + months + ")") + " and IS_DEL='0'";
            dt        = new FillQryLogic().GetPointInfo(Select, TableName, Where);
            break;

        case "EnvDrinking":     //地下饮用水
            Select    = "distinct POINT_CODE CODE,POINT_NAME NAME";
            TableName = "T_ENV_P_DRINK_UNDER";
            Where     = "YEAR='" + year + "' " + (months == "" ? "" : "and MONTH in(" + months + ")") + " and IS_DEL='0'";
            dt        = new FillQryLogic().GetPointInfo(Select, TableName, Where);
            break;

        case "EnvDrinkingSource":     //饮用水源地
            Select    = "distinct SECTION_CODE CODE,SECTION_NAME NAME";
            TableName = "T_ENV_P_DRINK_SRC a inner join T_ENV_P_DRINK_SRC_V b on(a.ID=b.SECTION_ID)";
            Where     = "YEAR='" + year + "' " + (months == "" ? "" : "and MONTH in(" + months + ")") + " and IS_DEL='0'";
            dt        = new FillQryLogic().GetPointInfo(Select, TableName, Where);
            break;

        case "EnvDust":     //降尘
            Select    = "distinct POINT_CODE CODE,POINT_NAME NAME";
            TableName = "T_ENV_P_DUST";
            Where     = "YEAR='" + year + "' " + (months == "" ? "" : "and MONTH in(" + months + ")") + " and IS_DEL='0'";
            dt        = new FillQryLogic().GetPointInfo(Select, TableName, Where);
            break;

        case "EnvDWAir":     //双三十废气
            Select    = "distinct POINT_CODE CODE,POINT_NAME NAME";
            TableName = "T_ENV_P_AIR30";
            Where     = "YEAR='" + year + "' " + (months == "" ? "" : "and MONTH in(" + months + ")") + " and IS_DEL='0'";
            dt        = new FillQryLogic().GetPointInfo(Select, TableName, Where);
            break;

        case "EnvDWWater":     //双三十废水
            Select    = "distinct SECTION_CODE CODE,SECTION_NAME NAME";
            TableName = "T_ENV_P_RIVER30 a inner join T_ENV_P_RIVER30_V b on(a.ID=b.SECTION_ID)";
            Where     = "YEAR='" + year + "' " + (months == "" ? "" : "and MONTH in(" + months + ")") + " and IS_DEL='0'";
            dt        = new FillQryLogic().GetPointInfo(Select, TableName, Where);
            break;

        case "EnvEstuaries":     //入海河口
            Select    = "distinct SECTION_CODE CODE,SECTION_NAME NAME";
            TableName = "T_ENV_P_ESTUARIES a inner join T_ENV_P_ESTUARIES_V b on(a.ID=b.SECTION_ID)";
            Where     = "YEAR='" + year + "' " + (months == "" ? "" : "and MONTH in(" + months + ")") + " and IS_DEL='0'";
            dt        = new FillQryLogic().GetPointInfo(Select, TableName, Where);
            break;

        case "EnvMudRiver":     //沉积物(河流)
            Select    = "distinct SECTION_CODE CODE,SECTION_NAME NAME";
            TableName = "T_ENV_P_MUD_RIVER a inner join T_ENV_P_MUD_RIVER_V b on(a.ID=b.SECTION_ID)";
            Where     = "YEAR='" + year + "' " + (months == "" ? "" : "and MONTH in(" + months + ")") + " and IS_DEL='0'";
            dt        = new FillQryLogic().GetPointInfo(Select, TableName, Where);
            break;

        case "EnvMudSea":     //沉积物(海水)
            Select    = "distinct SECTION_CODE CODE,SECTION_NAME NAME";
            TableName = "T_ENV_P_MUD_SEA a inner join T_ENV_P_MUD_SEA_V b on(a.ID=b.SECTION_ID)";
            Where     = "YEAR='" + year + "' " + (months == "" ? "" : "and MONTH in(" + months + ")") + " and IS_DEL='0'";
            dt        = new FillQryLogic().GetPointInfo(Select, TableName, Where);
            break;

        case "EnvSoil":     //土壤
            Select    = "distinct POINT_CODE CODE,POINT_NAME NAME";
            TableName = "T_ENV_P_SOIL";
            Where     = "YEAR='" + year + "' " + (months == "" ? "" : "and MONTH in(" + months + ")") + " and IS_DEL='0'";
            dt        = new FillQryLogic().GetPointInfo(Select, TableName, Where);
            break;

        case "EnvPSoild":     //固废
            Select    = "distinct POINT_CODE CODE,POINT_NAME NAME";
            TableName = "T_ENV_P_SOLID";
            Where     = "YEAR='" + year + "' " + (months == "" ? "" : "and MONTH in(" + months + ")") + " and IS_DEL='0'";
            dt        = new FillQryLogic().GetPointInfo(Select, TableName, Where);
            break;

        case "EnvRain":     //降水
            Select    = "distinct POINT_CODE CODE,POINT_NAME NAME";
            TableName = "T_ENV_P_RAIN";
            Where     = "YEAR='" + year + "' " + (months == "" ? "" : "and MONTH in(" + months + ")") + " and IS_DEL='0'";
            dt        = new FillQryLogic().GetPointInfo(Select, TableName, Where);
            break;

        case "EnvReservoir":     //湖库
            Select    = "distinct SECTION_CODE CODE,SECTION_NAME NAME";
            TableName = "T_ENV_P_LAKE a inner join T_ENV_P_LAKE_V b on(a.ID=b.SECTION_ID)";
            Where     = "YEAR='" + year + "' " + (months == "" ? "" : "and MONTH in(" + months + ")") + " and IS_DEL='0'";
            dt        = new FillQryLogic().GetPointInfo(Select, TableName, Where);
            break;

        case "EnvSeaBath":     //海水浴场
            Select    = "distinct POINT_CODE CODE,POINT_NAME NAME";
            TableName = "T_ENV_P_SEABATH";
            Where     = "YEAR='" + year + "' " + (months == "" ? "" : "and MONTH in(" + months + ")") + " and IS_DEL='0'";
            dt        = new FillQryLogic().GetPointInfo(Select, TableName, Where);
            break;

        case "EnvSear":     //近岸海域
            Select    = "distinct POINT_CODE CODE,POINT_NAME NAME";
            TableName = "T_ENV_P_SEA";
            Where     = "YEAR='" + year + "' " + (months == "" ? "" : "and MONTH in(" + months + ")") + " and IS_DEL='0'";
            dt        = new FillQryLogic().GetPointInfo(Select, TableName, Where);
            break;

        case "EnvSource":     //近岸直排
            Select    = "distinct POINT_CODE CODE,POINT_NAME NAME";
            TableName = "T_ENV_P_OFFSHORE";
            Where     = "YEAR='" + year + "' " + (months == "" ? "" : "and MONTH in(" + months + ")") + " and IS_DEL='0'";
            dt        = new FillQryLogic().GetPointInfo(Select, TableName, Where);
            break;

        case "EnvSpeed":     //盐酸盐化速率
            Select    = "distinct POINT_CODE CODE,POINT_NAME NAME";
            TableName = "T_ENV_P_ALKALI";
            Where     = "YEAR='" + year + "' " + (months == "" ? "" : "and MONTH in(" + months + ")") + " and IS_DEL='0'";
            dt        = new FillQryLogic().GetPointInfo(Select, TableName, Where);
            break;

        case "EnvStbc":     //生态补偿
            Select    = "distinct POINT_CODE CODE,POINT_NAME NAME";
            TableName = "T_ENV_P_PAYFOR";
            Where     = "YEAR='" + year + "' " + (months == "" ? "" : "and MONTH in(" + months + ")") + " and IS_DEL='0'";
            dt        = new FillQryLogic().GetPointInfo(Select, TableName, Where);
            break;

        default:
            dt.Columns.Add("CODE", typeof(String));
            dt.Columns.Add("NAME", typeof(String));
            break;
        }

        //加入全部
        DataRow dr = dt.NewRow();

        dr["NAME"] = "--全部--";
        dt.Rows.InsertAt(dr, 0);
        string json = DataTableToJson(dt);

        return(json);
    }
Exemple #8
0
    protected void Page_Load(object sender, EventArgs e)
    {
        ISheet    sheet        = null;
        DataTable dt           = new DataTable();
        string    strPoint_ID  = string.Empty;
        string    strType      = string.Empty;
        string    strAction    = string.Empty;
        string    strYear      = string.Empty;
        string    strMonth     = string.Empty;
        string    strXmlPath   = string.Empty;
        string    strExcelPath = string.Empty;
        string    strSheetName = string.Empty;
        string    strFileName  = string.Empty;

        if (Request["type"] != null && Request["action"] != null)
        {
            string strDes = string.Empty;

            string action = Request["action"].ToString();
            strType  = Request["type"].ToString();
            strYear  = Request["year"].ToString();
            strMonth = Request["month"];

            if (action.Equals("FillData"))
            {
                #region//填报的导出
                switch (strType)
                {
                //河流导出
                case "River":
                    strXmlPath   = "../xmlTemp/QY_Export/RiverTemple.xml";
                    strExcelPath = "../excelTemp/QY_excelTemp/河流.xls";
                    strSheetName = "Sheet1";
                    strFileName  = "河流.xls";
                    sheet        = ExcelExport(strYear, strMonth, strXmlPath, strExcelPath, strSheetName);
                    sheet        = ModifySheetTitle(sheet, strYear, strMonth);
                    break;

                //排污河流导出 黄进军 添加20141114
                case "SewageRiver":
                    strXmlPath   = "../xmlTemp/QY_Export/SewageRiverTemple.xml";
                    strExcelPath = "../excelTemp/QY_excelTemp/产业转移工业园排污河流.xls";
                    strSheetName = "Sheet1";
                    strFileName  = "产业转移工业园排污河流.xls";
                    sheet        = ExcelExport(strYear, strMonth, strXmlPath, strExcelPath, strSheetName);
                    sheet        = ModifySheetTitle(sheet, strYear, strMonth);
                    break;

                //湖库水质 河流导出 黄进军 添加20141114
                case "LakeRiver":
                    strXmlPath   = "../xmlTemp/QY_Export/LakeRiverTemple.xml";
                    strExcelPath = "../excelTemp/QY_excelTemp/湖库水质.xls";
                    strSheetName = "Sheet1";
                    strFileName  = "湖库水质.xls";
                    sheet        = ExcelExport(strYear, strMonth, strXmlPath, strExcelPath, strSheetName);
                    sheet        = ModifySheetTitle(sheet, strYear, strMonth);
                    break;

                //水质月报 河流导出 黄进军 添加20141114
                case "WQRiver":
                    strXmlPath   = "../xmlTemp/QY_Export/WQRiverTemple.xml";
                    strExcelPath = "../excelTemp/QY_excelTemp/水质月报.xls";
                    strSheetName = "Sheet1";
                    strFileName  = "水质月报.xls";
                    sheet        = ExcelExport(strYear, strMonth, strXmlPath, strExcelPath, strSheetName);
                    sheet        = ModifySheetTitle(sheet, strYear, strMonth);
                    break;

                //高桥 河流导出 黄进军 添加20141114
                case "GQRiver":
                    strXmlPath   = "../xmlTemp/QY_Export/GQRiverTemple.xml";
                    strExcelPath = "../excelTemp/QY_excelTemp/高桥.xls";
                    strSheetName = "Sheet1";
                    strFileName  = "高桥.xls";
                    sheet        = ExcelExport(strYear, strMonth, strXmlPath, strExcelPath, strSheetName);
                    sheet        = ModifySheetTitle(sheet, strYear, strMonth);
                    break;

                //界牌 河流导出 黄进军 添加20141114
                case "JPRiver":
                    strXmlPath   = "../xmlTemp/QY_Export/JPRiverTemple.xml";
                    strExcelPath = "../excelTemp/QY_excelTemp/界牌.xls";
                    strSheetName = "Sheet1";
                    strFileName  = "界牌.xls";
                    sheet        = ExcelExport(strYear, strMonth, strXmlPath, strExcelPath, strSheetName);
                    sheet        = ModifySheetTitle(sheet, strYear, strMonth);
                    break;

                //蓝藻水华 河流导出 黄进军 添加20141114
                case "LZSHRiver":
                    strXmlPath   = "../xmlTemp/QY_Export/LZSHRiverTemple.xml";
                    strExcelPath = "../excelTemp/QY_excelTemp/蓝藻水华.xls";
                    strSheetName = "Sheet1";
                    strFileName  = "蓝藻水华.xls";
                    sheet        = ExcelExport(strYear, strMonth, strXmlPath, strExcelPath, strSheetName);
                    sheet        = ModifySheetTitle(sheet, strYear, strMonth);
                    break;

                //重金属 河流导出 黄进军 添加20141114
                case "MetalRiver":
                    strXmlPath   = "../xmlTemp/QY_Export/MetalRiverTemple.xml";
                    strExcelPath = "../excelTemp/QY_excelTemp/重金属.xls";
                    strSheetName = "Sheet1";
                    strFileName  = "重金属.xls";
                    sheet        = ExcelExport(strYear, strMonth, strXmlPath, strExcelPath, strSheetName);
                    sheet        = ModifySheetTitle(sheet, strYear, strMonth);
                    break;

                //饮用水源 河流导出 黄进军 添加20141114
                case "WaterRiver":
                    strXmlPath   = "../xmlTemp/QY_Export/WaterRiverTemple.xml";
                    strExcelPath = "../excelTemp/QY_excelTemp/饮用水源.xls";
                    strSheetName = "Sheet1";
                    strFileName  = "饮用水源.xls";
                    sheet        = ExcelExport(strYear, strMonth, strXmlPath, strExcelPath, strSheetName);
                    sheet        = ModifySheetTitle(sheet, strYear, strMonth);
                    break;

                //底泥重金属导出
                case "Metal":
                    strXmlPath   = "../xmlTemp/QY_Export/Metal.xml";
                    strExcelPath = "../excelTemp/QY_excelTemp/底泥重金属.xls";
                    strSheetName = "Sheet1";
                    strFileName  = "底泥重金属.xls";
                    sheet        = ExcelExportSpecial(strYear, strMonth, strXmlPath, strExcelPath, strSheetName);
                    sheet        = ModifySheetTitle(sheet, strYear, strMonth);
                    break;

                //功能区噪声导出
                case "NoiseFun":
                    strXmlPath   = "../xmlTemp/QY_Export/FunctionNoiseTemple.xml";
                    strExcelPath = "../excelTemp/QY_excelTemp/功能区噪声.xls";
                    strSheetName = "Sheet1";
                    strFileName  = "功能区噪声.xls";
                    sheet        = ExcelExportSpecial(strYear, strMonth, strXmlPath, strExcelPath, strSheetName);
                    break;

                //道路交通噪声导出
                case "NoiseRoad":
                    strXmlPath   = "../xmlTemp/QY_Export/RoadNoiseTemple.xml";
                    strExcelPath = "../excelTemp/QY_excelTemp/道路交通噪声.xls";
                    strSheetName = "Sheet1";
                    strFileName  = "道路交通噪声.xls";
                    sheet        = ExcelExportSpecial(strYear, strMonth, strXmlPath, strExcelPath, strSheetName);
                    break;

                //区域环境噪声导出
                case "NoiseArea":
                    strXmlPath   = "../xmlTemp/QY_Export/AreaNoiseTemple.xml";
                    strExcelPath = "../excelTemp/QY_excelTemp/区域环境噪声.xls";
                    strSheetName = "Sheet1";
                    strFileName  = "区域环境噪声.xls";
                    sheet        = ExcelExportSpecial(strYear, strMonth, strXmlPath, strExcelPath, strSheetName);
                    break;

                //饮用水源地导出
                case "DrinkSource":
                    strXmlPath   = "../xmlTemp/Export/DrinkSourceTemple.xml";
                    strExcelPath = "../excelTemp/饮用水源地.xls";
                    strSheetName = "Sheet1";
                    strFileName  = "饮用水源地.xls";
                    sheet        = ExcelExport(strYear, strMonth, strXmlPath, strExcelPath, strSheetName);
                    break;

                //湖库饮用水导出 黄进军20141105
                case "DrinkUnder":
                    strXmlPath   = "../xmlTemp/QY_Export/DrinkUnderTemple.xml";
                    strExcelPath = "../excelTemp/QY_excelTemp/湖库饮用水.xls";
                    strSheetName = "Sheet1";
                    strFileName  = "湖库饮用水.xls";
                    sheet        = ExcelExport(strYear, strMonth, strXmlPath, strExcelPath, strSheetName);
                    sheet        = ModifySheetTitle(sheet, strYear, strMonth);
                    break;

                //湖库导出
                case "Lake":
                    strXmlPath   = "../xmlTemp/Export/LakeTemple.xml";
                    strExcelPath = "../excelTemp/湖库.xls";
                    strSheetName = "Sheet1";
                    strFileName  = "湖库.xls";
                    sheet        = ExcelExport(strYear, strMonth, strXmlPath, strExcelPath, strSheetName);
                    sheet        = ModifySheetTitle(sheet, strYear, strMonth);
                    break;

                //环境空气(天)
                case "Air":
                    //int Rtnresult = new TEnvFillAirLogic().ExcelOutCal(strYear, strMonth, TEnvFillAirHourVo.T_ENV_FILL_AIR_ITEM_TABLE);
                    //if (Rtnresult > 0)
                    //{
                    strXmlPath   = "../xmlTemp/QY_Export/AirTemple.xml";
                    strExcelPath = "../excelTemp/QY_excelTemp/环境空气(天).xls";
                    strSheetName = "Sheet1";
                    strFileName  = "环境空气(天).xls";
                    sheet        = ExcelExportSpecial(strYear, strMonth, strXmlPath, strExcelPath, strSheetName);
                    //}
                    break;

                //环境空(小时)
                case "AirHour":
                    strXmlPath   = "../xmlTemp/Export/AirHourTemple.xml";
                    strExcelPath = "../excelTemp/环境空气(小时)导出.xls";
                    strSheetName = "Sheet1";
                    strFileName  = "环境空(小时).xls";
                    sheet        = ExcelExportSpecial(strYear, strMonth, strXmlPath, strExcelPath, strSheetName);
                    break;

                //环境空科室(天)
                case "AirKS":
                    strXmlPath   = "../xmlTemp/Export/AirKsTemple.xml";
                    strExcelPath = "../excelTemp/环境空气科室(天)导出.xls";
                    strSheetName = "Sheet1";
                    strFileName  = "环境空气科室(天).xls";
                    sheet        = ExcelExportSpecial(strYear, strMonth, strXmlPath, strExcelPath, strSheetName);
                    break;

                //降尘
                case "Dust":
                    strXmlPath   = "../xmlTemp/QY_Export/DustTemple.xml";
                    strExcelPath = "../excelTemp/QY_excelTemp/降尘导出.xls";
                    strSheetName = "Sheet1";
                    strFileName  = "降尘.xls";
                    sheet        = ExcelExportSpecial(strYear, strMonth, strXmlPath, strExcelPath, strSheetName);
                    break;

                //硫酸盐化速率
                case "Alkali":
                    strXmlPath   = "../xmlTemp/Export/AlkaliTemple.xml";
                    strExcelPath = "../excelTemp/硫酸盐化速率导出.xls";
                    strSheetName = "Sheet1";
                    strFileName  = "硫酸盐化速率.xls";
                    sheet        = ExcelExportSpecial(strYear, strMonth, strXmlPath, strExcelPath, strSheetName);
                    break;

                //降水
                case "Rain":
                    strXmlPath   = "../xmlTemp/QY_Export/RainTemple.xml";
                    strExcelPath = "../excelTemp/QY_excelTemp/降水导出.xls";
                    strSheetName = "Sheet1";
                    strFileName  = "降水.xls";
                    sheet        = ExcelExportSpecial(strYear, strMonth, strXmlPath, strExcelPath, strSheetName);
                    break;

                //近岸直排
                case "OffShore":
                    strXmlPath   = "../xmlTemp/Export/OffShoreTemple.xml";
                    strExcelPath = "../excelTemp/近岸直排导出.xls";
                    strSheetName = "Sheet1";
                    strFileName  = "近岸直排.xls";
                    sheet        = ExcelExportSpecial(strYear, strMonth, strXmlPath, strExcelPath, strSheetName);
                    break;

                //近岸海域
                case "Sea":
                    strXmlPath   = "../xmlTemp/Export/SeaTemple.xml";
                    strExcelPath = "../excelTemp/近岸海域导出.xls";
                    strSheetName = "Sheet1";
                    strFileName  = "近岸海域.xls";
                    sheet        = ExcelExportSpecial(strYear, strMonth, strXmlPath, strExcelPath, strSheetName);
                    break;

                //入海河口
                case "Estuaries":
                    strXmlPath   = "../xmlTemp/Export/EstuariesTemple.xml";
                    strExcelPath = "../excelTemp/入海河口导出.xls";
                    strSheetName = "Sheet1";
                    strFileName  = "入海河口.xls";
                    sheet        = ExcelExport(strYear, strMonth, strXmlPath, strExcelPath, strSheetName);
                    break;

                //污染源常规(废水)
                case "PolluteWater":
                    strXmlPath   = "../xmlTemp/Export/PolluteWater.xml";
                    strExcelPath = "../excelTemp/污染源常规废水导出.xls";
                    strSheetName = "Sheet1";
                    strFileName  = "污染源常规废水导出.xls";
                    sheet        = ExcelExportSpecial(strYear, strMonth, strXmlPath, strExcelPath, strSheetName);
                    break;

                //污染源常规(废气)
                case "PolluteAir":
                    strXmlPath   = "../xmlTemp/Export/PolluteAir.xml";
                    strExcelPath = "../excelTemp/污染源常规废气导出.xls";
                    strSheetName = "Sheet1";
                    strFileName  = "污染源常规废气导出.xls";
                    sheet        = ExcelExportSpecial(strYear, strMonth, strXmlPath, strExcelPath, strSheetName);
                    break;
                }
                #endregion
            }
            else if (action.Equals("FillQry"))
            {
                string searchType = Request["searchType"]; //查询类型
                string half       = Request["half"];       //半年
                string quarter    = Request["quarter"];    //季度
                strPoint_ID = Request["point_id"];

                string months = getMonths(searchType, half, quarter, strMonth, ref strDes);

                #region//填报查询导出
                strFileName = "填报统计导出.xls";
                dt          = new FillQryLogic().GetDataInfo(strType, strYear, months, strPoint_ID, strDes);
                sheet       = CreatSheet(dt, searchType, half, quarter, strMonth);
                #endregion
            }

            #region//输出文件到浏览器
            using (MemoryStream stream = new MemoryStream())
            {
                sheet.Workbook.Write(stream);
                HttpContext curContext = HttpContext.Current;
                // 设置编码和附件格式
                curContext.Response.ContentType     = "application/vnd.ms-excel";
                curContext.Response.ContentEncoding = Encoding.UTF8;
                curContext.Response.Charset         = "";
                curContext.Response.AppendHeader("Content-Disposition",
                                                 "attachment;filename=" + HttpUtility.UrlEncode(strFileName, Encoding.UTF8));
                curContext.Response.BinaryWrite(stream.GetBuffer());
                curContext.Response.End();
            }
            #endregion
        }
    }