public void addUser(StudentTicketBLL student) { StudentTicketDAL studDAL = new StudentTicketDAL() { lastName = student.lastName, name = student.name, patronimic = student.patronimic, number = student.number, serial = student.serial, facult = student.facult, kurs = student.kurs, group = student.group, speciality = student.speciality, roomNumber = student.roomNumber }; PGUserRepository repository = repositoryFactory.getUserRepository(); repository.addUser(studDAL); }
public void addUser(WorkerTicketBLL worker) { WorkerTicketDAL wDAL = new WorkerTicketDAL { lastName = worker.lastName, name = worker.name, patronimic = worker.patronimic, number = worker.number, serial = worker.serial, phoneNumber = worker.phoneNumber, spec = worker.speciality }; if (worker.workDays != null) { wDAL.workDays = worker.workDays; } PGUserRepository repository = repositoryFactory.getUserRepository(); repository.addUser(wDAL); }