Ejemplo n.º 1
0
        public ActionResult QuickMeeting(QuickMeetingPostData postData)
        {
            if (!ModelState.IsValid) {
            //display error
              }

              var meeting = new Meeting {
            Description = postData.Description,
            Title = postData.Title,
            Location = postData.Location,
            ScheduledFor = postData.ScheduledFor
              };

              DB.Insert(meeting);

              GrowlConnector connector = new GrowlConnector();
              Application growlApp = new Application("GrokMob");
              NotificationType type = new NotificationType("grokmob-quick-meeting");
              connector.Register(growlApp, new[] { type });

              var growlPester = new GrowlPesterQueue(growlApp.Name, connector);
              growlPester.QueueUp(new GrowlMessage("New meeting cheduled", meeting.ToString()));
              var pesterQueue = new Pester.PesterQueue();
              pesterQueue.Enqueue(growlPester);

              var emailPester = new EmailPester(
            new MailMessage("*****@*****.**", "*****@*****.**", "New meeting!", meeting.ToString()));
              pesterQueue.Enqueue(emailPester);

              pesterQueue.LetEmHaveIt();

              return Redirect(Url.Action("index", "dashboard"));
        }
Ejemplo n.º 2
0
 public Comment(Meeting meeting, String memberHandle, String comment, DateTime createdAt)
 {
     _meeting = meeting;
       _memberHandle = memberHandle;
       _comment = comment;
       _createdAt = createdAt;
 }