예제 #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (IsPostBack)
     {
         GuestResponse rsvp = new GuestResponse();
         if (TryUpdateModel(rsvp, new FormValueProvider(ModelBindingExecutionContext)))
         {
             ResponseRepository.GetRepository().AddResponse(rsvp);
             if (rsvp.WillAttend.HasValue && rsvp.WillAttend.Value)
                 Response.Redirect("seeyouthere.html");
             else
                 Response.Redirect("sorryyoucantcome.html");
         }
     }
 }
예제 #2
0
 public void AddResponse(GuestResponse response)
 {
     responses.Add(response);
 }
 public void AddResponse(GuestResponse response)
 {
     responses.Add(response);
 }