Merge branch 'master' of http://scddns.f3322.net:13000/sc/Audit_APP
This commit is contained in:
commit
3323285542
6 files changed
+52
-9
No files matched your search
@@ -8,6 +8,8 @@ namespace Models
|
||||
{
|
||||
public class DyelotsBulkedRecipeProvider : IProvider<DyelotsBulkedRecipe>
|
||||
{
|
||||
private BatchDyeingCentralEntities db = new BatchDyeingCentralEntities();
|
||||
|
||||
public int Delete(DyelotsBulkedRecipe t)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
|
||||
@@ -8,19 +8,31 @@ namespace Models
|
||||
{
|
||||
public class DyelotsProvider : IProvider<Dyelots>
|
||||
{
|
||||
private BatchDyeingCentralEntities db = new BatchDyeingCentralEntities();
|
||||
|
||||
public int Delete(Dyelots t)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
if (t == null) return 0;
|
||||
var model = db.Dyelots.ToList().FirstOrDefault(item => t.Dyelot == item.Dyelot);
|
||||
if (model == null) return 0;
|
||||
db.Dyelots.Remove(model);
|
||||
int count = db.SaveChanges();
|
||||
return count;
|
||||
}
|
||||
|
||||
public int Insert(Dyelots t)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
if (t == null) return 0;
|
||||
if (String.IsNullOrEmpty(t.Dyelot)) return 0;
|
||||
db.Dyelots.Add(t);
|
||||
int count = db.SaveChanges();
|
||||
return count;
|
||||
|
||||
}
|
||||
|
||||
public List<Dyelots> Select()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
return db.Dyelots.ToList();
|
||||
}
|
||||
|
||||
public int Update(Dyelots t)
|
||||
|
||||
@@ -8,6 +8,8 @@ namespace Models
|
||||
{
|
||||
public class MachinesProvider : IProvider<Machines>
|
||||
{
|
||||
private BatchDyeingCentralEntities db = new BatchDyeingCentralEntities();
|
||||
|
||||
public int Delete(Machines t)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@
|
||||
<Grid Grid.Row="1">
|
||||
<DataGrid HorizontalAlignment="Left" Margin="15,15,0,150" VerticalAlignment="Stretch" Width="300" d:ItemsSource="{d:SampleData ItemCount=200}" AutoGenerateColumns="False" MinColumnWidth="30" HorizontalGridLinesBrush="Black" VerticalGridLinesBrush="Black" GridLinesVisibility="All" SelectionChanged="DataGrid_Directory" BorderBrush="#CCCCCC" BorderThickness="1,1,1,1">
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn Header="工单" Width="160" FontSize="25"/>
|
||||
<DataGridTextColumn Header="工单" Width="160" FontSize="25" />
|
||||
<DataGridTextColumn Header="重染" Width="50" FontSize="25"/>
|
||||
<DataGridTextColumn Header="染机" Width="90" FontSize="25"/>
|
||||
</DataGrid.Columns>
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
Text="{TemplateBinding Content}"
|
||||
FontFamily="Fonts/#FontAwesome"
|
||||
HorizontalAlignment="Center"
|
||||
Width="40" FontSize="20" Margin="0,5,0,0"/>
|
||||
Width="80" FontSize="20" Margin="0,5,0,0"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Grid>
|
||||
@@ -59,8 +59,9 @@
|
||||
<Border BorderThickness="0,0,0,1" BorderBrush="#CCCCCC">
|
||||
</Border>
|
||||
<Grid Grid.Row="0">
|
||||
<RadioButton Content="染料" HorizontalAlignment="Left" Height="30" Margin="0,0,0,1" VerticalAlignment="Top" Width="100" Background="#FFE0E0E0" Style="{DynamicResource RadioButtonStyle}" Checked="RadioButton_subdirectory"/>
|
||||
<RadioButton Content="助剂" HorizontalAlignment="Left" Height="30" Margin="100,0,0,1" VerticalAlignment="Top" Width="100" Background="#FFE0E0E0" Style="{DynamicResource RadioButtonStyle}" Checked="RadioButton_subdirectory"/>
|
||||
<RadioButton Content=" 染料" x:Uid="0" HorizontalAlignment="Left" Height="30" Margin="0,0,0,1" VerticalAlignment="Top" Width="100" Background="#FFE0E0E0" BorderBrush="#FFAEAEAE" Style="{DynamicResource RadioButtonStyle}" Checked="RadioButton_subdirectory"/>
|
||||
<RadioButton Content=" 助剂" x:Uid="1" HorizontalAlignment="Left" Height="30" Margin="100,0,0,1" VerticalAlignment="Top" Width="100" Background="#FFE0E0E0" BorderBrush="#FFAEAEAE" Style="{DynamicResource RadioButtonStyle}" Checked="RadioButton_subdirectory"/>
|
||||
<RadioButton Content="粉体助剂" x:Uid="2" HorizontalAlignment="Left" Height="30" Margin="200,0,0,1" VerticalAlignment="Top" Width="100" Background="#FFE0E0E0" BorderBrush="#FFAEAEAE" Style="{DynamicResource RadioButtonStyle}" Checked="RadioButton_subdirectory"/>
|
||||
</Grid>
|
||||
<Grid Grid.Row="1">
|
||||
<Grid Grid.Column="1">
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
using System;
|
||||
using GalaSoft.MvvmLight;
|
||||
using Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
@@ -9,7 +12,30 @@ namespace Audit.ViewModel
|
||||
///<Summary>
|
||||
/// QueryViewModel
|
||||
///</Summary>
|
||||
public class QueryViewModel
|
||||
public class QueryViewModel: ViewModelBase
|
||||
{
|
||||
private List<Dyelots> dyelots = new List<Dyelots>();
|
||||
/// <summary>
|
||||
/// 所有工单
|
||||
/// </summary>
|
||||
public List<Dyelots> Dyelots
|
||||
{
|
||||
get
|
||||
{
|
||||
return dyelots;
|
||||
}
|
||||
set
|
||||
{
|
||||
dyelots = value;
|
||||
RaisePropertyChanged();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public QueryViewModel()
|
||||
{
|
||||
dyelots = new DyelotsProvider().Select();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user