Guest User

Untitled

a guest
Jul 17th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1. public ViewResult Create()
  2. {
  3. var createStudyModel = new CreateStudyModel();
  4. return View(createStudyModel);
  5. }
  6.  
  7. [HttpPost]
  8. public ActionResult Create(CreateStudyModel createStudyModel)
  9. {
  10. try
  11. {
  12. //TODO: Send CreateStudyCommand
  13. return RedirectToAction("Edit", new { scientificStudyId = new Guid("{1C965285-788A-4B67-9894-3D0D46949F11}") });
  14. }
  15. catch
  16. {
  17. return View(createStudyModel);
  18. }
  19. }
  20.  
  21. [GET("ScientificStudy/Create/{scientificStudyId}")]
  22. public ActionResult Edit(Guid scientificStudyId)
  23. {
  24. //TODO: Query real model
  25. var model = new EditStudyModel() {StudyNr = "T01", StudyName = "Test"};
  26. return View(model);
  27. }
  28.  
  29. [HttpPost]
  30. public ActionResult Edit(EditStudyModel editStudyModel)
  31. {
  32. try
  33. {
  34. //TODO: Send UpdateStudyCommand
  35. return RedirectToAction(""); //TODO: Terug naar Studie lijst
  36. }
  37. catch
  38. {
  39. return View(editStudyModel);
  40. }
  41. }
  42.  
  43. return RedirectToAction("Edit", new { scientificStudyId = "{1C965285-788A-4B67-9894-3D0D46949F11}" });
  44.  
  45. public ActionResult Edit(string scientificStudyId)
Add Comment
Please, Sign In to add comment