Commit ed1264f5 authored by health's avatar health

待改

parent 709fb067
......@@ -85,10 +85,10 @@ namespace WSDDBBrowser.Core
// ((p.tEndTime > starttime) && (p.tEndTime < endtime)))
// && p.cOrderNo.Contains(orderNo) && p.bIsUpFin == true
// select p).ToList();
dBModel.Database.Log = new Action<string>((str) =>
{
Console.WriteLine(str);
});
//dBModel.Database.Log = new Action<string>((str) =>
//{
// Console.WriteLine(str);
//});
DataSet dataset = new DataSet();
var connection = dBModel.Database.Connection as SqlConnection;
......@@ -244,7 +244,6 @@ namespace WSDDBBrowser.Core
process.TGID = new List<int>();
process.TGID.Add(tgProcess.ide);
process.HasTGData = true;
process.HasSBData = false;
process.MachineNo = (int)tgProcess.nJt;
process.StepNo = (int)tgProcess.nJb;
......@@ -326,6 +325,7 @@ namespace WSDDBBrowser.Core
techInfo.Avg = r.NextDouble() * 10 - 5 + techInfo.Target;
techInfo.IsError = Math.Abs(techInfo.Target - techInfo.Avg) > techInfo.Tolerance;
techInfos.Add(techInfo);
}
}
catch (Exception e)
......@@ -388,7 +388,6 @@ namespace WSDDBBrowser.Core
process.TGID = new List<int>();
process.TGID.Add(tgProcess.ide);
process.HasTGData = true;
process.HasSBData = false;
process.MachineNo = (int)tgProcess.nJt;
process.StepNo = (int)tgProcess.nJb;
......@@ -521,8 +520,7 @@ namespace WSDDBBrowser.Core
public DateTime EndTime { get; set; }
public double TotalLen { get; set; }
public List<TechInfo> TechInfos { get; set; }
}
......@@ -536,6 +534,6 @@ namespace WSDDBBrowser.Core
public double Tolerance { get; set; }
public double Avg { get; set; }
public bool IsError { get; set; }
}
}
......@@ -44,8 +44,6 @@
ItemsSource="{Binding TechnologyItems}" RowHeaderWidth="20" SelectionUnit="FullRow" CanUserAddRows="False" CanUserDeleteRows="False">
<DataGrid.Columns>
<DataGridTextColumn Binding="{Binding DeviceName}" IsReadOnly="True" Header="设备名称" />
<DataGridTextColumn Binding="{Binding Target,StringFormat={}{0:F1}}" Header="目标值" />
<DataGridTextColumn Binding="{Binding Tolerance,StringFormat={}{0:F1}}" Header="规格线" />
<DataGridTextColumn Binding="{Binding Ctrlline,StringFormat={}{0:F1}}" Header="控制线" />
......
......@@ -125,7 +125,7 @@
<DataGrid x:Name="dgridProcesses" Grid.Row="1" AutoGenerateColumns="False" IsReadOnly="True" ItemsSource="{Binding Processes}"
RowStyle="{StaticResource MetroDataGridRow}"
SelectionMode="Single"
SelectionUnit="FullRow"
SelectionUnit="FullRow" SelectionChanged="dgridProcesses_SelectionChanged"
>
<DataGrid.Style>
<Style BasedOn="{StaticResource MetroDataGrid}" TargetType="{x:Type DataGrid}">
......
......@@ -48,6 +48,11 @@ namespace WSDDBBrowser
this.NavigationService.GoBack();
this.NavigationService.RemoveBackEntry();
}
private void dgridProcesses_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
}
}
public class PgSelectViewModel : INotifyPropertyChanged
......
......@@ -25,10 +25,10 @@
<DataGrid.Columns>
<DataGridTextColumn Binding="{Binding DeviceId}" Header="设备编号"/>
<DataGridTextColumn Binding="{Binding DeviceName}" Header="设备名称"/>
<DataGridTextColumn Binding="{Binding TechnologyNo}" Header="工艺号"/>
<DataGridTextColumn Binding="{Binding Target,StringFormat={}{0:F1}}" Header="目标值"/>
<DataGridTextColumn Binding="{Binding Tolerance,StringFormat={}{0:F1}}" Header="公差"/>
<DataGridTextColumn Binding="{Binding Avg,StringFormat={}{0:F1}}" Header="平均值"/>
</DataGrid.Columns>
</DataGrid>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,20" Grid.Row="1">
......
......@@ -5,7 +5,7 @@
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{933D19C1-8C4E-4326-B8A3-C385DCA34DC4}</ProjectGuid>
<OutputType>Exe</OutputType>
<OutputType>WinExe</OutputType>
<RootNamespace>WSDDBBrowser</RootNamespace>
<AssemblyName>WSDDBBrowser</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment