Пример #1
0
 private void PopulateWorkCentres()
 {
     try
     {
         WorkCentreData db = new WorkCentreData();
         _list = db.GetList();
         dgWorkCentre.AutoGenerateColumns = false;
         dgWorkCentre.DataSource          = _list;
         dgWorkCentre.Refresh();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Пример #2
0
        private void populateWorkCentres()
        {
            WorkCentreData wcd = new WorkCentreData();

            WorkCentres = wcd.GetList();
            int i = 0;

            foreach (WorkCentre wc in WorkCentres)
            {
                _staffWorkCentreAllocation.checkedListBox1.Items.Add(wc.WorkCentreName);
                if (FindWorkCentre(wc.WorkCentreName))
                {
                    _staffWorkCentreAllocation.checkedListBox1.SetItemChecked(i, true);
                }
                i += 1;
            }
        }