public Record WriteToReceptionDoctor(int id_Doctor, Pacient pacient) { new Repository<Pacient>(path).Save(pacient); Record theRecord = new Record(new Repository<Doctor>(path).Get(id_Doctor), pacient, GetTimeDoctor(id_Doctor)); new Repository<Record>(path).Save(theRecord); var item = new Repository<Doctor>(path).Get(id_Doctor); item.Records.Add(theRecord); new Repository<Doctor>(path).Update(item); return theRecord; }
public Record(Doctor doctor, Pacient pacient, DateTime dateTime) { this.Doctor = doctor; this.Pacient = pacient; this.DateTime = dateTime; }
public void GreetingTest() { Pacient pacient = new Pacient() { FirstName = "1", LastName = "2" }; Assert.AreEqual(reg.Greeting(pacient), String.Format("Hello,{0}!", "1 2")); }
public string Greeting(Pacient pacient) { return String.Format("Hello,{0}!", pacient.ToString()); }
public override string ToString() { return(String.Format("Doctor: {0}.\nPacient: {1}.\nTime: {2}.", Doctor.ToString(), Pacient.ToString(), DateTime.ToString("HH:mm"))); }