public WorkerTicketBLL searchBySerial(WorkerTicketBLL worker) { WorkerTicketDAL workDal = new WorkerTicketDAL { serial = worker.serial, number = worker.number, lastName = worker.lastName, name = worker.name, patronimic = worker.patronimic, spec = worker.speciality, phoneNumber = worker.phoneNumber, workDays = worker.workDays }; WorkerTicketDAL result; PGUserRepository repository = repositoryFactory.getUserRepository(); result = repository.findBySerial(workDal); return(new WorkerTicketBLL { serial = result.serial, number = result.number, lastName = result.lastName, name = result.name, patronimic = result.patronimic, phoneNumber = result.phoneNumber, speciality = result.spec, workDays = result.workDays }); }
public StudentTicketBLL searchBySerial(StudentTicketBLL student) { StudentTicketDAL stDal = new StudentTicketDAL { serial = student.serial, number = student.number, lastName = student.lastName, name = student.name, patronimic = student.patronimic, kurs = student.kurs, facult = student.facult, group = student.group, speciality = student.speciality, roomNumber = student.roomNumber }; StudentTicketDAL resultStud; PGUserRepository repository = repositoryFactory.getUserRepository(); resultStud = repository.findBySerial(stDal); return(new StudentTicketBLL { serial = resultStud.serial, number = resultStud.number, lastName = resultStud.lastName, name = resultStud.name, patronimic = resultStud.patronimic, kurs = resultStud.kurs, facult = resultStud.facult, group = resultStud.group, speciality = resultStud.speciality, roomNumber = resultStud.roomNumber }); }