Ejemplo n.º 1
0
        /// <summary>
        /// 从sourceItem构造
        /// </summary>
        /// <param name="sourceItem"></param>
        public SqlClauseBuilderItemOrd(IOrderByRequestItem sourceItem)
        {
            sourceItem.NullCheck("sourceItem");

            this.dataField     = sourceItem.DataField;
            this.sortDirection = sourceItem.SortDirection;
        }
Ejemplo n.º 2
0
 /// <summary>
 /// 从源复制
 /// </summary>
 /// <param name="source"></param>
 public void CopyFrom(IOrderByRequestItem source)
 {
     if (source != null)
     {
         this.DataField     = source.DataField;
         this.SortDirection = source.SortDirection;
     }
 }
Ejemplo n.º 3
0
        /// <summary>
        /// 添加一个构造项
        /// </summary>
        /// <param name="dataField">操作的数据</param>
        /// <param name="sortDirection">排序方式</param>
        public void AppendItem(string dataField, FieldSortDirection sortDirection)
        {
            SqlClauseBuilderItemOrd item = new SqlClauseBuilderItemOrd();

            item.DataField     = dataField;
            item.SortDirection = sortDirection;
            List.Add(item);
        }