Exemplo n.º 1
0
        /// <summary>
        /// 对象编辑
        /// </summary>
        /// <param name="tEnvPRiverVItem">用户对象</param>
        /// <returns>是否成功</returns>
        public bool Edit(TEnvPRiverVItemVo tEnvPRiverVItem)
        {
            string strSQL = SqlHelper.BuildUpdateExpress(tEnvPRiverVItem, TEnvPRiverVItemVo.T_ENV_P_RIVER_V_ITEM_TABLE);

            strSQL += string.Format(" where ID='{0}' ", tEnvPRiverVItem.ID);
            return(SqlHelper.ExecuteNonQuery(CommandType.Text, strSQL) > 0 ? true : false);
        }
Exemplo n.º 2
0
        /// <summary>
        /// 对象编辑
        /// </summary>
        /// <param name="tEnvPRiverVItem_UpdateSet">UpdateSet用户对象</param>
        /// <param name="tEnvPRiverVItem_UpdateWhere">UpdateWhere用户对象</param>
        /// <returns>是否成功</returns>
        public bool Edit(TEnvPRiverVItemVo tEnvPRiverVItem_UpdateSet, TEnvPRiverVItemVo tEnvPRiverVItem_UpdateWhere)
        {
            string strSQL = SqlHelper.BuildUpdateExpress(tEnvPRiverVItem_UpdateSet, TEnvPRiverVItemVo.T_ENV_P_RIVER_V_ITEM_TABLE);

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

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

            strSQL += this.BuildWhereStatement(tEnvPRiverVItem);

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

            if (null != tEnvPRiverVItem)
            {
                //主键ID
                if (!String.IsNullOrEmpty(tEnvPRiverVItem.ID.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND ID = '{0}'", tEnvPRiverVItem.ID.ToString()));
                }
                //点位ID
                if (!String.IsNullOrEmpty(tEnvPRiverVItem.POINT_ID.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND POINT_ID = '{0}'", tEnvPRiverVItem.POINT_ID.ToString()));
                }
                //监测项目ID
                if (!String.IsNullOrEmpty(tEnvPRiverVItem.ITEM_ID.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND ITEM_ID = '{0}'", tEnvPRiverVItem.ITEM_ID.ToString()));
                }
                //分析方法ID
                if (!String.IsNullOrEmpty(tEnvPRiverVItem.ANALYSIS_ID.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND ANALYSIS_ID = '{0}'", tEnvPRiverVItem.ANALYSIS_ID.ToString()));
                }
                //备注1
                if (!String.IsNullOrEmpty(tEnvPRiverVItem.REMARK1.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND REMARK1 = '{0}'", tEnvPRiverVItem.REMARK1.ToString()));
                }
                //备注2
                if (!String.IsNullOrEmpty(tEnvPRiverVItem.REMARK2.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND REMARK2 = '{0}'", tEnvPRiverVItem.REMARK2.ToString()));
                }
                //备注3
                if (!String.IsNullOrEmpty(tEnvPRiverVItem.REMARK3.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND REMARK3 = '{0}'", tEnvPRiverVItem.REMARK3.ToString()));
                }
                //备注4
                if (!String.IsNullOrEmpty(tEnvPRiverVItem.REMARK4.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND REMARK4 = '{0}'", tEnvPRiverVItem.REMARK4.ToString()));
                }
                //备注5
                if (!String.IsNullOrEmpty(tEnvPRiverVItem.REMARK5.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND REMARK5 = '{0}'", tEnvPRiverVItem.REMARK5.ToString()));
                }
            }
            return(strWhereStatement.ToString());
        }
    /// <summary>
    /// 获取垂线监测项目信息
    /// </summary>
    /// <param name="twoGridId">垂线ID</param>
    /// <returns></returns>
    public string getThreeGridInfo(string twoGridId)
    {
        string strSortname  = Request.Params["sortname"];
        string strSortorder = Request.Params["sortorder"];
        //当前页面
        int intPageIndex = Convert.ToInt32(Request.Params["page"]);
        //每页记录数
        int intPageSize = Convert.ToInt32(Request.Params["pagesize"]);

        TEnvPRiverVItemVo TEnvPRiverVItem = new TEnvPRiverVItemVo();

        TEnvPRiverVItem.POINT_ID   = twoGridId;
        TEnvPRiverVItem.SORT_FIELD = strSortname;
        TEnvPRiverVItem.SORT_TYPE  = strSortorder;
        DataTable dt            = new TEnvPRiverVItemLogic().SelectByTable(TEnvPRiverVItem, intPageIndex, intPageSize);
        int       intTotalCount = new TEnvPRiverVItemLogic().GetSelectResultCount(TEnvPRiverVItem);
        string    strJson       = CreateToJson(dt, intTotalCount);

        return(strJson);
    }
Exemplo n.º 7
0
 public TEnvPRiverVItemLogic(TEnvPRiverVItemVo _tEnvPRiverVItem)
 {
     tEnvPRiverVItem = _tEnvPRiverVItem;
     access          = new TEnvPRiverVItemAccess();
 }
Exemplo n.º 8
0
 /// <summary>
 /// 对象删除
 /// </summary>
 /// <param name="Id">ID</param>
 /// <returns>是否成功</returns>
 public bool Delete(TEnvPRiverVItemVo tEnvPRiverVItem)
 {
     return(access.Delete(tEnvPRiverVItem));
 }
Exemplo n.º 9
0
 /// <summary>
 /// 对象编辑
 /// </summary>
 /// <param name="tEnvPRiverVItem_UpdateSet">UpdateSet用户对象</param>
 /// <param name="tEnvPRiverVItem_UpdateWhere">UpdateWhere用户对象</param>
 /// <returns>是否成功</returns>
 public bool Edit(TEnvPRiverVItemVo tEnvPRiverVItem_UpdateSet, TEnvPRiverVItemVo tEnvPRiverVItem_UpdateWhere)
 {
     return(access.Edit(tEnvPRiverVItem_UpdateSet, tEnvPRiverVItem_UpdateWhere));
 }
Exemplo n.º 10
0
 /// <summary>
 /// 对象编辑
 /// </summary>
 /// <param name="tEnvPRiverVItem">用户对象</param>
 /// <returns>是否成功</returns>
 public bool Edit(TEnvPRiverVItemVo tEnvPRiverVItem)
 {
     return(access.Edit(tEnvPRiverVItem));
 }
Exemplo n.º 11
0
 /// <summary>
 /// 根据对象获取全部数据,用Table承载
 ///  数据量较小时使用【不推荐】
 /// </summary>
 /// <param name="tEnvPRiverVItem"></param>
 /// <returns></returns>
 public DataTable SelectByTable(TEnvPRiverVItemVo tEnvPRiverVItem)
 {
     return(access.SelectByTable(tEnvPRiverVItem));
 }
Exemplo n.º 12
0
 /// <summary>
 /// 获取对象List
 /// </summary>
 /// <param name="tEnvPRiverVItem">对象</param>
 /// <param name="iIndex">起始页码</param>
 /// <param name="iCount">每页数目</param>
 /// <returns>返回结果</returns>
 public List <TEnvPRiverVItemVo> SelectByObject(TEnvPRiverVItemVo tEnvPRiverVItem, int iIndex, int iCount)
 {
     return(access.SelectByObject(tEnvPRiverVItem, iIndex, iCount));
 }
Exemplo n.º 13
0
        /// <summary>
        /// 获取对象List
        /// </summary>
        /// <param name="tEnvPRiverVItem">对象</param>
        /// <param name="iIndex">起始页码</param>
        /// <param name="iCount">每页数目</param>
        /// <returns>返回结果</returns>
        public List <TEnvPRiverVItemVo> SelectByObject(TEnvPRiverVItemVo tEnvPRiverVItem, int iIndex, int iCount)
        {
            string strSQL = String.Format("select * from  T_ENV_P_RIVER_V_ITEM " + this.BuildWhereStatement(tEnvPRiverVItem));

            return(SqlHelper.ExecuteObjectList(tEnvPRiverVItem, BuildPagerExpress(strSQL, iIndex, iCount)));
        }
Exemplo n.º 14
0
        /// <summary>
        /// 对象明细
        /// </summary>
        /// <param name="tEnvPRiverVItem">对象条件</param>
        /// <returns>对象</returns>
        public TEnvPRiverVItemVo Details(TEnvPRiverVItemVo tEnvPRiverVItem)
        {
            string strSQL = String.Format("select * from  T_ENV_P_RIVER_V_ITEM " + this.BuildWhereStatement(tEnvPRiverVItem));

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

            return(Convert.ToInt32(SqlHelper.ExecuteScalar(strSQL)));
        }
Exemplo n.º 16
0
 /// <summary>
 /// 获得查询结果总行数,用于分页
 /// </summary>
 /// <param name="tEnvPRiverVItem">对象</param>
 /// <returns>返回行数</returns>
 public int GetSelectResultCount(TEnvPRiverVItemVo tEnvPRiverVItem)
 {
     return(access.GetSelectResultCount(tEnvPRiverVItem));
 }
Exemplo n.º 17
0
 /// <summary>
 /// 对象明细
 /// </summary>
 /// <param name="tEnvPRiverVItem">对象条件</param>
 /// <returns>对象</returns>
 public TEnvPRiverVItemVo Details(TEnvPRiverVItemVo tEnvPRiverVItem)
 {
     return(access.Details(tEnvPRiverVItem));
 }
Exemplo n.º 18
0
        /// <summary>
        /// 根据对象获取全部数据,用Table承载
        ///  数据量较小时使用【不推荐】
        /// </summary>
        /// <param name="tEnvPRiverVItem"></param>
        /// <returns></returns>
        public DataTable SelectByTable(TEnvPRiverVItemVo tEnvPRiverVItem)
        {
            string strSQL = "select * from T_ENV_P_RIVER_V_ITEM " + this.BuildWhereStatement(tEnvPRiverVItem);

            return(SqlHelper.ExecuteDataTable(strSQL));
        }
Exemplo n.º 19
0
 /// <summary>
 /// 获取对象DataTable
 /// </summary>
 /// <param name="tEnvPRiverVItem">对象</param>
 /// <param name="iIndex">起始页码</param>
 /// <param name="iCount">每页数目</param>
 /// <returns>返回结果</returns>
 public DataTable SelectByTable(TEnvPRiverVItemVo tEnvPRiverVItem, int iIndex, int iCount)
 {
     return(access.SelectByTable(tEnvPRiverVItem, iIndex, iCount));
 }
Exemplo n.º 20
0
 /// <summary>
 /// 根据对象特征获取单一对象
 /// </summary>
 /// <param name="tEnvPRiverVItem">对象</param>
 /// <returns></returns>
 public TEnvPRiverVItemVo SelectByObject(TEnvPRiverVItemVo tEnvPRiverVItem)
 {
     return(access.SelectByObject(tEnvPRiverVItem));
 }
Exemplo n.º 21
0
 /// <summary>
 /// 对象添加
 /// </summary>
 /// <param name="sysRole">对象</param>
 /// <returns>是否成功</returns>
 public bool Create(TEnvPRiverVItemVo tEnvPRiverVItem)
 {
     return(access.Create(tEnvPRiverVItem));
 }
Exemplo n.º 22
0
        /// <summary>
        /// 对象添加
        /// </summary>
        /// <param name="tEnvPRiverVItem">对象</param>
        /// <returns>是否成功</returns>
        public bool Create(TEnvPRiverVItemVo tEnvPRiverVItem)
        {
            string strSQL = SqlHelper.BuildInsertExpress(tEnvPRiverVItem, TEnvPRiverVItemVo.T_ENV_P_RIVER_V_ITEM_TABLE);

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