本文整理匯總了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;
}