Exemple #1
0
        private void SendPinboard_Click()
        {
            if (grid.SelectedIndices.Length == 0)
            {
                MsgBox.Show("Please select an appointment first.");
                return;
            }
            _listAptSelected.Clear();
            int patsRestricted = 0;

            for (int i = 0; i < grid.SelectedIndices.Length; i++)
            {
                if (PatRestrictionL.IsRestricted(_listUnschedApt[grid.SelectedIndices[i]].PatNum, PatRestrict.ApptSchedule, true))
                {
                    patsRestricted++;
                    continue;
                }
                _listAptSelected.Add(_listUnschedApt[grid.SelectedIndices[i]].AptNum);
            }
            if (patsRestricted > 0)
            {
                if (_listAptSelected.Count == 0)
                {
                    MsgBox.Show("All selected appointments have been skipped due to patient restriction "
                                + PatRestrictions.GetPatRestrictDesc(PatRestrict.ApptSchedule) + ".");
                    return;
                }
                MessageBox.Show("Appointments skipped due to patient restriction " + PatRestrictions.GetPatRestrictDesc(PatRestrict.ApptSchedule)
                                + ": " + patsRestricted + ".");
            }
            GotoModule.PinToAppt(_listAptSelected, 0);           //This will send all appointments in _listAptSelected to the pinboard, and will select the patient attached to the last appointment in _listAptSelected.
        }
Exemple #2
0
 /// <summary>Helper method to send given appt to pinboard.
 /// Refreshes Appointment module.
 /// Also does some appointment and security validation.</summary>
 public static void CopyAptToPinboardHelper(Appointment appt)
 {
     GotoModule.PinToAppt(new List <long>()
     {
         appt.AptNum
     }, appt.PatNum);
 }
		///<summary>Removes the selected appoinments from the class wide list of appointments, sends the appointments to the pinboard,
		///and then refreshes the grid so that the user can see that they are "taking care" of the conflicts.</summary>
		private void SendPinboard_Click() {
			if(gridConflicts.SelectedIndices.Length==0) {
				MsgBox.Show(this,"Please select an appointment first.");
				return;
			}
			List<long> listSelectedAptNums=new List<long>();
			for(int i=0;i<gridConflicts.SelectedIndices.Length;i++) {
				listSelectedAptNums.Add(((Appointment)gridConflicts.ListGridRows[gridConflicts.SelectedIndices[i]].Tag).AptNum);
			}
			_listAppts.RemoveAll(x => listSelectedAptNums.Contains(x.AptNum));
			FillGrid();
			GotoModule.PinToAppt(listSelectedAptNums,0); //Pins all appointments to the pinboard that were in listAptSelected.
		}
Exemple #4
0
        private void SendPinboard_Click()
        {
            if (gridMain.SelectedIndices.Length == 0)
            {
                MsgBox.Show(this, "Please select an appointment first.");
                return;
            }
            List <long> listAppts = new List <long>();

            for (int i = 0; i < gridMain.SelectedIndices.Length; i++)
            {
                listAppts.Add(_listPlannedAppts[gridMain.SelectedIndices[i]].AptNum);                //Will only be one unless multiselect is enabled in the future
                _listPlannedAppts.RemoveAt(gridMain.SelectedIndices[i]);
            }
            GotoModule.PinToAppt(listAppts, 0);           //This will send all appointments in _listAptSelected to the pinboard, and will select the patient attached to the last appointment in _listAptSelected.
            FillGrid();
        }