汽车美容管理系统(4)

2019-03-02 22:55

4.2.2 登记收费模块

登记收费界面实现收费管理。程序运行结果如图4.4所示。

图4.4登记收费模块

主要的功能代码如下:

private void button1_Click(object sender, EventArgs e) {

if (textBox1.Text == \请输入ID!\

else if (textBox2.Text == \请输入车辆ID!\ else if (textBox3.Text == \请输入项目!\ else if (textBox4.Text == \请输入日期!\ else { try

{ string strconn = \Security=True\

string sql2 = \into record values('\+ textBox1.Text + \+ textBox2.Text + \ connection.Open();

SqlCommand command2 = new SqlCommand(sql2, connection); command2.ExecuteNonQuery(); connection.Close(); showlist();

textBox1.Text = textBox2.Text = textBox3.Text = textBox4.Text=\ }

catch (Exception ex) {

MessageBox.Show(\登记错误!\ } } }

14

4.4客户管理模块

4.4.1 客户信息模块

客户信息界面实现客户信息查询功能。程序运行结果如图4.5所示。

图4.5客户信息模块

主要的功能代码如下:

private void button1_Click(object sender, EventArgs e) {

string cha= \

if (comboBox1.Text == \姓名\ if (comboBox1.Text == \性别\ if (comboBox1.Text == \年龄\ if (comboBox1.Text == \联系方式\ if (comboBox1.Text == \地址\ string strconn, strsql;

strconn = \ strsql = \姓名,sex as 性别,age as 年龄 ,tel as 联系方式, addr as 地址 from customer where \ SqlConnection myconn = new SqlConnection(strconn); SqlDataAdapter myda = new SqlDataAdapter(strsql, myconn); DataSet myds = new DataSet(); myda.Fill(myds, \

dataGridView1.DataSource = myds.Tables[\ }

15

4.4.2 新增客户模块

登陆界面实现管理员登录。程序运行结果如图4.6所示。

图4.6新增客户模块

主要的功能代码如下:

private void button1_Click(object sender, EventArgs e) {

if (textBox1.Text == \请输入ID!\ else if (textBox2.Text == \请输入姓名!\ else if (textBox3.Text == \请输入性别!\ else if (textBox4.Text == \请输入年龄!\ else if (textBox5.Text == \请输入联系方式!\ else if (textBox6.Text == \请输入地址!\ else { try {

string strconn = \Security=True\

SqlConnection connection = new SqlConnection(strconn );

string sql2 = \textBox1.Text + \textBox5.Text + \ connection.Open();

SqlCommand command2 = new SqlCommand(sql2, connection); command2.ExecuteNonQuery(); connection.Close(); showlist();

16

textBox1.Text = textBox2.Text = textBox3.Text = textBox4.Text = textBox5.Text = textBox6.Text = \ }

catch (Exception ex) {

MessageBox.Show(\添加错误!\ } } }

4.4.3客户修改模块

登陆界面实现管理员登录。程序运行结果如图4.7所示。

图4.7客户修改模块

主要的功能代码如下:

private void button1_Click(object sender, EventArgs e) {

if (textBox1.Text == \请输入ID!\

else if (textBox2.Text == \请输入修改值!\ else if (comboBox1.Text == \请输入修改项!\ else { try {

string cha = \

if (comboBox1.Text == \姓名\

17

if (comboBox1.Text == \性别\ if (comboBox1.Text == \年龄\ if (comboBox1.Text == \联系方式\ if (comboBox1.Text == \地址\

string strconn = \Security=True\

SqlConnection connection = new SqlConnection(strconn);

string sql2 = \='\

connection.Open();

SqlCommand command2 = new SqlCommand(sql2, connection); command2.ExecuteNonQuery(); connection.Close(); showlist();

textBox1.Text=textBox2.Text = \ }

catch (Exception ex) {

MessageBox.Show(\修改错误!\ } } }

4.4.4客户删除模块

登陆界面实现管理员登录。程序运行结果如图4.8所示。

图4.8客户删除模块

18


汽车美容管理系统(4).doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:新疆兵团上市公司与地方上市公司的财务风险差异研究

相关阅读
本类排行
× 注册会员免费下载(下载后可以自由复制和排版)

马上注册会员

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: