} (command == Create amp; amp; ((List lt; Appointment gt;) Session [ AppointmentList ]). Count ()!=0)
{illness=new Illness
{= model.Title,=model.Description,=false,=attendingDoctor,=DateTime.Now,=null,=patient.MedicalCard
} ;. UnitOfWork.IllnessRepository.Add (illness); RedirectToAction ( GetRequest raquo ;, DoctorCardOperation raquo ;, new {message= The operation was successful });
} RedirectToAction ( CreateIllness raquo ;, DoctorCardOperation raquo ;, new {message= You have to fill all empty areas });
}
[HttpGet]
[Authorize] ActionResult CreateReference (Appointment appointment, string message)
{. Message=message; (Session [ AppointmentList ] == null)
{[ AppointmentList ]=new List lt; Appointment gt; ();
}
{
((List lt; Appointment gt;) Session [ AppointmentList ]). Add (appointment);
} addedDoctor=Session [ CurrentDoctor ] as Doctor; patient=Session [ PatientRequest ] as Patient; model=new CreateReferenceModel
{= addedDoctor.Login,=addedDoctor.FirstName,=addedDoctor.LastName,=patient.Login,=patient.FirstName,=patient.LastName,=((List lt; Appointment gt;) Session [ AppointmentList ]).Select (x= gt; new SelectListItem
{= x.Id.ToString (),=string.Format ( {0} raquo ;, x.Title)
})
}; View (model);
}
[HttpPost]
[Authorize]
[ValidateAntiForgeryToken] ActionResult CreateReference (CreateReferenceModel model, string command)
{addedDoctor=Session [ CurrentDoctor ] as Doctor; patient=Session [ PatientRequest ] as Patient; (command == Add appointment )
{RedirectToAction ( GetAppointments raquo ;, MedicalCard raquo ;, new {param= FromReference });
} (command == Upload image )
{RedirectToAction ( UploadImage raquo ;, DoctorAppointment );
} (command == Write feedback )
{RedirectToAction ( WriteFeedback raquo ;, AdditionalFunction );
} (command == Back to patient card operation page )
{RedirectToAction ( GetRequest raquo ;, DoctorCardOperation );
} (command == Create amp; amp; ((List lt; Appointment gt;) Session [ AppointmentList ]). Count ()!=0)
{reference=new DoctorReference
{= model.Title,=model.Description,=null,=DateTime.Now,=null,=addedDoctor,=patient
} ;. UnitOfWork.DoctorReferenceRepository.Add (reference); RedirectToAction ( GetRequest raquo ;, new {message= The operation was successful });
} RedirectToAction ( CreateReference raquo ;, DoctorCardOperation raquo ;, new {message= You have to fill all empty areas });
}
[HttpGet]
[Authorize] ActionResult AddAppointment (Appointment appointment)
{param=Session [ AimOfOpenCard ] as string; (param == FromIllness )
{RedirectToAction ( CreateIllness raquo ;, DoctorCardOperation raquo ;, appointment);
} RedirectToAction ( CreateReference raquo ;, DoctorCardOperation raquo ;, appointment);
}