/// <summary>
        /// 对象编辑
        /// </summary>
        /// <param name="tEnvFillRain_UpdateSet">UpdateSet用户对象</param>
        /// <param name="tEnvFillRain_UpdateWhere">UpdateWhere用户对象</param>
        /// <returns>是否成功</returns>
        public bool Edit(TEnvFillRainVo tEnvFillRain_UpdateSet, TEnvFillRainVo tEnvFillRain_UpdateWhere)
        {
            string strSQL = SqlHelper.BuildUpdateExpress(tEnvFillRain_UpdateSet, TEnvFillRainVo.T_ENV_FILL_RAIN_TABLE);

            strSQL += this.BuildWhereStatement(tEnvFillRain_UpdateWhere);
            return(SqlHelper.ExecuteNonQuery(CommandType.Text, strSQL) > 0 ? true : false);
        }
        /// <summary>
        /// 对象编辑
        /// </summary>
        /// <param name="tEnvFillRain">用户对象</param>
        /// <returns>是否成功</returns>
        public bool Edit(TEnvFillRainVo tEnvFillRain)
        {
            string strSQL = SqlHelper.BuildUpdateExpress(tEnvFillRain, TEnvFillRainVo.T_ENV_FILL_RAIN_TABLE);

            strSQL += string.Format(" where ID='{0}' ", tEnvFillRain.ID);
            return(SqlHelper.ExecuteNonQuery(CommandType.Text, strSQL) > 0 ? true : false);
        }
        /// <summary>
        /// 获取对象DataTable
        /// </summary>
        /// <param name="tEnvFillRain">对象</param>
        /// <param name="iIndex">起始页码</param>
        /// <param name="iCount">每页数目</param>
        /// <returns>返回结果</returns>
        public DataTable SelectByTable(TEnvFillRainVo tEnvFillRain, int iIndex, int iCount)
        {
            string strSQL = " select * from T_ENV_FILL_RAIN {0} ";

            strSQL = String.Format(strSQL, BuildWhereStatement(tEnvFillRain));
            return(SqlHelper.ExecuteDataTable(BuildPagerExpress(strSQL, iIndex, iCount)));
        }
        /// <summary>
        /// 对象删除
        /// </summary>
        /// <param name="Id">ID</param>
        /// <returns>是否成功</returns>
        public bool Delete(TEnvFillRainVo tEnvFillRain)
        {
            string strSQL = "delete from T_ENV_FILL_RAIN ";

            strSQL += this.BuildWhereStatement(tEnvFillRain);

            return(SqlHelper.ExecuteNonQuery(CommandType.Text, strSQL) > 0 ? true : false);
        }
    private void GetFillID()
    {
        string year  = Request["year"];
        string month = Request["month"];

        TEnvFillRainVo envFillRainVo = new TEnvFillRainVo();

        envFillRainVo.YEAR  = year;
        envFillRainVo.MONTH = month;

        envFillRainVo = new TEnvFillRainLogic().Details(envFillRainVo);

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

        Response.ContentType = "application/json;charset=utf-8";
        Response.Write(json);
        Response.End();
    }
 /// <summary>
 /// 对象明细
 /// </summary>
 /// <param name="tEnvFillRain">对象条件</param>
 /// <returns>对象</returns>
 public TEnvFillRainVo Details(TEnvFillRainVo tEnvFillRain)
 {
     return(access.Details(tEnvFillRain));
 }
 public TEnvFillRainLogic(TEnvFillRainVo _tEnvFillRain)
 {
     tEnvFillRain = _tEnvFillRain;
     access       = new TEnvFillRainAccess();
 }
 /// <summary>
 /// 获得查询结果总行数,用于分页
 /// </summary>
 /// <param name="tEnvFillRain">对象</param>
 /// <returns>返回行数</returns>
 public int GetSelectResultCount(TEnvFillRainVo tEnvFillRain)
 {
     return(access.GetSelectResultCount(tEnvFillRain));
 }
 /// <summary>
 /// 对象编辑
 /// </summary>
 /// <param name="tEnvFillRain_UpdateSet">UpdateSet用户对象</param>
 /// <param name="tEnvFillRain_UpdateWhere">UpdateWhere用户对象</param>
 /// <returns>是否成功</returns>
 public bool Edit(TEnvFillRainVo tEnvFillRain_UpdateSet, TEnvFillRainVo tEnvFillRain_UpdateWhere)
 {
     return(access.Edit(tEnvFillRain_UpdateSet, tEnvFillRain_UpdateWhere));
 }
 /// <summary>
 /// 对象删除
 /// </summary>
 /// <param name="Id">ID</param>
 /// <returns>是否成功</returns>
 public bool Delete(TEnvFillRainVo tEnvFillRain)
 {
     return(access.Delete(tEnvFillRain));
 }
 /// <summary>
 /// 对象添加
 /// </summary>
 /// <param name="sysRole">对象</param>
 /// <returns>是否成功</returns>
 public bool Create(TEnvFillRainVo tEnvFillRain)
 {
     return(access.Create(tEnvFillRain));
 }
 /// <summary>
 /// 对象编辑
 /// </summary>
 /// <param name="tEnvFillRain">用户对象</param>
 /// <returns>是否成功</returns>
 public bool Edit(TEnvFillRainVo tEnvFillRain)
 {
     return(access.Edit(tEnvFillRain));
 }
 /// <summary>
 /// 根据对象获取全部数据,用Table承载
 ///  数据量较小时使用【不推荐】
 /// </summary>
 /// <param name="tEnvFillRain"></param>
 /// <returns></returns>
 public DataTable SelectByTable(TEnvFillRainVo tEnvFillRain)
 {
     return(access.SelectByTable(tEnvFillRain));
 }
        /// <summary>
        /// 对象添加
        /// </summary>
        /// <param name="tEnvFillRain">对象</param>
        /// <returns>是否成功</returns>
        public bool Create(TEnvFillRainVo tEnvFillRain)
        {
            string strSQL = SqlHelper.BuildInsertExpress(tEnvFillRain, TEnvFillRainVo.T_ENV_FILL_RAIN_TABLE);

            return(SqlHelper.ExecuteNonQuery(CommandType.Text, strSQL) > 0 ? true : false);
        }
 /// <summary>
 /// 获取对象List
 /// </summary>
 /// <param name="tEnvFillRain">对象</param>
 /// <param name="iIndex">起始页码</param>
 /// <param name="iCount">每页数目</param>
 /// <returns>返回结果</returns>
 public List <TEnvFillRainVo> SelectByObject(TEnvFillRainVo tEnvFillRain, int iIndex, int iCount)
 {
     return(access.SelectByObject(tEnvFillRain, iIndex, iCount));
 }
        /// <summary>
        /// 获取对象List
        /// </summary>
        /// <param name="tEnvFillRain">对象</param>
        /// <param name="iIndex">起始页码</param>
        /// <param name="iCount">每页数目</param>
        /// <returns>返回结果</returns>
        public List <TEnvFillRainVo> SelectByObject(TEnvFillRainVo tEnvFillRain, int iIndex, int iCount)
        {
            string strSQL = String.Format("select * from  T_ENV_FILL_RAIN " + this.BuildWhereStatement(tEnvFillRain));

            return(SqlHelper.ExecuteObjectList(tEnvFillRain, BuildPagerExpress(strSQL, iIndex, iCount)));
        }
        /// <summary>
        /// 对象明细
        /// </summary>
        /// <param name="tEnvFillRain">对象条件</param>
        /// <returns>对象</returns>
        public TEnvFillRainVo Details(TEnvFillRainVo tEnvFillRain)
        {
            string strSQL = String.Format("select * from  T_ENV_FILL_RAIN " + this.BuildWhereStatement(tEnvFillRain));

            return(SqlHelper.ExecuteObject(new TEnvFillRainVo(), strSQL));
        }
        /// <summary>
        /// 获得查询结果总行数,用于分页
        /// </summary>
        /// <param name="tEnvFillRain">对象</param>
        /// <returns>返回行数</returns>
        public int GetSelectResultCount(TEnvFillRainVo tEnvFillRain)
        {
            string strSQL = "select Count(*) from T_ENV_FILL_RAIN " + this.BuildWhereStatement(tEnvFillRain);

            return(Convert.ToInt32(SqlHelper.ExecuteScalar(strSQL)));
        }
        /// <summary>
        /// 根据对象构造条件语句
        /// </summary>
        /// <param name="tEnvFillRain"></param>
        /// <returns></returns>
        public string BuildWhereStatement(TEnvFillRainVo tEnvFillRain)
        {
            StringBuilder strWhereStatement = new StringBuilder(" Where 1=1 ");

            if (null != tEnvFillRain)
            {
                //主键ID
                if (!String.IsNullOrEmpty(tEnvFillRain.ID.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND ID = '{0}'", tEnvFillRain.ID.ToString()));
                }
                //监测点ID
                if (!String.IsNullOrEmpty(tEnvFillRain.POINT_ID.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND POINT_ID = '{0}'", tEnvFillRain.POINT_ID.ToString()));
                }
                //年度
                if (!String.IsNullOrEmpty(tEnvFillRain.YEAR.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND YEAR = '{0}'", tEnvFillRain.YEAR.ToString()));
                }
                //月度
                if (!String.IsNullOrEmpty(tEnvFillRain.MONTH.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND MONTH = '{0}'", tEnvFillRain.MONTH.ToString()));
                }
                //开始月
                if (!String.IsNullOrEmpty(tEnvFillRain.BEGIN_MONTH.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND BEGIN_MONTH = '{0}'", tEnvFillRain.BEGIN_MONTH.ToString()));
                }
                //开始日
                if (!String.IsNullOrEmpty(tEnvFillRain.BEGIN_DAY.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND BEGIN_DAY = '{0}'", tEnvFillRain.BEGIN_DAY.ToString()));
                }
                //开始时
                if (!String.IsNullOrEmpty(tEnvFillRain.BEGIN_HOUR.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND BEGIN_HOUR = '{0}'", tEnvFillRain.BEGIN_HOUR.ToString()));
                }
                //开始分
                if (!String.IsNullOrEmpty(tEnvFillRain.BEGIN_MINUTE.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND BEGIN_MINUTE = '{0}'", tEnvFillRain.BEGIN_MINUTE.ToString()));
                }
                //结束月
                if (!String.IsNullOrEmpty(tEnvFillRain.END_MONTH.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND END_MONTH = '{0}'", tEnvFillRain.END_MONTH.ToString()));
                }
                //结束日
                if (!String.IsNullOrEmpty(tEnvFillRain.END_DAY.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND END_DAY = '{0}'", tEnvFillRain.END_DAY.ToString()));
                }
                //结束时
                if (!String.IsNullOrEmpty(tEnvFillRain.END_HOUR.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND END_HOUR = '{0}'", tEnvFillRain.END_HOUR.ToString()));
                }
                //结束分
                if (!String.IsNullOrEmpty(tEnvFillRain.END_MINUTE.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND END_MINUTE = '{0}'", tEnvFillRain.END_MINUTE.ToString()));
                }
                //降水类型
                if (!String.IsNullOrEmpty(tEnvFillRain.RAIN_TYPE.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND RAIN_TYPE = '{0}'", tEnvFillRain.RAIN_TYPE.ToString()));
                }
                //降水量
                if (!String.IsNullOrEmpty(tEnvFillRain.PRECIPITATION.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND PRECIPITATION = '{0}'", tEnvFillRain.PRECIPITATION.ToString()));
                }
                //评价
                if (!String.IsNullOrEmpty(tEnvFillRain.JUDGE.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND JUDGE = '{0}'", tEnvFillRain.JUDGE.ToString()));
                }
                //超标污染类别污染物
                if (!String.IsNullOrEmpty(tEnvFillRain.OVERPROOF.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND OVERPROOF = '{0}'", tEnvFillRain.OVERPROOF.ToString()));
                }
                //备注1
                if (!String.IsNullOrEmpty(tEnvFillRain.REMARK1.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND REMARK1 = '{0}'", tEnvFillRain.REMARK1.ToString()));
                }
                //备注2
                if (!String.IsNullOrEmpty(tEnvFillRain.REMARK2.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND REMARK2 = '{0}'", tEnvFillRain.REMARK2.ToString()));
                }
                //备注3
                if (!String.IsNullOrEmpty(tEnvFillRain.REMARK3.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND REMARK3 = '{0}'", tEnvFillRain.REMARK3.ToString()));
                }
                //备注4
                if (!String.IsNullOrEmpty(tEnvFillRain.REMARK4.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND REMARK4 = '{0}'", tEnvFillRain.REMARK4.ToString()));
                }
                //备注5
                if (!String.IsNullOrEmpty(tEnvFillRain.REMARK5.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND REMARK5 = '{0}'", tEnvFillRain.REMARK5.ToString()));
                }
            }
            return(strWhereStatement.ToString());
        }
 /// <summary>
 /// 获取对象DataTable
 /// </summary>
 /// <param name="tEnvFillRain">对象</param>
 /// <param name="iIndex">起始页码</param>
 /// <param name="iCount">每页数目</param>
 /// <returns>返回结果</returns>
 public DataTable SelectByTable(TEnvFillRainVo tEnvFillRain, int iIndex, int iCount)
 {
     return(access.SelectByTable(tEnvFillRain, iIndex, iCount));
 }
        /// <summary>
        /// 根据对象获取全部数据,用Table承载
        ///  数据量较小时使用【不推荐】
        /// </summary>
        /// <param name="tEnvFillRain"></param>
        /// <returns></returns>
        public DataTable SelectByTable(TEnvFillRainVo tEnvFillRain)
        {
            string strSQL = "select * from T_ENV_FILL_RAIN " + this.BuildWhereStatement(tEnvFillRain);

            return(SqlHelper.ExecuteDataTable(strSQL));
        }
 /// <summary>
 /// 根据对象特征获取单一对象
 /// </summary>
 /// <param name="tEnvFillRain">对象</param>
 /// <returns></returns>
 public TEnvFillRainVo SelectByObject(TEnvFillRainVo tEnvFillRain)
 {
     return(access.SelectByObject(tEnvFillRain));
 }
        /// <summary>
        /// 根据对象特征获取单一对象
        /// </summary>
        /// <param name="tEnvFillRain">对象</param>
        /// <returns></returns>
        public TEnvFillRainVo SelectByObject(TEnvFillRainVo tEnvFillRain)
        {
            string strSQL = "select * from T_ENV_FILL_RAIN " + this.BuildWhereStatement(tEnvFillRain);

            return(SqlHelper.ExecuteObject(new TEnvFillRainVo(), strSQL));
        }