Exemplo n.º 1
0
 public HttpResponseMessage AddInstAnnouncement(AddAnnouncementDTO dto)
 {
     try
     {
         dto.Type = "I";
         var result = repository.AddAnnouncement(dto);
         return(ResponseWrapper.SuccessResponse(result));
     }
     catch (Exception e)
     {
         return(ResponseWrapper.ExceptionResponse(e));
     }
 }
Exemplo n.º 2
0
        public ActionResult ComposeAnnouncement(AnnouncementModel model)
        {
            AnnouncementRepository repository = new AnnouncementRepository();

            repository.AddAnnouncement(User.Identity.Name, model.title, model.body);

            return(RedirectToAction("SendAnnouncement"));
        }