输入身份证号
点击查询,信息输出
信息错误 对输出的乘客进行核实
确认信息
订票
代码如下:
using System;
using System.Collections.Generic; using System.ComponentModel; using System.Data;
using System.Drawing; using System.Linq; using System.Text;
using System.Windows.Forms; using System.Data.SqlClient;
namespace plant {
public partial class Form3 : Form {
public Form3() {
InitializeComponent(); }
private void button3_Click(object sender, EventArgs e) {
string conStr = \Source=GAO-PC\\\\SQL2005;Initial Catalog=plant;User ID=sa;Password=aa\;
SqlConnection conn = new SqlConnection(conStr); conn.Open();
string sql = \ * from 客í户§ where 身Θ??='\ + number.Text + \;
SqlDataAdapter cmd = new SqlDataAdapter(sql, conn); DataSet ds = new System.Data.DataSet();
cmd.Fill(ds, \);
dataGridView1.DataSource = ds;
dataGridView1.DataMember = ds.Tables[\].ToString(); conn.Close(); } } }
【新乘客注册】方式;
a跳转到该界面;
b输入相关信息之后,包括客户姓名,客户性别,身份证号;联系电话。客户类型等;
c将信息输入到数据库中
输入基本信息
点击确认
将信息插入到数据库中
订票
代码如下:
using System;
using System.Collec