Airline reservation system

Please download to get full document.

View again

All materials on our website are shared by users. If you have any questions about copyright issues, please report us to resolve them. We are always happy to assist you.
 5
 
  Airline reservation system on C# winforms
Related documents
Share
Transcript
  • 1. 2014 UNSA JAWAID B12101135 PROJECT DOCUMENTATION OBJECT ORIENTED PROGRAMMING
  • 2. AIRLINE RESERVATION SYSTEM
  • 3. ACKNOWLEDGEMENT I wish to express my deep sense of gratitude to our guide and respected MISS SHAISTA RAEES for her valuable guidance to prepare the project and in assembling the project material. I am very thankful for his faithful blessings and for providing necessary and related facilities required for our computer project file. In last I also want to thank those directly or indirectly took interest to complete my project file.
  • 4. SUBMISSION A Project report on “Airline Reservation System” Submitted of the computer practical 2014 Of Class BSCS-II For the practical fulfillment of the requirement for the syllabus. Submitted by: Unsa Jawaid
  • 5. CERTIFICATE Certified that unsa jawaid have undertaken the project entitled, “Airline Reservation System” the project submitted by her is the outcome of the work carried out by her during the academic session. This is to further certify that she have work genuinely conducting the experiment and work put by her is the original and outcome of her own efforts. Miss Shaista Raees (OOP lect.)
  • 6. ABSTRACT Airline Reservation System contains the details about flight schedules and its fare tariffs, passenger reservations and ticket records. An airline’s inventory contains all flights with their available seats. The inventory of an airline service is generally divided into three category of classes (e.g. First, Business or Economy class) and each category is having seats up to 26 bookings, along with prices and booking conditions. Inventory data is imported and maintained through a Schedule Distribution System over standardized interfaces. One of the core functions of the inventory management of airline reservations is the inventory control. Inventory control steers how many seats are available for the different booking classes, by opening and closing individual booking classes for sale. In combination with the fares and booking conditions stored in the Fare Quote System the price for each sold seat is determined.
  • 7. INTRODUCTION Existing System : In few countries if a person wants to book a flight ticket, he use to follow one of these things:  Manually goes to the Airport and book his ticket.  Downloading the ticket form as paper document, filling it manually and submitting it at Airport.  Fill the Ticket form on system and get the print out as paper documents to submit it at Airport.  Booking the Ticket at some particular registered ticket counters in online.  Even above approaches make a ticket booking online, it was not completely done on online. Passenger may not have much freedom over this approach.  Hence the Passenger may or may not be satisfied with this approach as it includes manual intervention like travelling to Airport for booking his ticket. Proposed System: The Proposed system ensures the complete freedom for users, where user can book his ticket. Our proposed system allows users to book the tickets, view timings and cancel their tickets. In this Proposal the entire work is done on online and ticket with id is also provided for passengers as a print document. Here passengers can able to see the booking details
  • 8. FEATURES:  Enter the details of the traveler.  Check for availability of tickets.  Inform the traveler the position of the available seat.  Ask his/her decision whether to reserve the ticket or not.  Positive reply-book ticket after receiving the amount for the cost of ticket.  Issue the ticket.  Ask the traveler to check in time so that he/she doesn’t miss the plan because of delay.  Update the database before the next booking is to be done.  Show bookings detail to the traveler.  Cancel ticket if traveler’s want to cancel his/her ticket.
  • 9. Operating Environment: Hard ware Specification  Processor : Intel Pentium3  RAM : 512MB  Hard disk : 2GB Software Requirements  Front end : .Net Framework 2.0  Back end : SQL Server 2005  Operating System : Windows XP/7 Reservation Modules:  Ticket Reservation: This module handles air ticket reservation process, which is user friendly and user can access easily.  View Reservation: This module handles processes of view reservation of passengers. User can easily view his/her flight schedule and seat numbers by filling few information.  Cancellation: This module handles the cancellation process of reservation of passengers.
  • 10. MODULE AND PROCESS:
  • 11. SCREEN SHOTS: WELCOME SCREEN
  • 12. RESERVATION SCREEN
  • 13. CANCELATION SCREEN
  • 14. SHOW BOOKINGS
  • 15. CODING PROGRAM.CS using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using System.Windows.Forms; namespace WindowsFormsApplication1 { static class Program { /// <summary> /// The main entry point for the application. /// </summary> [STAThread] static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new Form1()); } } } MAIN.CS using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Data.SqlClient; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using WindowsFormsApplication1.airlineDataSetTableAdapters; namespace WindowsFormsApplication1 { public partial class main : Form { public main() { InitializeComponent(); }
  • 16. private void label4_Click(object sender, EventArgs e) { } private void main_Load(object sender, EventArgs e) { // TODO: This line of code loads data into the 'airlineDataSet.place' table. You can move, or remove it, as needed. this.placeTableAdapter.Fill(this.airlineDataSet.place); button2.Hide(); } private void toolStripLabel1_Click(object sender, EventArgs e) { } private void toolStripButton1_Click(object sender, EventArgs e) { Application.Exit(); } private void toolStripButton2_Click(object sender, EventArgs e) { showbooking sb = new showbooking(); sb.Show(); this.Hide(); } private void button1_Click(object sender, EventArgs e) { if (comboBox1.SelectedValue == comboBox2.SelectedValue) { MessageBox.Show("Select Correct Destination"); } else { string query = "select count(*) from reserved_flights where date='" + dateTimePicker1.Value.ToString("yyyy-MM-dd") + "'"; SqlConnection con = new SqlConnection("Data Source=ANNS-LAPPY;Initial Catalog=airline;Integrated Security=True"); SqlCommand command = new SqlCommand(query, con); SqlDataReader reader = null; con.Open(); reader = command.ExecuteReader(); int reserved = 0; if (reader.HasRows) { while (reader.Read()) { reserved = reader.GetInt32(0); } } else {
  • 17. label7.Text = "No rows found."; } con.Close(); string totalseats = "select total_seats from available_flights where source=" + comboBox1.SelectedValue + "and destination=" + comboBox2.SelectedValue; command = new SqlCommand(totalseats, con); SqlDataReader myreader = null; con.Open(); myreader = command.ExecuteReader(); int total = 0; if (myreader.HasRows) { while (myreader.Read()) { total = myreader.GetInt32(0); } } else { label7.Text = "No rows found."; } label7.Text = total.ToString() + reserved.ToString(); if (reserved <= total) { label7.Text = "Seat is Available"; button1.Hide(); button2.Show(); } else { label7.Text = "All Seats are reserved"; } con.Close(); } } private void button2_Click(object sender, EventArgs e) { SqlConnection mycon = new SqlConnection("Data Source=ANNS-LAPPY;Initial Catalog=airline;Integrated Security=True"); mycon.Open(); string strquery = "insert into reserved_flights([customer_name],[date],[source],[destination])values('" + textBox1.Text + "','" + dateTimePicker1.Value.Date+ "'," + int.Parse(comboBox1.SelectedValue.ToString()) + "," + int.Parse(comboBox2.SelectedValue.ToString()) + ")"; SqlCommand cmd = new SqlCommand(strquery, mycon); cmd.ExecuteNonQuery(); mycon.Close(); Bill b = new Bill(textBox1.Text, dateTimePicker1.Value.Date, int.Parse(comboBox1.SelectedValue.ToString()), int.Parse(comboBox2.SelectedValue.ToString())); b.Show();
  • 18. } private void toolStripButton3_Click(object sender, EventArgs e) { cancel c = new cancel(); c.Show(); } } } BILL.DESIGNER.CS namespace WindowsFormsApplication1 { partial class Bill { /// <summary> /// Required designer variable. /// </summary> private System.ComponentModel.IContainer components = null; /// <summary> /// Clean up any resources being used. /// </summary> /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> protected override void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); } base.Dispose(disposing); } #region Windows Form Designer generated code /// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.label1 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label(); this.label6 = new System.Windows.Forms.Label(); this.button1 = new System.Windows.Forms.Button(); this.SuspendLayout(); //
  • 19. // label1 // this.label1.AutoSize = true; this.label1.Font = new System.Drawing.Font("Segoe UI", 20.25F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label1.Location = new System.Drawing.Point(168, 9); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(62, 37); this.label1.TabIndex = 0; this.label1.Text = "Bill"; // // label2 // this.label2.AutoSize = true; this.label2.Location = new System.Drawing.Point(55, 73); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(35, 13); this.label2.TabIndex = 1; this.label2.Text = "Name"; // // label3 // this.label3.AutoSize = true; this.label3.Location = new System.Drawing.Point(55, 112); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(41, 13); this.label3.TabIndex = 2; this.label3.Text = "Source"; // // label4 // this.label4.AutoSize = true; this.label4.Location = new System.Drawing.Point(208, 112); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(60, 13); this.label4.TabIndex = 3; this.label4.Text = "Destination"; // // label5 // this.label5.AutoSize = true; this.label5.Location = new System.Drawing.Point(55, 144); this.label5.Name = "label5"; this.label5.Size = new System.Drawing.Size(30, 13); this.label5.TabIndex = 4; this.label5.Text = "Date"; // // label6 // this.label6.AutoSize = true; this.label6.Location = new System.Drawing.Point(208, 144); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(43, 13); this.label6.TabIndex = 5; this.label6.Text = "Amount"; // // button1
  • 20. // this.button1.Font = new System.Drawing.Font("Segoe UI", 14.25F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.button1.Location = new System.Drawing.Point(211, 184); this.button1.Name = "button1"; this.button1.Size = new System.Drawing.Size(149, 42); this.button1.TabIndex = 6; this.button1.Text = "Done"; this.button1.UseVisualStyleBackColor = true; this.button1.Click += new System.EventHandler(this.button1_Click); // // Bill // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.SystemColors.HighlightText; this.ClientSize = new System.Drawing.Size(394, 253); this.Controls.Add(this.button1); this.Controls.Add(this.label6); this.Controls.Add(this.label5); this.Controls.Add(this.label4); this.Controls.Add(this.label3); this.Controls.Add(this.label2); this.Controls.Add(this.label1); this.Name = "Bill"; this.Text = "Bill"; this.Load += new System.EventHandler(this.Bill_Load); this.ResumeLayout(false); this.PerformLayout(); } #endregion private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label3; private System.Windows.Forms.Label label4; private System.Windows.Forms.Label label5; private System.Windows.Forms.Label label6; private System.Windows.Forms.Button button1; } } CANCEL.DESIGNER.CS namespace WindowsFormsApplication1 { partial class cancel { /// <summary> /// Required designer variable. /// </summary> private System.ComponentModel.IContainer components = null;
  • 21. /// <summary> /// Clean up any resources being used. /// </summary> /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> protected override void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); } base.Dispose(disposing); } #region Windows Form Designer generated code /// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(cancel)); this.toolStrip1 = new System.Windows.Forms.ToolStrip(); this.toolStripLabel1 = new System.Windows.Forms.ToolStripLabel(); this.toolStripButton1 = new System.Windows.Forms.ToolStripButton(); this.toolStripLabel2 = new System.Windows.Forms.ToolStripLabel(); this.toolStripButton2 = new System.Windows.Forms.ToolStripButton(); this.toolStripLabel3 = new System.Windows.Forms.ToolStripLabel(); this.toolStripTextBox1 = new System.Windows.Forms.ToolStripTextBox(); this.toolStripButton3 = new System.Windows.Forms.ToolStripButton(); this.label1 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label(); this.button1 = new System.Windows.Forms.Button(); this.toolStrip1.SuspendLayout(); this.SuspendLayout(); // // toolStrip1 // this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.toolStripLabel1, this.toolStripButton1, this.toolStripLabel2, this.toolStripButton2, this.toolStripLabel3, this.toolStripTextBox1, this.toolStripButton3}); this.toolStrip1.Location = new System.Drawing.Point(0, 0); this.toolStrip1.Name = "toolStrip1"; this.toolStrip1.Size = new System.Drawing.Size(487, 25); this.toolStrip1.TabIndex = 0; this.toolStrip1.Text = "toolStrip1"; // // toolStripLabel1
  • 22. // this.toolStripLabel1.Name = "toolStripLabel1"; this.toolStripLabel1.Size = new System.Drawing.Size(32, 22); this.toolStripLabel1.Text = "Back"; // // toolStripButton1 // this.toolStripButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.toolStripButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton1.Image"))); this.toolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta; this.toolStripButton1.Name = "toolStripButton1"; this.toolStripButton1.Size = new System.Drawing.Size(23, 22); this.toolStripButton1.Text = "toolStripButton1"; this.toolStripButton1.Click += new System.EventHandler(this.toolStripButton1_Click); // // toolStripLabel2 // this.toolStripLabel2.Name = "toolStripLabel2"; this.toolStripLabel2.Size = new System.Drawing.Size(25, 22); this.toolStripLabel2.Text = "Exit"; // // toolStripButton2 // this.toolStripButton2.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.toolStripButton2.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton2.Image"))); this.toolStripButton2.ImageTransparentColor = System.Drawing.Color.Magenta; this.toolStripButton2.Name = "toolStripButton2"; this.toolStripButton2.Size = new System.Drawing.Size(23, 22); this.toolStripButton2.Text = "toolStripButton2"; this.toolStripButton2.Click += new System.EventHandler(this.toolStripButton2_Click); // // toolStripLabel3 // this.toolStripLabel3.Name = "toolStripLabel3"; this.toolStripLabel3.Size = new System.Drawing.Size(116, 22); this.toolStripLabel3.Text = "Enter Ticket Number"; // // toolStripTextBox1 // this.toolStripTextBox1.Name = "toolStripTextBox1"; this.toolStripTextBox1.Size = new System.Drawing.Size(100, 25); // // toolStripButton3 // this.toolStripButton3.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.toolStripButton3.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton3.Image"))); this.toolStripButton3.ImageTransparentColor = System.Drawing.Color.Magenta; this.toolStripButton3.Name = "toolStripButton3"; this.toolStripButton3.Size = new System.Drawing.Size(23, 22); this.toolStripButton3.Text = "toolStripButton3";
  • 23. this.toolStripButton3.Click += new System.EventHandler(this.toolStripButton3_Click); // // label1 // this.label1.AutoSize = true; this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label1.Location = new System.Drawing.Point(59, 60); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(70, 25); this.label1.TabIndex = 1; this.label1.Text = "label1"; // // label2 // this.label2.AutoSize = true; this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label2.Location = new System.Drawing.Point(59, 105); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(70, 25); this.label2.TabIndex = 2; this.label2.Text = "label2"; // // label3 // this.label3.AutoSize = true; this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label3.Location = new System.Drawing.Point(246, 105); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(70, 25); this.label3.TabIndex = 3; this.label3.Text = "label3"; // // label4 // this.label4.AutoSize = true; this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label4.Location = new System.Drawing.Point(59, 155); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(70, 25); this.label4.TabIndex = 4; this.label4.Text = "label4"; // // button1 // this.button1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.button1.ForeColor = System.Drawing.Color.Red; this.button1.Location = new System.Drawing.Point(64, 210); this.button1.Name = "button1"; this.button1.Size = new System.Drawing.Size(357, 72); this.button1.TabIndex = 5; this.button1.Text = "Cancel This Reservation"; this.button1.UseVisualStyleBackColor = true;
  • 24. this.button1.Click += new System.EventHan
  • Related Search
    We Need Your Support
    Thank you for visiting our website and your interest in our free products and services. We are nonprofit website to share and download documents. To the running of this website, we need your help to support us.

    Thanks to everyone for your continued support.

    No, Thanks