예제 #1
0
        private void LoadWorkCode()
        {
            listWC.Columns.Clear();
            listWC.FullRowSelect = true;
            listWC.MultiSelect   = true;
            listWC.View          = View.Details;
            listWC.GridLines     = true;
            listWC.HeaderStyle   = ColumnHeaderStyle.Clickable;
            ColumnHeader workcodeCol = new ColumnHeader();

            workcodeCol.Text      = "Work Codes ";
            workcodeCol.TextAlign = HorizontalAlignment.Right;
            workcodeCol.Width     = 250;
            listWC.Columns.Add(workcodeCol);
            WorkCodes = cctr.GetWorkCodes(false).ToList();
            foreach (PayCode pc in WorkCodes)
            {
                ListViewItem lv = new ListViewItem();
                lv.Checked = false;
                lv.Name    = pc.pacode;
                lv.Text    = pc.pacdes;

                listWC.Items.Add(lv);
            }
            listWC.AllowDrop = true;
        }