- 3
- 0
- 约4.98千字
- 约 4页
- 2017-06-07 发布于重庆
- 举报
C连连看登陆代码
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.OleDb;
//using System.SqlConnection;
//using System.SqlCommand;
namespace LLKAN
{
public partial class Form1 : Form
{
//动态登陆
// public static Boolean access;
// string connstring = Server=(local);Database=business;Integrated Security=SSPI;User ID=Employee;Password=nbyg;
// public string SinSerch(string Sqlchar)
// {
// SqlConnection conn = new SqlConnection(connstring);
// SqlCommand oprating = new SqlCommand(Sqlchar, conn);
// try
// {
// conn.Open();
// return oprating.ExecuteScalar().ToString();
// }
// catch
// {
// return null;
// }
// }
public Form1()
{
InitializeComponent();
StartPosition = FormStartPosition.CenterScreen;
}
private void button1_Click(object sender, EventArgs e)
{
//DataBase Mydb = new DataBase();
//string Sqlchar = select count(*) from employee where Name= + textBox1.Text + and Password= + textBox2.Text + ;
//try
//{
//静态登陆
if (textBox1.Text == )
{
MessageBox.Show(用户名不能为空!, 信息提示, MessageBoxButtons.OK, MessageBoxIcon.Information);
}
else if (textBox2.Text == )
{
MessageBox.Show(密码不能为空!, 信息提示, MessageBoxButtons.OK, MessageBoxIcon.Information);
textBox1.Text = ;
}
else if (textBox1.Text == abcd textBox2.Text == 12345)
{
frmMain f = new frmMain();
f.Show();
this.Hide();
}
else if (textBox1.Text != abcd |
您可能关注的文档
最近下载
- 《民法典之债权法》课件.ppt VIP
- 提高出院患者随访率PDCA.pptx VIP
- 《广告学概论》PPT课件共482页.pptx VIP
- 2024-2025湘教版地理初中七年级下册(2024)第九章 走进国家《第二节 埃及》教学设计 .pdf
- 市场营销沙盘对抗 教案.pdf VIP
- 《大学生职业生涯规划与就业指导(应用型)》教案 第3课 职业环境分析.pdf VIP
- 《读书是教师最好的修行》教师读书分享课件.pptx VIP
- 管线迁改工程施工方案施工组织设计投标方案(技术方案).doc
- 2025年核实物保护系统薄弱性分析方法现状及发展.pptx VIP
- 《大学生职业生涯规划与就业指导(应用型)》教案 第1课 职业生涯规划概述.pdf VIP
原创力文档

文档评论(0)