예제 #1
0
        ////

        public void PopulateUpdateData()
        {
            ReloadOBForm();

            lblReturnOBnumber.Text     = OBEntry.Rob.ToString();
            txtOBNumber.Text           = OBEntry.Ob.ToString();
            txtTime.Text               = OBEntry.DateAndTime.Split('#')[1];
            txtDate.Text               = OBEntry.DateAndTime.Split('#')[0];
            cmbOccurence.SelectedIndex = cmbOccurence.FindStringExact(OBEntry.Occurence);
            cmbShift.SelectedIndex     = cmbShift.FindString(OBEntry.Shifts);

            cmbSite.DataSource    = siteCmbTemp.GetActiveSites();
            cmbOfficer.DataSource = officerCmbTemp.getActiveOfficers();
            int finalIndex = -1;

            int index = 0;

            foreach (SiteClass item in cmbSite.Items)
            {
                if (item.Callsighn == OBEntry.Site)
                {
                    finalIndex = index;
                }
                index++;
            }
            cmbSite.SelectedIndex = finalIndex;

            index = 0;
            foreach (OfficerClass item in cmbOfficer.Items)
            {
                if (item.PSiRA == OBEntry.Officer.ToString())
                {
                    finalIndex = index;
                }
                index++;
            }
            cmbOfficer.SelectedIndex = finalIndex;

            txtOccurenceNote.Text = OBEntry.Notes.Replace("&", Environment.NewLine).Replace("@", ",");

            btnLogEntry.Text = "Update Occurrence";

            if (personClassAdminForm.Rank != 2)
            {
                btnLogEntry.Enabled      = false;
                txtOBNumber.Enabled      = false;
                txtOccurenceNote.Enabled = false;
                cmbShift.Enabled         = false;
                cmbSite.Enabled          = false;
                cmbOfficer.Enabled       = false;
                cmbOccurence.Enabled     = false;
            }
        }
예제 #2
0
 public void ClearOfficerTab()
 {
     ConstantClass.ToStringType    = "AdminCombo";
     txtOfficerPSiRA.Text          = "";
     txtOfficerPSiRA.Enabled       = true;
     txtOfficerName.Text           = "";
     txtOfficerSurname.Text        = "";
     txtOfficerConNum.Text         = "";
     cmbOfficerSiteName.DataSource = siteClass.GetActiveSites();
     lstOfficers.SelectedIndex     = -1;
     btnLogOfficer.Text            = "Add New Officer";
 }