コード例 #1
0
        public bool AppointmentBooking(string patientName, string doctorName, DateTime appointmentTime, string clinicName)
        {
            string[] patientNames = patientName.Split(' ');
            string[] doctorNames = doctorName.Split(' ');

            if (patientNames.Length != 2 || doctorNames.Length != 2)
            {
                return false;
            }

            Patient patient = GetPatientInfo(patientNames[0], patientNames[1]);
            Doctor doctor = GetDoctorInfo(doctorNames[0], doctorNames[1]);

            AppointmentData appointment = new AppointmentData()
            {
                HealthInsuranceNo = patient.HealthInsuranceNo,
                MedicalRegistrationNo = doctor.MedicalRegistrationNo,
                AppointmentTime = appointmentTime,
                ClinicName = clinicName
            };

            db.AppointmentDatas.InsertOnSubmit(appointment);

            try
            {
                db.SubmitChanges();
            }
            catch (Exception e)
            {
                throw new FaultException(e.Message);
            }

            return true;
        }
コード例 #2
0
		private void detach_AppointmentDatas(AppointmentData entity)
		{
			this.SendPropertyChanging();
			entity.DoctorData = null;
		}
コード例 #3
0
 partial void DeleteAppointmentData(AppointmentData instance);
コード例 #4
0
 partial void UpdateAppointmentData(AppointmentData instance);
コード例 #5
0
 partial void InsertAppointmentData(AppointmentData instance);
コード例 #6
0
		private void attach_AppointmentDatas(AppointmentData entity)
		{
			this.SendPropertyChanging();
			entity.PatientData = this;
		}