예제 #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     DBRetriever retriever = new DBRetriever();
     companiesList = (DropDownList)Page.FindControl("companiesList");
     companiesList.DataSource = retriever.GetCompanyNames();
     companiesList.DataBind();
 }
예제 #2
0
 protected void ValidateCompanyName(object sender, ServerValidateEventArgs args)
 {
     DBRetriever retriever = new DBRetriever();
     args.IsValid = !retriever.ExistsCompany(name.Text) && name.Text.Length < 30;
 }
예제 #3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     retriever = new DBRetriever();
     PopulateWithAllCheapestTravels();
 }
예제 #4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     DBRetriever retriever = new DBRetriever();
     companiesList.DataSource = retriever.GetCompanyNames();
     companiesList.DataBind();
 }