public static Reference GetReference(DAL.Reference r) { if (r == null) { return(null); } Reference dto = new Reference() { RefId = r.RefId, Date = r.Date.Value, Description = r.Description, BornDate = r.BornDate.Value, IsCare = r.IsCare.Value, UserName = r.UserName.Value, //AttendantId = r..Value, ProfId = r.ProfId.Value, TypeRef = r.TypeRef.Value, recommendation = r.recommendation, Professions = NewFolder1.Profession.GetProfession1(r.Professions), users = NewFolder1.user.GetUser(r.users), TypeReference = NewFolder1.TypeReference.GetTypeReference(r.TypeReference) }; return(dto); }
public static DAL.Reference GetReference(DTO.NewFolder1.Reference referencedto) { if (referencedto == null) { return(null); } DAL.Reference reference = new DAL.Reference() { RefId = referencedto.RefId, Date = referencedto.Date, Description = referencedto.Description, BornDate = referencedto.BornDate, IsCare = referencedto.IsCare, UserName = referencedto.UserName, //AttendantId = referencedto.AttendantId, ProfId = referencedto.ProfId, TypeRef = referencedto.TypeRef, recommendation = referencedto.recommendation, //Professions = NewFolder1.Profession.GetProfession1(referencedto.Professions), users = NewFolder1.user.GetUser(referencedto.users), TypeReference = NewFolder1.TypeReference.GetTypeReference(referencedto.TypeReference) }; return(reference); }