示例#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();
 }