Ejemplo n.º 1
0
        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";
        }
Ejemplo n.º 2
0
        public void ReloadSiteList()
        {
            ConstantClass.ToStringType = "AdminList";
            lstSitesList.DataSource    = null;
            List <SiteClass> thelist = new List <SiteClass>();

            foreach (SiteClass item in siteClass.GetSiteData())
            {
                if (item.Active == "true")
                {
                    thelist.Add(item);
                }
            }
            lstSitesList.DataSource = thelist;
        }