//gets dal and convert it to dto (by the ctor) public Patients1(Dal.Patients p) { PatientId = p.PatientId; Firstname = p.Firstname; Lastname = p.Lastname; PatientTz = p.PatientTz; DateOfBirth = p.DateOfBirth; Email = p.Email; Password = p.Password; PhoneNumber1 = p.PhoneNumber1; PhoneNumber2 = p.PhoneNumber2; }
//gets dal and convert it to dto (by the ctor) public Meets1(Dal.Meets m) : this() { MeetId = m.MeetId; PatientId = (int)m.PatientId; TherapistId = (int)m.TherapistId; MeetDate = m.MeetDate; CategoryId = (int)m.CategoryId; Dal.Therapists t = Dal.TherapistsDal.GetById(TherapistId); TherapistName = t.FirstName + " " + t.LastName; CategoryName = Dal.CategoriesDal.GetById(CategoryId).CategoryName; Dal.Patients p = Dal.PatientsDal.GetById(PatientId); PatientName = p.Firstname + " " + p.Lastname; }