Last active
December 17, 2015 13:48
-
-
Save janvanderhaegen/5619452 to your computer and use it in GitHub Desktop.
LS Hacking challenge
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace LightSwitchApplication | |
{ | |
public partial class SchedulingViewDiagram | |
{ | |
partial void SchedulingViewDiagram_Created() | |
{ | |
this.FindControl("ReallyCoolImageButton").ControlAvailable += SchedulingViewDiagram_ControlAvailable; | |
} | |
void SchedulingViewDiagram_ControlAvailable(object sender, ControlAvailableEventArgs e) | |
{ | |
var reallyCoolImageButton = e.Control as ReallyCoolImageButton; | |
reallyCoolImageButton.Clicked += (s,evt ) => { | |
this.NewUserRegistration = this.DataWorkspace.ApplicationData.UserRegistrations.AddNew(); | |
this.NewUserRegistration.RegistrationAdded = DateTime.Now; | |
this.OpenModalWindow("NewRegistrationPopup"); | |
}; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment