This commit is contained in:
sc authored and 忱 沈 committed 2022-01-24 20:10:45 +08:00
commit 16cc991a20
4 files changed
+10 -10

No files matched your search

+1 -1
View File
@@ -71,7 +71,7 @@
<TargetZone>LocalIntranet</TargetZone>
</PropertyGroup>
<PropertyGroup>
<SignManifests>true</SignManifests>
<SignManifests>false</SignManifests>
</PropertyGroup>
<ItemGroup>
<Reference Include="CommonServiceLocator, Version=2.0.6.0, Culture=neutral, PublicKeyToken=489b6accfaf20ef0, processorArchitecture=MSIL">
+3 -3
View File
@@ -12,12 +12,12 @@ namespace Audit
{
public static AuditData Instance = new Lazy<AuditData>(() => new AuditData()).Value;
private UserAccount useraccount = null;
private UserAccount useraccount = new UserAccount();
public UserAccount UserAccount
public UserAccount Useraccount
{
get { return useraccount; }
set { useraccount = value; RaisePropertyChanged("UserAccount");}
set { useraccount = value; RaisePropertyChanged("Useraccount");}
}
}
}
+1 -1
View File
@@ -8,7 +8,7 @@ namespace Models
{
public class UserAccountProvide : IProvider<UserAccount>
{
private TicketEntities db = new TicketEntities();
private readonly TicketEntities db = new TicketEntities();
public int Delete(UserAccount t)
{
+5 -5
View File
@@ -38,26 +38,26 @@ namespace Audit.Windows
{
if (this.Passwds.Text == "sunlight")
{
MessageBox.Show("警告:进入设置模式请您明确操作目的及可能需承担的后果");
MessageBox.Show("警告:进入设置模式请您明确操作目的及可能需承担的后果");
Windows.Set_up setup = new Windows.Set_up();
setup.Show();//实例化并打开设置窗口
this.Close();//关闭当前窗口
}
else
{
MessageBox.Show("ERR.01:拒绝登录");//设置密码错误
MessageBox.Show("ERR.C0011:拒绝登录");//设置密码错误
}
}
else
{
UserAccountProvide UserAccountProvide = new UserAccountProvide();
var user = UserAccountProvide.Select()
.FirstOrDefault(item => item.UserCode == AuditData.Instance.UserAccount.UserCode
&& item.PassWord == AuditData.Instance.UserAccount.PassWord);
.FirstOrDefault(item => item.UserCode == AuditData.Instance.Useraccount.UserCode
&& item.PassWord == AuditData.Instance.Useraccount.PassWord);
if (user == null)
{
MessageBox.Show("ERR.00:用户名或密码错误");
MessageBox.Show("ERR.C0000:用户名或密码错误");
}
else
{