Пример #1
0
        /// <summary>
        /// 获取对象DataTable
        /// </summary>
        /// <param name="tEnvFillRiver30">对象</param>
        /// <param name="iIndex">起始页码</param>
        /// <param name="iCount">每页数目</param>
        /// <returns>返回结果</returns>
        public DataTable SelectByTable(TEnvFillRiver30Vo tEnvFillRiver30, int iIndex, int iCount)
        {
            string strSQL = " select * from T_ENV_FILL_RIVER30 {0} ";

            strSQL = String.Format(strSQL, BuildWhereStatement(tEnvFillRiver30));
            return(SqlHelper.ExecuteDataTable(BuildPagerExpress(strSQL, iIndex, iCount)));
        }
Пример #2
0
        /// <summary>
        /// 对象编辑
        /// </summary>
        /// <param name="tEnvFillRiver30">用户对象</param>
        /// <returns>是否成功</returns>
        public bool Edit(TEnvFillRiver30Vo tEnvFillRiver30)
        {
            string strSQL = SqlHelper.BuildUpdateExpress(tEnvFillRiver30, TEnvFillRiver30Vo.T_ENV_FILL_RIVER30_TABLE);

            strSQL += string.Format(" where ID='{0}' ", tEnvFillRiver30.ID);
            return(SqlHelper.ExecuteNonQuery(CommandType.Text, strSQL) > 0 ? true : false);
        }
Пример #3
0
        /// <summary>
        /// 对象编辑
        /// </summary>
        /// <param name="tEnvFillRiver30_UpdateSet">UpdateSet用户对象</param>
        /// <param name="tEnvFillRiver30_UpdateWhere">UpdateWhere用户对象</param>
        /// <returns>是否成功</returns>
        public bool Edit(TEnvFillRiver30Vo tEnvFillRiver30_UpdateSet, TEnvFillRiver30Vo tEnvFillRiver30_UpdateWhere)
        {
            string strSQL = SqlHelper.BuildUpdateExpress(tEnvFillRiver30_UpdateSet, TEnvFillRiver30Vo.T_ENV_FILL_RIVER30_TABLE);

            strSQL += this.BuildWhereStatement(tEnvFillRiver30_UpdateWhere);
            return(SqlHelper.ExecuteNonQuery(CommandType.Text, strSQL) > 0 ? true : false);
        }
Пример #4
0
        /// <summary>
        /// 对象添加
        /// </summary>
        /// <param name="tEnvFillRiver30">对象</param>
        /// <returns>是否成功</returns>
        public bool Create(TEnvFillRiver30Vo tEnvFillRiver30)
        {
            tEnvFillRiver30.ID = new TSysSerialAccess().GetSerialNumber("FILL_RIVER30_ID ");
            string strSQL = SqlHelper.BuildInsertExpress(tEnvFillRiver30, TEnvFillRiver30Vo.T_ENV_FILL_RIVER30_TABLE);

            return(SqlHelper.ExecuteNonQuery(CommandType.Text, strSQL) > 0 ? true : false);
        }
Пример #5
0
        /// <summary>
        /// 对象删除
        /// </summary>
        /// <param name="Id">ID</param>
        /// <returns>是否成功</returns>
        public bool Delete(TEnvFillRiver30Vo tEnvFillRiver30)
        {
            string strSQL = "delete from T_ENV_FILL_RIVER30 ";

            strSQL += this.BuildWhereStatement(tEnvFillRiver30);

            return(SqlHelper.ExecuteNonQuery(CommandType.Text, strSQL) > 0 ? true : false);
        }
Пример #6
0
        /// <summary>
        /// 获取对象DataTable
        /// </summary>
        /// <param name="tEnvFillRiver30">对象</param>
        /// <param name="iIndex">起始页码</param>
        /// <param name="iCount">每页数目</param>
        /// <returns>返回结果</returns>
        public DataTable SelectByTableEx(TEnvFillRiver30Vo tEnvFillRiver30)
        {
            string strSQL = " select * from T_ENV_FILL_RIVER30 where 1=1  ";

            //月份
            if (!String.IsNullOrEmpty(tEnvFillRiver30.MONTH.ToString().Trim()))
            {
                strSQL += string.Format(" AND MONTH = '{0}'", tEnvFillRiver30.MONTH.ToString());
            }
            //备注1
            if (!String.IsNullOrEmpty(tEnvFillRiver30.REMARK1.ToString().Trim()))
            {
                strSQL += string.Format(" AND RIVER_POINT_ID in (select id from T_ENV_POINT_RIVER30 where POINT_AREA = '{0}')", tEnvFillRiver30.REMARK1.ToString());
            }
            return(SqlHelper.ExecuteDataTable(strSQL));
        }
    private void GetFillID()
    {
        string year  = Request["year"];
        string month = Request["month"];

        TEnvFillRiver30Vo envFillRiver30Vo = new TEnvFillRiver30Vo();

        envFillRiver30Vo.YEAR  = year;
        envFillRiver30Vo.MONTH = month;

        envFillRiver30Vo = new TEnvFillRiver30Logic().Details(envFillRiver30Vo);

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

        Response.ContentType = "application/json;charset=utf-8";
        Response.Write(json);
        Response.End();
    }
 /// <summary>
 /// 根据对象特征获取单一对象
 /// </summary>
 /// <param name="tEnvFillRiver30">对象</param>
 /// <returns></returns>
 public TEnvFillRiver30Vo SelectByObject(TEnvFillRiver30Vo tEnvFillRiver30)
 {
     return(access.SelectByObject(tEnvFillRiver30));
 }
 /// <summary>
 /// 获取对象DataTable
 /// </summary>
 /// <param name="tEnvFillRiver30">对象</param>
 /// <param name="iIndex">起始页码</param>
 /// <param name="iCount">每页数目</param>
 /// <returns>返回结果</returns>
 public DataTable SelectByTable(TEnvFillRiver30Vo tEnvFillRiver30, int iIndex, int iCount)
 {
     return(access.SelectByTable(tEnvFillRiver30, iIndex, iCount));
 }
 /// <summary>
 /// 根据对象获取全部数据,用Table承载
 ///  数据量较小时使用【不推荐】
 /// </summary>
 /// <param name="tEnvFillRiver30"></param>
 /// <returns></returns>
 public DataTable SelectByTable(TEnvFillRiver30Vo tEnvFillRiver30)
 {
     return(access.SelectByTable(tEnvFillRiver30));
 }
 /// <summary>
 /// 对象明细
 /// </summary>
 /// <param name="tEnvFillRiver30">对象条件</param>
 /// <returns>对象</returns>
 public TEnvFillRiver30Vo Details(TEnvFillRiver30Vo tEnvFillRiver30)
 {
     return(access.Details(tEnvFillRiver30));
 }
 /// <summary>
 /// 获取对象List
 /// </summary>
 /// <param name="tEnvFillRiver30">对象</param>
 /// <param name="iIndex">起始页码</param>
 /// <param name="iCount">每页数目</param>
 /// <returns>返回结果</returns>
 public List <TEnvFillRiver30Vo> SelectByObject(TEnvFillRiver30Vo tEnvFillRiver30, int iIndex, int iCount)
 {
     return(access.SelectByObject(tEnvFillRiver30, iIndex, iCount));
 }
 public TEnvFillRiver30Logic(TEnvFillRiver30Vo _tEnvFillRiver30)
 {
     tEnvFillRiver30 = _tEnvFillRiver30;
     access          = new TEnvFillRiver30Access();
 }
 /// <summary>
 /// 获得查询结果总行数,用于分页
 /// </summary>
 /// <param name="tEnvFillRiver30">对象</param>
 /// <returns>返回行数</returns>
 public int GetSelectResultCount(TEnvFillRiver30Vo tEnvFillRiver30)
 {
     return(access.GetSelectResultCount(tEnvFillRiver30));
 }
 /// <summary>
 /// 对象编辑
 /// </summary>
 /// <param name="tEnvFillRiver30_UpdateSet">UpdateSet用户对象</param>
 /// <param name="tEnvFillRiver30_UpdateWhere">UpdateWhere用户对象</param>
 /// <returns>是否成功</returns>
 public bool Edit(TEnvFillRiver30Vo tEnvFillRiver30_UpdateSet, TEnvFillRiver30Vo tEnvFillRiver30_UpdateWhere)
 {
     return(access.Edit(tEnvFillRiver30_UpdateSet, tEnvFillRiver30_UpdateWhere));
 }
 /// <summary>
 /// 对象删除
 /// </summary>
 /// <param name="Id">ID</param>
 /// <returns>是否成功</returns>
 public bool Delete(TEnvFillRiver30Vo tEnvFillRiver30)
 {
     return(access.Delete(tEnvFillRiver30));
 }
 /// <summary>
 /// 对象添加
 /// </summary>
 /// <param name="sysRole">对象</param>
 /// <returns>是否成功</returns>
 public bool Create(TEnvFillRiver30Vo tEnvFillRiver30)
 {
     return(access.Create(tEnvFillRiver30));
 }
 /// <summary>
 /// 对象编辑
 /// </summary>
 /// <param name="tEnvFillRiver30">用户对象</param>
 /// <returns>是否成功</returns>
 public bool Edit(TEnvFillRiver30Vo tEnvFillRiver30)
 {
     return(access.Edit(tEnvFillRiver30));
 }
Пример #19
0
        /// <summary>
        /// 根据对象构造条件语句
        /// </summary>
        /// <param name="tEnvFillRiver30"></param>
        /// <returns></returns>
        public string BuildWhereStatement(TEnvFillRiver30Vo tEnvFillRiver30)
        {
            StringBuilder strWhereStatement = new StringBuilder(" Where 1=1 ");

            if (null != tEnvFillRiver30)
            {
                //主键ID
                if (!String.IsNullOrEmpty(tEnvFillRiver30.ID.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND ID = '{0}'", tEnvFillRiver30.ID.ToString()));
                }
                //断面ID
                if (!String.IsNullOrEmpty(tEnvFillRiver30.SECTION_ID.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND SECTION_ID = '{0}'", tEnvFillRiver30.SECTION_ID.ToString()));
                }
                //监测点ID
                if (!String.IsNullOrEmpty(tEnvFillRiver30.POINT_ID.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND POINT_ID = '{0}'", tEnvFillRiver30.POINT_ID.ToString()));
                }
                //采样日期
                if (!String.IsNullOrEmpty(tEnvFillRiver30.SAMPLING_DAY.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND SAMPLING_DAY = '{0}'", tEnvFillRiver30.SAMPLING_DAY.ToString()));
                }
                //年度
                if (!String.IsNullOrEmpty(tEnvFillRiver30.YEAR.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND YEAR = '{0}'", tEnvFillRiver30.YEAR.ToString()));
                }
                //月份
                if (!String.IsNullOrEmpty(tEnvFillRiver30.MONTH.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND MONTH = '{0}'", tEnvFillRiver30.MONTH.ToString()));
                }
                //日
                if (!String.IsNullOrEmpty(tEnvFillRiver30.DAY.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND DAY = '{0}'", tEnvFillRiver30.DAY.ToString()));
                }
                //时
                if (!String.IsNullOrEmpty(tEnvFillRiver30.HOUR.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND HOUR = '{0}'", tEnvFillRiver30.HOUR.ToString()));
                }
                //分
                if (!String.IsNullOrEmpty(tEnvFillRiver30.MINUTE.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND MINUTE = '{0}'", tEnvFillRiver30.MINUTE.ToString()));
                }
                //枯水期、平水期、枯水期
                if (!String.IsNullOrEmpty(tEnvFillRiver30.KPF.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND KPF = '{0}'", tEnvFillRiver30.KPF.ToString()));
                }
                //水质类别Code(字典项)
                if (!String.IsNullOrEmpty(tEnvFillRiver30.WATER_TYPE_CODE.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND WATER_TYPE_CODE = '{0}'", tEnvFillRiver30.WATER_TYPE_CODE.ToString()));
                }
                //超标污染类别污染物
                if (!String.IsNullOrEmpty(tEnvFillRiver30.OVERPROOF.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND OVERPROOF = '{0}'", tEnvFillRiver30.OVERPROOF.ToString()));
                }
                //备注1
                if (!String.IsNullOrEmpty(tEnvFillRiver30.REMARK1.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND REMARK1 = '{0}'", tEnvFillRiver30.REMARK1.ToString()));
                }
                //备注2
                if (!String.IsNullOrEmpty(tEnvFillRiver30.REMARK2.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND REMARK2 = '{0}'", tEnvFillRiver30.REMARK2.ToString()));
                }
                //备注3
                if (!String.IsNullOrEmpty(tEnvFillRiver30.REMARK3.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND REMARK3 = '{0}'", tEnvFillRiver30.REMARK3.ToString()));
                }
                //备注4
                if (!String.IsNullOrEmpty(tEnvFillRiver30.REMARK4.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND REMARK4 = '{0}'", tEnvFillRiver30.REMARK4.ToString()));
                }
                //备注5
                if (!String.IsNullOrEmpty(tEnvFillRiver30.REMARK5.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND REMARK5 = '{0}'", tEnvFillRiver30.REMARK5.ToString()));
                }
            }
            return(strWhereStatement.ToString());
        }
Пример #20
0
        /// <summary>
        /// 根据对象获取全部数据,用Table承载
        ///  数据量较小时使用【不推荐】
        /// </summary>
        /// <param name="tEnvFillRiver30"></param>
        /// <returns></returns>
        public DataTable SelectByTable(TEnvFillRiver30Vo tEnvFillRiver30)
        {
            string strSQL = "select * from T_ENV_FILL_RIVER30 " + this.BuildWhereStatement(tEnvFillRiver30);

            return(SqlHelper.ExecuteDataTable(strSQL));
        }
Пример #21
0
        /// <summary>
        /// 获得查询结果总行数,用于分页
        /// </summary>
        /// <param name="tEnvFillRiver30">对象</param>
        /// <returns>返回行数</returns>
        public int GetSelectResultCount(TEnvFillRiver30Vo tEnvFillRiver30)
        {
            string strSQL = "select Count(*) from T_ENV_FILL_RIVER30 " + this.BuildWhereStatement(tEnvFillRiver30);

            return(Convert.ToInt32(SqlHelper.ExecuteScalar(strSQL)));
        }
Пример #22
0
        /// <summary>
        /// 获取对象List
        /// </summary>
        /// <param name="tEnvFillRiver30">对象</param>
        /// <param name="iIndex">起始页码</param>
        /// <param name="iCount">每页数目</param>
        /// <returns>返回结果</returns>
        public List <TEnvFillRiver30Vo> SelectByObject(TEnvFillRiver30Vo tEnvFillRiver30, int iIndex, int iCount)
        {
            string strSQL = String.Format("select * from  T_ENV_FILL_RIVER30 " + this.BuildWhereStatement(tEnvFillRiver30));

            return(SqlHelper.ExecuteObjectList(tEnvFillRiver30, BuildPagerExpress(strSQL, iIndex, iCount)));
        }
Пример #23
0
        /// <summary>
        /// 对象明细
        /// </summary>
        /// <param name="tEnvFillRiver30">对象条件</param>
        /// <returns>对象</returns>
        public TEnvFillRiver30Vo Details(TEnvFillRiver30Vo tEnvFillRiver30)
        {
            string strSQL = String.Format("select * from  T_ENV_FILL_RIVER30 " + this.BuildWhereStatement(tEnvFillRiver30));

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