using System;

using HISClinic.DataModel;
using HISClinic.DataServices;

namespace HISClinic.BLL
{
	/// <summary>
	/// Registration 的摘要说明。
	/// </summary>
	public class Registration
	{
		public Registration()
		{
			//
			// TODO: 在此处添加构造函数逻辑
			//
		}

		/// <summary>
		/// 保存挂号信息
		/// </summary>
		/// <param name="registrationRow"></param>
		/// <returns></returns>
		public bool AddRegistration(Registrations.t_RegistrationRow registrationRow)
		{
			return (new RegistrationMapper()).Insert(registrationRow);
		}

		/// <summary>
		/// 根据医生ID查找病人的挂号记录
		/// </summary>
		/// <param name="PatientID"></param>
		/// <param name="DoctorID"></param>
		/// <returns></returns>
		public RegistrationsEx FindRegistration(int patientID,int doctorID)
		{
			RegistrationsEx registrationsEx=(new RegistrationMapper()).FindRegistration(patientID,doctorID);
			return (registrationsEx.t_Registration.Count>0?registrationsEx:null);
		}
	}
}
