Merge branch 'master' of http://scddns.f3322.net:13000/sc/Audit_APP
This commit is contained in:
commit
3323285542
5 files changed
+51
-8
No files matched your search
@@ -8,6 +8,8 @@ namespace Models
|
|||||||
{
|
{
|
||||||
public class DyelotsBulkedRecipeProvider : IProvider<DyelotsBulkedRecipe>
|
public class DyelotsBulkedRecipeProvider : IProvider<DyelotsBulkedRecipe>
|
||||||
{
|
{
|
||||||
|
private BatchDyeingCentralEntities db = new BatchDyeingCentralEntities();
|
||||||
|
|
||||||
public int Delete(DyelotsBulkedRecipe t)
|
public int Delete(DyelotsBulkedRecipe t)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
|
|||||||
@@ -8,19 +8,31 @@ namespace Models
|
|||||||
{
|
{
|
||||||
public class DyelotsProvider : IProvider<Dyelots>
|
public class DyelotsProvider : IProvider<Dyelots>
|
||||||
{
|
{
|
||||||
|
private BatchDyeingCentralEntities db = new BatchDyeingCentralEntities();
|
||||||
|
|
||||||
public int Delete(Dyelots t)
|
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)
|
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()
|
public List<Dyelots> Select()
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
return db.Dyelots.ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
public int Update(Dyelots t)
|
public int Update(Dyelots t)
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ namespace Models
|
|||||||
{
|
{
|
||||||
public class MachinesProvider : IProvider<Machines>
|
public class MachinesProvider : IProvider<Machines>
|
||||||
{
|
{
|
||||||
|
private BatchDyeingCentralEntities db = new BatchDyeingCentralEntities();
|
||||||
|
|
||||||
public int Delete(Machines t)
|
public int Delete(Machines t)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
Text="{TemplateBinding Content}"
|
Text="{TemplateBinding Content}"
|
||||||
FontFamily="Fonts/#FontAwesome"
|
FontFamily="Fonts/#FontAwesome"
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
Width="40" FontSize="20" Margin="0,5,0,0"/>
|
Width="80" FontSize="20" Margin="0,5,0,0"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
</Grid>
|
</Grid>
|
||||||
@@ -59,8 +59,9 @@
|
|||||||
<Border BorderThickness="0,0,0,1" BorderBrush="#CCCCCC">
|
<Border BorderThickness="0,0,0,1" BorderBrush="#CCCCCC">
|
||||||
</Border>
|
</Border>
|
||||||
<Grid Grid.Row="0">
|
<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=" 染料" 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="助剂" 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="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 Grid.Row="1">
|
<Grid Grid.Row="1">
|
||||||
<Grid Grid.Column="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.Generic;
|
||||||
|
using System.Collections.ObjectModel;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
@@ -9,7 +12,30 @@ namespace Audit.ViewModel
|
|||||||
///<Summary>
|
///<Summary>
|
||||||
/// QueryViewModel
|
/// QueryViewModel
|
||||||
///</Summary>
|
///</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