using System;
using System.Collections;
using System.Data;
using System.Windows.Forms;
using System.Drawing;
namespace TOA.Common
{
/// <summary>
/// 模块编号:
/// 模块功能:对ListView的封装
/// 作 者:何宝魁
/// 编写时间:2007-3-20
/// </summary>
public class ListViewHelper
{
/// <summary>
/// 构造函数
/// </summary>
public ListViewHelper()
{
//
// TODO: 在此处添加构造函数逻辑
//
}
public static void ListView_ColumnClick(object sender, ColumnClickEventArgs e)
{
ListView lv = sender as ListView;
// 检查点击的列是不是现在的排序列.
if (e.Column == (lv.ListViewItemSorter as ListViewColumnSorter).SortColumn)
{
// 重新设置此列的排序方法.
if ((lv.ListViewItemSorter as ListViewColumnSorter).Order == SortOrder.Ascending)
{
(lv.ListViewItemSorter as ListViewColumnSorter).Order = SortOrder.Descending;
}
else
{
(lv.ListViewItemSorter as ListViewColumnSorter).Order = SortOrder.Ascending;
}
}
else
{