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.
43 lines
1.5 KiB
43 lines
1.5 KiB
using GalaSoft.MvvmLight;
|
|
using GalaSoft.MvvmLight.Command;
|
|
using Models;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows;
|
|
|
|
namespace Audit.ViewModel
|
|
{
|
|
public class LogViewModel : ViewModelBase
|
|
{
|
|
/* public AuditData AuditData { get; set; } = AuditData.Instance;
|
|
public UserAccount UserAccount { get; private set; } = AuditData.Instance.Useraccount;
|
|
|
|
//登录命令绑定
|
|
public RelayCommand LogCommand
|
|
{
|
|
get
|
|
{
|
|
return new RelayCommand(() =>
|
|
{
|
|
UserAccountProvide UserAccountProvide = new UserAccountProvide();
|
|
var list = UserAccountProvide.Select();
|
|
var usersql = list.FirstOrDefault(item => item.UserCode == AuditData.Useraccount.UserCode && item.PassWord == AuditData.Useraccount.PassWord);
|
|
if (usersql == null)
|
|
{
|
|
MessageBox.Show("ERR.C0000:用户名或密码错误");
|
|
}
|
|
else
|
|
{
|
|
MainWindow mainWindow = new MainWindow();
|
|
mainWindow.Show();
|
|
|
|
}
|
|
});
|
|
}
|
|
}
|
|
*/
|
|
}
|
|
}
|
|
|