예제 #1
0
        private void butEditSchedule_Click(object sender, EventArgs e)
        {
            //allow user to edit this day's schedule
            FormScheduleDayEdit FormS = new FormScheduleDayEdit(DateEdit);

            FormS.ShowDialog();
            if (FormS.DialogResult != DialogResult.OK)
            {
                return;
            }
            //schedules may have changed to make a log entry
            SecurityLogs.MakeLogEntry(Permissions.Schedules, 0, "In 'FormPhoneGraphDateEdit', user edited daily schedule for " + DateEdit.ToShortDateString());
            FillGrid();
        }
예제 #2
0
        private void butSchedules_Click(object sender, EventArgs e)
        {
            if (!Security.IsAuthorized(Permissions.Schedules))
            {
                return;
            }
            FormScheduleDayEdit FormSDE = new FormScheduleDayEdit(DateTime.Now, Clinics.ClinicNum);

            FormSDE.ShowOkSchedule = true;
            FormSDE.ShowDialog();
            SecurityLogs.MakeLogEntry(Permissions.Schedules, 0, "");
            if (FormSDE.GotoScheduleOnClose)
            {
                FormSchedule FormS = new FormSchedule();
                FormS.ShowDialog();
            }
        }
예제 #3
0
        private void gridMain_CellDoubleClick(object sender, ODGridClickEventArgs e)
        {
            if (!Security.IsAuthorized(Permissions.Schedules, DateTime.MinValue))
            {
                return;
            }
            if (textDateFrom.errorProvider1.GetError(textDateFrom) != "" ||
                textDateTo.errorProvider1.GetError(textDateTo) != "")
            {
                MsgBox.Show(this, "Please fix errors first.");
                return;
            }
            int clickedCol = e.Col;

            if (!checkWeekend.Checked)
            {
                clickedCol++;
            }
            //the "clickedCell" is in terms of the entire 7 col layout.
            Point    clickedCell  = new Point(clickedCol, e.Row);
            DateTime selectedDate = Schedules.GetDateCal(PIn.Date(textDateFrom.Text), e.Row, clickedCol);

            if (selectedDate < PIn.Date(textDateFrom.Text) || selectedDate > PIn.Date(textDateTo.Text))
            {
                return;
            }
            //MessageBox.Show(selectedDate.ToShortDateString());
            FormScheduleDayEdit FormS = new FormScheduleDayEdit(selectedDate);

            FormS.ShowDialog();
            if (FormS.DialogResult != DialogResult.OK)
            {
                return;
            }
            FillGrid();
            if (checkWeekend.Checked)
            {
                gridMain.SetSelected(clickedCell);
            }
            else
            {
                gridMain.SetSelected(new Point(clickedCell.X - 1, clickedCell.Y));
            }
            changed = true;
        }
예제 #4
0
		private void gridEmpSched_DoubleClick(object sender,EventArgs e) {
			if(ApptDrawing.IsWeeklyView) {
				MsgBox.Show(this,"Not available in weekly view");
				return;
			}
			if(!Security.IsAuthorized(Permissions.Schedules)) {
				return;
			}
			FormScheduleDayEdit FormS=new FormScheduleDayEdit(AppointmentL.DateSelected);
			FormS.ShowDialog();
			SecurityLogs.MakeLogEntry(Permissions.Schedules,0,"");
			SetWeeklyView(false);//to refresh
		}
		private void butEditSchedule_Click(object sender,EventArgs e) {
			//allow user to edit this day's schedule
			FormScheduleDayEdit FormS=new FormScheduleDayEdit(DateEdit);
			FormS.ShowDialog();
			if(FormS.DialogResult!=DialogResult.OK) {
				return;
			}
			//schedules may have changed to make a log entry
			SecurityLogs.MakeLogEntry(Permissions.Schedules,0,"In 'FormPhoneGraphDateEdit', user edited daily schedule for "+DateEdit.ToShortDateString());
			FillGrid();
		}
예제 #6
0
파일: FormSchedule.cs 프로젝트: mnisl/OD
		private void gridMain_CellDoubleClick(object sender,ODGridClickEventArgs e) {
			if(!Security.IsAuthorized(Permissions.Schedules,DateTime.MinValue)) {
				return;
			}
			if(textDateFrom.errorProvider1.GetError(textDateFrom)!=""
				|| textDateTo.errorProvider1.GetError(textDateTo)!="")
			{
				MsgBox.Show(this,"Please fix errors first.");
				return;
			}
			int clickedCol=e.Col;
			if(!checkWeekend.Checked){
				clickedCol++;
			}
			//the "clickedCell" is in terms of the entire 7 col layout.
			Point clickedCell=new Point(clickedCol,e.Row);
			DateTime selectedDate=Schedules.GetDateCal(PIn.Date(textDateFrom.Text),e.Row,clickedCol);
			if(selectedDate<PIn.Date(textDateFrom.Text) || selectedDate>PIn.Date(textDateTo.Text)){
				return;
			}
			//MessageBox.Show(selectedDate.ToShortDateString());
			long clinicNum=0; 
			if(Security.CurUser.ClinicIsRestricted) {
				clinicNum=_listClinics[comboClinic.SelectedIndex].ClinicNum;
			}
			else if(comboClinic.SelectedIndex > 0) {
				clinicNum=_listClinics[comboClinic.SelectedIndex-1].ClinicNum;//Subtract 1, because Headquarters is the first option.
			}
			FormScheduleDayEdit FormS=new FormScheduleDayEdit(selectedDate,clinicNum);
			FormS.ShowDialog();
			if(FormS.DialogResult!=DialogResult.OK){
				return;
			}
			FillGrid();
			if(checkWeekend.Checked){
				gridMain.SetSelected(clickedCell);
			}
			else{
				gridMain.SetSelected(new Point(clickedCell.X-1,clickedCell.Y));
			}
			changed=true;
		}
예제 #7
0
파일: ContrAppt.cs 프로젝트: mnisl/OD
		private void gridEmpSched_DoubleClick(object sender,EventArgs e) {
			if(ApptDrawing.IsWeeklyView) {
				MsgBox.Show(this,"Not available in weekly view");
				return;
			}
			if(!Security.IsAuthorized(Permissions.Schedules)) {
				return;
			}
			List<Provider> listProvs=ProviderC.GetListShort();
			List<Employee> listEmps=Employees.GetListShort();
			if(!PrefC.GetBool(PrefName.EasyNoClinics)) {//Using clinics.
				//For phase one we are only filtering employees, not providers.  Show all providers for now.
				//listProvs=Providers.GetProvsByClinic(FormOpenDental.ClinicNum);
				listEmps=Employees.GetEmpsForClinic(FormOpenDental.ClinicNum);
			}
			//Get the providers and employees for the currently selected clinic.
			FormScheduleDayEdit FormS=new FormScheduleDayEdit(AppointmentL.DateSelected,FormOpenDental.ClinicNum);
			FormS.ShowDialog();
			SecurityLogs.MakeLogEntry(Permissions.Schedules,0,"");
			SetWeeklyView(false);//to refresh
		}