Merge branch 'master' of http://scddns.f3322.net:13000/sc/Audit_APP
This commit is contained in:
commit
3c052000e3
4 files changed
+37
-25
No files matched your search
@@ -1,4 +1,6 @@
|
||||
using MahApps.Metro.Controls;
|
||||
using GalaSoft.MvvmLight.Command;
|
||||
using MahApps.Metro.Controls;
|
||||
using Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
@@ -24,19 +26,17 @@ namespace Audit.Windows
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
|
||||
private void Exit(object sender, RoutedEventArgs e)//退出按钮
|
||||
{
|
||||
Application.Current.Shutdown();//关闭窗口
|
||||
}
|
||||
|
||||
private void Log(object sender, RoutedEventArgs e)//登录按钮
|
||||
{
|
||||
string user = this.users.Text;
|
||||
string passwd = this.Passwds.Text;
|
||||
if (user == "setup")
|
||||
{
|
||||
if (this.users.Text == "sunlight")
|
||||
{
|
||||
if (passwd == "setup")
|
||||
if (this.Passwds.Text == "sunlight")
|
||||
{
|
||||
MessageBox.Show("警告:进入设置模式请您明确操作目的及可能需承担的后果");
|
||||
Windows.Set_up setup = new Windows.Set_up();
|
||||
@@ -45,12 +45,26 @@ namespace Audit.Windows
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("ERR01:拒绝认证");//设置密码错误
|
||||
MessageBox.Show("ERR.01:拒绝登录");//设置密码错误
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
UserAccountProvide UserAccountProvide = new UserAccountProvide();
|
||||
var user = UserAccountProvide.Select()
|
||||
.FirstOrDefault(item => item.UserCode == AuditData.Instance.UserAccount.UserCode
|
||||
&& item.PassWord == AuditData.Instance.UserAccount.PassWord);
|
||||
|
||||
if (user == null)
|
||||
{
|
||||
MessageBox.Show("ERR.00:用户名或密码错误");
|
||||
}
|
||||
else
|
||||
{
|
||||
MainWindow mainWindow = new MainWindow();
|
||||
mainWindow.Show();
|
||||
this.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user