protected void Button1_Click(object sender, EventArgs e) { Booking book = new Booking(); book.BookingDate = Date; book.BookingNo = BookingNo; book.TravelerCount = Convert.ToInt32(TravelerCount.Text); if (!(Request.Cookies["custUsername"] is null)) { book.CustomerId = Convert.ToInt32(Request.Cookies["custUsername"].Value); } if (Session["custUsername"] != null) { book.CustomerId = Convert.ToInt32(Session["custUsername"].ToString()); } book.PackageId = ToNullableInt(Session["lastPckgVw"].ToString()); BookingDetailsDB.CreateBookingDetailPckg(BookingDB.CreateBookingPckg(book, ClassesDropDDl.SelectedValue), ClassesDropDDl.SelectedValue); Response.Redirect("Index.aspx"); }
protected void btnCustHist_Click() { //int I = Convert.ToInt32(txtCustIdGridView.Text); // Justins Code int I = (int)Application["CustomerID"]; List <BookingDetails> II = new List <BookingDetails>(); II = BookingDetailsDB.bookingDetails((int)I); List <money> III = new List <money>(); III = BookingDetailsDB.getPrice((int)I); decimal price = 0; foreach (money a in III) { price = price + a.vacationCost; } lblTotal.Text = price.ToString("C"); GridView1.DataSource = II; GridView1.DataBind(); }