本文整理汇总了C#中sct.svc.mrp.imp.MRPDbContext.SaveChanges方法的典型用法代码示例。如果您正苦于以下问题:C# MRPDbContext.SaveChanges方法的具体用法?C# MRPDbContext.SaveChanges怎么用?C# MRPDbContext.SaveChanges使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sct.svc.mrp.imp.MRPDbContext
的用法示例。
在下文中一共展示了MRPDbContext.SaveChanges方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Create
public virtual OperationResult Create(ProductWareStockInfo info)
{
OperationResult result = new OperationResult(OperationResultType.Error, "操作失败,请稍后重试!");
using (var DbContext = new MRPDbContext())
{
ProductWareStock entity = new ProductWareStock();
DESwap.ProductWareStockDTE(info, entity);
ProductWareStockRpt.Insert(DbContext, entity);
DbContext.SaveChanges();
}
result.ResultType = OperationResultType.Success;
result.Message = "操作成功!";
return result;
}
示例2: Create
public virtual OperationResult Create(MaterialPurchaseItemInfo info)
{
OperationResult result = new OperationResult(OperationResultType.Error, "操作失败,请稍后重试!");
using (var DbContext = new MRPDbContext())
{
MaterialPurchaseItem entity = new MaterialPurchaseItem();
DESwap.MaterialPurchaseItemDTE(info, entity);
MaterialPurchaseItemRpt.Insert(DbContext, entity);
DbContext.SaveChanges();
}
result.ResultType = OperationResultType.Success;
result.Message = "操作成功!";
return result;
}
示例3: Create
public virtual OperationResult Create(WareHouseInfo info)
{
OperationResult result = new OperationResult(OperationResultType.Error, "操作失败,请稍后重试!");
using (var DbContext = new MRPDbContext())
{
WareHouse entity = new WareHouse();
DESwap.WareHouseDTE(info, entity);
WareHouseRpt.Insert(DbContext, entity);
DbContext.SaveChanges();
}
result.ResultType = OperationResultType.Success;
result.Message = "操作成功!";
return result;
}
示例4: Create
public virtual OperationResult Create(GatherBillInfo info)
{
OperationResult result = new OperationResult(OperationResultType.Error, "操作失败,请稍后重试!");
using (var DbContext = new MRPDbContext())
{
GatherBill entity = new GatherBill();
DESwap.GatherBillDTE(info, entity);
GatherBillRpt.Insert(DbContext, entity);
DbContext.SaveChanges();
}
result.ResultType = OperationResultType.Success;
result.Message = "操作成功!";
return result;
}
示例5: Create
public virtual OperationResult Create(IEnumerable<ProductCatalogInfo> infoList)
{
OperationResult result = new OperationResult(OperationResultType.Error, "操作失败,请稍后重试!");
List<ProductCatalog> eList = new List<ProductCatalog>();
infoList.ForEach(x =>
{
ProductCatalog entity = new ProductCatalog();
DESwap. ProductCatalogDTE(x, entity);
eList.Add(entity);
});
using (var DbContext = new MRPDbContext())
{
ProductCatalogRpt.Insert(DbContext, eList);
DbContext.SaveChanges();
}
result.ResultType = OperationResultType.Success;
result.Message = "操作成功!";
return result;
}
示例6: Remove
public virtual OperationResult Remove(IEnumerable<string> keyList)
{
OperationResult result = new OperationResult(OperationResultType.Error, "操作失败,请稍后重试!");
List<MaterialPurchaseItem> eList = new List<MaterialPurchaseItem>();
using (var DbContext = new MRPDbContext())
{
keyList.ForEach(x =>
{
MaterialPurchaseItem entity = MaterialPurchaseItemRpt.Get(DbContext, x);
eList.Add(entity);
});
MaterialPurchaseItemRpt.Delete(DbContext, eList);
DbContext.SaveChanges();
}
result.ResultType = OperationResultType.Success;
result.Message = "操作成功!";
return result;
}
示例7: Modify
public virtual OperationResult Modify(IEnumerable<ManufacturePlanInfo> infoList)
{
OperationResult result = new OperationResult(OperationResultType.Error, "操作失败,请稍后重试!");
List<ManufacturePlan> eList = new List<ManufacturePlan>();
infoList.ForEach(x =>
{
ManufacturePlan entity = new ManufacturePlan();
DESwap. ManufacturePlanDTE(x, entity);
eList.Add(entity);
});
using (var DbContext = new MRPDbContext())
{
ManufacturePlanRpt.Update(DbContext, eList);
DbContext.SaveChanges();
}
result.ResultType = OperationResultType.Success;
result.Message = "操作成功!";
return result;
}
示例8: Remove
public virtual OperationResult Remove(string key)
{
OperationResult result = new OperationResult(OperationResultType.Error, "操作失败,请稍后重试!");
using (var DbContext = new MRPDbContext())
{
CompanyWareHouse entity = CompanyWareHouseRpt.Get(DbContext, key);
CompanyWareHouseRpt.Delete(DbContext, entity);
DbContext.SaveChanges();
}
result.ResultType = OperationResultType.Success;
result.Message = "操作成功!";
return result;
}
示例9: Modify
public virtual OperationResult Modify(CompanyWareHouseInfo info)
{
OperationResult result = new OperationResult(OperationResultType.Error, "操作失败,请稍后重试!");
using (var DbContext = new MRPDbContext())
{
CompanyWareHouse entity = CompanyWareHouseRpt.Get(DbContext, info.Id);
DESwap.CompanyWareHouseDTE(info, entity);
CompanyWareHouseRpt.Update(DbContext, entity);
DbContext.SaveChanges();
}
result.ResultType = OperationResultType.Success;
result.Message = "操作成功!";
return result;
}
示例10: Modify
public virtual OperationResult Modify(IEnumerable<ProductWareStockInfo> infoList)
{
OperationResult result = new OperationResult(OperationResultType.Error, "操作失败,请稍后重试!");
List<ProductWareStock> eList = new List<ProductWareStock>();
infoList.ForEach(x =>
{
ProductWareStock entity = new ProductWareStock();
DESwap. ProductWareStockDTE(x, entity);
eList.Add(entity);
});
using (var DbContext = new MRPDbContext())
{
ProductWareStockRpt.Update(DbContext, eList);
DbContext.SaveChanges();
}
result.ResultType = OperationResultType.Success;
result.Message = "操作成功!";
return result;
}
示例11: Modify
public virtual OperationResult Modify(ProductOrderItemInfo info)
{
OperationResult result = new OperationResult(OperationResultType.Error, "操作失败,请稍后重试!");
using (var DbContext = new MRPDbContext())
{
ProductOrderItem entity = ProductOrderItemRpt.Get(DbContext, info.Id);
DESwap.ProductOrderItemDTE(info, entity);
ProductOrderItemRpt.Update(DbContext, entity);
DbContext.SaveChanges();
}
result.ResultType = OperationResultType.Success;
result.Message = "操作成功!";
return result;
}
示例12: Modify
public virtual OperationResult Modify(IEnumerable<GatherBillInfo> infoList)
{
OperationResult result = new OperationResult(OperationResultType.Error, "操作失败,请稍后重试!");
List<GatherBill> eList = new List<GatherBill>();
infoList.ForEach(x =>
{
GatherBill entity = new GatherBill();
DESwap. GatherBillDTE(x, entity);
eList.Add(entity);
});
using (var DbContext = new MRPDbContext())
{
GatherBillRpt.Update(DbContext, eList);
DbContext.SaveChanges();
}
result.ResultType = OperationResultType.Success;
result.Message = "操作成功!";
return result;
}