public void GetPicture(StudentPictureType type) { Response <WebImage> response = _mediator.Request(new GetPicture { Type = type, UserId = _currentUser.User.Id }); response.Data.Write(); }
public ActionResult UploadPicture(HttpPostedFileBase file, StudentPictureType type) { try { _mediator.Notify(new SavePicture(file, type)); return(RedirectToAction(type.ToString()).WithSuccess("Your Picture has been saved.")); } catch (Exception) { return(RedirectToAction(type.ToString()).WithError("There was a problem uploading your file. Your picture has not been saved.")); } }
public SavePicture(HttpPostedFileBase file, StudentPictureType type) { File = file; Type = type; }