吉林安睿特调度
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

80 lines
2.5 KiB

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DBFactory;
namespace ControlSystem
{
/// <summary>
/// Creator:Richard.liu
/// ÉóºËÓû§ÃÜÂë
/// </summary>
public partial class FrmConfirmPassword : Form
{
private static FrmConfirmPassword _formInstance;
public static FrmConfirmPassword FormInstance
{
get
{
if (_formInstance == null)
{
_formInstance = new FrmConfirmPassword();
}
return _formInstance;
}
set { _formInstance = value; }
}
DBOperator dbo =CStaticClass.dbo;
public FrmConfirmPassword()
{
InitializeComponent();
_formInstance=this;
}
private void FrmPassword_Load(object sender, EventArgs e)
{
DataView dv = dbo.ExceSQL("select * from t_base_users where f_userid ='"+CStaticClass.UserID+"'").Tables[0].DefaultView;
if (dv.Count > 0)
{
this.lblUserID.Text = dv[0]["f_userid"].ToString();
this.lblUserName.Text = dv[0]["f_username"].ToString();
}
}
private void button1_Click(object sender, EventArgs e)
{
if (MessageBox.Show("ÄúÈ·ÈÏÒª±£´æÄúµÄµÇ¼ÃÜÂëÂð£¿", "²Ù×÷Ìáʾ£º", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) != DialogResult.OK)
{
return;
}
if (this.tbPassword2.Text.Trim() == "")
{
MessageBox.Show("È·ÈÏÃÜÂë²»ÔÊÐíÊÇ¿ÕÖµ£¡", "Îó²Ù×÷Ìáʾ£º", MessageBoxButtons.OK, MessageBoxIcon.Warning);
this.tbPassword2.Focus();
return;
}
DataView dv = dbo.ExceSQL("select * from t_base_users where f_userid ='" + CStaticClass.UserID + "' and f_password ='" + this.tbPassword2.Text.Trim() + "'").Tables[0].DefaultView;
if (dv.Count > 0)
{
this.Close();
}
else
{
MessageBox.Show("È·ÈÏÃÜÂë²»ÕýÈ·£¡", "Îó²Ù×÷Ìáʾ£º", MessageBoxButtons.OK, MessageBoxIcon.Warning);
this.tbPassword2.Focus();
return;
}
//CommonClassLib.CCarryConvert.WriteDarkCasket("Login", "UserID£º" + CStaticClass.UserID + "µÄ²Ù×÷ÈÕÖ¾", "µã»÷¡¾È·ÈÏ¡¿°´Å¥", "Ð޸ĵ±Ç°Óû§ÃÜÂë", "");
}
}
}