private void butHoliday_Click(object sender, System.EventArgs e)
        {
            for (int i = 0; i < SchedList.Count; i++)
            {
                if (SchedList[i].SchedType == ScheduleType.Practice &&
                    SchedList[i].Status == SchedStatus.Holiday)
                {
                    MsgBox.Show(this, "Day is already a Holiday.");
                    return;
                }
            }
            Schedule SchedCur = new Schedule();

            SchedCur.SchedDate = SchedCurDate;
            SchedCur.Status    = SchedStatus.Holiday;
            SchedCur.SchedType = ScheduleType.Practice;
            FormScheduleEdit FormS = new FormScheduleEdit();

            FormS.SchedCur = SchedCur;
            FormS.ShowDialog();
            if (FormS.DialogResult != DialogResult.OK)
            {
                return;
            }
            SchedList.Add(SchedCur);
            FillGrid();
        }
        private void butProvNote_Click(object sender, EventArgs e)
        {
            Schedule SchedCur = new Schedule();

            SchedCur.SchedDate = SchedCurDate;
            SchedCur.Status    = SchedStatus.Open;
            //schedtype, provNum, and empnum will be set down below
            FormScheduleEdit FormS = new FormScheduleEdit();

            FormS.SchedCur = SchedCur;
            FormS.ShowDialog();
            if (FormS.DialogResult != DialogResult.OK)
            {
                return;
            }
            Schedule schedTemp;

            for (int i = 0; i < listProv.SelectedIndices.Count; i++)
            {
                schedTemp           = new Schedule();
                schedTemp           = SchedCur.Copy();
                schedTemp.SchedType = ScheduleType.Provider;
                schedTemp.ProvNum   = ProviderC.ListShort[listProv.SelectedIndices[i]].ProvNum;
                SchedList.Add(schedTemp);
            }
            for (int i = 0; i < listEmp.SelectedIndices.Count; i++)
            {
                schedTemp             = new Schedule();
                schedTemp             = SchedCur.Copy();
                schedTemp.SchedType   = ScheduleType.Employee;
                schedTemp.EmployeeNum = Employees.ListShort[listEmp.SelectedIndices[i]].EmployeeNum;
                SchedList.Add(schedTemp);
            }
            FillGrid();
        }
        private void butNote_Click(object sender, EventArgs e)
        {
            Schedule SchedCur = new Schedule();

            SchedCur.SchedDate = SchedCurDate;
            SchedCur.Status    = SchedStatus.Open;
            SchedCur.SchedType = ScheduleType.Practice;
            FormScheduleEdit FormS = new FormScheduleEdit();

            FormS.SchedCur = SchedCur;
            FormS.ShowDialog();
            if (FormS.DialogResult != DialogResult.OK)
            {
                return;
            }
            SchedList.Add(SchedCur);
            FillGrid();
        }
        private void gridMain_CellDoubleClick(object sender, ODGridClickEventArgs e)
        {
            Schedule         schedCur = SchedList[e.Row];  //remember the clicked row
            FormScheduleEdit FormS    = new FormScheduleEdit();

            FormS.SchedCur = SchedList[e.Row];
            FormS.ShowDialog();
            if (FormS.DialogResult != DialogResult.OK)
            {
                return;
            }
            FillGrid();
            for (int i = 0; i < SchedList.Count; i++)
            {
                if (SchedList[i] == schedCur)
                {
                    gridMain.SetSelected(i, true);
                }
            }
        }
Example #5
0
		private void butHoliday_Click(object sender,System.EventArgs e) {
			for(int i=0;i<_listScheds.Count;i++){
				if(_listScheds[i].SchedType==ScheduleType.Practice
					&& _listScheds[i].Status==SchedStatus.Holiday)
				{
					MsgBox.Show(this,"Day is already a Holiday.");
					return;
				}
			}
		  Schedule SchedCur=new Schedule();
      SchedCur.SchedDate=_dateSched;
      SchedCur.Status=SchedStatus.Holiday;
			SchedCur.SchedType=ScheduleType.Practice;
		  FormScheduleEdit FormS=new FormScheduleEdit();
			FormS.SchedCur=SchedCur;
			FormS.ClinicNum=_clinicNum;
      FormS.ShowDialog();
			if(FormS.DialogResult!=DialogResult.OK) {
				return;
			}
			_listScheds.Add(SchedCur);
      FillGrid();
		}
Example #6
0
		private void butNote_Click(object sender,EventArgs e) {
			Schedule SchedCur=new Schedule();
			SchedCur.SchedDate=_dateSched;
			SchedCur.Status=SchedStatus.Open;
			SchedCur.SchedType=ScheduleType.Practice;
			FormScheduleEdit FormS=new FormScheduleEdit();
			FormS.SchedCur=SchedCur;
			FormS.ClinicNum=_clinicNum;
			FormS.ShowDialog();
			if(FormS.DialogResult!=DialogResult.OK) {
				return;
			}
			_listScheds.Add(SchedCur);
			FillGrid();
		}
Example #7
0
		private void butProvNote_Click(object sender,EventArgs e) {
			Schedule schedCur=new Schedule();
			schedCur.SchedDate=_dateSched;
			schedCur.Status=SchedStatus.Open;
			//schedtype, provNum, and empnum will be set down below
			FormScheduleEdit FormS=new FormScheduleEdit();
			FormS.SchedCur=schedCur;
			FormS.ClinicNum=_clinicNum;
			FormS.ShowDialog();
			if(FormS.DialogResult!=DialogResult.OK) {
				return;
			}
			Schedule schedTemp;
			for(int i=0;i<listProv.SelectedIndices.Count;i++) {
				schedTemp=new Schedule();
				schedTemp=schedCur.Copy();
				schedTemp.SchedType=ScheduleType.Provider;
				schedTemp.ProvNum=_listProvs[listProv.SelectedIndices[i]].ProvNum;
				_listScheds.Add(schedTemp);
			}
			for(int i=0;i<listEmp.SelectedIndices.Count;i++) {
				schedTemp=new Schedule();
				schedTemp=schedCur.Copy();
				schedTemp.SchedType=ScheduleType.Employee;
				schedTemp.EmployeeNum=_listEmps[listEmp.SelectedIndices[i]].EmployeeNum;
				_listScheds.Add(schedTemp);
			}
			FillGrid();
		}
Example #8
0
		private void gridMain_CellDoubleClick(object sender,ODGridClickEventArgs e) {
			Schedule schedCur=_listScheds[e.Row];//remember the clicked row
			FormScheduleEdit FormS=new FormScheduleEdit();
			FormS.SchedCur=_listScheds[e.Row];
			FormS.ClinicNum=_clinicNum;
			FormS.ShowDialog();
			if(FormS.DialogResult!=DialogResult.OK) {
				return;
			}
			FillGrid();
			for(int i=0;i<_listScheds.Count;i++){
				if(_listScheds[i]==schedCur){
					gridMain.SetSelected(i,true);
				}
			}
		}
Example #9
0
 //private void butAll_Click(object sender,EventArgs e) {
 //    for(int i=0;i<listProv.Items.Count;i++){
 //        listProv.SetSelected(i,true);
 //    }
 //}
 private void butAddTime_Click(object sender, System.EventArgs e)
 {
     Schedule SchedCur=new Schedule();
     SchedCur.SchedDate=SchedCurDate;
     SchedCur.Status=SchedStatus.Open;
     SchedCur.StartTime=new TimeSpan(8,0,0);//8am
     SchedCur.StopTime=new TimeSpan(17,0,0);//5pm
     //schedtype, provNum, and empnum will be set down below
     FormScheduleEdit FormS=new FormScheduleEdit();
     FormS.SchedCur=SchedCur;
     FormS.ShowDialog();
     if(FormS.DialogResult!=DialogResult.OK){
         return;
     }
     Schedule schedTemp;
     for(int i=0;i<listProv.SelectedIndices.Count;i++){
         schedTemp=new Schedule();
         schedTemp=SchedCur.Copy();
         schedTemp.SchedType=ScheduleType.Provider;
         schedTemp.ProvNum=ProviderC.ListShort[listProv.SelectedIndices[i]].ProvNum;
         SchedList.Add(schedTemp);
     }
     for(int i=0;i<listEmp.SelectedIndices.Count;i++) {
         schedTemp=new Schedule();
         schedTemp=SchedCur.Copy();
         schedTemp.SchedType=ScheduleType.Employee;
         schedTemp.EmployeeNum=Employees.ListShort[listEmp.SelectedIndices[i]].EmployeeNum;
         SchedList.Add(schedTemp);
     }
     FillGrid();
 }