private AppointmentWithDoctorViewModel GetFilledAppointmentWithDoctorViewModel(Yamed_Service.Patient currentPatient, string paginationType) { AppointmentWithDoctorViewModel viewModel = new AppointmentWithDoctorViewModel(); PatientViewModel patient = new PatientViewModel { FIO = HttpContext.Session.GetString("fioPatient"), Birthday = DateTime.Parse(HttpContext.Session.GetString("birthdayPatient")), NPolis = currentPatient.NPolis, SexPat = currentPatient.SexPat, IdPatient = HttpContext.Session.GetString("idPatient") }; LpuViewModel lpu = new LpuViewModel { IdLpu = HttpContext.Session.GetString("idCurrentLpu"), NameLpu = HttpContext.Session.GetString("nameCurrentLpu"), AddressLpu = HttpContext.Session.GetString("addressCurrentLpu") }; LpuViewModel selectLpu = new LpuViewModel { IdLpu = HttpContext.Session.GetString("idSelectLpu"), NameLpu = HttpContext.Session.GetString("nameSelectLpu"), AddressLpu = HttpContext.Session.GetString("addressSelectLpu") }; SpesialityViewModel spesiality = new SpesialityViewModel { IdSpesiality = HttpContext.Session.GetString("idSpesiality"), NameSpesiality = HttpContext.Session.GetString("nameSpesiality"), CountFreeTicketSpesiality = HttpContext.Session.GetString("countFreeTicketSpesiality") }; DoctorViewModel doctor = new DoctorViewModel { IdDoctor = HttpContext.Session.GetString("idDoctor"), NameDoctor = HttpContext.Session.GetString("nameDoctor"), CountFreeTicketDoctor = HttpContext.Session.GetString("countFreeTicketDoctor") }; SelectedDayViewModel selectedDay = new SelectedDayViewModel { DayName = HttpContext.Session.GetString("selectDayName"), DayDate = HttpContext.Session.GetString("selectDayDate") }; string selectedTime = HttpContext.Session.GetString("selectTime"); string roomNumber = HttpContext.Session.GetString("roomNumber"); string idSelectAppointment = HttpContext.Session.GetString("idSelectAppointment"); bool isAppointmentCOVID = false; if (HttpContext.Session.GetString("nextPathKey") == "AppointmentWithCOVID19") { isAppointmentCOVID = true; } viewModel = viewModelHelper.FillAppointmentWithDoctorViewModel(patient, lpu, selectLpu, spesiality, doctor, selectedDay, selectedTime, roomNumber, idSelectAppointment, currentPatient, paginationType, isAppointmentCOVID); return(viewModel); }