Exemple #1
0
        /// <summary>
        /// 对象编辑
        /// </summary>
        /// <param name="tEnvFillMetal_UpdateSet">UpdateSet用户对象</param>
        /// <param name="tEnvFillMetal_UpdateWhere">UpdateWhere用户对象</param>
        /// <returns>是否成功</returns>
        public bool Edit(TEnvFillMetalVo tEnvFillMetal_UpdateSet, TEnvFillMetalVo tEnvFillMetal_UpdateWhere)
        {
            string strSQL = SqlHelper.BuildUpdateExpress(tEnvFillMetal_UpdateSet, TEnvFillMetalVo.T_ENV_FILL_METAL_TABLE);

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

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

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

            strSQL += this.BuildWhereStatement(tEnvFillMetal);

            return(SqlHelper.ExecuteNonQuery(CommandType.Text, strSQL) > 0 ? true : false);
        }
Exemple #5
0
        /// <summary>
        /// 对象添加
        /// </summary>
        /// <param name="tEnvFillMetal">对象</param>
        /// <returns>是否成功</returns>
        public bool Create(TEnvFillMetalVo tEnvFillMetal)
        {
            string strSQL = SqlHelper.BuildInsertExpress(tEnvFillMetal, TEnvFillMetalVo.T_ENV_FILL_METAL_TABLE);

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

            return(SqlHelper.ExecuteObject(new TEnvFillMetalVo(), strSQL));
        }
 public TEnvFillMetalLogic(TEnvFillMetalVo _tEnvFillMetal)
 {
     tEnvFillMetal = _tEnvFillMetal;
     access        = new TEnvFillMetalAccess();
 }
 /// <summary>
 /// 获得查询结果总行数,用于分页
 /// </summary>
 /// <param name="tEnvFillMetal">对象</param>
 /// <returns>返回行数</returns>
 public int GetSelectResultCount(TEnvFillMetalVo tEnvFillMetal)
 {
     return(access.GetSelectResultCount(tEnvFillMetal));
 }
 /// <summary>
 /// 对象删除
 /// </summary>
 /// <param name="Id">ID</param>
 /// <returns>是否成功</returns>
 public bool Delete(TEnvFillMetalVo tEnvFillMetal)
 {
     return(access.Delete(tEnvFillMetal));
 }
 /// <summary>
 /// 对象编辑
 /// </summary>
 /// <param name="tEnvFillMetal_UpdateSet">UpdateSet用户对象</param>
 /// <param name="tEnvFillMetal_UpdateWhere">UpdateWhere用户对象</param>
 /// <returns>是否成功</returns>
 public bool Edit(TEnvFillMetalVo tEnvFillMetal_UpdateSet, TEnvFillMetalVo tEnvFillMetal_UpdateWhere)
 {
     return(access.Edit(tEnvFillMetal_UpdateSet, tEnvFillMetal_UpdateWhere));
 }
 /// <summary>
 /// 对象编辑
 /// </summary>
 /// <param name="tEnvFillMetal">用户对象</param>
 /// <returns>是否成功</returns>
 public bool Edit(TEnvFillMetalVo tEnvFillMetal)
 {
     return(access.Edit(tEnvFillMetal));
 }
Exemple #14
0
        /// <summary>
        /// 根据对象构造条件语句
        /// </summary>
        /// <param name="tEnvFillMetal"></param>
        /// <returns></returns>
        public string BuildWhereStatement(TEnvFillMetalVo tEnvFillMetal)
        {
            StringBuilder strWhereStatement = new StringBuilder(" Where 1=1 ");

            if (null != tEnvFillMetal)
            {
                //主键ID
                if (!String.IsNullOrEmpty(tEnvFillMetal.ID.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND ID = '{0}'", tEnvFillMetal.ID.ToString()));
                }
                //饮用水断面监测点ID
                if (!String.IsNullOrEmpty(tEnvFillMetal.SEDIMENT_METAL_POINT_ID.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND SEDIMENT_METAL_POINT_ID = '{0}'", tEnvFillMetal.SEDIMENT_METAL_POINT_ID.ToString()));
                }
                //月份
                if (!String.IsNullOrEmpty(tEnvFillMetal.MONTH.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND MONTH = '{0}'", tEnvFillMetal.MONTH.ToString()));
                }
                //垂线ID,对应T_BAS_POINT_RIVER_VERTICAL主键
                if (!String.IsNullOrEmpty(tEnvFillMetal.VERTICAL_ID.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND VERTICAL_ID = '{0}'", tEnvFillMetal.VERTICAL_ID.ToString()));
                }
                //枯水期、平水期、枯水期
                if (!String.IsNullOrEmpty(tEnvFillMetal.KPF.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND KPF = '{0}'", tEnvFillMetal.KPF.ToString()));
                }
                //采样日期
                if (!String.IsNullOrEmpty(tEnvFillMetal.SAMPLING_DAY.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND SAMPLING_DAY = '{0}'", tEnvFillMetal.SAMPLING_DAY.ToString()));
                }
                //备注1
                if (!String.IsNullOrEmpty(tEnvFillMetal.REMARK1.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND REMARK1 = '{0}'", tEnvFillMetal.REMARK1.ToString()));
                }
                //备注2
                if (!String.IsNullOrEmpty(tEnvFillMetal.REMARK2.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND REMARK2 = '{0}'", tEnvFillMetal.REMARK2.ToString()));
                }
                //备注3
                if (!String.IsNullOrEmpty(tEnvFillMetal.REMARK3.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND REMARK3 = '{0}'", tEnvFillMetal.REMARK3.ToString()));
                }
                //备注4
                if (!String.IsNullOrEmpty(tEnvFillMetal.REMARK4.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND REMARK4 = '{0}'", tEnvFillMetal.REMARK4.ToString()));
                }
                //备注5
                if (!String.IsNullOrEmpty(tEnvFillMetal.REMARK5.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND REMARK5 = '{0}'", tEnvFillMetal.REMARK5.ToString()));
                }
            }
            return(strWhereStatement.ToString());
        }
 /// <summary>
 /// 获取对象List
 /// </summary>
 /// <param name="tEnvFillMetal">对象</param>
 /// <param name="iIndex">起始页码</param>
 /// <param name="iCount">每页数目</param>
 /// <returns>返回结果</returns>
 public List <TEnvFillMetalVo> SelectByObject(TEnvFillMetalVo tEnvFillMetal, int iIndex, int iCount)
 {
     return(access.SelectByObject(tEnvFillMetal, iIndex, iCount));
 }
Exemple #16
0
        /// <summary>
        /// 获得查询结果总行数,用于分页
        /// </summary>
        /// <param name="tEnvFillMetal">对象</param>
        /// <returns>返回行数</returns>
        public int GetSelectResultCount(TEnvFillMetalVo tEnvFillMetal)
        {
            string strSQL = "select Count(*) from T_ENV_FILL_METAL " + this.BuildWhereStatement(tEnvFillMetal);

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

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

            return(SqlHelper.ExecuteDataTable(strSQL));
        }
 /// <summary>
 /// 根据对象特征获取单一对象
 /// </summary>
 /// <param name="tEnvFillMetal">对象</param>
 /// <returns></returns>
 public TEnvFillMetalVo SelectByObject(TEnvFillMetalVo tEnvFillMetal)
 {
     return(access.SelectByObject(tEnvFillMetal));
 }