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