Beispiel #1
0
        /// <summary>
        /// 对象编辑
        /// </summary>
        /// <param name="tEnvFillPolluteAir_UpdateSet">UpdateSet用户对象</param>
        /// <param name="tEnvFillPolluteAir_UpdateWhere">UpdateWhere用户对象</param>
        /// <returns>是否成功</returns>
        public bool Edit(TEnvFillPolluteAirVo tEnvFillPolluteAir_UpdateSet, TEnvFillPolluteAirVo tEnvFillPolluteAir_UpdateWhere)
        {
            string strSQL = SqlHelper.BuildUpdateExpress(tEnvFillPolluteAir_UpdateSet, TEnvFillPolluteAirVo.T_ENV_FILL_POLLUTE_AIR_TABLE);

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

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

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

            strSQL += this.BuildWhereStatement(tEnvFillPolluteAir);

            return(SqlHelper.ExecuteNonQuery(CommandType.Text, strSQL) > 0 ? true : false);
        }
 /// <summary>
 /// 对象删除
 /// </summary>
 /// <param name="Id">ID</param>
 /// <returns>是否成功</returns>
 public bool Delete(TEnvFillPolluteAirVo tEnvFillPolluteAir)
 {
     return(access.Delete(tEnvFillPolluteAir));
 }
 /// <summary>
 /// 对象编辑
 /// </summary>
 /// <param name="tEnvFillPolluteAir_UpdateSet">UpdateSet用户对象</param>
 /// <param name="tEnvFillPolluteAir_UpdateWhere">UpdateWhere用户对象</param>
 /// <returns>是否成功</returns>
 public bool Edit(TEnvFillPolluteAirVo tEnvFillPolluteAir_UpdateSet, TEnvFillPolluteAirVo tEnvFillPolluteAir_UpdateWhere)
 {
     return(access.Edit(tEnvFillPolluteAir_UpdateSet, tEnvFillPolluteAir_UpdateWhere));
 }
 /// <summary>
 /// 对象编辑
 /// </summary>
 /// <param name="tEnvFillPolluteAir">用户对象</param>
 /// <returns>是否成功</returns>
 public bool Edit(TEnvFillPolluteAirVo tEnvFillPolluteAir)
 {
     return(access.Edit(tEnvFillPolluteAir));
 }
 /// <summary>
 /// 对象添加
 /// </summary>
 /// <param name="sysRole">对象</param>
 /// <returns>是否成功</returns>
 public bool Create(TEnvFillPolluteAirVo tEnvFillPolluteAir)
 {
     return(access.Create(tEnvFillPolluteAir));
 }
 /// <summary>
 /// 获取对象DataTable
 /// </summary>
 /// <param name="tEnvFillPolluteAir">对象</param>
 /// <param name="iIndex">起始页码</param>
 /// <param name="iCount">每页数目</param>
 /// <returns>返回结果</returns>
 public DataTable SelectByTable(TEnvFillPolluteAirVo tEnvFillPolluteAir, int iIndex, int iCount)
 {
     return(access.SelectByTable(tEnvFillPolluteAir, iIndex, iCount));
 }
 /// <summary>
 /// 对象明细
 /// </summary>
 /// <param name="tEnvFillPolluteAir">对象条件</param>
 /// <returns>对象</returns>
 public TEnvFillPolluteAirVo Details(TEnvFillPolluteAirVo tEnvFillPolluteAir)
 {
     return(access.Details(tEnvFillPolluteAir));
 }
Beispiel #11
0
        /// <summary>
        /// 获取对象List
        /// </summary>
        /// <param name="tEnvFillPolluteAir">对象</param>
        /// <param name="iIndex">起始页码</param>
        /// <param name="iCount">每页数目</param>
        /// <returns>返回结果</returns>
        public List <TEnvFillPolluteAirVo> SelectByObject(TEnvFillPolluteAirVo tEnvFillPolluteAir, int iIndex, int iCount)
        {
            string strSQL = String.Format("select * from  T_ENV_FILL_POLLUTE_AIR " + this.BuildWhereStatement(tEnvFillPolluteAir));

            return(SqlHelper.ExecuteObjectList(tEnvFillPolluteAir, BuildPagerExpress(strSQL, iIndex, iCount)));
        }
Beispiel #12
0
        /// <summary>
        /// 根据对象构造条件语句
        /// </summary>
        /// <param name="tEnvFillPolluteAir"></param>
        /// <returns></returns>
        public string BuildWhereStatement(TEnvFillPolluteAirVo tEnvFillPolluteAir)
        {
            StringBuilder strWhereStatement = new StringBuilder(" Where 1=1 ");

            if (null != tEnvFillPolluteAir)
            {
                //
                if (!String.IsNullOrEmpty(tEnvFillPolluteAir.ID.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND ID = '{0}'", tEnvFillPolluteAir.ID.ToString()));
                }
                //
                if (!String.IsNullOrEmpty(tEnvFillPolluteAir.POINT_ID.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND POINT_ID = '{0}'", tEnvFillPolluteAir.POINT_ID.ToString()));
                }
                //
                if (!String.IsNullOrEmpty(tEnvFillPolluteAir.ENTERPRISE_CODE.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND ENTERPRISE_CODE = '{0}'", tEnvFillPolluteAir.ENTERPRISE_CODE.ToString()));
                }
                //
                if (!String.IsNullOrEmpty(tEnvFillPolluteAir.ENTERPRISE_NAME.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND ENTERPRISE_NAME = '{0}'", tEnvFillPolluteAir.ENTERPRISE_NAME.ToString()));
                }
                //
                if (!String.IsNullOrEmpty(tEnvFillPolluteAir.YEAR.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND YEAR = '{0}'", tEnvFillPolluteAir.YEAR.ToString()));
                }
                //
                if (!String.IsNullOrEmpty(tEnvFillPolluteAir.MONTH.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND MONTH = '{0}'", tEnvFillPolluteAir.MONTH.ToString()));
                }
                //
                if (!String.IsNullOrEmpty(tEnvFillPolluteAir.DAY.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND DAY = '{0}'", tEnvFillPolluteAir.DAY.ToString()));
                }
                //
                if (!String.IsNullOrEmpty(tEnvFillPolluteAir.HOUR.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND HOUR = '{0}'", tEnvFillPolluteAir.HOUR.ToString()));
                }
                //
                if (!String.IsNullOrEmpty(tEnvFillPolluteAir.SEASON.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND SEASON = '{0}'", tEnvFillPolluteAir.SEASON.ToString()));
                }
                //
                if (!String.IsNullOrEmpty(tEnvFillPolluteAir.TIMES.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND TIMES = '{0}'", tEnvFillPolluteAir.TIMES.ToString()));
                }
                //
                if (!String.IsNullOrEmpty(tEnvFillPolluteAir.OQTY.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND OQTY = '{0}'", tEnvFillPolluteAir.OQTY.ToString()));
                }
                //
                if (!String.IsNullOrEmpty(tEnvFillPolluteAir.POLLUTEPER.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND POLLUTEPER = '{0}'", tEnvFillPolluteAir.POLLUTEPER.ToString()));
                }
                //
                if (!String.IsNullOrEmpty(tEnvFillPolluteAir.POLLUTECALPER.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND POLLUTECALPER = '{0}'", tEnvFillPolluteAir.POLLUTECALPER.ToString()));
                }
                //
                if (!String.IsNullOrEmpty(tEnvFillPolluteAir.IS_STANDARD.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND IS_STANDARD = '{0}'", tEnvFillPolluteAir.IS_STANDARD.ToString()));
                }
                //
                if (!String.IsNullOrEmpty(tEnvFillPolluteAir.AIRQTY.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND AIRQTY = '{0}'", tEnvFillPolluteAir.AIRQTY.ToString()));
                }
                //
                if (!String.IsNullOrEmpty(tEnvFillPolluteAir.MO_DATE.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND MO_DATE = '{0}'", tEnvFillPolluteAir.MO_DATE.ToString()));
                }
                //
                if (!String.IsNullOrEmpty(tEnvFillPolluteAir.FUEL_TYPE.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND FUEL_TYPE = '{0}'", tEnvFillPolluteAir.FUEL_TYPE.ToString()));
                }
                //
                if (!String.IsNullOrEmpty(tEnvFillPolluteAir.FUEL_QTY.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND FUEL_QTY = '{0}'", tEnvFillPolluteAir.FUEL_QTY.ToString()));
                }
                //
                if (!String.IsNullOrEmpty(tEnvFillPolluteAir.FUEL_MODEL.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND FUEL_MODEL = '{0}'", tEnvFillPolluteAir.FUEL_MODEL.ToString()));
                }
                //
                if (!String.IsNullOrEmpty(tEnvFillPolluteAir.FUEL_TECH.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND FUEL_TECH = '{0}'", tEnvFillPolluteAir.FUEL_TECH.ToString()));
                }
                //
                if (!String.IsNullOrEmpty(tEnvFillPolluteAir.IS_FUEL.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND IS_FUEL = '{0}'", tEnvFillPolluteAir.IS_FUEL.ToString()));
                }
                //
                if (!String.IsNullOrEmpty(tEnvFillPolluteAir.DISCHARGE_WAY.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND DISCHARGE_WAY = '{0}'", tEnvFillPolluteAir.DISCHARGE_WAY.ToString()));
                }
                //
                if (!String.IsNullOrEmpty(tEnvFillPolluteAir.MO_HOUR_QTY.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND MO_HOUR_QTY = '{0}'", tEnvFillPolluteAir.MO_HOUR_QTY.ToString()));
                }
                //
                if (!String.IsNullOrEmpty(tEnvFillPolluteAir.LOAD_MODE.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND LOAD_MODE = '{0}'", tEnvFillPolluteAir.LOAD_MODE.ToString()));
                }
                //
                if (!String.IsNullOrEmpty(tEnvFillPolluteAir.POINT_TEMP.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND POINT_TEMP = '{0}'", tEnvFillPolluteAir.POINT_TEMP.ToString()));
                }
                //
                if (!String.IsNullOrEmpty(tEnvFillPolluteAir.IS_RUN.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND IS_RUN = '{0}'", tEnvFillPolluteAir.IS_RUN.ToString()));
                }
                //
                if (!String.IsNullOrEmpty(tEnvFillPolluteAir.MEASURED.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND MEASURED = '{0}'", tEnvFillPolluteAir.MEASURED.ToString()));
                }
                //
                if (!String.IsNullOrEmpty(tEnvFillPolluteAir.WASTE_AIR_QTY.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND WASTE_AIR_QTY = '{0}'", tEnvFillPolluteAir.WASTE_AIR_QTY.ToString()));
                }
                //
                if (!String.IsNullOrEmpty(tEnvFillPolluteAir.REMARK1.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND REMARK1 = '{0}'", tEnvFillPolluteAir.REMARK1.ToString()));
                }
                //
                if (!String.IsNullOrEmpty(tEnvFillPolluteAir.REMARK2.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND REMARK2 = '{0}'", tEnvFillPolluteAir.REMARK2.ToString()));
                }
                //
                if (!String.IsNullOrEmpty(tEnvFillPolluteAir.REMARK3.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND REMARK3 = '{0}'", tEnvFillPolluteAir.REMARK3.ToString()));
                }
                //
                if (!String.IsNullOrEmpty(tEnvFillPolluteAir.REMARK4.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND REMARK4 = '{0}'", tEnvFillPolluteAir.REMARK4.ToString()));
                }
                //
                if (!String.IsNullOrEmpty(tEnvFillPolluteAir.REMARK5.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND REMARK5 = '{0}'", tEnvFillPolluteAir.REMARK5.ToString()));
                }
            }
            return(strWhereStatement.ToString());
        }
Beispiel #13
0
        /// <summary>
        /// 对象明细
        /// </summary>
        /// <param name="tEnvFillPolluteAir">对象条件</param>
        /// <returns>对象</returns>
        public TEnvFillPolluteAirVo Details(TEnvFillPolluteAirVo tEnvFillPolluteAir)
        {
            string strSQL = String.Format("select * from  T_ENV_FILL_POLLUTE_AIR " + this.BuildWhereStatement(tEnvFillPolluteAir));

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

            return(Convert.ToInt32(SqlHelper.ExecuteScalar(strSQL)));
        }
 public TEnvFillPolluteAirLogic(TEnvFillPolluteAirVo _tEnvFillPolluteAir)
 {
     tEnvFillPolluteAir = _tEnvFillPolluteAir;
     access             = new TEnvFillPolluteAirAccess();
 }
 /// <summary>
 /// 获得查询结果总行数,用于分页
 /// </summary>
 /// <param name="tEnvFillPolluteAir">对象</param>
 /// <returns>返回行数</returns>
 public int GetSelectResultCount(TEnvFillPolluteAirVo tEnvFillPolluteAir)
 {
     return(access.GetSelectResultCount(tEnvFillPolluteAir));
 }
Beispiel #17
0
        /// <summary>
        /// 根据对象获取全部数据,用Table承载
        ///  数据量较小时使用【不推荐】
        /// </summary>
        /// <param name="tEnvFillPolluteAir"></param>
        /// <returns></returns>
        public DataTable SelectByTable(TEnvFillPolluteAirVo tEnvFillPolluteAir)
        {
            string strSQL = "select * from T_ENV_FILL_POLLUTE_AIR " + this.BuildWhereStatement(tEnvFillPolluteAir);

            return(SqlHelper.ExecuteDataTable(strSQL));
        }
 /// <summary>
 /// 获取对象List
 /// </summary>
 /// <param name="tEnvFillPolluteAir">对象</param>
 /// <param name="iIndex">起始页码</param>
 /// <param name="iCount">每页数目</param>
 /// <returns>返回结果</returns>
 public List <TEnvFillPolluteAirVo> SelectByObject(TEnvFillPolluteAirVo tEnvFillPolluteAir, int iIndex, int iCount)
 {
     return(access.SelectByObject(tEnvFillPolluteAir, iIndex, iCount));
 }
 /// <summary>
 /// 根据对象特征获取单一对象
 /// </summary>
 /// <param name="tEnvFillPolluteAir">对象</param>
 /// <returns></returns>
 public TEnvFillPolluteAirVo SelectByObject(TEnvFillPolluteAirVo tEnvFillPolluteAir)
 {
     return(access.SelectByObject(tEnvFillPolluteAir));
 }
 /// <summary>
 /// 根据对象获取全部数据,用Table承载
 ///  数据量较小时使用【不推荐】
 /// </summary>
 /// <param name="tEnvFillPolluteAir"></param>
 /// <returns></returns>
 public DataTable SelectByTable(TEnvFillPolluteAirVo tEnvFillPolluteAir)
 {
     return(access.SelectByTable(tEnvFillPolluteAir));
 }
Beispiel #21
0
        /// <summary>
        /// 对象添加
        /// </summary>
        /// <param name="tEnvFillPolluteAir">对象</param>
        /// <returns>是否成功</returns>
        public bool Create(TEnvFillPolluteAirVo tEnvFillPolluteAir)
        {
            string strSQL = SqlHelper.BuildInsertExpress(tEnvFillPolluteAir, TEnvFillPolluteAirVo.T_ENV_FILL_POLLUTE_AIR_TABLE);

            return(SqlHelper.ExecuteNonQuery(CommandType.Text, strSQL) > 0 ? true : false);
        }