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;
 }
 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;
 }
Esempio n. 3
0
 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;
 }
Esempio n. 4
0
 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;
 }
 public virtual OperationResult Create(IEnumerable<MaterialPurchaseItemInfo> infoList)
 {
     OperationResult result = new OperationResult(OperationResultType.Error, "操作失败,请稍后重试!");
     List<MaterialPurchaseItem> eList = new List<MaterialPurchaseItem>();
     infoList.ForEach(x =>
     {
         MaterialPurchaseItem entity = new MaterialPurchaseItem();
         DESwap. MaterialPurchaseItemDTE(x, entity);
         eList.Add(entity);
     });
     using (var DbContext = new MRPDbContext())
     {
     MaterialPurchaseItemRpt.Insert(DbContext, eList);
     DbContext.SaveChanges();
     }
     result.ResultType = OperationResultType.Success;
     result.Message = "操作成功!";
     return result;
 }
Esempio n. 6
0
 public virtual OperationResult Create(IEnumerable<WareHouseInfo> infoList)
 {
     OperationResult result = new OperationResult(OperationResultType.Error, "操作失败,请稍后重试!");
     List<WareHouse> eList = new List<WareHouse>();
     infoList.ForEach(x =>
     {
         WareHouse entity = new WareHouse();
         DESwap. WareHouseDTE(x, entity);
         eList.Add(entity);
     });
     using (var DbContext = new MRPDbContext())
     {
     WareHouseRpt.Insert(DbContext, eList);
     DbContext.SaveChanges();
     }
     result.ResultType = OperationResultType.Success;
     result.Message = "操作成功!";
     return result;
 }
 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;
 }
 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;
 }
 public virtual OperationResult Remove(string key)
 {
     OperationResult result = new OperationResult(OperationResultType.Error, "操作失败,请稍后重试!");
     using (var DbContext = new MRPDbContext())
     {
     MaterialPurchaseItem entity = MaterialPurchaseItemRpt.Get(DbContext, key);
     MaterialPurchaseItemRpt.Delete(DbContext, entity);
     DbContext.SaveChanges();
     }
     result.ResultType = OperationResultType.Success;
     result.Message = "操作成功!";
     return result;
 }
 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;
 }
 public virtual OperationResult Modify(ManufacturePlanInfo info)
 {
     OperationResult result = new OperationResult(OperationResultType.Error, "操作失败,请稍后重试!");
     using (var DbContext = new MRPDbContext())
     {
     ManufacturePlan entity = ManufacturePlanRpt.Get(DbContext, info.Id);
     DESwap.ManufacturePlanDTE(info, entity);
     ManufacturePlanRpt.Update(DbContext, entity);
     DbContext.SaveChanges();
     }
     result.ResultType = OperationResultType.Success;
     result.Message = "操作成功!";
     return result;
 }
 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;
 }
 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;
 }
 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;
 }
 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;
 }
Esempio n. 16
0
 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;
 }