public NewAppointment(CalendarItem item, string providerID, Calendar calendar1, SchedulingCalendar schedulingCalendar)
        {
            InitializeComponent();

            this.calendarItem = item;
            this.providerID   = providerID;
            this.calendar1    = calendar1;

            this.scheduleForm = schedulingCalendar;


            if (this.scheduleForm.Type == "Provider")
            {
                ChooseProviderLabel.Hide();
                ProviderForPatientList.Hide();
            }
            if (this.scheduleForm.Type == "Scheduler")
            {
                if (PatientListView.Rows.Count > 0)
                {
                    int rowIndex = PatientListView.CurrentRow.Index;
                    var selectedPatientIDCell = this.PatientListView["PatientID", rowIndex];
                    selectedPatientID = (Int32)selectedPatientIDCell.Value;
                    ProviderForPatientList.DataSource    = patientProviderRelationTableAdapter.GetDataByPatientID(selectedPatientID);
                    ProviderForPatientList.ValueMember   = "ProviderID";
                    ProviderForPatientList.DisplayMember = "ProviderInfo";
                }
            }
        }
Exemple #2
0
 public NewPatient(ProviderMain providerMain)
 {
     InitializeComponent();
     PregnantBox.Hide();
     PregnantLabel.Hide();
     NotPregnantBox.Hide();
     ProviderList.Hide();
     ChooseProviderLabel.Hide();
     this.providerMain = providerMain;
     providerIDList.Add(providerMain.GetProviderID());
 }
        public NewAppointment(bool isUpdated, CalendarItem item, string providerID, Calendar calendar1, SchedulingCalendar schedulingCalendar)
        {
            InitializeComponent();

            this.calendarItem = item;
            this.providerID   = providerID;
            this.calendar1    = calendar1;
            this.scheduleForm = schedulingCalendar;
            this.isUpdated    = isUpdated;


            Console.WriteLine(PatientIDNum.Text);
            firstNameFromAppt = calendarItem.PatientFirstName;
            lastNameFromAppt  = calendarItem.PatientLastName;

            string[] text = calendarItem.Text.Split('\n');
            AppointmentDetails.Text = text[2];

            if (this.scheduleForm.Type == "Provider")
            {
                ChooseProviderLabel.Hide();
                ProviderForPatientList.Hide();
            }
            if (this.scheduleForm.Type == "Scheduler")
            {
                if (PatientListView.Rows.Count > 0)
                {
                    int rowIndex = PatientListView.CurrentRow.Index;
                    var selectedPatientIDCell = this.PatientListView["PatientID", rowIndex];
                    selectedPatientID = (Int32)selectedPatientIDCell.Value;
                    ProviderForPatientList.DataSource    = patientProviderRelationTableAdapter.GetDataByPatientID(selectedPatientID);
                    ProviderForPatientList.ValueMember   = "ProviderID";
                    ProviderForPatientList.DisplayMember = "ProviderInfo";
                }
            }
        }