コード例 #1
0
 private void tablelistView_SelectedIndexChanged(object sender, EventArgs e)
 {
     headers = new List <TableHeader>();
     foreach (ListViewItem item in tablelistView.SelectedItems)
     {
         if (item.Text == GlobalData.GlobalLanguage.call_message)
         {
             headers.Add(new TableHeader {
                 oldheader = DataMessage.Displaytime()
             });
             headers.Add(new TableHeader {
                 oldheader = DataMessage.DisplaycallerNum()
             });
             headers.Add(new TableHeader {
                 oldheader = DataMessage.DisplayemployeeNum()
             });
             headers.Add(new TableHeader {
                 oldheader = DataMessage.Displaytype()
             });
             headers.Add(new TableHeader {
                 oldheader = DataMessage.Displaystatus()
             });
             headers.Add(new TableHeader {
                 oldheader = DataMessage.DisplaycallZone()
             });
         }
         else if (item.Text == GlobalData.GlobalLanguage.employ_info)
         {
             headers.Add(new TableHeader {
                 oldheader = Employee.DisplayemployeeNum()
             });
             headers.Add(new TableHeader {
                 oldheader = Employee.Displayname()
             });
             headers.Add(new TableHeader {
                 oldheader = Employee.Displayphonenum()
             });
             headers.Add(new TableHeader {
                 oldheader = Employee.Displayremarks()
             });
             headers.Add(new TableHeader {
                 oldheader = Employee.Displaysex()
             });
         }
         dataGridView.DataSource = headers;
         dataGridView.Refresh();
     }
 }