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.
85 lines
2.7 KiB
85 lines
2.7 KiB
3 months ago
|
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 wcfControlMonitorClient
|
||
|
{
|
||
|
/// <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 + "�IJ�����־", "������ȷ�ϡ���ť", "�ĵ�ǰ�û�����", "");
|
||
|
}
|
||
|
|
||
|
private void FrmConfirmPassword_FormClosing(object sender, FormClosingEventArgs e)
|
||
|
{
|
||
|
_formInstance = null;
|
||
|
}
|
||
|
|
||
|
|
||
|
}
|
||
|
}
|