自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(0)
  • 资源 (2)
  • 收藏
  • 关注

空空如也

JSP文件管理

String strParentFolder = "上级目录"; String strCurrentFolder = "当前目录"; String strDrivers = "驱动器"; String strFileName = "文件名称"; String strFileOperation = "文件操作"; String strFileDown = "下载"; String strBack = "返回"; String strFileSave = "保存"; String strFileDel = "删除";

2017-10-02

图书管理系统

private void button1_Click(object sender, EventArgs e) { if (textBox1.Text.Trim() == "" || textBox2.Text.Trim() == "" || textBox3.Text.Trim() == "" || textBox4.Text.Trim() == "" || textBox5.Text.Trim() == "" || textBox6.Text.Trim() == "") { MessageBox.Show("数据不完整! 请重新输入"); return; } SqlConnection conn = new SqlConnection(strcon); string sql = "INSERT INTO View_1 VALUES(" + textBox1.Text.Trim() + ",'" + textBox2.Text.Trim() + "'," + textBox3.Text.Trim() + "," + textBox4.Text.Trim() + ",'" + textBox5.Text.Trim() + "','" + textBox6.Text.Trim() + "')"; SqlCommand cmd = new SqlCommand(sql, conn); SqlParameter xuhao = new SqlParameter("@in_xuhao", SqlDbType.Int); xuhao.Direction = ParameterDirection.Input; xuhao.Value = textBox1.Text.Trim(); cmd.Parameters.Add(xuhao); SqlParameter Tit = new SqlParameter("@in_Tit", SqlDbType.Char, 30); Tit.Direction = ParameterDirection.Input; Tit.Value = textBox2.Text.Trim(); cmd.Parameters.Add(Tit); SqlParameter price = new SqlParameter("@in_price", SqlDbType.Int); price.Direction = ParameterDirection.Input; price.Value = textBox3.Text.Trim(); cmd.Parameters.Add(price); SqlParameter number = new SqlParameter("@in_number", SqlDbType.Int); number.Direction = ParameterDirection.Input; number.Value = textBox4.Text.Trim(); cmd.Parameters.Add(number); SqlParameter press = new SqlParameter("@in_press", SqlDbType.Char, 30); press.Direction = ParameterDirection.Input; press.Value = textBox5.Text.Trim(); cmd.Parameters.Add(press); SqlParameter Huang = new SqlParameter("@in_Huang", SqlDbType.Char, 10); Huang.Direction = ParameterDirection.Input; Huang.Value = textBox6.Text.Trim(); cmd.Parameters.Add(Huang); try { conn.Open(); int a = cmd.ExecuteNonQuery(); if (a != 0) { MessageBox.Show("添加成功"); } } catch { MessageBox.Show("添加出错!"); } finally { conn.Close(); } }

2017-10-02

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除