資源簡介
企業人事管理系統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.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();
????????}
????}
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????4443??2008-04-16?13:13??PWMS\Backup\PWMS\DataClass\MyMeans.cs
?????文件???????3016??2008-03-21?11:00??PWMS\Backup\PWMS\F_Login.cs
?????文件???????6856??2008-03-11?19:09??PWMS\Backup\PWMS\F_Login.designer.cs
?????文件?????341697??2008-03-11?19:09??PWMS\Backup\PWMS\F_Login.resx
?????文件???????7226??2008-03-21?18:43??PWMS\Backup\PWMS\F_Main.cs
?????文件??????38268??2008-03-21?14:36??PWMS\Backup\PWMS\F_Main.designer.cs
?????文件????1001373??2008-03-21?14:36??PWMS\Backup\PWMS\F_Main.resx
?????文件???????2354??2008-03-26?14:26??PWMS\Backup\PWMS\InfoAddForm\F_Address.cs
?????文件??????11367??2008-03-11?19:14??PWMS\Backup\PWMS\InfoAddForm\F_Address.Designer.cs
?????文件???????5814??2008-03-11?19:14??PWMS\Backup\PWMS\InfoAddForm\F_Address.resx
?????文件???????4004??2008-03-11?19:14??PWMS\Backup\PWMS\InfoAddForm\F_Basic.cs
?????文件???????8024??2008-03-11?19:14??PWMS\Backup\PWMS\InfoAddForm\F_Basic.Designer.cs
?????文件???????5814??2008-03-11?19:14??PWMS\Backup\PWMS\InfoAddForm\F_Basic.resx
?????文件???????1688??2008-03-11?19:15??PWMS\Backup\PWMS\InfoAddForm\F_ClewSet.cs
?????文件???????6146??2008-03-11?19:15??PWMS\Backup\PWMS\InfoAddForm\F_ClewSet.Designer.cs
?????文件???????5814??2008-03-11?19:15??PWMS\Backup\PWMS\InfoAddForm\F_ClewSet.resx
?????文件??????47069??2008-03-18?18:19??PWMS\Backup\PWMS\ModuleClass\MyModule.cs
?????文件???????4925??2008-03-11?19:19??PWMS\Backup\PWMS\PerForm\F_AddressList.cs
?????文件??????11198??2008-03-11?19:19??PWMS\Backup\PWMS\PerForm\F_AddressList.Designer.cs
?????文件???????5814??2008-03-11?19:19??PWMS\Backup\PWMS\PerForm\F_AddressList.resx
?????文件???????1435??2008-03-11?19:19??PWMS\Backup\PWMS\PerForm\F_ClearData.cs
?????文件??????20161??2008-03-11?19:19??PWMS\Backup\PWMS\PerForm\F_ClearData.Designer.cs
?????文件???????5814??2008-03-11?19:19??PWMS\Backup\PWMS\PerForm\F_ClearData.resx
?????文件???????8064??2008-04-16?13:53??PWMS\Backup\PWMS\PerForm\F_Find.cs
?????文件??????35871??2008-03-11?19:19??PWMS\Backup\PWMS\PerForm\F_Find.Designer.cs
?????文件???????5814??2008-03-11?19:19??PWMS\Backup\PWMS\PerForm\F_Find.resx
?????文件???????4906??2008-03-27?15:57??PWMS\Backup\PWMS\PerForm\F_HaveBack.cs
?????文件??????11756??2008-03-11?19:19??PWMS\Backup\PWMS\PerForm\F_HaveBack.Designer.cs
?????文件??????12138??2008-03-11?19:19??PWMS\Backup\PWMS\PerForm\F_HaveBack.resx
?????文件??????51677??2008-04-16?13:59??PWMS\Backup\PWMS\PerForm\F_ManFile.cs
............此處省略183個文件信息
- 上一篇:C#實現軟件加殼
- 下一篇:C#Socket網絡通信實現多人聊天
評論
共有 條評論