public Seat(string rowName, uint number, PricingCategory pricingCategory, SeatAvailability seatAvailability, int distanceFromRowCentroid = 0) { RowName = rowName; Number = number; PricingCategory = pricingCategory; SeatAvailability = seatAvailability; DistanceFromRowCentroid = distanceFromRowCentroid; }
public int UpdateSeatBooking(String seatId, String bookingId, int sceduleId) { SeatAvailability v = context.SeatAvailabilities.Where(t => t.SeatNumber.CompareTo(seatId) == 0).Where(t => t.ScheduleId == sceduleId).FirstOrDefault(); v.BookingId = bookingId; int NoOfRowsAffected = context.SaveChanges(); return(NoOfRowsAffected); }
public TheatreSeatInfo(int id, string position, string row, int number, double price, SeatAvailability status) { this._id = id; this._position = position; this._row = row; this._number = number; this._price = price; this._status = status; }
private void Button4_Click(System.Object sender, System.EventArgs e) { DGV.Rows.Clear(); SeatCapacity.Clear(); BookingNo.Clear(); SC2.Clear(); SeatAvailability.Clear(); RadioButton1.Checked = false; RadioButton2.Checked = false; RNo.Text = "Select"; BusSerialNo.Text = "Select"; }
public int InseartSeatsForNewSchedule(int scheduleId) { int NoOfRowsAffected = 0; for (int i = 0; i < 24; i++) { SeatAvailability seatAvail = new SeatAvailability(); seatAvail.ScheduleId = scheduleId; seatAvail.SeatNumber = (i + 1).ToString(); context.SeatAvailabilities.AddObject(seatAvail); NoOfRowsAffected += context.SaveChanges(); } return(NoOfRowsAffected); }
public void btnclear_Click(System.Object sender, System.EventArgs e) { Rno.Text = "Select"; cmbstartpoint.Text = ""; cmbdestination.Text = ""; BusSerialNo.Text = "Select"; BusNumber.Text = "Select"; BusType.Text = "Select"; BusReservation.Text = "Select"; Arrivaltime.Value = Convert.ToDateTime(DateTime.Now); Departuretime.Value = Convert.ToDateTime(DateTime.Now); SeatCapacity.Clear(); S1.Clear(); S2.Clear(); SeatAvailability.Clear(); SC2.Clear(); }
public ReservationChangedEventArgs(SeatAvailability availability) : base() { Availability = availability; }
public Seat(PricingCategory pricingCategory, string seatName, SeatAvailability seatAvailability, int distanceFromRowCentroid) : this(seatName, seatName[0].ToString(), uint.Parse(seatName.Substring(1)), pricingCategory, seatAvailability, distanceFromRowCentroid) { }
public Seat(string rowName, uint number, SeatAvailability seatAvailability) { RowName = rowName; Number = number; SeatAvailability = seatAvailability; }
private void Button3_Click(System.Object sender, System.EventArgs e) { //Try DialogResult res = MessageBox.Show("Do U Want To Cancel Waiting Booking?", "Cancel Booking?", MessageBoxButtons.YesNo, MessageBoxIcon.Warning); if (res == DialogResult.Yes) { if (string.IsNullOrEmpty(BookingNo.Text.Trim())) { MessageBox.Show("Give Booking No.."); } else { string CN2 = null; con = new SqlConnection("Data Source=.\\SQLEXPRESS;Initial Catalog=Bus_System;Integrated Security=True"); con.Open(); cmd = new SqlCommand("Select max(CancellationNo) From Cancellation", con); dr = cmd.ExecuteReader(); dr.Read(); if ((!object.ReferenceEquals(dr[0], DBNull.Value))) { t = Convert.ToInt32(dr[0]) + 1; } else { t = 1; } CN2 = t.ToString(); dr.Close(); cmd = new SqlCommand("Select * From APaymentPassenger Where BookingNo=" + BookingNo.Text + "", con); dr = cmd.ExecuteReader(); dr.Read(); string a1 = null; string a2 = null; string a3 = null; string a4 = null; string a5 = null; string a6 = null; string a7 = null; a1 = dr.GetValue(0).ToString(); a2 = dr.GetValue(1).ToString(); a3 = dr.GetValue(2).ToString(); a4 = dr.GetValue(6).ToString(); a5 = dr.GetValue(7).ToString(); a6 = dr.GetValue(8).ToString(); a7 = dr.GetValue(9).ToString(); dr.Close(); cmd = new SqlCommand("Insert Into Cancellation Values(" + CN2 + ",'" + a1 + "','" + a2 + "','" + a3 + "','" + DateAndTime.Today + " " + DateAndTime.TimeOfDay + "','" + a4 + "','" + a5 + "','" + a6 + "','" + a7 + "','" + Strings.Format(Arrivaltime.Value, "hh:MM:ss tt") + "')", con); cmd.ExecuteNonQuery(); cmd = new SqlCommand("Delete From APassengerDetails Where BookingNo=" + BookingNo.Text + "", con); cmd.ExecuteNonQuery(); cmd = new SqlCommand("Delete From APaymentPassenger Where BookingNo=" + BookingNo.Text + "", con); cmd.ExecuteNonQuery(); MessageBox.Show("Done"); con.Close(); DGV.Rows.Clear(); SeatCapacity.Clear(); BookingNo.Clear(); SC2.Clear(); SeatAvailability.Clear(); RadioButton1.Checked = false; RadioButton2.Checked = false; } } else { MessageBox.Show("Not Cancelled"); } //Catch ex As Exception // MsgBox("Nothing Selected..!") //End Try }