示例#1
0
        /// <summary>
        ///检查未选中的桌子号是否存在
        /// </summary>
        /// <param name="tableid"></param>
        /// <returns></returns>
        //public int EmptyTable1(string tableid)
        //{

        //    string strSql = "select count(*) from [table] where table_id=@tableid and table_status=1";
        //    SqlParameter[] parameters =
        //    {
        //        new SqlParameter("@tableid",tableid)
        //    };
        //    int i = (int)SQLHelper.ExecuteSql(strSql.ToString(), parameters);
        //    return i;
        //}
        public bool EmptyTable(string tableid)
        {
            string strSql = "select count(*) from [table] where table_id=@tableid and table_status=1";

            SqlParameter[] parameters =
            {
                new SqlParameter("@tableid", tableid)
            };
            return(SQLHelper.Exists(strSql.ToString(), parameters));
        }
示例#2
0
        /// <summary>
        /// 检查选中的桌子号是否存在
        /// </summary>
        /// <param name="tableid"></param>
        /// <returns></returns>
        public bool CheckedTable(string tableid)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select count(*) from [table] where table_id=@tableid and table_status=2");
            SqlParameter[] parameters =
            {
                new SqlParameter("@tableid", tableid)
            };
            return(SQLHelper.Exists(strSql.ToString(), parameters));
        }