public ShowPageToSendDischangeCommandAnswer ShowPageToSendDischange(ShowPageToSendDischangeCommand command) { var clinics = this._clinicRepository.GetModels().ToList(); if (command.ClinicId == null) { command.ClinicId = clinics.FirstOrDefault().Id; } var clinicResults = clinics.Select(model => new KeyValuePair<int, string>(model.Id, model.Name)).ToList(); return new ShowPageToSendDischangeCommandAnswer { Token = command.Token.Value, ClinicId = command.ClinicId.Value, Clinics = clinicResults, }; }
public ActionResult ShowPageToSendDischange(ShowPageToSendDischangeCommand command) { var answer = _noticesService.ShowPageToSendDischange(command); return View(answer); }