This commit is contained in:
sc committed 2022-02-09 14:02:14 +08:00
commit 3323285542
5 files changed
+51 -8

No files matched your search

+2
View File
@@ -8,6 +8,8 @@ namespace Models
{
public class DyelotsBulkedRecipeProvider : IProvider<DyelotsBulkedRecipe>
{
private BatchDyeingCentralEntities db = new BatchDyeingCentralEntities();
public int Delete(DyelotsBulkedRecipe t)
{
throw new NotImplementedException();
+15 -3
View File
@@ -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)
+2
View File
@@ -8,6 +8,8 @@ namespace Models
{
public class MachinesProvider : IProvider<Machines>
{
private BatchDyeingCentralEntities db = new BatchDyeingCentralEntities();
public int Delete(Machines t)
{
throw new NotImplementedException();
+4 -3
View File
@@ -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">
+28 -2
View File
@@ -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();
}
}
}