Merge branch 'master' of http://192.168.0.12:13000/sc/Audit_APP
This commit is contained in:
commit
7db3c62905
3 files changed
+23
-8
No files matched your search
+5
-1
@@ -8,4 +8,8 @@
|
||||
xmlns:mah="http://metro.mahapps.com/winfx/xaml/controls"
|
||||
x:Class="Audit.MainWindow"
|
||||
mc:Ignorable="d"
|
||||
Title="化学品审计管理" Height="1080" Width="1920" WindowStartupLocation="CenterScreen"/>
|
||||
Title="化学品审计管理" Height="720" Width="960" WindowStartupLocation="CenterScreen">
|
||||
<Grid>
|
||||
|
||||
</Grid>
|
||||
</mah:MetroWindow>
|
||||
@@ -4,7 +4,7 @@
|
||||
<edmx:Designer xmlns="http://schemas.microsoft.com/ado/2009/11/edmx">
|
||||
<!-- Diagram content (shape and connector positions) -->
|
||||
<edmx:Diagrams>
|
||||
<Diagram DiagramId="89d520d3675442b5b0979c510546a2e9" Name="Diagram1" ZoomLevel="49">
|
||||
<Diagram DiagramId="89d520d3675442b5b0979c510546a2e9" Name="Diagram1" ZoomLevel="73">
|
||||
<EntityTypeShape EntityType="TicketModel.Product" Width="1.5" PointX="0.75" PointY="0.75" IsExpanded="true" />
|
||||
<EntityTypeShape EntityType="TicketModel.ProductInventory" Width="1.5" PointX="2.75" PointY="0.75" IsExpanded="true" />
|
||||
<EntityTypeShape EntityType="TicketModel.ProductUsed" Width="1.5" PointX="2.75" PointY="3.75" IsExpanded="true" />
|
||||
|
||||
@@ -38,9 +38,9 @@ namespace Audit.Windows
|
||||
|
||||
string users = this.users.Text;
|
||||
string Passwds = this.Passwds.Text;
|
||||
if (users == "sunlight")
|
||||
if (users == "sunlight")//内置账号
|
||||
{
|
||||
if (Passwds == "sunlight")
|
||||
if (Passwds == "setup")//设置页面判断
|
||||
{
|
||||
MessageBox.Show("警告:进入设置模式请您明确操作目的及可能需承担的后果");
|
||||
Windows.Set_up setup = new Windows.Set_up();
|
||||
@@ -48,22 +48,33 @@ namespace Audit.Windows
|
||||
this.Close();//关闭当前窗口
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Passwds == "sunlight")//主页面判断
|
||||
{
|
||||
MessageBox.Show("SC:开启主页面");
|
||||
MainWindow mainWindow = new MainWindow();
|
||||
mainWindow.Show();//实例化并打开主窗口
|
||||
this.Close();//关闭当前窗口
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("ERR.C0011:拒绝登录");//设置密码错误
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
UserAccountProvide UserAccountProvide = new UserAccountProvide();
|
||||
var usersql = UserAccountProvide.Select().FirstOrDefault(item => item.UserCode == users && item.PassWord == Passwds);
|
||||
if (usersql == null)
|
||||
UserAccountProvide UserAccountProvide = new UserAccountProvide();//实例化数据库用户表
|
||||
var usersql = UserAccountProvide.Select().FirstOrDefault(item => item.UserCode == users && item.PassWord == Passwds);//查询比较用户信息
|
||||
if (usersql == null)//判断查询结果
|
||||
{
|
||||
MessageBox.Show("ERR.C0000:用户名或密码错误");
|
||||
}
|
||||
else
|
||||
{
|
||||
MainWindow mainWindow = new MainWindow();
|
||||
mainWindow.Show();
|
||||
mainWindow.Show();//实例化并打开主窗口
|
||||
this.Close();//关闭当前窗口
|
||||
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user