コード例 #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";
        }
コード例 #2
0
 private void lstSitesList_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (lstSitesList.SelectedIndex != -1)
     {
         SiteClass site = (SiteClass)lstSitesList.SelectedItem;
         txtSiteCallSign.Text      = site.Callsighn;
         txtSiteCallSign.Enabled   = false;
         txtSiteName.Text          = site.SiteName;
         txtSiteClientName.Text    = site.ClientName;
         txtSiteContactNumber.Text = site.CleintContactNr;
         txtSiteEmt.Text           = site.Emt;
         txtSiteFire.Text          = site.Fire;
         txtSiteArmed.Text         = site.Armed;
         txtSiteSaps.Text          = site.Saps;
         btnSiteLog.Text           = "Update Site";
     }
 }
コード例 #3
0
        private void cmbSite_SelectedIndexChanged(object sender, EventArgs e)
        {
            try
            {
                SiteClass           siteClasstemp = (SiteClass)cmbSite.SelectedItem;
                List <OfficerClass> notTheList    = new List <OfficerClass>();

                foreach (OfficerClass item in theOfficerClass.getActiveOfficers())
                {
                    if (item.Site == siteClasstemp.Callsighn)
                    {
                        notTheList.Add(item);
                    }
                }

                cmbOfficer.DataSource = notTheList;
            }
            catch (Exception)
            {
            }
        }