Ejemplo n.º 1
0
        /// <summary>
        /// 对象编辑
        /// </summary>
        /// <param name="tBaseApparatusMsgUser_UpdateSet">UpdateSet用户对象</param>
        /// <param name="tBaseApparatusMsgUser_UpdateWhere">UpdateWhere用户对象</param>
        /// <returns>是否成功</returns>
        public bool Edit(TBaseApparatusMsgUserVo tBaseApparatusMsgUser_UpdateSet, TBaseApparatusMsgUserVo tBaseApparatusMsgUser_UpdateWhere)
        {
            string strSQL = SqlHelper.BuildUpdateExpress(tBaseApparatusMsgUser_UpdateSet, TBaseApparatusMsgUserVo.T_BASE_APPARATUS_MSG_USER_TABLE);

            strSQL += this.BuildWhereStatement(tBaseApparatusMsgUser_UpdateWhere);
            return(SqlHelper.ExecuteNonQuery(CommandType.Text, strSQL) > 0 ? true : false);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 对象编辑
        /// </summary>
        /// <param name="tBaseApparatusMsgUser">用户对象</param>
        /// <returns>是否成功</returns>
        public bool Edit(TBaseApparatusMsgUserVo tBaseApparatusMsgUser)
        {
            string strSQL = SqlHelper.BuildUpdateExpress(tBaseApparatusMsgUser, TBaseApparatusMsgUserVo.T_BASE_APPARATUS_MSG_USER_TABLE);

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

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

            strSQL += this.BuildWhereStatement(tBaseApparatusMsgUser);

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

            if (null != tBaseApparatusMsgUser)
            {
                //ID
                if (!String.IsNullOrEmpty(tBaseApparatusMsgUser.ID.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND ID = '{0}'", tBaseApparatusMsgUser.ID.ToString()));
                }
                //USERID
                if (!String.IsNullOrEmpty(tBaseApparatusMsgUser.USERID.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND USERID = '{0}'", tBaseApparatusMsgUser.USERID.ToString()));
                }
                //备份1
                if (!String.IsNullOrEmpty(tBaseApparatusMsgUser.REMARK1.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND REMARK1 = '{0}'", tBaseApparatusMsgUser.REMARK1.ToString()));
                }
                //备份2
                if (!String.IsNullOrEmpty(tBaseApparatusMsgUser.REMARK2.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND REMARK2 = '{0}'", tBaseApparatusMsgUser.REMARK2.ToString()));
                }
                //备份3
                if (!String.IsNullOrEmpty(tBaseApparatusMsgUser.REMARK3.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND REMARK3 = '{0}'", tBaseApparatusMsgUser.REMARK3.ToString()));
                }
                //备份4
                if (!String.IsNullOrEmpty(tBaseApparatusMsgUser.REMARK4.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND REMARK4 = '{0}'", tBaseApparatusMsgUser.REMARK4.ToString()));
                }
                //备份5
                if (!String.IsNullOrEmpty(tBaseApparatusMsgUser.REMARK5.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND REMARK5 = '{0}'", tBaseApparatusMsgUser.REMARK5.ToString()));
                }
            }
            return(strWhereStatement.ToString());
        }
 /// <summary>
 /// 对象删除
 /// </summary>
 /// <param name="Id">ID</param>
 /// <returns>是否成功</returns>
 public bool Delete(TBaseApparatusMsgUserVo tBaseApparatusMsgUser)
 {
     return(access.Delete(tBaseApparatusMsgUser));
 }
 /// <summary>
 /// 对象编辑
 /// </summary>
 /// <param name="tBaseApparatusMsgUser_UpdateSet">UpdateSet用户对象</param>
 /// <param name="tBaseApparatusMsgUser_UpdateWhere">UpdateWhere用户对象</param>
 /// <returns>是否成功</returns>
 public bool Edit(TBaseApparatusMsgUserVo tBaseApparatusMsgUser_UpdateSet, TBaseApparatusMsgUserVo tBaseApparatusMsgUser_UpdateWhere)
 {
     return(access.Edit(tBaseApparatusMsgUser_UpdateSet, tBaseApparatusMsgUser_UpdateWhere));
 }
 /// <summary>
 /// 对象编辑
 /// </summary>
 /// <param name="tBaseApparatusMsgUser">用户对象</param>
 /// <returns>是否成功</returns>
 public bool Edit(TBaseApparatusMsgUserVo tBaseApparatusMsgUser)
 {
     return(access.Edit(tBaseApparatusMsgUser));
 }
 /// <summary>
 /// 对象添加
 /// </summary>
 /// <param name="sysRole">对象</param>
 /// <returns>是否成功</returns>
 public bool Create(TBaseApparatusMsgUserVo tBaseApparatusMsgUser)
 {
     return(access.Create(tBaseApparatusMsgUser));
 }
 /// <summary>
 /// 获取对象DataTable
 /// </summary>
 /// <param name="tBaseApparatusMsgUser">对象</param>
 /// <param name="iIndex">起始页码</param>
 /// <param name="iCount">每页数目</param>
 /// <returns>返回结果</returns>
 public DataTable SelectByTable(TBaseApparatusMsgUserVo tBaseApparatusMsgUser, int iIndex, int iCount)
 {
     return(access.SelectByTable(tBaseApparatusMsgUser, iIndex, iCount));
 }
 /// <summary>
 /// 对象明细
 /// </summary>
 /// <param name="tBaseApparatusMsgUser">对象条件</param>
 /// <returns>对象</returns>
 public TBaseApparatusMsgUserVo Details(TBaseApparatusMsgUserVo tBaseApparatusMsgUser)
 {
     return(access.Details(tBaseApparatusMsgUser));
 }
Ejemplo n.º 12
0
        /// <summary>
        /// 获取对象List
        /// </summary>
        /// <param name="tBaseApparatusMsgUser">对象</param>
        /// <param name="iIndex">起始页码</param>
        /// <param name="iCount">每页数目</param>
        /// <returns>返回结果</returns>
        public List <TBaseApparatusMsgUserVo> SelectByObject(TBaseApparatusMsgUserVo tBaseApparatusMsgUser, int iIndex, int iCount)
        {
            string strSQL = String.Format("select * from  T_BASE_APPARATUS_MSG_USER " + this.BuildWhereStatement(tBaseApparatusMsgUser));

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

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

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

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

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