日期:2014-05-17  浏览次数:20833 次

C#编机票预订系统的问题

代码如下:
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.Windows.Forms;

namespace 航空机票预订管理系统
{
    public partial class booking : Form
    {
        LinkDatabase link = new LinkDatabase();
        public booking()
        {
            InitializeComponent();
        }
        private bool checkEmpty()
        {
            bool result=true;
            if(addTno.Text.Trim()==string.Empty)
                result=false;
            else if(Pno.Text.Trim()==string.Empty)
                result=false;
            else if(Pseat.Text.Trim()==string.Empty)
                result=false;
            else if(Pleave.Text.Trim()==string.Empty)
                result=false;
            else if(Parrive.Text.Trim()==string.Empty)
                result=false;
            else if(Ptime.Text.Trim()==string.Empty)
                result=false;
            else if(Cname.Text.Trim()==string.Empty)
                result=false;
            else if(Csex.Text.Trim()==string.Empty)
                result=false;
            else if(Cno.Text.Trim()==string.Empty)
                result=false;
            else if(Ctele.Text.Trim()==string.Empty)
                result=false;
            else if(Ttime.Text.Trim()==string.Empty)
                result=false;
            else if(Tsum.Text.Trim()==string.Empty)
             &n