/// <summary>
        ///
        /// </summary>
        /// <param name="orderfld"></param>
        /// <param name="orderByType"></param>
        public void AddSorts(string orderfld, EnumSQLOrderBY orderByType)
        {
            #region
            if (_pageParams.PageSorts == null)
            {
                _pageParams.PageSorts = new PageSortCollection();
            }

            PageSort pagesort = new PageSort(orderfld, orderByType);
            _pageParams.PageSorts.Add(pagesort);
            #endregion
        }
Exemplo n.º 2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sqlExpression"></param>
        public void Add(PageSort pagesort)
        {
            #region
            for (int i = 0; i < this.Count; i++)
            {
                if (pagesort.Fieldname == ((PageSort)List[i]).Fieldname)
                {
                    ExtConsole.WriteWithColor("不能重复添加排序字段!");
                    return;
                }
            }

            List.Add(pagesort);
            #endregion
        }