Esempio n. 1
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="dmParent"></param>
        /// <param name="tableName"></param>
        /// <param name="defaultOrder"></param>
        /// <param name="groupByClause"></param>
        /// <param name="selectClause"></param>
        public SearchManagerGroupByDetail(IDisplayManager dmParent, string tableName, string defaultOrder, string selectClause, string groupByClause)
            : base(dmParent)
        {
            m_parentSm = dmParent.SearchManager as SearchManager;
            if (m_parentSm == null)
            {
                SearchManagerGroupByDetail se = dmParent.SearchManager as SearchManagerGroupByDetail;
                if (se == null)
                {
                    throw new ArgumentException("SearchManagerGroupByDetail's Parent SearchManager must be Feng.Data.SearchManager or SearchManagerGroupByDetail!", "se");
                }
                m_parentSm = se.m_innerSearchManager;
            }
            if (string.IsNullOrEmpty(m_parentSm.GroupBySql))
            {
                throw new ArgumentException("SearchManagerGroupByDetail's Parent SearchManager must has groupby sub clause!", "GroupBySql");
            }
            string s = m_parentSm.GroupBySql.ToUpper().Replace("GROUP BY", "");

            m_groupByColumns = s.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
            for (int i = 0; i < m_groupByColumns.Length; ++i)
            {
                m_groupByColumns[i] = m_groupByColumns[i].Trim();
            }
            m_innerSearchManager      = new SearchManager(tableName, defaultOrder, selectClause, groupByClause);
            m_innerSearchManager.Name = this.Name + ".Inner";

            m_tableName     = tableName;
            m_defaultOrder  = defaultOrder;
            m_selectClause  = selectClause;
            m_groupByClause = groupByClause;

            m_innerSearchManager.EnablePage = false;
        }
Esempio n. 2
0
        /// <summary>
        /// 复制
        /// </summary>
        /// <returns></returns>
        public override object Clone()
        {
            SearchManagerGroupByDetail sm = new SearchManagerGroupByDetail(this.ParentDisplayManager, m_tableName, m_defaultOrder, m_selectClause, m_groupByClause);

            Copy(this, sm);
            return(sm);
        }
 /// <summary>
 /// 复制
 /// </summary>
 /// <returns></returns>
 public override object Clone()
 {
     SearchManagerGroupByDetail sm = new SearchManagerGroupByDetail(this.ParentDisplayManager, m_tableName, m_defaultOrder, m_selectClause, m_groupByClause);
     Copy(this, sm);
     return sm;
 }