资源简介
业务很清晰,结业时的项目,还是很不错的,大家多多支持! 初学者也非常值得下载!可以学习很多东西的!东西都很齐全。。
代码片段和文件信息
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace WindowsFormsApplication1
{
public partial class AddGoods : Form
{
public AddGoods()
{
InitializeComponent();
}
static string sql = @“Data Source=.;Initial Catalog=International Fashion Hotel;Integrated Security=True“;
SqlConnection con = new SqlConnection(sql);
private void label2_Click(object sender EventArgs e)
{
}
private void label1_Click(object sender EventArgs e)
{
}
private void button2_Click(object sender EventArgs e)
{
textBox1.Text = ““;
textBox2.Text = ““;
textBox3.Text = ““;
comboBox1.SelectedIndex = 0;
textBox4.Text = ““;
textBox5.Text = ““;
}
private void button1_Click(object sender EventArgs e)
{
try
{
con.Open();
int name = 0;
if (comboBox1.Text == “槟榔“)
{
name = 3;
}
else if (comboBox1.Text == “食品“)
{
name = 2;
}
else if (comboBox1.Text == “饮料“)
{
name = 4;
}
else if (comboBox1.Text == “烟酒“)
{
name = 1;
}
else if (comboBox1.Text == “日用品“)
{
name = 5;
}
foreach (Control item in Controls)
{
if (item is TextBox)
{
if (item.Text==“请输入正确的值“||item.Text==““)
{
MessageBox.Show(“请填写完整信息“ “提示“ MessageBoxButtons.OK MessageBoxIcon.Asterisk);
return;
}
}
}
if (Convert.ToDouble(textBox2.Text)>Convert.ToDouble(textBox3.Text))
{
MessageBox.Show(“预售价格不能小于进价““提示“MessageBoxButtons.OKMessageBoxIcon.Asterisk);
return;
}
string ii = string.Format(@“insert into GoodsInfo(GoodsName Unit InPrice OutPrice GoodsType Inventory)
values(‘{0}‘‘{1}‘‘{2}‘‘{3}‘‘{4}‘‘{5}‘)“ textBox1.Text textBox5.Text textBox2.Text textBox3.Text name textBox4.Text);
SqlCommand ser = new SqlCommand(ii con);
int yy = (int)ser.ExecuteNonQuery();
if (yy > 0)
{
MessageBox.Show(“添加成功“ “
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 5242880 2018-10-22 08:26 International Fashion Hotel.mdf
文件 1048576 2018-10-22 08:26 International Fashion Hotel_log.ldf
目录 0 2018-09-23 12:40 最终项目!\
文件 13185 2018-08-19 14:24 最终项目!\1806项目功能.xlsx
目录 0 2018-09-05 16:31 最终项目!\International Fashion Hotel\
文件 1041 2018-08-05 15:42 最终项目!\International Fashion Hotel\International Fashion Hotel.sln
文件 360960 2018-10-22 08:25 最终项目!\International Fashion Hotel\International Fashion Hotel.v12.suo
目录 0 2018-10-25 11:59 最终项目!\International Fashion Hotel\WindowsFormsApplication1\
文件 12003 2018-09-21 16:05 最终项目!\International Fashion Hotel\WindowsFormsApplication1\AddGoods.cs
文件 16100 2018-09-21 16:05 最终项目!\International Fashion Hotel\WindowsFormsApplication1\AddGoods.designer.cs
文件 54461 2018-09-21 16:05 最终项目!\International Fashion Hotel\WindowsFormsApplication1\AddGoods.resx
文件 9891 2018-09-21 16:38 最终项目!\International Fashion Hotel\WindowsFormsApplication1\AddRoom.cs
文件 15912 2018-09-21 16:38 最终项目!\International Fashion Hotel\WindowsFormsApplication1\AddRoom.designer.cs
文件 84217 2018-09-21 16:38 最终项目!\International Fashion Hotel\WindowsFormsApplication1\AddRoom.resx
文件 4256 2018-09-21 16:07 最终项目!\International Fashion Hotel\WindowsFormsApplication1\AddRoomType.cs
文件 9283 2018-09-21 16:07 最终项目!\International Fashion Hotel\WindowsFormsApplication1\AddRoomType.designer.cs
文件 13668 2018-09-21 16:07 最终项目!\International Fashion Hotel\WindowsFormsApplication1\AddRoomType.resx
文件 10052 2018-09-21 16:08 最终项目!\International Fashion Hotel\WindowsFormsApplication1\AddStaff.cs
文件 15352 2018-09-21 16:08 最终项目!\International Fashion Hotel\WindowsFormsApplication1\AddStaff.designer.cs
文件 13668 2018-09-21 16:08 最终项目!\International Fashion Hotel\WindowsFormsApplication1\AddStaff.resx
文件 9186 2018-09-21 16:09 最终项目!\International Fashion Hotel\WindowsFormsApplication1\AddVip.cs
文件 18497 2018-09-21 16:09 最终项目!\International Fashion Hotel\WindowsFormsApplication1\AddVip.designer.cs
文件 51209 2018-09-21 16:09 最终项目!\International Fashion Hotel\WindowsFormsApplication1\AddVip.resx
文件 187 2018-08-05 15:42 最终项目!\International Fashion Hotel\WindowsFormsApplication1\App.config
目录 0 2018-09-05 16:31 最终项目!\International Fashion Hotel\WindowsFormsApplication1\bin\
目录 0 2018-10-25 11:56 最终项目!\International Fashion Hotel\WindowsFormsApplication1\bin\Debug\
文件 2738176 2016-05-18 18:13 最终项目!\International Fashion Hotel\WindowsFormsApplication1\bin\Debug\CSkin.dll
文件 3559424 2018-10-22 08:25 最终项目!\International Fashion Hotel\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.exe
文件 187 2018-08-05 15:42 最终项目!\International Fashion Hotel\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.exe.config
文件 679424 2018-10-22 08:25 最终项目!\International Fashion Hotel\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.pdb
文件 24224 2018-10-22 08:25 最终项目!\International Fashion Hotel\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.vshost.exe
............此处省略190个文件信息
- 上一篇:北大青鸟KTV点歌系统项目
- 下一篇:air_data.csv
评论
共有 条评论