Merge branch 'master' of http://192.168.0.12:13000/sc/Audit_APP
This commit is contained in:
commit
57aa8b1c6c
3 files changed
+15
-3
No files matched your search
+1
-1
@@ -23,7 +23,7 @@
|
|||||||
</Border>
|
</Border>
|
||||||
<Grid Grid.Row="0"/>
|
<Grid Grid.Row="0"/>
|
||||||
<Grid Grid.Row="1">
|
<Grid Grid.Row="1">
|
||||||
<DataGrid x:Name="DataGridStuff" MouseDoubleClick="DataGridStuff_MouseDoubleClick" ItemsSource="{Binding Product}" SelectionMode="Single" AlternationCount="2" IsReadOnly="True" HorizontalAlignment="Left" Margin="15,15,0,150" d:ItemsSource="{d:SampleData ItemCount=200}" AutoGenerateColumns="False" MinColumnWidth="30" HorizontalGridLinesBrush="#FFC9C9C9" VerticalGridLinesBrush="#FFC9C9C9" GridLinesVisibility="All" BorderBrush="#CCCCCC" BorderThickness="1,1,1,1" ColumnHeaderHeight="40" HorizontalContentAlignment="Right" Grid.ColumnSpan="2" CanUserReorderColumns="False">
|
<DataGrid x:Name="DataGridStuff" MouseDoubleClick="DataGridStuff_MouseDoubleClick" ItemsSource="{Binding Product, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" SelectionMode="Single" AlternationCount="2" IsReadOnly="True" HorizontalAlignment="Left" Margin="15,15,0,150" d:ItemsSource="{d:SampleData ItemCount=200}" AutoGenerateColumns="False" MinColumnWidth="30" HorizontalGridLinesBrush="#FFC9C9C9" VerticalGridLinesBrush="#FFC9C9C9" GridLinesVisibility="All" BorderBrush="#CCCCCC" BorderThickness="1,1,1,1" ColumnHeaderHeight="40" HorizontalContentAlignment="Right" Grid.ColumnSpan="2" CanUserReorderColumns="False">
|
||||||
<DataGrid.RowStyle >
|
<DataGrid.RowStyle >
|
||||||
<Style TargetType="{x:Type DataGridRow}">
|
<Style TargetType="{x:Type DataGridRow}">
|
||||||
<Style.Triggers>
|
<Style.Triggers>
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using GalaSoft.MvvmLight;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
@@ -16,6 +17,7 @@ using System.Windows.Forms;
|
|||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using Models;
|
using Models;
|
||||||
|
using Audit.ViewModel;
|
||||||
|
|
||||||
namespace Audit.View
|
namespace Audit.View
|
||||||
{
|
{
|
||||||
@@ -44,7 +46,6 @@ namespace Audit.View
|
|||||||
}
|
}
|
||||||
|
|
||||||
private Product product = new Product();
|
private Product product = new Product();
|
||||||
|
|
||||||
private void Button_Preservation(object sender, RoutedEventArgs e)//保存按钮事件
|
private void Button_Preservation(object sender, RoutedEventArgs e)//保存按钮事件
|
||||||
{
|
{
|
||||||
int int_stuff_ProductType = 0;
|
int int_stuff_ProductType = 0;
|
||||||
@@ -130,6 +131,7 @@ namespace Audit.View
|
|||||||
///存储色彩变量
|
///存储色彩变量
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static int ColorCode_SQL;
|
public static int ColorCode_SQL;
|
||||||
|
|
||||||
private void Stuff_Color_MouseDoubleClick(object sender, MouseButtonEventArgs e)//色彩框双击事件
|
private void Stuff_Color_MouseDoubleClick(object sender, MouseButtonEventArgs e)//色彩框双击事件
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ using System.Threading.Tasks;
|
|||||||
using System.Web.Services.Description;
|
using System.Web.Services.Description;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
using System.Windows.Data;
|
using System.Windows.Data;
|
||||||
|
using System.Windows.Threading;
|
||||||
|
|
||||||
namespace Audit.ViewModel
|
namespace Audit.ViewModel
|
||||||
{
|
{
|
||||||
@@ -36,11 +37,20 @@ namespace Audit.ViewModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查询数据
|
/// StuffViewModeldl
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public StuffViewModel()
|
public StuffViewModel()
|
||||||
{
|
{
|
||||||
products = new ProductProvider().Select();
|
products = new ProductProvider().Select();
|
||||||
|
DispatcherTimer timer = new DispatcherTimer();//每5秒调用一次Tick_Event
|
||||||
|
timer.Interval = TimeSpan.FromSeconds(5);
|
||||||
|
timer.Tick += Tick_Event;
|
||||||
|
timer.Start();
|
||||||
|
}
|
||||||
|
|
||||||
|
void Tick_Event(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Product = new ProductProvider().Select();//扫描数据库
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user