Esempio n. 1
0
        /// <summary>
        /// 对员工ListView进行排序
        /// </summary>
        /// <param name="p_lsvInput"></param>
        /// <param name="p_intColumn"></param>
        private void m_mthListViewSorting(ListView p_lsvInput, int p_intColumn)
        {
            clsListViewColumnSorter objSort = new clsListViewColumnSorter(true);

            objSort.m_IntColumn           = p_intColumn;
            p_lsvInput.ListViewItemSorter = objSort;
            p_lsvInput.Sort();
        }
Esempio n. 2
0
        private void ListView_ColumnClick(object sender, ColumnClickEventArgs e)
        {
            if (m_intColumn != e.Column)
            {
                m_blnAsc = true;
            }
            else
            {
                m_blnAsc = !m_blnAsc;
            }

            clsListViewColumnSorter objSorter = new clsListViewColumnSorter(m_blnAsc);

            m_lsvToSort.ListViewItemSorter = objSorter;
            objSorter.m_IntColumn          = e.Column;
            m_lsvToSort.Sort();
            m_intColumn = e.Column;
        }