private void LoadDDLs() { Pilot Allpilots = new Pilot(); Allpilots.GetAllPilots(); uiDropDownListPilot.DataSource = Allpilots.DefaultView; uiDropDownListPilot.DataTextField = "DisplayName"; uiDropDownListPilot.DataValueField = "PilotID"; uiDropDownListPilot.DataBind(); uiDropDownListPilot.Items.Insert(0, new ListItem("Select Pilot", "")); Pilot AllCopilots = new Pilot(); AllCopilots.GetAllCoPilots(); uiDropDownListCoPilot.DataSource = AllCopilots.DefaultView; uiDropDownListCoPilot.DataTextField = "DisplayName"; uiDropDownListCoPilot.DataValueField = "PilotID"; uiDropDownListCoPilot.DataBind(); uiDropDownListCoPilot.Items.Insert(0, new ListItem("Select Co-Pilot", "")); Crew AllCrew = new Crew(); AllCrew.LoadAll(); uiDropDownListCrew.DataSource = AllCrew.DefaultView; uiDropDownListCrew.DataTextField = "Name"; uiDropDownListCrew.DataValueField = "CrewID"; uiDropDownListCrew.DataBind(); uiDropDownListCrew.Items.Insert(0, new ListItem("Select Member", "")); AirPort AllAirports = new AirPort(); AllAirports.LoadAll(); uiDropDownListSectorFrom.DataSource = AllAirports.DefaultView; uiDropDownListSectorFrom.DataTextField = "IATACode"; uiDropDownListSectorFrom.DataValueField = "AirPortID"; uiDropDownListSectorFrom.DataBind(); uiDropDownListSectorFrom.Items.Insert(0, new ListItem("Select Airport", "0")); uiDropDownListSectorTo.DataSource = AllAirports.DefaultView; uiDropDownListSectorTo.DataTextField = "IATACode"; uiDropDownListSectorTo.DataValueField = "AirPortID"; uiDropDownListSectorTo.DataBind(); uiDropDownListSectorTo.Items.Insert(0, new ListItem("Select Airport", "0")); }
private void LoadDDLs() { Pilot Allpilots = new Pilot(); Allpilots.GetAllPilots(); uiDropDownListPilot.DataSource = Allpilots.DefaultView; uiDropDownListPilot.DataTextField = "DisplayName"; uiDropDownListPilot.DataValueField = "PilotID"; uiDropDownListPilot.DataBind(); uiDropDownListPilot.Items.Insert(0, new ListItem("Select Pilot", "")); Pilot AllCopilots = new Pilot(); AllCopilots.GetAllCoPilots(); uiDropDownListCoPilot.DataSource = AllCopilots.DefaultView; uiDropDownListCoPilot.DataTextField = "DisplayName"; uiDropDownListCoPilot.DataValueField = "PilotID"; uiDropDownListCoPilot.DataBind(); uiDropDownListCoPilot.Items.Insert(0, new ListItem("Select Co-Pilot", "")); Position AllPositions = new Position(); AllPositions.LoadAll(); uiDropDownListPilotPos.DataSource = AllPositions.DefaultView; uiDropDownListPilotPos.DataTextField = "Title"; uiDropDownListPilotPos.DataValueField = "PositionID"; uiDropDownListPilotPos.DataBind(); uiDropDownListPilotPos.Items.Insert(0, new ListItem("Select Position", "")); uiDropDownListCOPos.DataSource = AllPositions.DefaultView; uiDropDownListCOPos.DataTextField = "Title"; uiDropDownListCOPos.DataValueField = "PositionID"; uiDropDownListCOPos.DataBind(); uiDropDownListCOPos.Items.Insert(0, new ListItem("Select Position", "")); Crew AllCrew = new Crew(); AllCrew.LoadAll(); uiDropDownListCrew.DataSource = AllCrew.DefaultView; uiDropDownListCrew.DataTextField = "Name"; uiDropDownListCrew.DataValueField = "CrewID"; uiDropDownListCrew.DataBind(); uiDropDownListCrew.Items.Insert(0, new ListItem("Select Member", "")); uiDropDownListCrewPos.DataSource = AllPositions.DefaultView; ; uiDropDownListCrewPos.DataTextField = "Title"; uiDropDownListCrewPos.DataValueField = "PositionID"; uiDropDownListCrewPos.DataBind(); uiDropDownListCrewPos.Items.Insert(0, new ListItem("Select Position", "")); AirPort AllAirports = new AirPort(); AllAirports.LoadAll(); uiDropDownListSectorFrom.DataSource = AllAirports.DefaultView; uiDropDownListSectorFrom.DataTextField = "IATACode"; uiDropDownListSectorFrom.DataValueField = "AirPortID"; uiDropDownListSectorFrom.DataBind(); uiDropDownListSectorFrom.Items.Insert(0, new ListItem("Select Airport", "")); uiDropDownListSectorTo.DataSource = AllAirports.DefaultView; uiDropDownListSectorTo.DataTextField = "IATACode"; uiDropDownListSectorTo.DataValueField = "AirPortID"; uiDropDownListSectorTo.DataBind(); uiDropDownListSectorTo.Items.Insert(0, new ListItem("Select Airport", "")); AirPlane Ap = new AirPlane(); Ap.LoadAll(); uiDropDownListAirCraftRegistration.DataSource = Ap.DefaultView; uiDropDownListAirCraftRegistration.DataTextField = "Name"; uiDropDownListAirCraftRegistration.DataValueField = "AirPlaneID"; uiDropDownListAirCraftRegistration.DataBind(); }
private void LoadDDLs() { Pilot Allpilots = new Pilot(); Allpilots.LoadAll(); uiDropDownListPilots.DataSource = Allpilots.DefaultView; uiDropDownListPilots.DataTextField = "ShortName"; uiDropDownListPilots.DataValueField = "PilotID"; uiDropDownListPilots.DataBind(); uiDropDownListPilots.Items.Insert(0, new ListItem("Select Pilot", "")); AirPlane AllPlanes = new AirPlane(); AllPlanes.LoadAll(); uiDropDownListAirplane.DataSource = AllPlanes.DefaultView; uiDropDownListAirplane.DataTextField = "Name"; uiDropDownListAirplane.DataValueField = "AirPlaneID"; uiDropDownListAirplane.DataBind(); uiDropDownListAirplane.Items.Insert(0, new ListItem("All", "0")); AirPort AllAirports = new AirPort(); AllAirports.LoadAll(); uiDropDownListFrom.DataSource = AllAirports.DefaultView; uiDropDownListFrom.DataTextField = "IATACode"; uiDropDownListFrom.DataValueField = "AirPortID"; uiDropDownListFrom.DataBind(); uiDropDownListFrom.Items.Insert(0, new ListItem("Select Airport", "0")); uiDropDownListTo.DataSource = AllAirports.DefaultView; uiDropDownListTo.DataTextField = "IATACode"; uiDropDownListTo.DataValueField = "AirPortID"; uiDropDownListTo.DataBind(); uiDropDownListTo.Items.Insert(0, new ListItem("Select Airport", "0")); }
private void LoadDDLs() { AirPort AllAirports = new AirPort(); AllAirports.LoadAll(); uiDropDownListSectorFrom.DataSource = AllAirports.DefaultView; uiDropDownListSectorFrom.DataTextField = "IATACode"; uiDropDownListSectorFrom.DataValueField = "AirPortID"; uiDropDownListSectorFrom.DataBind(); uiDropDownListSectorFrom.Items.Insert(0, new ListItem("Select Airport", "0")); uiDropDownListSectorTo.DataSource = AllAirports.DefaultView; uiDropDownListSectorTo.DataTextField = "IATACode"; uiDropDownListSectorTo.DataValueField = "AirPortID"; uiDropDownListSectorTo.DataBind(); uiDropDownListSectorTo.Items.Insert(0, new ListItem("Select Airport", "0")); AirPlane Ap = new AirPlane(); Ap.LoadAll(); uiDropDownListAirCraftRegistration.DataSource = Ap.DefaultView; uiDropDownListAirCraftRegistration.DataTextField = "Name"; uiDropDownListAirCraftRegistration.DataValueField = "AirPlaneID"; uiDropDownListAirCraftRegistration.DataBind(); SectorClients SC = new SectorClients(); SC.LoadAll(); uiDropDownListClients.DataSource = SC.DefaultView; uiDropDownListClients.DataTextField = "Name"; uiDropDownListClients.DataValueField = "ClientID"; uiDropDownListClients.DataBind(); uiDropDownListClients.Items.Insert(0, new ListItem("Select Client", "0")); }