public void ReloadOBForm() { SiteClass site = new SiteClass(); OfficerClass officer = new OfficerClass(); ConstantClass.ToStringType = "OBCombo"; OBEntry.PopulateOBList(); lblReturnOBnumber.Text = OBEntry.GetNewReturnOBNumber(); cmbSite.DataSource = site.GetSiteData(); cmbOfficer.DataSource = officer.GetOfficerData(); txtTime.Text = DateTime.Now.ToString("HH:mm:ss"); txtDate.Text = DateTime.Now.ToString("dd/MM/yyyy"); txtOBNumber.Text = personClassAdminForm.PSiRA; txtOccurenceNote.Text = ""; cmbOccurence.SelectedIndex = -1; cmbOfficer.SelectedIndex = -1; cmbShift.SelectedIndex = -1; cmbSite.SelectedIndex = -1; txtOBNumber.Enabled = true; txtOccurenceNote.Enabled = true; cmbOccurence.Enabled = true; cmbOfficer.Enabled = true; cmbShift.Enabled = true; cmbSite.Enabled = true; btnLogEntry.Text = "Log Occurrence"; }
public void ReloadOfficerList() { ConstantClass.ToStringType = "AdminList"; lstOfficers.DataSource = null; List <OfficerClass> thelist = new List <OfficerClass>(); foreach (OfficerClass item in officerClass.GetOfficerData()) { if (item.Active == "true") { thelist.Add(item); } } lstOfficers.DataSource = thelist; }