Ignore:
Timestamp:
Sep 28, 2010, 9:40:17 AM (14 years ago)
Author:
Sam Habiel
Message:

Several fixes:

  1. Appointments in Past now trigger a warning.
  2. Changes to support Division based management of Scheduling GUI.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Scheduling/trunk/cs/bsdx0200GUISourceCode/CGView.cs

    r892 r964  
    20952095                                }
    20962096
     2097                // Added check for making Walk-ins in the past. 9/28/2010
     2098                if (dStart.Date < DateTime.Today.Date)
     2099                {
     2100                    var result = MessageBox.Show("Are you sure you want to make a Walk-in in the past?", "Windows Scheduling", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button2);
     2101                    if (result == DialogResult.No) return;
     2102                }
     2103
    20972104                                /*
    20982105                                 * 8-10-05 Added overbook prompt for walkin
     
    21722179                                if (bRet == false)
    21732180                                        return;
    2174                                
     2181
     2182                // Added check for making Walk-ins in the past. 9/28/2010
     2183                if (dStart.Date < DateTime.Today.Date)
     2184                {
     2185                    var result = MessageBox.Show("Are you sure you want to make an appointment in the past?", "Windows Scheduling", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button2);
     2186                    if (result == DialogResult.No) return;
     2187                }
     2188
    21752189                                //Test dStart for Holiday
    21762190                                DataView dvHoliday = new DataView(this.DocManager.GlobalDataSet.Tables["HOLIDAY"]);
     
    26572671                                }
    26582672
     2673                // Added check for making Walk-ins/appts in the past. 9/28/2010 //smh
     2674                if (e.StartTime < DateTime.Today.Date)
     2675                {
     2676                    var result = MessageBox.Show("Are you sure you want to make an appointment in the past?", "Windows Scheduling", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button2);
     2677                    if (result == DialogResult.No) return;
     2678                }
     2679
    26592680                                if (EditAppointmentEnabled(e.Resource) == false)
    26602681                                        return;
     
    27082729                                m_Document.CreateAppointment(e.Appointment);
    27092730                       
    2710                                 string sError = AppointmentDeleteOne(e.Appointment.AppointmentKey);
    2711                                 if (sError != "")
     2731                               
     2732                string sError = AppointmentDeleteOne(e.Appointment.AppointmentKey);
     2733                if (sError != "")
    27122734                                {
    27132735                                        MessageBox.Show(sError);
     
    28662888                                if (bModAppts == false)
    28672889                                        return;
     2890
     2891                // Added check for making Walk-ins/appts in the past. 9/28/2010 //smh
     2892                if (e.StartTime < DateTime.Today.Date)
     2893                {
     2894                    var result = MessageBox.Show("Are you sure you want to make an appointment in the past?", "Windows Scheduling", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button2);
     2895                    if (result == DialogResult.No) return;
     2896                }
     2897
    28682898
    28692899                                bOverbook = (bool) this.m_htOverbook[e.Resource.ToString()];
Note: See TracChangeset for help on using the changeset viewer.