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();
|
||||
|
||||
Reference in new issue
Block a user