资源简介
企业人事管理软件及源代码,非常适合作为毕业设计,里面有文档以及详细的注释,自己可以进行改进。
代码片段和文件信息
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 PWMS
{
public partial class F_Login : Form
{
DataClass.MyMeans MyClass = new PWMS.DataClass.MyMeans();
public F_Login()
{
InitializeComponent();
}
private void butClose_Click(object sender EventArgs e)
{
if ((int)(this.Tag) == 1)
{
DataClass.MyMeans.Login_n = 3;
Application.Exit();
}
else
if ((int)(this.Tag) == 2)
this.Close();
}
private void butLogin_Click(object sender EventArgs e)
{
if (textName.Text != ““ & textPass.Text != ““)
{
SqlDataReader temDR = MyClass.getcom(“select * from tb_Login where Name=‘“ + textName.Text.Trim() + “‘ and Pass=‘“ + textPass.Text.Trim() + “‘“);
bool ifcom = temDR.Read();
if (ifcom)
{
DataClass.MyMeans.Login_Name = textName.Text.Trim();
DataClass.MyMeans.Login_ID = temDR.GetString(0);
DataClass.MyMeans.My_con.Close();
DataClass.MyMeans.My_con.Dispose();
DataClass.MyMeans.Login_n = (int)(this.Tag);
this.Close();
}
else
{
MessageBox.Show(“用户名或密码错误!“ “提示“ MessageBoxButtons.OK MessageBoxIcon.Information);
textName.Text = ““;
textPass.Text = ““;
}
MyClass.con_close();
}
else
MessageBox.Show(“请将登录信息添写完整!“ “提示“ MessageBoxButtons.OK MessageBoxIcon.Information);
}
private void F_Login_Load(object sender EventArgs e)
{
try
{
MyClass.con_open(); //连接数据库
MyClass.con_close();
textName.Text = ““;
textPass.Text = ““;
}
catch
{
MessageBox.Show(“数据库连接失败。“ “提示“ MessageBoxButtons.OK MessageBoxIcon.Information);
Application.Exit();
}
}
private void textName_KeyPress(object sender KeyPressEventArgs e)
{
if (e.KeyChar == ‘\r‘)
textPass.Focus();
}
private void textPass_KeyPress(object sender KeyPressEventArgs e)
{
if (e.KeyChar == ‘\r‘)
butLogin.Focus();
}
private void F_Login_Activated(object sender EventArgs e)
{
textName.Focus();
}
}
}
相关资源
- CA6140车床拨叉831008工艺及铣断双体夹
- 人脸识别系统设计-毕业设计
- 路灯系统毕业设计
- 免费flash毕业设计源文件 动画毕设源
- flash毕业设计源文件 3分钟毕设源文件
- 都市供求信息网源代码
- 自动洗车毕业设计机
- 二手房交易系统 毕业设计 论文
- 运动会管理系统毕业设计
- 基于SSM的KTV管理系统完整论文
- 我的计算机毕业论文很标准的,刚结
- 毕业设计智能小车的制作蓝牙控制,
- opencv毕业设计
- 毕设:基于 stm32 微控制器的绘图机器
- 基于单片机的多功能路灯自动控制系
- 基于单片机控制的智能窗帘控制系统
- 学生报到系统 毕业设计
- 毕业设计 教务管理系统
- 指纹识别毕业设计论文
- 计算机毕业设计的外文翻译附外文原
- 汽车在线销售网站--毕业论文+源码设
- 大学校园一卡通毕业设计
- 家政服务管理系统毕业设计
- 开题报告、毕业设计PPT模板
- 单片机点阵毕业设计
- 音乐网站的设计与实现毕业设计
- 本科毕业设计——电子词典系统的设
- 计算机毕业设计外文翻译
- 单片机毕业设计题目及程序电路
- SSM+maven+多模块整合宿舍管理项目系统
评论
共有 条评论