欧美色欧美亚洲高清在线观看,国产特黄特色a级在线视频,国产一区视频一区欧美,亚洲成a 人在线观看中文

  1. <ul id="fwlom"></ul>

    <object id="fwlom"></object>

    <span id="fwlom"></span><dfn id="fwlom"></dfn>

      <object id="fwlom"></object>

      基于java航空售票系統(tǒng)(范文)

      時間:2019-05-12 21:36:23下載本文作者:會員上傳
      簡介:寫寫幫文庫小編為你整理了多篇相關(guān)的《基于java航空售票系統(tǒng)(范文)》,但愿對你工作學(xué)習(xí)有幫助,當(dāng)然你在寫寫幫文庫還可以找到更多《基于java航空售票系統(tǒng)(范文)》。

      第一篇:基于java航空售票系統(tǒng)(范文)

      public FlightBook()

      //構(gòu)造函數(shù)

      {

      super(“航空訂票”);this.setSize(600,400);this.setLocation(300,240);this.setResizable(false);this.setVisible(true);this.setLayout(new BorderLayout());JPanel panel=new JPanel(new GridLayout(11,1));this.add(panel,BorderLayout.WEST);this.setBackground(Color.blue);

      button_ask=new JButton(“查詢”);panel.add(button_ask);button_ask.addActionListener(this);

      button_book=new JButton(“訂票”);panel.add(button_book);button_book.addActionListener(this);

      button_cancel=new JButton(“退票”);panel.add(button_cancel);button_cancel.addActionListener(this);

      text_user=new JTextArea();this.add(text_user,BorderLayout.CENTER);

      frame_cx=new JFrame(“輸入”);

      //查詢輸入框

      frame_cx.setSize(280,120);frame_cx.setResizable(false);frame_cx.setBackground(Color.LIGHT_GRAY);frame_cx.setLayout(new FlowLayout());frame_cx.add(new JLabel(“終點站:”));text_field1=new JTextField(20);frame_cx.add(text_field1);button_ok1=new JButton(“ok”);frame_cx.add(button_ok1);button_ok1.addActionListener(this);frame_cx.addWindowListener(this);

      frame_dp=new JFrame(“輸入”);

      //訂票輸入框

      frame_dp.setSize(350,150);frame_dp.setResizable(false);frame_dp.setBackground(Color.LIGHT_GRAY);frame_dp.setLayout(new FlowLayout());frame_dp.add(new JLabel(“ 航班號:”));text_field2=new JTextField(20);frame_dp.add(text_field2);frame_dp.add(new JLabel(“ 訂票數(shù):”));text_field3=new JTextField(20);frame_dp.add(text_field3);button_ok2=new JButton(“確定”);frame_dp.add(button_ok2);

      button_ok2.addActionListener(this);frame_dp.addWindowListener(this);

      frame_tp=new JFrame(“輸入”);

      //退票輸入框

      frame_tp.setSize(350,150);frame_tp.setResizable(false);frame_tp.setBackground(Color.LIGHT_GRAY);frame_tp.setLayout(new FlowLayout());frame_tp.add(new JLabel(“ 日期 :”));text_field4=new JTextField(20);frame_tp.add(text_field4);frame_tp.add(new JLabel(“ 航班號:”));text_field5=new JTextField(20);frame_tp.add(text_field5);button_ok3=new JButton(“正確”);frame_tp.add(button_ok3);button_ok3.addActionListener(this);frame_tp.addWindowListener(this);

      dialog_cx=new JDialog(this,“提示”,true);

      //提示查詢輸入航線未開通錯誤

      dialog_cx.setSize(240,80);label=new JLabel(“此站點未開通航線,請重新輸入!”);dialog_cx.add(label);dialog_cx.setLayout(new FlowLayout(FlowLayout.CENTER));

      dialog_cx.addWindowListener(this);

      frame_dpsx=new JFrame(“訂票手續(xù)”);

      //訂票手續(xù)

      frame_dpsx.setSize(250,200);frame_dpsx.setResizable(false);frame_dpsx.setBackground(Color.LIGHT_GRAY);frame_dpsx.setLayout(new FlowLayout(FlowLayout.CENTER));frame_dpsx.add(new JLabel(“ 姓名 :”));text_fielddp_name=new JTextField(10);frame_dpsx.add(text_fielddp_name);frame_dpsx.add(new JLabel(“ 航班號 :”));text_fielddp_hbh=new JTextField(10);frame_dpsx.add(text_fielddp_hbh);frame_dpsx.add(new JLabel(“ 訂票數(shù) :”));text_fielddp_number=new JTextField(10);frame_dpsx.add(text_fielddp_number);frame_dpsx.add(new JLabel(“聯(lián)系方式 :”));text_fielddp_lxfs=new JTextField(10);frame_dpsx.add(text_fielddp_lxfs);button_tj=new JButton(“提交”);frame_dpsx.add(button_tj);button_tj.addActionListener(this);

      frame_djsx=new JFrame(“登記手續(xù)”);

      //登記手續(xù)

      frame_djsx.setSize(250,200);frame_djsx.setResizable(false);

      frame_djsx.setBackground(Color.LIGHT_GRAY);frame_djsx.setLayout(new FlowLayout(FlowLayout.CENTER));frame_djsx.add(new JLabel(“ 姓名 :”));text_fielddj_name=new JTextField(10);frame_djsx.add(text_fielddj_name);frame_djsx.add(new JLabel(“ 航班號 :”));text_fielddj_hbh=new JTextField(10);frame_djsx.add(text_fielddj_hbh);frame_djsx.add(new JLabel(“ 訂票數(shù) :”));text_fielddj_number=new JTextField(10);frame_djsx.add(text_fielddj_number);frame_djsx.add(new JLabel(“聯(lián)系方式 :”));text_fielddj_lxfs=new JTextField(10);frame_djsx.add(text_fielddj_lxfs);button_wc=new JButton(“完成”);frame_djsx.add(button_wc);button_wc.addActionListener(this);

      frame_tpsx=new JFrame(“退票手續(xù)”);

      //退票手續(xù)

      frame_tpsx.setSize(250,200);frame_tpsx.setResizable(false);frame_tpsx.setBackground(Color.LIGHT_GRAY);frame_tpsx.setLayout(new FlowLayout(FlowLayout.CENTER));frame_tpsx.add(new JLabel(“ 姓名 :”));text_fieldtp_name=new JTextField(10);frame_tpsx.add(text_fieldtp_name);frame_tpsx.add(new JLabel(“ 航班號 :”));

      text_fieldtp_hbh=new JTextField(10);frame_tpsx.add(text_fieldtp_hbh);frame_tpsx.add(new JLabel(“ 退票數(shù) :”));text_fieldtp_number=new JTextField(10);frame_tpsx.add(text_fieldtp_number);frame_tpsx.add(new JLabel(“聯(lián)系方式 :”));text_fieldtp_lxfs=new JTextField(10);frame_tpsx.add(text_fieldtp_lxfs);button_cg=new JButton(“成功”);frame_tpsx.add(button_cg);button_cg.addActionListener(this);

      dialog_dpwk=new JDialog(this,“提示”,true);

      //提示訂票輸入未開通航線錯誤

      dialog_dpwk.setSize(350,80);label=new JLabel(“此站點未開通航線,請查詢后重新輸入!”);dialog_dpwk.add(label);dialog_dpwk.setLayout(new FlowLayout(FlowLayout.CENTER));dialog_dpwk.addWindowListener(this);

      dialog_dpyk=new JDialog(this,“提示”,true);

      //提示訂票輸入票額不足錯誤

      dialog_dpyk.setSize(350,150);label1=new JLabel(“此站點已滿員或余票不足,請查詢后重新輸入!”);dialog_dpyk.add(label1);

      錯誤

      } label2=new JLabel(“ 若需要,可登記排隊候補(bǔ)”);dialog_dpyk.add(label2);button_sq=new JButton(“登記”);button_sq.addActionListener(this);dialog_dpyk.add(button_sq);dialog_dpyk.setLayout(new FlowLayout(FlowLayout.CENTER));dialog_dpyk.addWindowListener(this);

      dialog_tpts=new JDialog(this,“提示”,true);

      //提示退票輸入日期和航班號矛盾dialog_tpts.setSize(350,80);label=new JLabel(“您輸入的日期無此航班號,請查詢后重新輸入!”);dialog_tpts.add(label);dialog_tpts.setLayout(new FlowLayout(FlowLayout.CENTER));dialog_tpts.addWindowListener(this);

      d=new JDialog(this,“提示”,true);

      //當(dāng)退票滿足客戶,提示聯(lián)系該客戶

      d.setSize(350,150);d.setLayout(new FlowLayout(FlowLayout.CENTER));d.addWindowListener(this);

      this.addWindowListener(this);this.setVisible(true);4.1.2 軟件的查詢、訂票和退票模塊

      查詢截圖:

      查詢成功截圖:

      訂票截圖:

      退票截圖:

      public void actionPerformed(ActionEvent e){ String s=e.getActionCommand();if(s==“查詢”){ frame_cx.setLocation(this.getX()+100,this.getY()+100);frame_cx.setVisible(true);}

      if(s==“訂票”){ frame_dp.setLocation(this.getX()+100,this.getY()+100);frame_dp.setVisible(true);}

      if(s==“退票”){ frame_tp.setLocation(this.getX()+100,this.getY()+100);frame_tp.setVisible(true);}

      if(s==“ok”){ if(text_field1.getText().toString().trim().equals(“北京”)){ text_user.append(“地點:”+F_name[0]+“ 航班號:”+H_number[0]+“ 飛機(jī)號:”+F_number[0]+“ 時間:”+time[0]+“ ”+Price[0]+“ 余票量:”+Count[0]+“n”);

      價格:

      } else if(text_field1.getText().toString().trim().equals(“香港”)){ text_user.append(“地點:”+F_name[1]+“ 航班號:”+H_number[1]+“ 飛機(jī)號:”+F_number[1]+“ 時間:”+time[1]+“ 價格:”+Price[1]+“ 余票量:”+Count[1]+“n”);} else if(text_field1.getText().toString().trim().equals(“澳門”)){ text_user.append(“地點:”+F_name[2]+“ 航班號:”+H_number[2]+“ 飛機(jī)號:”+F_number[2]+“ 時間:”+time[2]+“ ”+Price[2]+“ 余票量:”+Count[2]+“n”);} else if(text_field1.getText().toString().trim().equals(“紐約”)){ text_user.append(“地點:”+F_name[3]+“ 航班號:”+H_number[3]+“ 飛機(jī)號:”+F_number[3]+“ 時間:”+time[3]+“ ”+Price[3]+“ 余票量:”+Count[3]+“n”);} else if(text_field1.getText().toString().trim().equals(“悉尼”)){ text_user.append(“地點:”+F_name[4]+“ 航班號:”+H_number[4]+“ 飛機(jī)號:”+F_number[4]+“ 時間:”+time[4]+“ ”+Price[4]+“ 余票量:”+Count[4]+“n”);} else {

      dialog_cx.setLocation(this.getX()+100,this.getY()+100);

      dialog_cx.setVisible(true);}

      價格:價格:價格: } frame_cx.setVisible(false);if(s==“確定”){

      String Hnumber=text_field2.getText().toString().trim();int Dcount=Integer.parseInt(text_field3.getText().toString().trim());if(Hnumber.equals(“CAC”)||Hnumber.equals(“cac”)){

      if(Dcount<=Count[0]){ Count[0]-=Dcount;

      frame_dpsx.setLocation(this.getX()+100,this.getY()+100);frame_dpsx.setVisible(true);

      } else { dialog_dpyk.setLocation(this.getX()+100,this.getY()+100);dialog_dpyk.setVisible(true);

      } else if(Hnumber.equals(“CFC”)||Hnumber.equals(“cfc”)&&Dcount<=Count[1]){

      if(Dcount<=Count[1]){ Count[0]-=Dcount;}

      frame_dpsx.setLocation(this.getX()+100,this.getY()+100);frame_dpsx.setVisible(true);

      } else { dialog_dpyk.setLocation(this.getX()+100,this.getY()+100);dialog_dpyk.setVisible(true);} } else if(Hnumber.equals(“CDA”)||Hnumber.equals(“cda”)&&Dcount<=Count[2])

      {

      if(Dcount<=Count[2]){ Count[0]-=Dcount;

      frame_dpsx.setLocation(this.getX()+100,this.getY()+100);frame_dpsx.setVisible(true);

      } else { dialog_dpyk.setLocation(this.getX()+100,this.getY()+100);dialog_dpyk.setVisible(true);} } else if(Hnumber.equals(“CCX”)||Hnumber.equals(“ccx”)&&Dcount<=Count[3])

      {

      if(Dcount<=Count[3]){ Count[0]-=Dcount;

      frame_dpsx.setLocation(this.getX()+100,this.getY()+100);frame_dpsx.setVisible(true);

      } else { dialog_dpyk.setLocation(this.getX()+100,this.getY()+100);dialog_dpyk.setVisible(true);} } else if(Hnumber.equals(“MCM”)||Hnumber.equals(“mcm”)&&Dcount<=Count[4])

      {

      if(Dcount<=Count[4]){ Count[0]-=Dcount;

      frame_dpsx.setLocation(this.getX()+100,this.getY()+100);frame_dpsx.setVisible(true);

      } else { dialog_dpyk.setLocation(this.getX()+100,this.getY()+100);dialog_dpyk.setVisible(true);

      }

      if(e.getActionCommand()==“提交”){ frame_dpsx.setVisible(false);else {

      } frame_dp.setVisible(false);dialog_dpwk.setLocation(this.getX()+100,this.getY()+100);dialog_dpwk.setVisible(true);} } }

      if(e.getActionCommand()==“登記”){ dialog_dpyk.setVisible(false);frame_djsx.setLocation(this.getX()+100,this.getY()+100);frame_djsx.setVisible(true);}

      if(e.getActionCommand()==“完成”){ int Wait_number=Integer.parseInt(text_fielddj_number.getText().toString().trim());Wait_name[Wait_i]=text_fielddj_name.getText().toString().trim();Wait_hbh[Wait_i]=text_fielddj_hbh.getText().toString().trim();Wait_count[Wait_i]=Wait_number;Wait_xl[Wait_i]=Wait_i;Wait_lxfs[Wait_i]=text_fielddj_lxfs.getText().toString().trim();frame_djsx.setVisible(false);text_user.append(“登記姓名 :”+Wait_name[Wait_i]+“ 登記航班號 :”+Wait_hbh[Wait_i]+“ 登記訂票數(shù)量 :”+Wait_count[Wait_i]+“ 聯(lián)系方式 ”+Wait_lxfs[Wait_i]+“n”);Wait_i++;}

      if(e.getActionCommand()==“正確”){ String a=text_field4.getText().toString().trim();String b=text_field5.getText().toString().trim();if(a.equals(“周三

      :”)&&b.equals(“cfc”)||b.equals(“CFC”)||b.equals(“ccx”)||b.equals(“CCX”)){

      } else if(a.equals(“周日

      ”)&&b.equals(“cda”)||b.equals(“CDA”)||b.equals(“mcm”)||b.equals(“MCM”)){ frame_tpsx.setLocation(this.getX()+100,this.getY()+100);frame_tpsx.setLocation(this.getX()+100,this.getY()+100);frame_tpsx.setVisible(true);frame_tpsx.setVisible(true);} else if(a.equals(“周五”)&&b.equals(“cac”)||b.equals(“CAC”)){ frame_tpsx.setLocation(this.getX()+100,this.getY()+100);frame_tpsx.setVisible(true);} else { dialog_tpts.setLocation(this.getX()+100,this.getY()+100);dialog_tpts.setVisible(true);}

      frame_tp.setVisible(false);

      }

      if(e.getActionCommand()==“成功”){

      int i=0;int j=0;String c=text_fieldtp_hbh.getText().toString().trim();int Numb=Integer.parseInt(text_fieldtp_number.getText().toString().trim());frame_tpsx.setVisible(false);if(c.equals(“cac”)||c.equals(“CAC”)){

      Count[0]+=Numb;

      if(Wait_i>0){

      for(i=0;i

      if(Wait_hbh[i].equals(“cac”)||Wait_hbh[i].equals(“CAC”)&&Wait_count[i]<=Count[0])

      {

      j=i+1;

      label=new JLabel(j+“號客戶:

      ”+Wait_name[i]+“ 滿足訂票要求,聯(lián)系方式是:”+Wait_lxfs[i]);d.add(label);d.setLocation(this.getX()+100,this.getY()+100);d.setVisible(true);} }

      }

      } else if(c.equals(“cfc”)||c.equals(“CFC”)){ Count[1]+=Numb;if(Wait_i>0){

      for(i=0;i

      if(Wait_hbh[i].equals(“cfc”)||Wait_hbh[i].equals(“CFC”)&&Wait_count[i]<=Count[0])

      {

      j=i+1;

      label=new JLabel(j+“號客戶:

      ”+Wait_name[i]+“ 滿足訂票要求,聯(lián)系方式是:”+Wait_lxfs[i]);d.add(label);d.setLocation(this.getX()+100,this.getY()+100);d.setVisible(true);} }

      }

      } else if(c.equals(“cda”)||c.equals(“CDA”)){ Count[2]+=Numb;if(Wait_i>0){

      for(i=0;i

      if(Wait_hbh[i].equals(“cda”)||Wait_hbh[i].equals(“CDA”)&&Wait_count[i]<=Count[0])

      {

      j=i+1;

      label=new JLabel(j+“號客戶:

      ”+Wait_name[i]+“ 滿足訂票要求,聯(lián)系方式是:”+Wait_lxfs[i]);d.add(label);d.setLocation(this.getX()+100,this.getY()+100);d.setVisible(true);} }

      }

      } else if(c.equals(“ccx”)||c.equals(“CCX”)){ Count[3]+=Numb;if(Wait_i>0){

      for(i=0;i

      if(Wait_hbh[i].equals(“ccx”)||Wait_hbh[i].equals(“CCX”)&&Wait_count[i]<=Count[0])

      {

      j=i+1;

      label=new JLabel(j+“號客戶:

      ”+Wait_name[i]+“ 滿足訂票要求,聯(lián)系方式是:”+Wait_lxfs[i]);d.add(label);d.setLocation(this.getX()+100,this.getY()+100);d.setVisible(true);} }

      }

      } else if(c.equals(“mcm”)||c.equals(“MCM”)){ Count[4]+=Numb;if(Wait_i>0){

      for(i=0;i

      if(Wait_hbh[i].equals(“mcm”)||Wait_hbh[i].equals(“MCM”)&&Wait_count[i]<=Count[0])

      {

      j=i+1;

      label=new JLabel(j+“號客戶:

      ”+Wait_name[i]+“ 滿足訂票要求,聯(lián)系方式是:”+Wait_lxfs[i]);d.add(label);d.setLocation(this.getX()+100,this.getY()+100);d.setVisible(true);} }

      } } } }

      第二篇:航空售票管理系統(tǒng)

      #include #include #include #include #include #define N 100 using namespace std;

      typedef struct node//定義信息結(jié)構(gòu)體 {

      char num[10];// 航班號

      int hour;//起飛時間小時

      int minitues;//起飛時間分鐘

      char start[10];//起始

      char end[10];//終點

      float prize;//經(jīng)濟(jì)艙票價

      int last;//剩余座位 }FLIGHT;

      typedef struct Order//訂單信息 {

      char name[10];//乘客姓名

      char num[10];//航班號

      int count;//訂票數(shù)量 }Order;

      class flight//定義類 {

      private: FLIGHT stu[N];//每個元素對應(yīng)一條信息

      Order psg[N];//訂單

      int len;//航班總數(shù)

      int lenp;//訂票者總數(shù) public:

      flight();

      ~flight();void input();//錄入信息

      void show();//瀏覽

      void sall();//售票

      void back();//退票

      void search();// 信息查詢

      void search2();// 信息查詢(起點終點)

      char menu();//菜單

      };

      flight stud;

      char filename[]=“flight.txt”;

      flight::flight(){}//構(gòu)造函數(shù) flight::~flight(){}//析構(gòu)函數(shù)

      bool CheckTime(int h1,int m1,int h2,int m2)//判斷兩個時間前后

      { if(h1

      return true;else if(h1==h2){

      if(m1

      return true;

      else

      return false;} else

      return false;} void flight::show()//瀏覽 {

      system(“cls”);//清屏

      cout<<“

      所有航班信息如下:”<

      起飛時間

      起點

      終點

      經(jīng)濟(jì)艙票價

      剩余座位

      備注”<

      for(int i=0;i

      printf(“%-10s%-2.2d:%-2.2d

      %-10s%-10s%-12.2f%-10d”,stu[i].num,stu[i].hour,stu[i].minitues,stu[i].start,stu[i].end,stu[i].prize,stu[i].last);

      time_t t;

      struct tm *tm;

      t=time(NULL);//獲取當(dāng)前系統(tǒng)時間

      tm=localtime(&t);

      if(CheckTime(stud.stu[i].hour,stud.stu[i].minitues,tm->tm_hour,tm->tm_min)==true)//如果起飛時間在當(dāng)前時間之前 輸出此次航班已發(fā)出

      cout<<“此次航班已發(fā)出”<

      else

      cout<

      } cout<<“_______________________________________________________________________________”<

      void flight::back()//退票 {

      char name[20];

      char s[20];

      system(“cls”);//清屏

      cout<<“請輸入退票的航班編號:”;cin>>s;

      for(int i=0;i

      if(strcmp(stud.stu[i].num,s)==0)

      break;//存在 結(jié)束循環(huán)

      if(i==stud.len)//這二者相等說明查找完所有信息也沒找到輸入信息,說明輸入航班編號不存在{

      cout<<“對不起!沒有你輸入航班編號的相關(guān)信息。n”;

      system(“pause”);//任意鍵繼續(xù)

      return;}

      time_t t;

      struct tm *tm;

      t=time(NULL);//獲取當(dāng)前系統(tǒng)時間

      tm=localtime(&t);if(CheckTime(stud.stu[i].hour,stud.stu[i].minitues,tm->tm_hour,tm->tm_min)==true)

      {

      cout<<“對不起!該航班已經(jīng)起飛。不能退票。n”;

      system(“pause”);//任意鍵繼續(xù)

      return;} int j=i;

      cout<<“請輸入您的姓名:”;cin>>name;for(i=0;i

      if(strcmp(stud.psg[i].name,name)==0 && strcmp(stud.psg[i].num,s)==0)//查詢這個名字是否相同

      {

      stud.stu[j].last+=stud.psg[i].count;//退票

      stud.psg[i]=stud.psg[stud.lenp-1];///刪除這個訂單

      stud.lenp--;//訂單數(shù)減一

      cout<<“退票成功!n”;

      system(“pause”);//任意鍵繼續(xù)

      return;

      } } cout<<“對不起!您沒有定該航班的票。n”;

      system(“pause”);//任意鍵繼續(xù)

      }

      void flight::sall()//售票 {

      char s[20];

      system(“cls”);//清屏

      cout<<“請輸入要購買的航班編號:”;cin>>s;

      for(int i=0;i

      if(strcmp(stud.stu[i].num,s)==0)

      break;//存在 結(jié)束循環(huán)

      if(i==stud.len)//這二者相等說明查找完所有信息也沒找到輸入信息,說明輸入航班編號不存在{

      cout<<“對不起!沒有你輸入航班編號的相關(guān)信息。n”;

      system(“pause”);//任意鍵繼續(xù)

      return;}

      if(stud.stu[i].last<=0)//沒有票了

      {

      cout<<“對不起!該航班票已售完。n”;

      system(“pause”);//任意鍵繼續(xù)

      return;}

      time_t t;

      struct tm *tm;

      t=time(NULL);//獲取當(dāng)前系統(tǒng)時間

      tm=localtime(&t);if(CheckTime(stud.stu[i].hour,stud.stu[i].minitues,tm->tm_hour,tm->tm_min)==true)

      {

      cout<<“對不起!該航班已經(jīng)起飛。n”;

      system(“pause”);//任意鍵繼續(xù)

      return;}

      int j=i;i=stud.lenp;strcpy(stud.psg[i].num,stud.stu[i].num);cout<<“請輸入購票數(shù)量:”;cin>>stud.psg[i].count;

      while(stud.psg[i].count>stud.stu[i].last){

      cout<<“余票不足,請重新輸入:”;

      cin>>stud.psg[i].count;

      } cout<<“請輸入您的姓名:”;cin>>stud.psg[i].name;

      stud.stu[j].last-=stud.psg[i].count;//剩余票數(shù)

      stud.lenp++;cout<<“購票成功!n”;system(“pause”);//任意鍵繼續(xù) }

      void flight::input()//錄入信息 {

      system(“cls”);//清屏

      for(int i=stud.len;i

      {

      cout<<“請輸入航班號:”;

      cin>>stud.stu[i].num;

      cout<<“請輸入起飛時間(格式: 12:30):”;

      char ch;

      cin>>stud.stu[i].hour>>ch>>stud.stu[i].minitues;

      cout<<“請輸入起點:”;

      cin>>stud.stu[i].start;

      cout<<“請輸入終點:”;

      cin>>stud.stu[i].end;

      cout<<“請輸入經(jīng)濟(jì)艙票價:”;

      cin>>stud.stu[i].prize;

      cout<<“請輸入剩余座位:”;

      cin>>stud.stu[i].last;

      stud.len++;//個數(shù)加1

      cout<<“一條航班信息錄入完成,是否繼續(xù)錄入?(y/n):”;

      while(1)

      {

      cin>>ch;

      if(ch=='y' || ch=='Y' || ch=='n' || ch=='N')

      break;

      else

      cout<<“輸入錯誤請重新輸入:”;

      }

      if(ch=='n' || ch=='N')

      break;

      } }

      void flight::search()// 信息查詢 {

      char s[20];

      system(“cls”);//清屏

      cout<<“請輸入要查詢的航班編號:”;cin>>s;

      for(int i=0;i

      if(strcmp(stud.stu[i].num,s)==0)

      break;//存在 結(jié)束循環(huán)

      if(i==stud.len)//這二者相等說明查找完所有信息也沒找到輸入信息,說明輸入航班編號不存在{

      cout<<“對不起!沒有你輸入航班編號的相關(guān)信息。n”;

      system(“pause”);//任意鍵繼續(xù)

      return;}

      cout<<“

      查詢結(jié)果如下:”<

      起飛時間

      起點

      終點

      經(jīng)濟(jì)艙票價

      剩余座位

      備注”<

      printf(“%-10s%-2.2d:%-2.2d

      %-10s%-10s%-12.2f%-10d”,stu[i].num,stu[i].hour,stu[i].minitues,stu[i].start,stu[i].end,stu[i].prize,stu[i].last);

      time_t t;

      struct tm *tm;

      t=time(NULL);//獲取當(dāng)前系統(tǒng)時間

      tm=localtime(&t);

      if(CheckTime(stud.stu[i].hour,stud.stu[i].minitues,tm->tm_hour,tm->tm_min)==true)//如果起飛時間在當(dāng)前時間之前 輸出此次航班已發(fā)出

      cout<<“此次航班已發(fā)出”<

      else

      cout<

      cout<<“_______________________________________________________________________________”<

      void flight::search2()// 信息查詢(按線路){

      char s1[20],s2[20];

      system(“cls”);//清屏

      cout<<“請輸入要查詢的線路起點:”;cin>>s1;

      cout<<“請輸入要查詢的線路終點:”;cin>>s2;

      for(int i=0;i

      if(strcmp(stud.stu[i].start,s1)==0 && strcmp(stud.stu[i].end,s2)==0)

      break;//存在 結(jié)束循環(huán)

      if(i==stud.len)//這二者相等說明查找完所有信息也沒找到輸入信息,說明輸入航班編號不存在{

      cout<<“對不起!沒有你輸入線路的相關(guān)信息。n”;

      system(“pause”);//任意鍵繼續(xù)

      return;}

      cout<<“

      查詢結(jié)果如下:”<

      起飛時間

      起點

      終點

      經(jīng)濟(jì)艙票價

      剩余座位

      備注”<

      for(i=0;i

      if(strcmp(stud.stu[i].start,s1)==0 && strcmp(stud.stu[i].end,s2)==0)

      {

      printf(“%-10s%-2.2d:%-2.2d

      %-10s%-10s%-12.2f%-10d”,stu[i].num,stu[i].hour,stu[i].minitues,stu[i].start,stu[i].end,stu[i].prize,stu[i].last);

      time_t t;

      struct tm *tm;

      t=time(NULL);//獲取當(dāng)前系統(tǒng)時間

      tm=localtime(&t);

      if(CheckTime(stud.stu[i].hour,stud.stu[i].minitues,tm->tm_hour,tm->tm_min)==true)//如果起飛時間在當(dāng)前時間之前 輸出此次航班已發(fā)出

      cout<<“此次航班已發(fā)出”<

      else

      cout<

      } cout<<“_______________________________________________________________________________”<

      char flight::menu()//菜單 { char c;

      system(“cls”);//清屏

      cout<<“nnnn

      ╔═══════════════════════════╗n”;cout<<“

      1、錄入航班信息

      ║n”;

      cout<<“

      ╠═══════════════════════════╣n”;cout<<“

      2、瀏覽航班信息

      ║n”;cout<<“

      ╠═══════════════════════════╣n”;

      cout<<“

      3、查詢路線(按編號)

      ║n”;

      cout<<“

      ╠═══════════════════════════╣n”;cout<<“

      4、查詢路線(按線路)

      ║n”;

      cout<<“

      ╠═══════════════════════════╣n”;cout<<“

      5、售票

      ║n”;

      cout<<“

      ╠═══════════════════════════╣n”;cout<<“

      6、退票

      ║n”;

      cout<<“

      ╠═══════════════════════════╣n”;cout<<“

      0、退出系統(tǒng)

      ║n”;

      cout<<“

      ╚═══════════════════════════╝n”;cout<<“

      請選擇:”;

      cin>>c;

      return c;}

      int main(){

      while(1)

      {

      char ch;

      ch=stud.menu();//獲取選擇

      switch(ch)

      {

      case '1': stud.input();break;//錄入航班信息

      case '2': stud.show();break;//瀏覽航班信息

      case '3': stud.search();break;// 查詢路線

      case '4': stud.search2();break;// 查詢路線(按線路)

      case '5': stud.sall();break;// 售票

      case '6': stud.back();

      break;// 退票

      case '0': exit(0);//退出

      }

      }

      return 0;}

      第三篇:航空售票系統(tǒng)系統(tǒng)實施報告

      航 空 售 票 管 理 系 統(tǒng)

      實 施 報 告

      組員:

      目錄

      第一章 引言 ················································································································· 4

      1.1編寫目的··········································································································· 4 1.2參考文獻(xiàn)··········································································································· 4 1.3術(shù)語和縮寫詞...................................................................................................4 第二章

      軟件概述 ····································································································· 5

      2.1軟件用途··········································································································· 5 2.2軟件運(yùn)行··········································································································· 5 2.3系統(tǒng)配置·········································································································· 7 2.4軟件結(jié)構(gòu)·········································································································· 7 2.5軟件性能·········································································································· 8 2.6輸入、處理、輸出·························································································· 8

      2.6.1輸入········································································································· 8 2.6.2輸出········································································································· 9

      第三章

      軟件使用過程 ····························································································· 10

      3.1軟件安裝········································································································· 10 3.2運(yùn)行步驟········································································································· 10 3.3運(yùn)行說明········································································································· 10

      3.3.1控制輸入······························································································· 10 3.3.2管理信息······························································································· 10 3.4.3輸入輸出文件······················································································· 10 3.4.4輸出報告······························································································· 10 3.5出錯處理········································································································· 10 3.6非常規(guī)過程····································································································· 11 第四章 軟件維護(hù)過程 ······························································································· 12

      4.1程序設(shè)計的約定····························································································· 12 4.2出錯及糾正方法····························································································· 12 4.3專用維護(hù)程序································································································· 12 4.4 源程序清單···································································································· 12

      第一章 引言

      1.1編寫目的

      開發(fā)目標(biāo):開發(fā)出一個操作簡便,界面友好,靈活實用,安全可靠,功能齊全的的航空售票管理信息系統(tǒng)。

      航空售票管理信息系統(tǒng)對航空相關(guān)單位進(jìn)行包括機(jī)票訂購在內(nèi)的許多信息管理有著極其重要的作用,就一般的實用軟件來說,它的設(shè)計內(nèi)容繁多、功能重疊、操作復(fù)雜,比如訂票和修改票務(wù)信息某些功能模塊重疊等。本開發(fā)小組正是通過廣泛調(diào)研,對同類的相關(guān)系統(tǒng)掌握了一定的資料的基礎(chǔ)上,制定開發(fā)出來的。為了更好的完善本系統(tǒng),在實施管理階段特制定本實施報告,以求徹底完善本系統(tǒng)。

      1.2參考文獻(xiàn)

      [1]張翼英等 《Visual Basic課程設(shè)計》 清華大學(xué)出版社 出版日期:2008-1 [2]《信息系統(tǒng)開發(fā)方法》清華大學(xué)出版社 姜旭平

      1.3術(shù)語和縮寫詞

      在本文檔中,所有專門術(shù)語的定義以及縮寫詞的原意如下: ①程序流程圖:

      程序流程圖又稱程序框圖,獨立于任何一種設(shè)計語言,比較直觀和清晰的描述了過程的控制流程。

      ②N-S圖:

      N-S圖是為了改變流程圖描述程序邏輯時過大的隨意性與靈活性,其規(guī)定了五種圖形構(gòu)建,包括:順序型,選擇型,while重復(fù),until重復(fù)型,多分枝選擇型。

      ③PAD圖:

      PAD圖是problem analysis diagram的英文縮寫,是日本日立公司提出。它使用結(jié)構(gòu)化程序設(shè)計思想表現(xiàn)程序的邏輯結(jié)構(gòu)的圖形工具。

      ④PDL語言:

      PDL語言是procedure design language的英文縮寫。PDL是所有非正文形式的過程設(shè)計工具的統(tǒng)稱。PDL具有“非純粹”的編寫語言的特點。

      第二章

      軟件概述

      2.1軟件用途

      現(xiàn)在應(yīng)用在大中型企業(yè)的管理信息系統(tǒng)中,幾乎都包括了工資管理模塊。有些環(huán)境中是由作為大型ERP軟件中的一個模塊引進(jìn)的,有些是作為企業(yè)的財務(wù)系統(tǒng)的一部分。這些根據(jù)規(guī)范的西方的管理制度設(shè)計的工資管理軟件,在很多時候還不能完全解決中國特色的中小企業(yè)的問題,本文介紹的就是要為高校解決他們在工資管理方面的問題,主要實現(xiàn)系統(tǒng)用戶管理、員工基本信息管理、工資標(biāo)準(zhǔn)設(shè)定以及工資結(jié)算和查詢等一般工資管理系統(tǒng)應(yīng)具有的主要功能,以便完成課程實踐的目的。

      2.2軟件運(yùn)行

      學(xué)生成績管理系統(tǒng)主要有:登陸界面、員工信息管理,工資標(biāo)準(zhǔn)管理 主要運(yùn)行如下所示:

      a : 登陸界面

      輸入姓名、密碼,點擊登陸界面顯示圖 b : 航線信息界面

      圖2.5 c :機(jī)票信息界面

      圖2.8 2.3系統(tǒng)配置

      本軟件要求在PC 及其兼容機(jī)上運(yùn)行,要求奔騰II以上CPU,64兆以上內(nèi)存,10G 以上硬盤。

      軟件需要有WINDOWS 7操作系統(tǒng)環(huán)境。.4軟件結(jié)構(gòu)

      航空售票管理系統(tǒng)的結(jié)構(gòu)圖如下:

      航空訂票管理系統(tǒng)訂票信息管理客戶信息管理航線信息管理系統(tǒng)管理訂票信息查詢訂票信息修改添加訂票信息客戶基本信息管理客戶類別信息管理航線基本信息管理客機(jī)信息管理艙位信息管理密碼管理用戶管理客戶信息查詢客戶信息修改客戶信息添加客戶類別信息修改客戶類別信息添加航線信息查詢航線信息修改航線信息添加客機(jī)信息查詢客機(jī)信息修改客機(jī)信息添加艙位信息修改艙位信息添加

      圖2.12 2.5軟件性能

      A:用戶管理模塊能在普通用戶與管理員之間加以區(qū)分,分別實現(xiàn)其對應(yīng)的功能,方法簡單,性能較好。

      B:查詢模塊中我們對教職工按照姓名和工號兩種方法進(jìn)行查詢,有效的考慮了重名的各種情況,達(dá)到一定的性能指標(biāo)。

      C:工資模塊:我們將職稱工資管理和其他工資管理等幾種情況

      D:密碼管理:我們起初編寫了一份密碼表,只有按照密碼表上的輸入才能對工資管理系統(tǒng)進(jìn)行相關(guān)操作,性能較好。.6輸入、輸出 2.6.1輸入 本系統(tǒng)采用文本文框進(jìn)行信息的輸入以及成績的輸入。

      我們將創(chuàng)建模塊,顯示模塊,存盤功能模塊,讀入功能模塊,統(tǒng)計功能模塊等的輸入項

      2.6.2輸出

      本系統(tǒng)采用文本文框進(jìn)行信息的輸出以及成績的輸出。

      我們將創(chuàng)建模塊,顯示模塊,存盤功能模塊,讀入功能模塊,統(tǒng)計功能模塊等的輸出項

      第三章 軟件使用過程

      3.1軟件安裝

      本系統(tǒng)采用vb.net進(jìn)行設(shè)計與實現(xiàn),完成設(shè)計后進(jìn)行發(fā)布就可以在沒有安裝vb.net環(huán)境的計算機(jī)中使用,安裝方便簡潔,只需要在安裝的計算機(jī)中添加數(shù)據(jù)庫即可。

      3.2運(yùn)行步驟

      首先選擇要登錄的角色,然后進(jìn)入相應(yīng)的界面進(jìn)行操作。

      3.3運(yùn)行說明

      對于本系統(tǒng)我們設(shè)計時進(jìn)行了權(quán)限的分配,比如普通用戶登陸后只能進(jìn)行自己工資的查詢而不能進(jìn)行工資的修改,管理員登陸后既可以進(jìn)行查詢又可以進(jìn)行修改。

      3.3.1控制輸入

      按照軟件的說明,將測試數(shù)據(jù)加入到軟件中

      3.3.2管理信息

      軟件運(yùn)行過程中的密碼鍵入:通過文本框進(jìn)行輸入。

      3.4.3輸入輸出文件

      軟件運(yùn)行過程中通過文本框進(jìn)行文件的輸入輸出。

      3.4.4輸出報告

      若輸入要輸出的條件正確的話會彈出相應(yīng)的提示框提示是否成功或者正確等。

      3.5出錯處理

      軟件運(yùn)行過程中可能雛形的出物及處理如下:(1)輸入信息出錯

      在數(shù)據(jù)庫內(nèi)找不到輸入的信息,輸入信息有誤,導(dǎo)致操作失敗。(2)出錯處理對策

      檢查重新輸入的信息是否符合要求。(3)數(shù)據(jù)庫連接錯誤

      這類錯誤主要是數(shù)據(jù)庫設(shè)置不正確,或sql server異常引起的,我們只要取消本次操作,提醒用戶檢查數(shù)據(jù)庫問題就可。

      3.6非常規(guī)過程

      如果出現(xiàn)不可能處理的問題,可以直接與公司的技術(shù)支持人員聯(lián)系。

      第四章 軟件維護(hù)過程

      4.1程序設(shè)計的約定

      本軟件程序是一個單一的運(yùn)行軟件,各個軟件子模塊的預(yù)定如下:

      航空售票管理系統(tǒng)主要以管理航空售票信息為目的,設(shè)置了嚴(yán)密的權(quán)限管理。用戶管理:設(shè)置了權(quán)限管理功能

      查詢管理:包括查詢航線和航班等基本信息。可以顯示單獨一條記錄,也可以顯示所有信息。

      更新管理:當(dāng)有需要時,管理員可以進(jìn)行工資和信息的刪除操作 密碼管理:管理員和個人可以根據(jù)需求修改密碼。

      4.2出錯及糾正方法

      可能由于輸入的數(shù)據(jù)不符合軟件的要求,軟件將可能提出錯誤,并提醒您按照軟件的要求運(yùn)行程序;可能出現(xiàn)的問題如下:

      <1>若輸入密碼格式不對,應(yīng)提示:您輸入的密碼錯誤。

      4.3專用維護(hù)程序

      本軟件提供您一個專用維護(hù)軟件,以便在軟件出現(xiàn)意想不到的問題時可以使您迅速發(fā)現(xiàn)您在軟件運(yùn)行時的失誤,保證您的分析結(jié)果不會受到損失,盡管您的軟件可能永遠(yuǎn)不會出現(xiàn)使用維護(hù)本軟件的時候,希望您在使用分析錯誤!未找到索引項。軟件的時候,可以瀏覽以下本軟件的使用。軟件的使用如下:

      A:輸入正確的用戶名與密碼登陸。

      B:若是普通用戶,請選擇登陸普通用戶界面。C:若是管理員,請選擇登陸管理員界面。

      4.4 源程序清單

      登錄界面代碼:

      Imports System.Data Imports System.Data.SqlClient Public Class 登錄

      Inherits System.Windows.Forms.Form Dim count As Integer = 0 Dim my_class As New class1 #Region “ Windows 窗體設(shè)計器生成的代碼” Public Sub New()MyBase.New()'該調(diào)用是Windows 窗體設(shè)計器所必需的。InitializeComponent()'在InitializeComponent()調(diào)用之后添加任何初始化

      End Sub '窗體重寫dispose 以清理組件列表。

      Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)If disposing Then If Not(components Is Nothing)Then components.Dispose()End If End If MyBase.Dispose(disposing)End Sub 'Windows 窗體設(shè)計器所必需的

      Private components As System.ComponentModel.IContainer '注意: 以下過程是Windows 窗體設(shè)計器所必需的'可以使用Windows 窗體設(shè)計器修改此過程。

      '不要使用代碼編輯器修改它。

      Friend WithEvents Button2 As System.Windows.Forms.Button Friend WithEvents Button1 As System.Windows.Forms.Button Friend WithEvents TextBox2 As System.Windows.Forms.TextBox Friend WithEvents TextBox1 As System.Windows.Forms.TextBox Friend WithEvents Label3 As System.Windows.Forms.Label Friend WithEvents Label2 As System.Windows.Forms.Label Friend WithEvents Label1 As System.Windows.Forms.Label Private Sub InitializeComponent()Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(登錄))Me.Button2 = New System.Windows.Forms.Button Me.Button1 = New System.Windows.Forms.Button Me.TextBox2 = New System.Windows.Forms.TextBox Me.TextBox1 = New System.Windows.Forms.TextBox Me.Label3 = New System.Windows.Forms.Label Me.Label2 = New System.Windows.Forms.Label Me.Label1 = New System.Windows.Forms.Label Me.SuspendLayout()'Button2 Me.Button2.Font = New System.Drawing.Font(“宋體”, 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134, Byte))Me.Button2.Location = New System.Drawing.Point(306, 299)Me.Button2.Name = “Button2” Me.Button2.Size = New System.Drawing.Size(112, 32)Me.Button2.TabIndex = 13 Me.Button2.Text = “取 消” 'Button1 Me.Button1.Font = New System.Drawing.Font(“宋體”, 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134, Byte))Me.Button1.Location = New System.Drawing.Point(72, 299)Me.Button1.Name = “Button1” Me.Button1.Size = New System.Drawing.Size(112, 32)Me.Button1.TabIndex = 12 Me.Button1.Text = “確 定” 'TextBox2 Me.TextBox2.Location = New System.Drawing.Point(208, 235)Me.TextBox2.Name = “TextBox2” Me.TextBox2.PasswordChar = Global.Microsoft.VisualBasic.ChrW(42)Me.TextBox2.Size = New System.Drawing.Size(240, 21)Me.TextBox2.TabIndex = 11 'TextBox1' Me.TextBox1.Location = New System.Drawing.Point(208, 163)Me.TextBox1.Name = “TextBox1” Me.TextBox1.Size = New System.Drawing.Size(240, 21)Me.TextBox1.TabIndex = 10 'Label3 Me.Label3.Font = New System.Drawing.Font(“宋體”, 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134, Byte))Me.Label3.Location = New System.Drawing.Point(48, 234)Me.Label3.Name = “Label3” Me.Label3.Size = New System.Drawing.Size(136, 22)Me.Label3.TabIndex = 9 Me.Label3.Text = “ 密 碼” '

      'Label2 ' Me.Label2.Font = New System.Drawing.Font(“宋體”, 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134, Byte))Me.Label2.Location = New System.Drawing.Point(48, 163)Me.Label2.Name = “Label2” Me.Label2.Size = New System.Drawing.Size(136, 21)Me.Label2.TabIndex = 8 Me.Label2.Text = “ 用戶名” '

      'Label1 ' Me.Label1.BackColor = System.Drawing.SystemColors.ButtonHighlight Me.Label1.Font = New System.Drawing.Font(“華文彩云”, 36.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))Me.Label1.ForeColor = System.Drawing.SystemColors.InactiveCaption Me.Label1.Location = New System.Drawing.Point(55, 9)Me.Label1.Name = “Label1” Me.Label1.Size = New System.Drawing.Size(393, 120)Me.Label1.TabIndex = 7 Me.Label1.Text = “蘭州航空公司 管理信息系統(tǒng)” '

      '登錄 ' Me.AutoScaleBaseSize = New System.Drawing.Size(6, 14)Me.BackgroundImage = CType(resources.GetObject(“$this.BackgroundImage”), System.Drawing.Image)Me.ClientSize = New System.Drawing.Size(504, 390)Me.Controls.Add(Me.Button2)Me.Controls.Add(Me.Button1)Me.Controls.Add(Me.TextBox2)Me.Controls.Add(Me.TextBox1)Me.Controls.Add(Me.Label3)Me.Controls.Add(Me.Label2)Me.Controls.Add(Me.Label1)Me.Icon = CType(resources.GetObject(“$this.Icon”), System.Drawing.Icon)Me.Name = “登錄” Me.Text = “Form7” Me.ResumeLayout(False)Me.PerformLayout()End Sub #End Region Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)Handles Button1.Click Dim user As String Dim pw As String Dim temp1 As String Dim temp2 As String Dim con As String Dim singe As Integer = 1 user = TextBox1.Text username = TextBox1.Text pw = TextBox2.Text con = “select * from users where id='” + user + “' and password='” + pw + “'” Dim ds As New DataSet ds = class1.query(con)Try If ds.Tables(0).Rows.Count > 0 Then class1.dr = ds.Tables(0).Rows(0)temp1 = class1.dr(0)temp2 = class1.dr(1)主窗口.Show()End If Catch ex As Exception MessageBox.Show(ex.Message)End Try 'con = “insert into log(id)select id from permission where id='” + temp1 + “'” 'If(Trim(user)= Trim(temp1)And Trim(pw)= Trim(temp2)And(user <> “" Or pw <> ”“))Then ' Me.Hide()' class1.insert(con)' singe = 1 'ElseIf(user = ”“ And pw = ”“)Then ' MessageBox.Show(”用戶名和密碼為空!“, ”提示“)' TextBox1.Focus()' singe = 0 'ElseIf(Trim(user)<> Trim(temp1)Or Trim(pw)<> Trim(temp2))Then ' MessageBox.Show(”沒有這個用戶或密碼錯誤,請重新輸入!“, ”提示“)' TextBox1.SelectAll()' TextBox1.Focus()' singe = 0 'End If 'count = count + 1 'If(count = 3 And singe = 0)Then ' MessageBox.Show(”三次錯誤,退出本系統(tǒng)“, ”提示“)' End 'End If End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)Handles Button2.Click End Sub Private Sub Form7_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)Handles MyBase.Load class1.init()Label1.BackColor = Color.Transparent Label2.BackColor = Color.Transparent Label3.BackColor = Color.Transparent Button1.BackColor = Color.Transparent Button2.BackColor = Color.Transparent End Sub End Class 訂票界面代碼:

      Public Class 訂票

      Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)Handles Button1.Click Dim i As Integer If TextBox1.Text = ”“ Then i = MsgBox(”客戶號不能為空“, MsgBoxStyle.OkCancel, ”警告“)Else Dim conn As String = ”data source=.;connect timeout=5;User ID=sa;Password='123';initial catalog=Ticket;“ Dim objconn1 As New SqlConnection(conn)objconn1.Open()Dim 客戶號 As New SqlParameter(”@客戶號“, SqlDbType.Int, 4)Dim 客戶姓名 As New SqlParameter(”@客戶姓名“, SqlDbType.Char, 10)Dim 起飛地 As New SqlParameter(”@起飛地“, SqlDbType.VarChar, 50)Dim 目的地 As New SqlParameter(”@目的地“, SqlDbType.VarChar, 50)Dim 票價 As New SqlParameter(”@票價“, SqlDbType.Int, 4)Dim 飛行時間 As New SqlParameter(”@飛行時間“, SqlDbType.Int, 4)Dim 航空公司 As New SqlParameter(”@航空公司“, SqlDbType.VarChar, 50)Dim strin As String strin = ”insert into flyernb(客戶號,客戶姓名,起飛地,目的地,票價,飛行時間,航空公司)values(@客戶號,@客戶姓名,@起飛地,@目的地,@票價,@飛行時間,@航空公司)“ Dim objcmd1 As New SqlCommand(strin, objconn1)objcmd1.Parameters.Add(客戶號)objcmd1.Parameters.Add(客戶姓名)objcmd1.Parameters.Add(起飛地)objcmd1.Parameters.Add(目的地)objcmd1.Parameters.Add(票價)objcmd1.Parameters.Add(飛行時間)objcmd1.Parameters.Add(航空公司)客戶號.Value = TextBox1.Text 客戶姓名.Value = TextBox2.Text 起飛地.Value = ComboBox2.Text()目的地.Value = ComboBox3.Text()票價.Value = TextBox5.Text 飛行時間.Value = TextBox6.Text 航空公司.Value = ComboBox1.Text objcmd1.ExecuteNonQuery()objconn1.Close()objcmd1.Dispose()MsgBox(”訂票成功!“)TextBox1.Text = ”“ TextBox2.Text = ”“ TextBox5.Text = ”“ TextBox6.Text = ”“ ComboBox2.Text = ”“ ComboBox3.Text()= ”“ ComboBox1.Text()= ”“ End If End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)Handles Button2.Click Me.Close()End Sub End Class 退票界面代碼:

      Public Class 退票

      Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)Handles Button1.Click Dim i As Integer i = MsgBox(”確定要退票嗎?“, MsgBoxStyle.OkCancel, ”警告“)If i = MsgBoxResult.Cancel Then Close()Else Dim conn As String = ”data source=.;connect timeout=300;User ID=sa;Password='123';initial catalog=Ticket;“ Dim objconn1 As New SqlConnection(conn)'objconn1.Open()Dim strsql As String = ”delete from flyernb where 客戶號='“ & Trim(TextBox1.Text)& ”'“ objconn1.Open()Dim objcmd As New SqlCommand(strsql, objconn1)objcmd.ExecuteNonQuery()objconn1.Close()objcmd.Dispose()MsgBox(”刪除成功!“)TextBox1.Text = ”“ End If End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)Handles Button2.Click Me.Close()End Sub End Class 用戶權(quán)限設(shè)置代碼:

      Public Class 退票

      Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)Handles Button1.Click Dim i As Integer i = MsgBox(”確定要退票嗎?“, MsgBoxStyle.OkCancel, ”警告“)If i = MsgBoxResult.Cancel Then Close()Else Dim conn As String = ”data source=.;connect timeout=300;User ID=sa;Password='123';initial catalog=Ticket;“ Dim objconn1 As New SqlConnection(conn)'objconn1.Open()Dim strsql As String = ”delete from flyernb where 客戶號='“ & Trim(TextBox1.Text)& ”'“ objconn1.Open()Dim objcmd As New SqlCommand(strsql, objconn1)objcmd.ExecuteNonQuery()objconn1.Close()objcmd.Dispose()MsgBox(”刪除成功!“)TextBox1.Text = ”“ End If End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)Handles Button2.Click Me.Close()End Sub End Class 航線信息代碼:

      Public Class 航線信息

      Inherits System.Windows.Forms.Form #Region ” Windows 窗體設(shè)計器生成的代碼“ Public Sub New()MyBase.New()'該調(diào)用是Windows 窗體設(shè)計器所必需的。InitializeComponent()'在InitializeComponent()調(diào)用之后添加任何初始化

      End Sub '窗體重寫dispose 以清理組件列表。

      Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)If disposing Then If Not(components Is Nothing)Then components.Dispose()End If End If MyBase.Dispose(disposing)End Sub 'Windows 窗體設(shè)計器所必需的

      Private components As System.ComponentModel.IContainer '注意: 以下過程是Windows 窗體設(shè)計器所必需的'可以使用Windows 窗體設(shè)計器修改此過程。

      '不要使用代碼編輯器修改它。

      Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents Label2 As System.Windows.Forms.Label Friend WithEvents Label3 As System.Windows.Forms.Label Friend WithEvents Label4 As System.Windows.Forms.Label Friend WithEvents Label5 As System.Windows.Forms.Label Friend WithEvents Label6 As System.Windows.Forms.Label Friend WithEvents Label7 As System.Windows.Forms.Label Friend WithEvents Label8 As System.Windows.Forms.Label Friend WithEvents Label9 As System.Windows.Forms.Label Friend WithEvents Label10 As System.Windows.Forms.Label Friend WithEvents TextBox1 As System.Windows.Forms.TextBox Friend WithEvents TextBox2 As System.Windows.Forms.TextBox Friend WithEvents TextBox3 As System.Windows.Forms.TextBox Friend WithEvents TextBox4 As System.Windows.Forms.TextBox Friend WithEvents TextBox5 As System.Windows.Forms.TextBox Friend WithEvents TextBox6 As System.Windows.Forms.TextBox Friend WithEvents TextBox7 As System.Windows.Forms.TextBox Friend WithEvents TextBox8 As System.Windows.Forms.TextBox Friend WithEvents ComboBox1 As System.Windows.Forms.ComboBox Friend WithEvents Button1 As System.Windows.Forms.Button Friend WithEvents Button2 As System.Windows.Forms.Button Friend WithEvents Label11 As System.Windows.Forms.Label Friend WithEvents TextBox10 As System.Windows.Forms.TextBox Friend WithEvents TextBox9 As System.Windows.Forms.TextBox Private Sub InitializeComponent()Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(航線信息))Me.GroupBox1 = New System.Windows.Forms.GroupBox Me.TextBox10 = New System.Windows.Forms.TextBox Me.TextBox9 = New System.Windows.Forms.TextBox Me.Label11 = New System.Windows.Forms.Label Me.ComboBox1 = New System.Windows.Forms.ComboBox Me.TextBox8 = New System.Windows.Forms.TextBox Me.TextBox7 = New System.Windows.Forms.TextBox Me.TextBox6 = New System.Windows.Forms.TextBox Me.TextBox5 = New System.Windows.Forms.TextBox Me.TextBox4 = New System.Windows.Forms.TextBox Me.TextBox3 = New System.Windows.Forms.TextBox Me.TextBox2 = New System.Windows.Forms.TextBox Me.TextBox1 = New System.Windows.Forms.TextBox Me.Label10 = New System.Windows.Forms.Label Me.Label9 = New System.Windows.Forms.Label Me.Label8 = New System.Windows.Forms.Label Me.Label7 = New System.Windows.Forms.Label Me.Label6 = New System.Windows.Forms.Label Me.Label5 = New System.Windows.Forms.Label Me.Label4 = New System.Windows.Forms.Label Me.Label3 = New System.Windows.Forms.Label Me.Label2 = New System.Windows.Forms.Label Me.Label1 = New System.Windows.Forms.Label Me.Button1 = New System.Windows.Forms.Button Me.Button2 = New System.Windows.Forms.Button Me.GroupBox1.SuspendLayout()Me.SuspendLayout()'

      'GroupBox1' Me.GroupBox1.Controls.Add(Me.TextBox10)Me.GroupBox1.Controls.Add(Me.TextBox9)Me.GroupBox1.Controls.Add(Me.Label11)Me.GroupBox1.Controls.Add(Me.ComboBox1)Me.GroupBox1.Controls.Add(Me.TextBox8)Me.GroupBox1.Controls.Add(Me.TextBox7)Me.GroupBox1.Controls.Add(Me.TextBox6)Me.GroupBox1.Controls.Add(Me.TextBox5)Me.GroupBox1.Controls.Add(Me.TextBox4)Me.GroupBox1.Controls.Add(Me.TextBox3)Me.GroupBox1.Controls.Add(Me.TextBox2)Me.GroupBox1.Controls.Add(Me.TextBox1)Me.GroupBox1.Controls.Add(Me.Label10)Me.GroupBox1.Controls.Add(Me.Label9)Me.GroupBox1.Controls.Add(Me.Label8)Me.GroupBox1.Controls.Add(Me.Label7)Me.GroupBox1.Controls.Add(Me.Label6)Me.GroupBox1.Controls.Add(Me.Label5)Me.GroupBox1.Controls.Add(Me.Label4)Me.GroupBox1.Controls.Add(Me.Label3)Me.GroupBox1.Controls.Add(Me.Label2)Me.GroupBox1.Controls.Add(Me.Label1)Me.GroupBox1.Font = New System.Drawing.Font(”宋體“, 10.5!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))Me.GroupBox1.Location = New System.Drawing.Point(8, 8)Me.GroupBox1.Name = ”GroupBox1“ Me.GroupBox1.Size = New System.Drawing.Size(488, 344)Me.GroupBox1.TabIndex = 0 Me.GroupBox1.TabStop = False Me.GroupBox1.Text = ”航線信息“ '

      'TextBox10 ' Me.TextBox10.Location = New System.Drawing.Point(376, 182)Me.TextBox10.Name = ”TextBox10“ Me.TextBox10.Size = New System.Drawing.Size(100, 23)Me.TextBox10.TabIndex = 22 '

      'TextBox9 ' Me.TextBox9.Location = New System.Drawing.Point(128, 32)Me.TextBox9.Name = ”TextBox9“ Me.TextBox9.Size = New System.Drawing.Size(100, 23)Me.TextBox9.TabIndex = 21 '

      'Label11 Me.Label11.Location = New System.Drawing.Point(24, 32)Me.Label11.Name = ”Label11“ Me.Label11.Size = New System.Drawing.Size(100, 23)Me.Label11.TabIndex = 20 Me.Label11.Text = ”航線編號“ 'ComboBox1 Me.ComboBox1.Location = New System.Drawing.Point(376, 29)Me.ComboBox1.Name = ”ComboBox1“ Me.ComboBox1.Size = New System.Drawing.Size(104, 22)Me.ComboBox1.TabIndex = 18 'TextBox8 ' Me.TextBox8.Location = New System.Drawing.Point(128, 272)Me.TextBox8.Multiline = True Me.TextBox8.Name = ”TextBox8“ Me.TextBox8.ScrollBars = System.Windows.Forms.ScrollBars.Both Me.TextBox8.Size = New System.Drawing.Size(336, 56)Me.TextBox8.TabIndex = 17 'TextBox7 Me.TextBox7.Location = New System.Drawing.Point(130, 237)Me.TextBox7.Name = ”TextBox7“ Me.TextBox7.Size = New System.Drawing.Size(100, 23)Me.TextBox7.TabIndex = 16 'TextBox6 Me.TextBox6.Location = New System.Drawing.Point(376, 237)Me.TextBox6.Name = ”TextBox6“ Me.TextBox6.Size = New System.Drawing.Size(100, 23)Me.TextBox6.TabIndex = 15 'TextBox5 Me.TextBox5.Location = New System.Drawing.Point(128, 182)Me.TextBox5.Name = ”TextBox5“ Me.TextBox5.Size = New System.Drawing.Size(100, 23)Me.TextBox5.TabIndex = 14 'TextBox4 Me.TextBox4.Location = New System.Drawing.Point(128, 131)Me.TextBox4.Name = ”TextBox4“ Me.TextBox4.Size = New System.Drawing.Size(100, 23)Me.TextBox4.TabIndex = 13 'TextBox3 ' Me.TextBox3.Location = New System.Drawing.Point(376, 125)Me.TextBox3.Name = ”TextBox3“ Me.TextBox3.Size = New System.Drawing.Size(100, 23)Me.TextBox3.TabIndex = 12 'TextBox2 Me.TextBox2.Location = New System.Drawing.Point(376, 72)Me.TextBox2.Name = ”TextBox2“ Me.TextBox2.Size = New System.Drawing.Size(100, 23)Me.TextBox2.TabIndex = 11'

      'TextBox1 Me.TextBox1.Location = New System.Drawing.Point(128, 72)Me.TextBox1.Name = ”TextBox1“ Me.TextBox1.Size = New System.Drawing.Size(100, 23)Me.TextBox1.TabIndex = 10 'Label10' Me.Label10.Location = New System.Drawing.Point(24, 288)Me.Label10.Name = ”Label10“ Me.Label10.Size = New System.Drawing.Size(88, 23)Me.Label10.TabIndex = 9 Me.Label10.Text = ”備注信息“ 'Label9 Me.Label9.Location = New System.Drawing.Point(24, 240)Me.Label9.Name = ”Label9“ Me.Label9.Size = New System.Drawing.Size(100, 23)Me.Label9.TabIndex = 8 Me.Label9.Text = ”頭等艙價格“ 'Label8 Me.Label8.Location = New System.Drawing.Point(270, 237)Me.Label8.Name = ”Label8“ Me.Label8.Size = New System.Drawing.Size(100, 23)Me.Label8.TabIndex = 7 Me.Label8.Text = ”公務(wù)艙價格“ 'Label7 Me.Label7.Location = New System.Drawing.Point(270, 185)Me.Label7.Name = ”Label7“ Me.Label7.Size = New System.Drawing.Size(100, 23)Me.Label7.TabIndex = 6 Me.Label7.Text = ”經(jīng)濟(jì)艙價格“ 'Label6 Me.Label6.Location = New System.Drawing.Point(22, 185)Me.Label6.Name = ”Label6“ Me.Label6.Size = New System.Drawing.Size(100, 23)Me.Label6.TabIndex = 5 Me.Label6.Text = ”客機(jī)編號“ 'Label5 Me.Label5.Location = New System.Drawing.Point(24, 131)Me.Label5.Name = ”Label5“ Me.Label5.Size = New System.Drawing.Size(100, 23)Me.Label5.TabIndex = 4 Me.Label5.Text = ”出發(fā)時間“ 'Label4 Me.Label4.Location = New System.Drawing.Point(270, 128)Me.Label4.Name = ”Label4“ Me.Label4.Size = New System.Drawing.Size(100, 23)Me.Label4.TabIndex = 3 Me.Label4.Text = ”到達(dá)時間“ 'Label3' Me.Label3.Location = New System.Drawing.Point(270, 35)Me.Label3.Name = ”Label3“ Me.Label3.Size = New System.Drawing.Size(100, 23)Me.Label3.TabIndex = 2 Me.Label3.Text = ”航班日期“ 'Label2 Me.Label2.Location = New System.Drawing.Point(270, 80)Me.Label2.Name = ”Label2“ Me.Label2.Size = New System.Drawing.Size(100, 23)Me.Label2.TabIndex = 1 Me.Label2.Text = ”到達(dá)城市“ 'Label1' Me.Label1.Location = New System.Drawing.Point(24, 77)Me.Label1.Name = ”Label1“ Me.Label1.Size = New System.Drawing.Size(88, 24)Me.Label1.TabIndex = 0 Me.Label1.Text = ”出發(fā)城市“'

      'Button1 ' Me.Button1.Font = New System.Drawing.Font(”宋體“, 10.5!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))Me.Button1.Location = New System.Drawing.Point(104, 360)Me.Button1.Name = ”Button1“ Me.Button1.Size = New System.Drawing.Size(104, 40)Me.Button1.TabIndex = 1 Me.Button1.Text = ”保存“ 'Button2 Me.Button2.Font = New System.Drawing.Font(”宋體“, 10.5!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))Me.Button2.Location = New System.Drawing.Point(280, 360)Me.Button2.Name = ”Button2“ Me.Button2.Size = New System.Drawing.Size(104, 40)Me.Button2.TabIndex = 2 Me.Button2.Text = ”返回“ '

      '航線信息

      ' Me.AutoScaleBaseSize = New System.Drawing.Size(6, 14)Me.ClientSize = New System.Drawing.Size(504, 414)Me.Controls.Add(Me.Button2)Me.Controls.Add(Me.Button1)Me.Controls.Add(Me.GroupBox1)Me.Icon = CType(resources.GetObject(”$this.Icon“), System.Drawing.Icon)Me.Name = ”航線信息“ Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent Me.Text = ”航線信息“ Me.GroupBox1.ResumeLayout(False)Me.GroupBox1.PerformLayout()Me.ResumeLayout(False)End Sub #End Region Private Sub 航線信息_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)Handles MyBase.Load ct = 31 class1.init()TextBox9.Focus()If(mytemp = 0)Then Button1.Text = ”添加“ Else Button1.Text = ”修改“ End If Dim ds As DataSet Dim con As String Dim count, i As Integer con = ”select * from airlineinfo“ ds = class1.query(con)count = ds.Tables(0).Rows.Count For i = 0 To count-2 class1.dr = ds.Tables(0).Rows(i)ComboBox1.Items.Add(Trim(CStr(class1.dr(”航班日期“))))Next End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)Handles Button1.Click Dim con As String Dim con1 As String Dim ano, dd, dt, at, pno, cp, cap, fp As String Dim dc, ac, am As String Dim signe As Integer = 1 ano = TextBox9.Text dc = TextBox1.Text ac = TextBox2.Text dd = ComboBox1.Text pno = TextBox10.Text dt = TextBox3.Text at = TextBox4.Text cp = TextBox5.Text cap = TextBox6.Text fp = TextBox7.Text am = TextBox8.Text con = ”select * from airlineinfo where 航線編號='“ + TextBox9.Text + ”'“ Dim ds As DataSet Try ds = class1.query(con)Catch ex As Exception MessageBox.Show(ex.Message)End Try Try If(ds.Tables(0).Rows.Count > 0 And mytemp = 0)Then class1.dr = ds.Tables(0).Rows(0)If class1.dr(”航線編號“)> 0 Then MsgBox(”已存在該航線!“)TextBox9.Focus()signe = 0 End If End If Catch ex As Exception MessageBox.Show(ex.Message)End Try If TextBox9.Text = ”“ Then MsgBox(”航線編號不能為空!“)TextBox9.Focus()ElseIf(signe = 1 Or mytemp = 1)Then con1 = ”delete from airlineinfo where 航線編號='“ + TextBox9.Text + ”'“ con = ”insert into airlineinfo values('“ + ano + ”','“ + dc + ”','“ + ac + ”','“ + dd + ”','“ + dt + ”','“ + at + ”','“ + pno + ”','“ + cp + ”','“ + cap + ”','“ + fp + ”','“ + am + ”')“ Try class1.delete(con1)Catch ex As Exception MessageBox.Show(ex.Message)End Try Try class1.update(con)If(mytemp = 0)Then MsgBox(”添加成功!“)End If If(mytemp = 1)Then MsgBox(”修改成功!“)End If Catch ex As Exception MessageBox.Show(ex.Message)End Try TextBox1.Text = ”“ TextBox2.Text = ”“ TextBox3.Text = ”“ TextBox4.Text = ”“ TextBox5.Text = ”“ TextBox6.Text = ”“ TextBox7.Text = ”“ TextBox8.Text = ”“ TextBox9.Text = ”“ ComboBox1.Text = ”“ TextBox10.Text = ”“ End If End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)Handles Button2.Click Me.Close()End Sub Private Sub GroupBox1_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs)Handles GroupBox1.Enter End Sub End Class 添加用戶代碼:

      Public Class 添加用戶

      Inherits System.Windows.Forms.Form #Region ” Windows 窗體設(shè)計器生成的代碼“ Public Sub New()MyBase.New()'該調(diào)用是Windows 窗體設(shè)計器所必需的。InitializeComponent()'在InitializeComponent()調(diào)用之后添加任何初始化

      End Sub '窗體重寫dispose 以清理組件列表。

      Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)If disposing Then If Not(components Is Nothing)Then components.Dispose()End If End If MyBase.Dispose(disposing)End Sub

      'Windows 窗體設(shè)計器所必需的

      Private components As System.ComponentModel.IContainer '注意: 以下過程是Windows 窗體設(shè)計器所必需的'可以使用Windows 窗體設(shè)計器修改此過程。

      '不要使用代碼編輯器修改它。

      Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents Label2 As System.Windows.Forms.Label Friend WithEvents Label3 As System.Windows.Forms.Label Friend WithEvents Label4 As System.Windows.Forms.Label Friend WithEvents TextBox1 As System.Windows.Forms.TextBox Friend WithEvents TextBox2 As System.Windows.Forms.TextBox Friend WithEvents TextBox3 As System.Windows.Forms.TextBox Friend WithEvents TextBox4 As System.Windows.Forms.TextBox Friend WithEvents Button1 As System.Windows.Forms.Button Friend WithEvents Button2 As System.Windows.Forms.Button Private Sub InitializeComponent()Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(添加用戶))Me.Label1 = New System.Windows.Forms.Label Me.Label2 = New System.Windows.Forms.Label Me.Label3 = New System.Windows.Forms.Label Me.Label4 = New System.Windows.Forms.Label Me.TextBox1 = New System.Windows.Forms.TextBox Me.TextBox2 = New System.Windows.Forms.TextBox Me.TextBox3 = New System.Windows.Forms.TextBox Me.TextBox4 = New System.Windows.Forms.TextBox Me.Button1 = New System.Windows.Forms.Button Me.Button2 = New System.Windows.Forms.Button Me.SuspendLayout()'Label1' Me.Label1.Font = New System.Drawing.Font(”宋體“, 10.5!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))Me.Label1.Location = New System.Drawing.Point(55, 33)Me.Label1.Name = ”Label1“ Me.Label1.Size = New System.Drawing.Size(100, 23)Me.Label1.TabIndex = 0 Me.Label1.Text = ”用戶名“ '

      'Label2 Me.Label2.Font = New System.Drawing.Font(”宋體“, 10.5!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))Me.Label2.Location = New System.Drawing.Point(55, 84)Me.Label2.Name = ”Label2“ Me.Label2.Size = New System.Drawing.Size(100, 23)Me.Label2.TabIndex = 1 Me.Label2.Text = ”姓名“ 'Label3 Me.Label3.Font = New System.Drawing.Font(”宋體“, 10.5!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))Me.Label3.Location = New System.Drawing.Point(55, 121)Me.Label3.Name = ”Label3“ Me.Label3.Size = New System.Drawing.Size(100, 23)Me.Label3.TabIndex = 2 Me.Label3.Text = ”新密碼“ 'Label4 Me.Label4.Font = New System.Drawing.Font(”宋體“, 10.5!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))Me.Label4.Location = New System.Drawing.Point(55, 168)Me.Label4.Name = ”Label4“ Me.Label4.Size = New System.Drawing.Size(100, 23)Me.Label4.TabIndex = 3 Me.Label4.Text = ”確認(rèn)密碼“ 'TextBox1 Me.TextBox1.Location = New System.Drawing.Point(224, 32)Me.TextBox1.Name = ”TextBox1“ Me.TextBox1.Size = New System.Drawing.Size(100, 21)Me.TextBox1.TabIndex = 4 'TextBox2 Me.TextBox2.Location = New System.Drawing.Point(224, 72)Me.TextBox2.Name = ”TextBox2“ Me.TextBox2.Size = New System.Drawing.Size(100, 21)Me.TextBox2.TabIndex = 5 'TextBox3 Me.TextBox3.Location = New System.Drawing.Point(224, 120)Me.TextBox3.Name = ”TextBox3“ Me.TextBox3.PasswordChar = Global.Microsoft.VisualBasic.ChrW(42)Me.TextBox3.Size = New System.Drawing.Size(100, 21)Me.TextBox3.TabIndex = 6 'TextBox4 Me.TextBox4.Location = New System.Drawing.Point(224, 168)Me.TextBox4.Name = ”TextBox4“ Me.TextBox4.PasswordChar = Global.Microsoft.VisualBasic.ChrW(42)Me.TextBox4.Size = New System.Drawing.Size(100, 21)Me.TextBox4.TabIndex = 7'

      'Button1 ' Me.Button1.Font = New System.Drawing.Font(”宋體“, 10.5!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))Me.Button1.Location = New System.Drawing.Point(48, 208)Me.Button1.Name = ”Button1“ Me.Button1.Size = New System.Drawing.Size(88, 40)Me.Button1.TabIndex = 8 Me.Button1.Text = ”確定“ 'Button2 Me.Button2.Font = New System.Drawing.Font(”宋體“, 10.5!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))Me.Button2.Location = New System.Drawing.Point(240, 208)Me.Button2.Name = ”Button2“ Me.Button2.Size = New System.Drawing.Size(88, 40)Me.Button2.TabIndex = 9 Me.Button2.Text = ”取消“ '添加用戶 ' Me.AutoScaleBaseSize = New System.Drawing.Size(6, 14)Me.ClientSize = New System.Drawing.Size(392, 270)Me.Controls.Add(Me.Button2)Me.Controls.Add(Me.Button1)Me.Controls.Add(Me.TextBox4)Me.Controls.Add(Me.TextBox3)Me.Controls.Add(Me.TextBox2)Me.Controls.Add(Me.TextBox1)Me.Controls.Add(Me.Label4)Me.Controls.Add(Me.Label3)Me.Controls.Add(Me.Label2)Me.Controls.Add(Me.Label1)Me.Icon = CType(resources.GetObject(”$this.Icon“), System.Drawing.Icon)Me.Name = ”添加用戶“ Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent Me.Text = ”添加用戶“ Me.ResumeLayout(False)Me.PerformLayout()End Sub #End Region Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)Handles Button1.Click class1.init()Dim con As String Dim user, name As String Dim pw1, pw2 As String Dim ds As DataSet Dim signe As Integer = 1 user = TextBox1.Text name = TextBox2.Text pw1 = TextBox3.Text pw2 = TextBox4.Text con = ”select * from users where id='“ + TextBox1.Text + ”'“ ds = class1.query(con)Try If(ds.Tables(0).Rows.Count > 0)Then class1.dr = ds.Tables(0).Rows(0)If class1.dr(”id“)<> ”“ Then MsgBox(”已存在用戶!“)TextBox1.SelectAll()TextBox1.Focus()TextBox2.Clear()TextBox3.Clear()TextBox4.Clear()signe = 0 End If End If Catch ex As Exception MessageBox.Show(ex.Message)End Try If(TextBox3.Text <> TextBox4.Text)Then MessageBox.Show(”密碼不一致,請重新確認(rèn)“, ”提示“)TextBox3.SelectAll()TextBox3.Focus()TextBox4.Clear()signe = 0 End If If Trim(TextBox1.Text)= ”“ Then MsgBox(”用戶名不能為空!“)Exit Sub TextBox1.Focus()ElseIf(signe = 1)Then con = ”insert into users values('“ + user + ”','“ + pw2 + ”','“ + name + ”','null')“ class1.insert(con)MsgBox(”添加成功!")End If End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)Handles Button2.Click Me.Close()End Sub Private Sub 添加用戶_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)Handles MyBase.Load ct = 0 End Sub

      End Class

      第四篇:航空售票系統(tǒng)數(shù)據(jù)庫分析表

      flight

      1.用戶表:user

      用戶編號:userid int 自動增長 主鍵 用戶名 username varchar(20)密碼

      password varchar(20)類型

      usertype varchar(10)登錄時間 logintime datetime 2.航空公司表 company

      公司編號 companyid int 自動增長 主鍵 航空公司名稱 companyname varchar(50)3.機(jī)場表 airport

      機(jī)場編號:airportid int 自動增長 主鍵 機(jī)場代碼:airportcode varchar(20)機(jī)場名稱:airportname varchar(50)4.航班信息表 flight

      航班編號:flightid nt 自動增長 主鍵 航班代號:flightcode varchar(20)所屬航空公司:company int 日期:flightdate datetime 起飛時間:flytime datetime 到達(dá)時間:landtime datetime 起飛機(jī)場:flyairport int 到達(dá)機(jī)場:landairport int 頭等艙價格:firstprice money 公務(wù)艙價格:secondprice money 經(jīng)濟(jì)艙價格:thirdprice money 機(jī)型:planetype varchar(20)

      第五篇:航空售票系統(tǒng)+C++課程設(shè)計源代碼

      #include #include #define M 5//每種飛機(jī)票的總數(shù)目 #define N 3//飛機(jī)票的總數(shù)目 class Plane {private: char name[40];//終點站名

      int number;//航班號

      int Number;//飛機(jī)號

      int week;//星期幾飛行

      int day;//日期

      int left;//余票額

      int n;//與數(shù)組flag一起確定客戶訂票狀態(tài) public:

      int flag[20];//訂票狀態(tài)數(shù)組,-1為預(yù)訂票,1為已定票,0為初始化狀態(tài)

      Plane()//構(gòu)造函數(shù)

      {

      name[0]='