资源简介
c#期末实验,自己设计的失物招领系统,数据库采用sqlserver2017版本,代码vs2017版本
代码片段和文件信息
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\.vs\WindowsFormsApplication1\v15\.suo
文件 0 2018-06-05 15:18 失物招领\WindowsFormsApplication1\.vs\WindowsFormsApplication1\v15\Server\sqlite3\db.lock
文件 647168 2018-12-29 11:57 失物招领\WindowsFormsApplication1\.vs\WindowsFormsApplication1\v15\Server\sqlite3\storage.ide
文件 914944 2018-12-29 11:38 失物招领\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.exe
文件 85504 2018-12-29 11:38 失物招领\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.pdb
文件 11600 2018-06-25 10:29 失物招领\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.vshost.exe
文件 490 2018-04-12 07:35 失物招领\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.vshost.exe.manifest
文件 140288 2018-12-29 11:38 失物招领\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\zh-CN\WindowsFormsApplication1.resources.dll
文件 4728 2018-07-02 09:09 失物招领\WindowsFormsApplication1\WindowsFormsApplication1\Form1.cs
文件 12293 2018-07-02 09:09 失物招领\WindowsFormsApplication1\WindowsFormsApplication1\Form1.Designer.cs
文件 206300 2018-07-02 09:09 失物招领\WindowsFormsApplication1\WindowsFormsApplication1\Form1.resx
文件 1168 2018-07-02 08:54 失物招领\WindowsFormsApplication1\WindowsFormsApplication1\Form2.cs
文件 5973 2018-07-02 08:54 失物招领\WindowsFormsApplication1\WindowsFormsApplication1\Form2.Designer.cs
文件 206300 2018-07-02 08:54 失物招领\WindowsFormsApplication1\WindowsFormsApplication1\Form2.resx
文件 2703 2018-07-02 08:54 失物招领\WindowsFormsApplication1\WindowsFormsApplication1\Form3.cs
文件 8127 2018-07-02 08:54 失物招领\WindowsFormsApplication1\WindowsFormsApplication1\Form3.Designer.cs
文件 68244 2018-07-02 08:54 失物招领\WindowsFormsApplication1\WindowsFormsApplication1\Form3.resx
文件 19141 2018-07-03 15:16 失物招领\WindowsFormsApplication1\WindowsFormsApplication1\Form4.cs
文件 35527 2018-07-03 15:16 失物招领\WindowsFormsApplication1\WindowsFormsApplication1\Form4.Designer.cs
文件 206300 2018-07-03 15:16 失物招领\WindowsFormsApplication1\WindowsFormsApplication1\Form4.resx
文件 4942 2018-07-02 09:05 失物招领\WindowsFormsApplication1\WindowsFormsApplication1\Form5.cs
文件 8046 2018-07-02 08:54 失物招领\WindowsFormsApplication1\WindowsFormsApplication1\Form5.Designer.cs
文件 223630 2018-07-02 08:54 失物招领\WindowsFormsApplication1\WindowsFormsApplication1\Form5.resx
文件 207721 2018-06-25 10:28 失物招领\WindowsFormsApplication1\WindowsFormsApplication1\Form5.zh-CN.resx
文件 4178 2018-07-03 15:20 失物招领\WindowsFormsApplication1\WindowsFormsApplication1\Form6.cs
文件 10557 2018-07-03 15:19 失物招领\WindowsFormsApplication1\WindowsFormsApplication1\Form6.Designer.cs
文件 206300 2018-07-03 15:19 失物招领\WindowsFormsApplication1\WindowsFormsApplication1\Form6.resx
文件 4890 2018-07-02 08:54 失物招领\WindowsFormsApplication1\WindowsFormsApplication1\Form7.cs
............此处省略52个文件信息
- 上一篇:库存管理源码,有需要的请!
- 下一篇:C#打印-全部打印源码
相关资源
- C#打印-全部打印源码
- 库存管理源码,有需要的请!
- 权限管理系统(C# +SQL SERVER)
- C# 学生管理系统 ( 简洁版 ).zip
- 非常简单的坦克大战.zip
- C#+数据库
- C# 生成二维码名片 实例源码174850
- asp.net(C#+SqlServer)编写图书借阅系统
- AE+C#实现最短路径源码与程序
- npoi的excel读写代码C#实现,并用winfo
- 基于C#的多目标优化问题,其中包含各
- C#图书馆管理系统课程设计+课程报告
- c#图书管理系统 SQL Server数据库
- c#教务管理系统
- C#Winform使用NPOI导入Excel数据
- asp.net网上报名系统
- c#中串口接收数据并且生成EXCEL
- ASP.NET C#服装销售管理系统 代码 论文
- TabControl重绘添加关闭按钮与Treeview导
- C#题库管理系统
- c#asp.net表格Html数据模板转换Pdf文件
- 微软c# chart控件 全部
- c#+sql 酒店客房管理系统+系统开发要求
- C#爬虫实现网盘资源搜索
- C#毕业生信息管理系统
- 人事工资管理系统
- C#人事管理系统(winform版)功能独特
- Sharpmap GIS C#开发的Map渲染类库
- C#航班简单操作系统
-
C# 3层架构操作xm
l文件(增删改查)
评论
共有 条评论