Beispiel #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         all               = Request.QueryString["Type"];
         massAll           = all.Split('?');
         type              = massAll[0];
         passNumb          = massAll[1].Split('=')[1];
         fName             = massAll[2].Split('=')[1];
         lName             = massAll[3].Split('=')[1];
         sex               = massAll[4].Split('=')[1];
         birDat            = massAll[5].Split('=')[1];
         passNumbPart      = massAll[6].Split('=')[1];
         ForPasspNumb.Text = passNumb; ForFirstName.Text = fName; ForLastName.Text = lName;
         ForSex.Text       = sex; ForBirthDate.Text = birDat; ForPassportNumbPartner.Text = passNumbPart;
         AirportEntities airport = new AirportEntities();
         if (type == "Chart")
         {
             Flights.DataSource = (from CharterFlight in airport.CharterFlight select CharterFlight).ToList();
         }
         else
         {
             Flights.DataSource = (from PassengersFlight in airport.PassengersFlight select PassengersFlight).ToList();
         }
         Flights.DataBind();
     }
 }
Beispiel #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            AirportEntities airport = new AirportEntities();

            Airoport.DataSource = (from Airoport in airport.Airoport select Airoport).ToList();
            Airoport.DataBind();
            Partition.DataSource = (from Partition in airport.Partition select Partition).ToList();
            Partition.DataBind();
            Boss.DataSource = (from Boss in airport.Boss select Boss).ToList();
            Boss.DataBind();
            Pilot.DataSource = (from Pilot in airport.Pilot select Pilot).ToList();
            Pilot.DataBind();
            Plane.DataSource = (from Plane in airport.Plane select Plane).ToList();
            Plane.DataBind();
            Flight.DataSource = (from Flight in airport.Flight select Flight).ToList();
            Flight.DataBind();
            FreightFlight.DataSource = (from FreightFlight in airport.FreightFlight select FreightFlight).ToList();
            FreightFlight.DataBind();
            CharterFlight.DataSource = (from CharterFlight in airport.CharterFlight select CharterFlight).ToList();
            CharterFlight.DataBind();
            PassengersFlight.DataSource = (from PassengersFlight in airport.PassengersFlight select PassengersFlight).ToList();
            PassengersFlight.DataBind();
            Passenger1.DataSource = (from Passenger1 in airport.Passenger1 select Passenger1).ToList();
            Passenger1.DataBind();
        }