public static string deleteData(string strDelID)
    {
        if (strDelID.Length == 0)
        {
            return("0");
        }

        bool isSuccess = true;

        isSuccess = new TEnvFillAttLogic().Delete(strDelID);

        if (isSuccess)
        {
            return("1");
        }
        else
        {
            return("0");
        }
    }
    private string GetList()
    {
        string strSortname  = Request.Params["sortname"];
        string strSortorder = Request.Params["sortorder"];
        int    intPageIdx   = Convert.ToInt32(Request.Params["page"]);
        int    intPagesize  = Convert.ToInt32(Request.Params["pagesize"]);

        string strType   = (Request.Params["SrhType"] != null) ? Request.Params["SrhType"] : "";
        string strYear   = (Request.Params["SrhYear"] != null) ? Request.Params["SrhYear"] : "";
        string strSeason = (Request.Params["SrhSeason"] != null) ? Request.Params["SrhSeason"] : "";
        string strMonth  = (Request.Params["SrhMonth"] != null) ? Request.Params["SrhMonth"] : "";
        string strDay    = (Request.Params["SrhDay"] != null) ? Request.Params["SrhDay"] : "";

        DataTable     dt           = new DataTable();
        TEnvFillAttVo objFillAttVo = new TEnvFillAttVo();

        objFillAttVo.ENVTYPE = strType;
        objFillAttVo.YEAR    = strYear;
        objFillAttVo.SEASON  = strSeason;
        objFillAttVo.MONTH   = strMonth;
        objFillAttVo.DAY     = strDay;

        objFillAttVo.SORT_FIELD = "ENVTYPE,YEAR";
        objFillAttVo.SORT_TYPE  = "desc";

        int intTotalCount = new TEnvFillAttLogic().GetSelectResultCount(objFillAttVo);; //总计的数据条数

        dt = new TEnvFillAttLogic().SelectByTable(objFillAttVo, intPageIdx, intPagesize);
        for (int i = 0; i < dt.Rows.Count; i++)
        {
            i3.ValueObject.Channels.OA.ATT.TOaAttVo objAttVo = new i3.ValueObject.Channels.OA.ATT.TOaAttVo();
            objAttVo.BUSINESS_ID   = dt.Rows[i]["ID"].ToString();
            objAttVo.BUSINESS_TYPE = "EnvData";
            objAttVo = new i3.BusinessLogic.Channels.OA.ATT.TOaAttLogic().SelectByObject(objAttVo);
            dt.Rows[i]["REMARK1"] = objAttVo.ATTACH_NAME;
        }
        string strJson = CreateToJson(dt, intTotalCount);

        return(strJson);
    }
    public static string EditData(string strID, string strEnvType, string strYear, string strSeason, string strMonth, string strDay, string strRemark)
    {
        bool          isSuccess    = true;
        TEnvFillAttVo objFillAttVo = new TEnvFillAttVo();

        objFillAttVo.ENVTYPE = strEnvType;
        objFillAttVo.YEAR    = strYear;
        objFillAttVo.SEASON  = strSeason;
        objFillAttVo.MONTH   = strMonth;
        objFillAttVo.DAY     = strDay;
        objFillAttVo.REMARK  = strRemark;
        if (strID.Length > 0)
        {
            objFillAttVo.ID = strID;
            isSuccess       = new TEnvFillAttLogic().Edit(objFillAttVo);
        }
        else
        {
            objFillAttVo.ID = GetSerialNumber("t_env_fill_att_id");
            isSuccess       = new TEnvFillAttLogic().Create(objFillAttVo);
        }

        return(isSuccess ? "1" : "0");
    }