c#实验 失物招领系统
c#期末实验,自己设计的失物招领系统,数据库采用sqlserver2017版本,代码vs2017版本
代码片段和文件信息
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 4194304 2018-07-06 16:12 失物招领swzl1.mdf
文件 3538944 2018-07-06 16:12 失物招领swzl1_log.ldf
..A..H. 60928 2018-12-29 11:57 失物招领WindowsFormsApplication1.vsWindowsFormsApplication1v15.suo
文件 0 2018-06-05 15:18 失物招领WindowsFormsApplication1.vsWindowsFormsApplication1v15Serversqlite3db.lock
文件 647168 2018-12-29 11:57 失物招领WindowsFormsApplication1.vsWindowsFormsApplication1v15Serversqlite3storage.ide
文件 914944 2018-12-29 11:38 失物招领WindowsFormsApplication1WindowsFormsApplication1inDebugWindowsFormsApplication1.exe
文件 85504 2018-12-29 11:38 失物招领WindowsFormsApplication1WindowsFormsApplication1inDebugWindowsFormsApplication1.pdb
文件 11600 2018-06-25 10:29 失物招领WindowsFormsApplication1WindowsFormsApplication1inDebugWindowsFormsApplication1.vshost.exe
文件 490 2018-04-12 07:35 失物招领WindowsFormsApplication1WindowsFormsApplication1inDebugWindowsFormsApplication1.vshost.exe.manifest
文件 140288 2018-12-29 11:38 失物招领WindowsFormsApplication1WindowsFormsApplication1inDebugzh-CNWindowsFormsApplication1.resources.dll
文件 4728 2018-07-02 09:09 失物招领WindowsFormsApplication1WindowsFormsApplication1Form1.cs
文件 12293 2018-07-02 09:09 失物招领WindowsFormsApplication1WindowsFormsApplication1Form1.Designer.cs
文件 206300 2018-07-02 09:09 失物招领WindowsFormsApplication1WindowsFormsApplication1Form1.resx
文件 1168 2018-07-02 08:54 失物招领WindowsFormsApplication1WindowsFormsApplication1Form2.cs
文件 5973 2018-07-02 08:54 失物招领WindowsFormsApplication1WindowsFormsApplication1Form2.Designer.cs
文件 206300 2018-07-02 08:54 失物招领WindowsFormsApplication1WindowsFormsApplication1Form2.resx
文件 2703 2018-07-02 08:54 失物招领WindowsFormsApplication1WindowsFormsApplication1Form3.cs
文件 8127 2018-07-02 08:54 失物招领WindowsFormsApplication1WindowsFormsApplication1Form3.Designer.cs
文件 68244 2018-07-02 08:54 失物招领WindowsFormsApplication1WindowsFormsApplication1Form3.resx
文件 19141 2018-07-03 15:16 失物招领WindowsFormsApplication1WindowsFormsApplication1Form4.cs
文件 35527 2018-07-03 15:16 失物招领WindowsFormsApplication1WindowsFormsApplication1Form4.Designer.cs
文件 206300 2018-07-03 15:16 失物招领WindowsFormsApplication1WindowsFormsApplication1Form4.resx
文件 4942 2018-07-02 09:05 失物招领WindowsFormsApplication1WindowsFormsApplication1Form5.cs
文件 8046 2018-07-02 08:54 失物招领WindowsFormsApplication1WindowsFormsApplication1Form5.Designer.cs
文件 223630 2018-07-02 08:54 失物招领WindowsFormsApplication1WindowsFormsApplication1Form5.resx
文件 207721 2018-06-25 10:28 失物招领WindowsFormsApplication1WindowsFormsApplication1Form5.zh-CN.resx
文件 4178 2018-07-03 15:20 失物招领WindowsFormsApplication1WindowsFormsApplication1Form6.cs
文件 10557 2018-07-03 15:19 失物招领WindowsFormsApplication1WindowsFormsApplication1Form6.Designer.cs
文件 206300 2018-07-03 15:19 失物招领WindowsFormsApplication1WindowsFormsApplication1Form6.resx
文件 4890 2018-07-02 08:54 失物招领WindowsFormsApplication1WindowsFormsApplication1Form7.cs
............此处省略52个文件信息
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 WindowsFormsApplication1
{
public partial class Form1 : Form
{
public static string zhanghao;
public static string mima;
public Form1()
{
InitializeComponent();
}
private void button3_Click(object sender EventArgs e)
{
if (radioButton1.Checked)
{
string str;
string sel;
SqlCommand cmd;
SqlDataAdapter da;
DataSet ds;
str = “server=.;Initial Catalog=swzl1; Integrated Security=true;“;
SqlConnection conn = new SqlConnection(str);
conn.Open();
sel = “select userIDuserpwd from yh1 where userID=‘“ + textBox1.Text + “‘ and userpwd=‘“ + textBox2.Text + “‘“;
cmd = new SqlCommand(sel conn);
da = new SqlDataAdapter(cmd);
ds = new DataSet();
da.Fill(ds “userID“);
DataTable dt = new DataTable();
if (ds.Tables[0].Rows.Count > 0)
{
Form2 f2 = new Form2();
f2.Show();
zhanghao = textBox1.Text;
mima = textBox2.Text;
this.Hide();
}
else
{
MessageBox.Show(“信息错误“ “提示“ MessageBoxButtons.OKCancel);
textBox1.Text = ““;
textBox2.Text = ““;}
}
else if (radioButton2.Checked)
{
string str1;
string sel1;
SqlCommand cmd1;
SqlDataAdapter da1;
DataSet ds1;
str1 = “server=.;Initial Catalog=swzl1; Integrated Security=true;“;
SqlConnection conn1 = new SqlConnection(str1);
conn1.Open();
sel1 = “select admIDadmpwd from gly where admID =‘“ + textBox1.Text + “‘ and admpwd=‘“ + textBox2.Text + “‘“;
cmd1 = new SqlCommand(sel1 conn1);
da1 = new SqlDataAdapter(cmd1);
ds1 = new DataSet();
da1.Fill(ds1 “admID“);
DataTable dt1 = new DataTable();
if (ds1.Tables[0].Rows.Count > 0)
{
Form4 f4 = new Form4();
f4.Show();
zhanghao=textBox1.Text;
mima=textBox2.Text;
this.Hide();
}
else
{
MessageBox.Show(“信息错误“ “提示“ MessageBoxButtons.OKCancel);
textBox1.Text = ““;
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 4194304 2018-07-06 16:12 失物招领swzl1.mdf
文件 3538944 2018-07-06 16:12 失物招领swzl1_log.ldf
..A..H. 60928 2018-12-29 11:57 失物招领WindowsFormsApplication1.vsWindowsFormsApplication1v15.suo
文件 0 2018-06-05 15:18 失物招领WindowsFormsApplication1.vsWindowsFormsApplication1v15Serversqlite3db.lock
文件 647168 2018-12-29 11:57 失物招领WindowsFormsApplication1.vsWindowsFormsApplication1v15Serversqlite3storage.ide
文件 914944 2018-12-29 11:38 失物招领WindowsFormsApplication1WindowsFormsApplication1inDebugWindowsFormsApplication1.exe
文件 85504 2018-12-29 11:38 失物招领WindowsFormsApplication1WindowsFormsApplication1inDebugWindowsFormsApplication1.pdb
文件 11600 2018-06-25 10:29 失物招领WindowsFormsApplication1WindowsFormsApplication1inDebugWindowsFormsApplication1.vshost.exe
文件 490 2018-04-12 07:35 失物招领WindowsFormsApplication1WindowsFormsApplication1inDebugWindowsFormsApplication1.vshost.exe.manifest
文件 140288 2018-12-29 11:38 失物招领WindowsFormsApplication1WindowsFormsApplication1inDebugzh-CNWindowsFormsApplication1.resources.dll
文件 4728 2018-07-02 09:09 失物招领WindowsFormsApplication1WindowsFormsApplication1Form1.cs
文件 12293 2018-07-02 09:09 失物招领WindowsFormsApplication1WindowsFormsApplication1Form1.Designer.cs
文件 206300 2018-07-02 09:09 失物招领WindowsFormsApplication1WindowsFormsApplication1Form1.resx
文件 1168 2018-07-02 08:54 失物招领WindowsFormsApplication1WindowsFormsApplication1Form2.cs
文件 5973 2018-07-02 08:54 失物招领WindowsFormsApplication1WindowsFormsApplication1Form2.Designer.cs
文件 206300 2018-07-02 08:54 失物招领WindowsFormsApplication1WindowsFormsApplication1Form2.resx
文件 2703 2018-07-02 08:54 失物招领WindowsFormsApplication1WindowsFormsApplication1Form3.cs
文件 8127 2018-07-02 08:54 失物招领WindowsFormsApplication1WindowsFormsApplication1Form3.Designer.cs
文件 68244 2018-07-02 08:54 失物招领WindowsFormsApplication1WindowsFormsApplication1Form3.resx
文件 19141 2018-07-03 15:16 失物招领WindowsFormsApplication1WindowsFormsApplication1Form4.cs
文件 35527 2018-07-03 15:16 失物招领WindowsFormsApplication1WindowsFormsApplication1Form4.Designer.cs
文件 206300 2018-07-03 15:16 失物招领WindowsFormsApplication1WindowsFormsApplication1Form4.resx
文件 4942 2018-07-02 09:05 失物招领WindowsFormsApplication1WindowsFormsApplication1Form5.cs
文件 8046 2018-07-02 08:54 失物招领WindowsFormsApplication1WindowsFormsApplication1Form5.Designer.cs
文件 223630 2018-07-02 08:54 失物招领WindowsFormsApplication1WindowsFormsApplication1Form5.resx
文件 207721 2018-06-25 10:28 失物招领WindowsFormsApplication1WindowsFormsApplication1Form5.zh-CN.resx
文件 4178 2018-07-03 15:20 失物招领WindowsFormsApplication1WindowsFormsApplication1Form6.cs
文件 10557 2018-07-03 15:19 失物招领WindowsFormsApplication1WindowsFormsApplication1Form6.Designer.cs
文件 206300 2018-07-03 15:19 失物招领WindowsFormsApplication1WindowsFormsApplication1Form6.resx
文件 4890 2018-07-02 08:54 失物招领WindowsFormsApplication1WindowsFormsApplication1Form7.cs
............此处省略52个文件信息
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。
评论列表(条)