12 2017 档案

摘要:private void btnlogin_Click(object sender, EventArgs e) { //登录按钮事件 try { //判断最后登录时间 是不是今天 string s5 = "select ... 阅读全文
posted @ 2017-12-27 17:26 你的斗志并没有失去 阅读(303) 评论(0) 推荐(0)
摘要:新建一个winfrom窗体应用程序,为程序添加配置文件App.config,然后在配置文件中添加数据库连接字符串 using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Configuration; using System.D... 阅读全文
posted @ 2017-12-12 10:16 你的斗志并没有失去 阅读(1878) 评论(0) 推荐(0)
摘要: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.... 阅读全文
posted @ 2017-12-12 10:03 你的斗志并没有失去 阅读(167) 评论(0) 推荐(0)
摘要://获取用户输入的用户名和密码 string userName=txtuserName.Text.Trim(); string pwd=txtPwd.Text.Trim(); //设置数据库连接 string strCon = "Server=PC-20161029WDCV\\SQL2014;Database=StudentDB;Trusted_Connection=True"; ... 阅读全文
posted @ 2017-12-12 09:45 你的斗志并没有失去 阅读(126) 评论(0) 推荐(0)
摘要://定义一个需要访问的数据库的信息 string strCon = "Server=PC-20161029WDCV\\SQL2014;Database=StudentDB;Trusted_Connection=True"; SqlConnection con = new SqlConnection(strCon); con.open(); //把sql语句换成删除和更新,即可实现删除和更新操... 阅读全文
posted @ 2017-12-12 09:22 你的斗志并没有失去 阅读(138) 评论(0) 推荐(0)
摘要:1.自动绑定列 //定义一个需要访问的数据库的信息 string strCon = "Server=PC-20161029WDCV\\SQL2014;Database=StudentDB;Trusted_Connection=True"; SqlConnection con = new SqlConnection(strCon); //打开数据库连接 con.Open(); string ... 阅读全文
posted @ 2017-12-12 09:14 你的斗志并没有失去 阅读(608) 评论(0) 推荐(0)