Merge branch 'master' of http://192.168.0.12:13000/sc/Audit_APP
This commit is contained in:
commit
7db3c62905
3 files changed
+24
-9
No files matched your search
+5
-1
@@ -8,4 +8,8 @@
|
|||||||
xmlns:mah="http://metro.mahapps.com/winfx/xaml/controls"
|
xmlns:mah="http://metro.mahapps.com/winfx/xaml/controls"
|
||||||
x:Class="Audit.MainWindow"
|
x:Class="Audit.MainWindow"
|
||||||
mc:Ignorable="d"
|
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">
|
<edmx:Designer xmlns="http://schemas.microsoft.com/ado/2009/11/edmx">
|
||||||
<!-- Diagram content (shape and connector positions) -->
|
<!-- Diagram content (shape and connector positions) -->
|
||||||
<edmx:Diagrams>
|
<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.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.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" />
|
<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 users = this.users.Text;
|
||||||
string Passwds = this.Passwds.Text;
|
string Passwds = this.Passwds.Text;
|
||||||
if (users == "sunlight")
|
if (users == "sunlight")//内置账号
|
||||||
{
|
{
|
||||||
if (Passwds == "sunlight")
|
if (Passwds == "setup")//设置页面判断
|
||||||
{
|
{
|
||||||
MessageBox.Show("警告:进入设置模式请您明确操作目的及可能需承担的后果");
|
MessageBox.Show("警告:进入设置模式请您明确操作目的及可能需承担的后果");
|
||||||
Windows.Set_up setup = new Windows.Set_up();
|
Windows.Set_up setup = new Windows.Set_up();
|
||||||
@@ -49,21 +49,32 @@ namespace Audit.Windows
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MessageBox.Show("ERR.C0011:拒绝登录");//设置密码错误
|
if (Passwds == "sunlight")//主页面判断
|
||||||
|
{
|
||||||
|
MessageBox.Show("SC:开启主页面");
|
||||||
|
MainWindow mainWindow = new MainWindow();
|
||||||
|
mainWindow.Show();//实例化并打开主窗口
|
||||||
|
this.Close();//关闭当前窗口
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MessageBox.Show("ERR.C0011:拒绝登录");//设置密码错误
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
UserAccountProvide UserAccountProvide = new UserAccountProvide();
|
UserAccountProvide UserAccountProvide = new UserAccountProvide();//实例化数据库用户表
|
||||||
var usersql = UserAccountProvide.Select().FirstOrDefault(item => item.UserCode == users && item.PassWord == Passwds);
|
var usersql = UserAccountProvide.Select().FirstOrDefault(item => item.UserCode == users && item.PassWord == Passwds);//查询比较用户信息
|
||||||
if (usersql == null)
|
if (usersql == null)//判断查询结果
|
||||||
{
|
{
|
||||||
MessageBox.Show("ERR.C0000:用户名或密码错误");
|
MessageBox.Show("ERR.C0000:用户名或密码错误");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MainWindow mainWindow = new MainWindow();
|
MainWindow mainWindow = new MainWindow();
|
||||||
mainWindow.Show();
|
mainWindow.Show();//实例化并打开主窗口
|
||||||
this.Close();//关闭当前窗口
|
this.Close();//关闭当前窗口
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user