private void EditAppointment()
        {
            PatientsDataSet.AppointmentsRow appointment = DataSources.PatientsDataSet.Appointments.FindById(this.appointmentId);
            appointment.NameDoc     = this.nameTextBoxControl.Text;
            appointment.Start       = this.startDateTimePicker.Value;
            appointment.End         = this.endDateTimePicker.Value;
            appointment.Location    = this.locationTextBoxControl.Text;
            appointment.Description = this.descriptionTextBoxControl.Text;

            this.appointmentsTableAdapter1.Update(DataSources.PatientsDataSet.Appointments);
            this.appointmentsTableAdapter1.Fill(DataSources.PatientsDataSet.Appointments);
            RadMessageBox.Show(this, "Appointment changed.");
        }
Exemple #2
0
        private void AddAppointment()
        {
            PatientsDataSet.AppointmentsRow appointment = (PatientsDataSet.AppointmentsRow)DataSources.PatientsDataSet.Appointments.Rows.Add();
            appointment.NameDoc     = nameTextBoxControl.Text;
            appointment.Start       = this.startDateTimePicker.Value;
            appointment.End         = this.endDateTimePicker.Value;
            appointment.Location    = this.locationTextBoxControl.Text;
            appointment.Description = this.descriptionTextBoxControl.Text;

            this.appointmentsTableAdapter1.Update(DataSources.PatientsDataSet.Appointments);
            this.appointmentsTableAdapter1.Fill(DataSources.PatientsDataSet.Appointments);
            RadMessageBox.Show(this, "Appointment added.");
            //this.Close();
        }
Exemple #3
0
        private void radButton3_Click(object sender, EventArgs e)
        {
            if (!this.AreRequiredFieldsValid())
            {
                return;
            }

            if (this.editing)
            {
                PatientsDataSet.AppointmentsRow appointment2 = DataSources.PatientsDataSet.Appointments.FindById(this.appointmentId);

                if (appointment2 != null)
                {
                    appointment2.Delete();
                    this.appointmentsTableAdapter1.Update(DataSources.PatientsDataSet.Appointments);
                    this.appointmentsTableAdapter1.Fill(DataSources.PatientsDataSet.Appointments);
                    RadMessageBox.Show(this, "Appointment Deleted.");
                    this.Close();
                }
            }
        }
Exemple #4
0
        private void AddAppointmentForm_Load(object sender, EventArgs e)
        {
            startDateTimePicker.Value = DateTime.Now;
            endDateTimePicker.Value   = DateTime.Now.AddHours(1);
            this.startDateTimePicker.DateTimePickerElement.ShowTimePicker = true;
            this.endDateTimePicker.DateTimePickerElement.ShowTimePicker   = true;
            //this.startDateTimePicker.ThemeName = "MedicalAppTheme";
            //this.endDateTimePicker.ThemeName = "MedicalAppTheme";
            PatientsDataSet.AppointmentsRow appointmentsRow = this.Tag as PatientsDataSet.AppointmentsRow;
            if (appointmentsRow != null)
            {
                this.appointmentId             = appointmentsRow.Id;
                this.editing                   = true;
                this.Text                      = "Edit Appointment";
                this.startDateTimePicker.Value = appointmentsRow.Start;
                this.endDateTimePicker.Value   = appointmentsRow.End;
                //selectedPatientId = appointmentsRow.PersonId;
                if (appointmentsRow["Location"] != DBNull.Value)
                {
                    this.locationTextBoxControl.Text = appointmentsRow.Location;
                }
                if (appointmentsRow["Description"] != DBNull.Value)
                {
                    this.descriptionTextBoxControl.Text = appointmentsRow.Description;
                }
                if (appointmentsRow["NameDoc"] != DBNull.Value)
                {
                    this.nameTextBoxControl.Text = appointmentsRow.NameDoc;
                }
            }

            Appointment appointment = this.Tag as Appointment;

            if (appointment != null)
            {
                this.startDateTimePicker.Value = appointment.Start;
                this.endDateTimePicker.Value   = appointment.End;
            }
        }
Exemple #5
0
        private void AddAppointmentForm_Load(object sender, EventArgs e)
        {
            startDateTimePicker.Value = DateTime.Now;
            endDateTimePicker.Value   = DateTime.Now.AddHours(1);
            this.startDateTimePicker.DateTimePickerElement.ShowTimePicker = true;
            this.endDateTimePicker.DateTimePickerElement.ShowTimePicker   = true;
            PatientsDataSet.AppointmentsRow appointmentsRow = this.Tag as PatientsDataSet.AppointmentsRow;
            if (appointmentsRow != null)
            {
                this.Text = "Edit Appointment";
                this.startDateTimePicker.Value = appointmentsRow.Start;
                this.endDateTimePicker.Value   = appointmentsRow.End;
                //selectedPatientId = appointmentsRow.PersonId;
            }

            Appointment appointment = this.Tag as Appointment;

            if (appointment != null)
            {
                this.startDateTimePicker.Value = appointment.Start;
            }
        }
Exemple #6
0
        private void saveButton_Click(object sender, EventArgs e)
        {
            if (!this.AreRequiredFieldsValid())
            {
                return;
            }

            PatientsDataSet.AppointmentsRow appointment = (PatientsDataSet.AppointmentsRow)DataSources.PatientsDataSet.Appointments.Rows.Add();
            appointment.NameDoc     = name;
            appointment.Start       = this.startDateTimePicker.Value;
            appointment.End         = this.endDateTimePicker.Value;
            appointment.Location    = place;
            appointment.Description = sub;

            this.appointmentsTableAdapter1.Update(DataSources.PatientsDataSet.Appointments);
            this.appointmentsTableAdapter1.Fill(DataSources.PatientsDataSet.Appointments);
            spt = new recognitionArabic().CloudTextToSpeech("تم اضافة المَوعِد", "male");

            RadMessageBox.Show(this, "Appointment added.");


            this.Close();
        }