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

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

            strSQL = String.Format(strSQL, BuildWhereStatement(tEnvFillMetalItem));
            return(SqlHelper.ExecuteDataTable(BuildPagerExpress(strSQL, iIndex, iCount)));
        }
        /// <summary>
        /// 对象编辑
        /// </summary>
        /// <param name="tEnvFillMetalItem">用户对象</param>
        /// <returns>是否成功</returns>
        public bool Edit(TEnvFillMetalItemVo tEnvFillMetalItem)
        {
            string strSQL = SqlHelper.BuildUpdateExpress(tEnvFillMetalItem, TEnvFillMetalItemVo.T_ENV_FILL_METAL_ITEM_TABLE);

            strSQL += string.Format(" where ID='{0}' ", tEnvFillMetalItem.ID);
            return(SqlHelper.ExecuteNonQuery(CommandType.Text, strSQL) > 0 ? true : false);
        }
        /// <summary>
        /// 对象删除
        /// </summary>
        /// <param name="Id">ID</param>
        /// <returns>是否成功</returns>
        public bool Delete(TEnvFillMetalItemVo tEnvFillMetalItem)
        {
            string strSQL = "delete from T_ENV_FILL_METAL_ITEM ";

            strSQL += this.BuildWhereStatement(tEnvFillMetalItem);

            return(SqlHelper.ExecuteNonQuery(CommandType.Text, strSQL) > 0 ? true : false);
        }
        /// <summary>
        /// 根据对象构造条件语句
        /// </summary>
        /// <param name="tEnvFillMetalItem"></param>
        /// <returns></returns>
        public string BuildWhereStatement(TEnvFillMetalItemVo tEnvFillMetalItem)
        {
            StringBuilder strWhereStatement = new StringBuilder(" Where 1=1 ");

            if (null != tEnvFillMetalItem)
            {
                //主键ID
                if (!String.IsNullOrEmpty(tEnvFillMetalItem.ID.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND ID = '{0}'", tEnvFillMetalItem.ID.ToString()));
                }
                //饮用水断面数据填报ID
                if (!String.IsNullOrEmpty(tEnvFillMetalItem.SEDIMENT_METAL_FILL_ID.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND SEDIMENT_METAL_FILL_ID = '{0}'", tEnvFillMetalItem.SEDIMENT_METAL_FILL_ID.ToString()));
                }
                //监测项ID
                if (!String.IsNullOrEmpty(tEnvFillMetalItem.ITEM_ID.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND ITEM_ID = '{0}'", tEnvFillMetalItem.ITEM_ID.ToString()));
                }
                //监测值
                if (!String.IsNullOrEmpty(tEnvFillMetalItem.ITEM_VALUE.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND ITEM_VALUE = '{0}'", tEnvFillMetalItem.ITEM_VALUE.ToString()));
                }
                //备注1
                if (!String.IsNullOrEmpty(tEnvFillMetalItem.REMARK1.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND REMARK1 = '{0}'", tEnvFillMetalItem.REMARK1.ToString()));
                }
                //备注2
                if (!String.IsNullOrEmpty(tEnvFillMetalItem.REMARK2.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND REMARK2 = '{0}'", tEnvFillMetalItem.REMARK2.ToString()));
                }
                //备注3
                if (!String.IsNullOrEmpty(tEnvFillMetalItem.REMARK3.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND REMARK3 = '{0}'", tEnvFillMetalItem.REMARK3.ToString()));
                }
                //备注4
                if (!String.IsNullOrEmpty(tEnvFillMetalItem.REMARK4.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND REMARK4 = '{0}'", tEnvFillMetalItem.REMARK4.ToString()));
                }
                //备注5
                if (!String.IsNullOrEmpty(tEnvFillMetalItem.REMARK5.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND REMARK5 = '{0}'", tEnvFillMetalItem.REMARK5.ToString()));
                }
            }
            return(strWhereStatement.ToString());
        }
        /// <summary>
        /// 对象添加
        /// </summary>
        /// <param name="tEnvFillMetalItem">对象</param>
        /// <returns>是否成功</returns>
        public bool Create(TEnvFillMetalItemVo tEnvFillMetalItem)
        {
            string strSQL = SqlHelper.BuildInsertExpress(tEnvFillMetalItem, TEnvFillMetalItemVo.T_ENV_FILL_METAL_ITEM_TABLE);

            return(SqlHelper.ExecuteNonQuery(CommandType.Text, strSQL) > 0 ? true : false);
        }
Ejemplo n.º 7
0
 /// <summary>
 /// 对象添加
 /// </summary>
 /// <param name="sysRole">对象</param>
 /// <returns>是否成功</returns>
 public bool Create(TEnvFillMetalItemVo tEnvFillMetalItem)
 {
     return(access.Create(tEnvFillMetalItem));
 }
        /// <summary>
        /// 对象明细
        /// </summary>
        /// <param name="tEnvFillMetalItem">对象条件</param>
        /// <returns>对象</returns>
        public TEnvFillMetalItemVo Details(TEnvFillMetalItemVo tEnvFillMetalItem)
        {
            string strSQL = String.Format("select * from  T_ENV_FILL_METAL_ITEM " + this.BuildWhereStatement(tEnvFillMetalItem));

            return(SqlHelper.ExecuteObject(new TEnvFillMetalItemVo(), strSQL));
        }
Ejemplo n.º 9
0
 /// <summary>
 /// 对象明细
 /// </summary>
 /// <param name="tEnvFillMetalItem">对象条件</param>
 /// <returns>对象</returns>
 public TEnvFillMetalItemVo Details(TEnvFillMetalItemVo tEnvFillMetalItem)
 {
     return(access.Details(tEnvFillMetalItem));
 }
Ejemplo n.º 10
0
 /// <summary>
 /// 获得查询结果总行数,用于分页
 /// </summary>
 /// <param name="tEnvFillMetalItem">对象</param>
 /// <returns>返回行数</returns>
 public int GetSelectResultCount(TEnvFillMetalItemVo tEnvFillMetalItem)
 {
     return(access.GetSelectResultCount(tEnvFillMetalItem));
 }
Ejemplo n.º 11
0
 public TEnvFillMetalItemLogic(TEnvFillMetalItemVo _tEnvFillMetalItem)
 {
     tEnvFillMetalItem = _tEnvFillMetalItem;
     access            = new TEnvFillMetalItemAccess();
 }
Ejemplo n.º 12
0
 /// <summary>
 /// 对象删除
 /// </summary>
 /// <param name="Id">ID</param>
 /// <returns>是否成功</returns>
 public bool Delete(TEnvFillMetalItemVo tEnvFillMetalItem)
 {
     return(access.Delete(tEnvFillMetalItem));
 }
Ejemplo n.º 13
0
 /// <summary>
 /// 对象编辑
 /// </summary>
 /// <param name="tEnvFillMetalItem_UpdateSet">UpdateSet用户对象</param>
 /// <param name="tEnvFillMetalItem_UpdateWhere">UpdateWhere用户对象</param>
 /// <returns>是否成功</returns>
 public bool Edit(TEnvFillMetalItemVo tEnvFillMetalItem_UpdateSet, TEnvFillMetalItemVo tEnvFillMetalItem_UpdateWhere)
 {
     return(access.Edit(tEnvFillMetalItem_UpdateSet, tEnvFillMetalItem_UpdateWhere));
 }
Ejemplo n.º 14
0
 /// <summary>
 /// 对象编辑
 /// </summary>
 /// <param name="tEnvFillMetalItem">用户对象</param>
 /// <returns>是否成功</returns>
 public bool Edit(TEnvFillMetalItemVo tEnvFillMetalItem)
 {
     return(access.Edit(tEnvFillMetalItem));
 }
Ejemplo n.º 15
0
 /// <summary>
 /// 获取对象List
 /// </summary>
 /// <param name="tEnvFillMetalItem">对象</param>
 /// <param name="iIndex">起始页码</param>
 /// <param name="iCount">每页数目</param>
 /// <returns>返回结果</returns>
 public List <TEnvFillMetalItemVo> SelectByObject(TEnvFillMetalItemVo tEnvFillMetalItem, int iIndex, int iCount)
 {
     return(access.SelectByObject(tEnvFillMetalItem, iIndex, iCount));
 }
        /// <summary>
        /// 获得查询结果总行数,用于分页
        /// </summary>
        /// <param name="tEnvFillMetalItem">对象</param>
        /// <returns>返回行数</returns>
        public int GetSelectResultCount(TEnvFillMetalItemVo tEnvFillMetalItem)
        {
            string strSQL = "select Count(*) from T_ENV_FILL_METAL_ITEM " + this.BuildWhereStatement(tEnvFillMetalItem);

            return(Convert.ToInt32(SqlHelper.ExecuteScalar(strSQL)));
        }
Ejemplo n.º 17
0
 /// <summary>
 /// 获取对象DataTable
 /// </summary>
 /// <param name="tEnvFillMetalItem">对象</param>
 /// <param name="iIndex">起始页码</param>
 /// <param name="iCount">每页数目</param>
 /// <returns>返回结果</returns>
 public DataTable SelectByTable(TEnvFillMetalItemVo tEnvFillMetalItem, int iIndex, int iCount)
 {
     return(access.SelectByTable(tEnvFillMetalItem, iIndex, iCount));
 }
        /// <summary>
        /// 获取对象List
        /// </summary>
        /// <param name="tEnvFillMetalItem">对象</param>
        /// <param name="iIndex">起始页码</param>
        /// <param name="iCount">每页数目</param>
        /// <returns>返回结果</returns>
        public List <TEnvFillMetalItemVo> SelectByObject(TEnvFillMetalItemVo tEnvFillMetalItem, int iIndex, int iCount)
        {
            string strSQL = String.Format("select * from  T_ENV_FILL_METAL_ITEM " + this.BuildWhereStatement(tEnvFillMetalItem));

            return(SqlHelper.ExecuteObjectList(tEnvFillMetalItem, BuildPagerExpress(strSQL, iIndex, iCount)));
        }
Ejemplo n.º 19
0
 /// <summary>
 /// 根据对象获取全部数据,用Table承载
 ///  数据量较小时使用【不推荐】
 /// </summary>
 /// <param name="tEnvFillMetalItem"></param>
 /// <returns></returns>
 public DataTable SelectByTable(TEnvFillMetalItemVo tEnvFillMetalItem)
 {
     return(access.SelectByTable(tEnvFillMetalItem));
 }
        /// <summary>
        /// 根据对象获取全部数据,用Table承载
        ///  数据量较小时使用【不推荐】
        /// </summary>
        /// <param name="tEnvFillMetalItem"></param>
        /// <returns></returns>
        public DataTable SelectByTable(TEnvFillMetalItemVo tEnvFillMetalItem)
        {
            string strSQL = "select * from T_ENV_FILL_METAL_ITEM " + this.BuildWhereStatement(tEnvFillMetalItem);

            return(SqlHelper.ExecuteDataTable(strSQL));
        }
Ejemplo n.º 21
0
 /// <summary>
 /// 根据对象特征获取单一对象
 /// </summary>
 /// <param name="tEnvFillMetalItem">对象</param>
 /// <returns></returns>
 public TEnvFillMetalItemVo SelectByObject(TEnvFillMetalItemVo tEnvFillMetalItem)
 {
     return(access.SelectByObject(tEnvFillMetalItem));
 }