• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# imp.MRPDbContext类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中sct.svc.mrp.imp.MRPDbContext的典型用法代码示例。如果您正苦于以下问题:C# MRPDbContext类的具体用法?C# MRPDbContext怎么用?C# MRPDbContext使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



MRPDbContext类属于sct.svc.mrp.imp命名空间,在下文中一共展示了MRPDbContext类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: 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;
 }
开发者ID:liurongjin,项目名称:frame,代码行数:14,代码来源:MaterialPurchaseItemBaseService.cs


示例2: 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;
 }
开发者ID:liurongjin,项目名称:frame,代码行数:14,代码来源:GatherBillBaseService.cs


示例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;
 }
开发者ID:liurongjin,项目名称:frame,代码行数:14,代码来源:WareHouseBaseService.cs


示例4: 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;
 }
开发者ID:liurongjin,项目名称:frame,代码行数:14,代码来源:ProductWareStockBaseService.cs


示例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;
 }
开发者ID:liurongjin,项目名称:frame,代码行数:19,代码来源:ProductCatalogBaseService.cs


示例6: Load

 public virtual ProductCatalogInfo Load(string key)
 {
     ProductCatalogInfo info = new ProductCatalogInfo();
     using (var DbContext = new MRPDbContext())
     {
     ProductCatalog entity = ProductCatalogRpt.Get(DbContext, key);
     DESwap.ProductCatalogETD(entity,info);
     }
     return info;
 }
开发者ID:liurongjin,项目名称:frame,代码行数:10,代码来源:ProductCatalogBaseService.cs


示例7: Load

 public virtual WareHouseInfo Load(string key)
 {
     WareHouseInfo info = new WareHouseInfo();
     using (var DbContext = new MRPDbContext())
     {
     WareHouse entity = WareHouseRpt.Get(DbContext, key);
     DESwap.WareHouseETD(entity,info);
     }
     return info;
 }
开发者ID:liurongjin,项目名称:frame,代码行数:10,代码来源:WareHouseBaseService.cs


示例8: 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;
 }
开发者ID:liurongjin,项目名称:frame,代码行数:19,代码来源:ManufacturePlanBaseService.cs


示例9: Load

 public virtual ManufacturePlanInfo Load(string key)
 {
     ManufacturePlanInfo info = new ManufacturePlanInfo();
     using (var DbContext = new MRPDbContext())
     {
     ManufacturePlan entity = ManufacturePlanRpt.Get(DbContext, key);
     DESwap.ManufacturePlanETD(entity,info);
     }
     return info;
 }
开发者ID:liurongjin,项目名称:frame,代码行数:10,代码来源:ManufacturePlanBaseService.cs


示例10: ListByCondition

        public PageResult<ProductInfo> ListByCondition(NameValueCollection searchCondtionCollection, NameValueCollection sortCollection, int pageNumber, int pageSize)
        {
            PageResult<ProductInfo> result = new PageResult<ProductInfo>();
            int skip = (pageNumber - 1) * pageSize;
            int take = pageSize;
            List<ProductInfo> list = null;

            using (var DbContext = new MRPDbContext())
            {
                var query = from i in DbContext.Product
                            join p in DbContext.ProductCatalog on i.ProductCatalogId equals p.Id
                            select new ProductInfo()
                            {
                                Id = i.Id,
                                ProductCode = i.ProductCode,
                                ProductName = i.ProductName,
                                ProductCatalogName = p.ProductCatalogName,
                                ProductCatalogId = i.ProductCatalogId,
                                ImageUrl = i.ImageUrl,
                                SearchKey = i.SearchKey,
                                Special = i.Special,
                                Size = i.Size,
                                MinStock = i.MinStock,
                                Stock = i.Stock,
                                MaxStock = i.MaxStock,
                                Texture = i.Texture,
                                Color = i.Color,
                                UnitId = i.UnitId,
                                SYS_IsValid = i.SYS_IsValid,
                                SYS_OrderSeq = i.SYS_OrderSeq,
                                SYS_AppId = i.SYS_AppId,
                                SYS_StaffId = i.SYS_StaffId,
                                SYS_StationId = i.SYS_StationId,
                                SYS_DepartmentId = i.SYS_DepartmentId,
                                SYS_CompanyId = i.SYS_CompanyId,
                                SYS_CreateTime = i.SYS_CreateTime
                            };

                #region 条件
                foreach (string key in searchCondtionCollection)
                {
                    string condition = searchCondtionCollection[key];
                    switch (key.ToLower())
                    {
                        case "productname":
                            query = query.Where(x => x.ProductName.Contains(condition));
                            break;
                        case "productcatalogid":
                            query = query.Where(x => x.ProductCatalogId.Equals(condition));
                            break;
                        case "searchkey":
                            query = query.Where(x => x.SearchKey.Equals(condition));
                            break;
                        case "isvalid":
                            int value = Convert.ToInt32(condition);
                            query = query.Where(x => x.SYS_IsValid.Equals(value));
                            break;
                        default:
                            break;
                    }
                }
                #endregion

                result.TotalRecords = query.Count();

                #region 排序
                foreach (string sort in sortCollection)
                {
                    string direct = sortCollection[sort];
                    switch (sort.ToLower())
                    {
                        case "createtime":
                            if (direct.ToLower().Equals("asc"))
                            {
                                query = query.OrderBy(x => new { x.SYS_CreateTime }).Skip(skip).Take(take);
                            }
                            else
                            {
                                query = query.OrderByDescending(x => new { x.SYS_CreateTime }).Skip(skip).Take(take);
                            }
                            break;
                        case "productname":
                            if (direct.ToLower().Equals("asc"))
                            {
                                query = query.OrderBy(x => x.ProductName).Skip(skip).Take(take);
                            }
                            else
                            {
                                query = query.OrderByDescending(x => x.ProductName).Skip(skip).Take(take);
                            }
                            break;
                        default:
                            query = query.OrderByDescending(x => new { x.SYS_OrderSeq }).Skip(skip).Take(take);
                            break;
                    }
                }
                #endregion
                list = query.ToList();
            }

//.........这里部分代码省略.........
开发者ID:liurongjin,项目名称:frame,代码行数:101,代码来源:ProductService.cs


示例11: Load

 public virtual ProductOrderItemInfo Load(string key)
 {
     ProductOrderItemInfo info = new ProductOrderItemInfo();
     using (var DbContext = new MRPDbContext())
     {
     ProductOrderItem entity = ProductOrderItemRpt.Get(DbContext, key);
     DESwap.ProductOrderItemETD(entity,info);
     }
     return info;
 }
开发者ID:liurongjin,项目名称:frame,代码行数:10,代码来源:ProductOrderItemBaseService.cs


示例12: ListAllByCondition

        public virtual List<MaterialPurchaseItemInfo> ListAllByCondition(NameValueCollection searchCondtionCollection, NameValueCollection sortCollection)
        {
            List<MaterialPurchaseItem> list = null;

            using (var DbContext = new MRPDbContext())
            {
            var query = from i in DbContext.MaterialPurchaseItem
                        select i;

            #region 条件
            foreach (string key in searchCondtionCollection)
            {
                string condition = searchCondtionCollection[key];
                switch (key.ToLower())
                {
                    case "isvalid":
                        int value = Convert.ToInt32(condition);
                        query = query.Where(x => x.SYS_IsValid.Equals(value));
                        break;
                    default:
                        break;
                }
            }
            #endregion

            #region 排序
            foreach (string sort in sortCollection)
            {
                string direct = string.Empty;
                switch (sort.ToLower())
                {
                    case "createtime":
                        if (direct.ToLower().Equals("asc"))
                        {
                            query = query.OrderBy(x => new { x.SYS_CreateTime });
                        }
                        else
                        {
                            query = query.OrderByDescending(x => new { x.SYS_CreateTime });
                        }
                        break;
                    default:
                        query = query.OrderByDescending(x => new { x.SYS_OrderSeq });
                        break;
                }
            }
               list = query.ToList();
            }
            #endregion
            #region linq to entity
            List<MaterialPurchaseItemInfo> ilist = new List<MaterialPurchaseItemInfo>();
            list.ForEach(x =>
            {
                MaterialPurchaseItemInfo info = new MaterialPurchaseItemInfo();
                DESwap.MaterialPurchaseItemETD(x, info);
                ilist.Add(info);
            });
            #endregion

            return ilist;;
        }
开发者ID:liurongjin,项目名称:frame,代码行数:61,代码来源:MaterialPurchaseItemBaseService.cs


示例13: Load

 public virtual GatherBillInfo Load(string key)
 {
     GatherBillInfo info = new GatherBillInfo();
     using (var DbContext = new MRPDbContext())
     {
     GatherBill entity = GatherBillRpt.Get(DbContext, key);
     DESwap.GatherBillETD(entity,info);
     }
     return info;
 }
开发者ID:liurongjin,项目名称:frame,代码行数:10,代码来源:GatherBillBaseService.cs


示例14: Remove

 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;
 }
开发者ID:liurongjin,项目名称:frame,代码行数:13,代码来源:MaterialPurchaseItemBaseService.cs


示例15: 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;
 }
开发者ID:liurongjin,项目名称:frame,代码行数:19,代码来源:ProductWareStockBaseService.cs


示例16: Load

 public virtual ProductWareStockInfo Load(string key)
 {
     ProductWareStockInfo info = new ProductWareStockInfo();
     using (var DbContext = new MRPDbContext())
     {
     ProductWareStock entity = ProductWareStockRpt.Get(DbContext, key);
     DESwap.ProductWareStockETD(entity,info);
     }
     return info;
 }
开发者ID:liurongjin,项目名称:frame,代码行数:10,代码来源:ProductWareStockBaseService.cs


示例17: ListByCondition

        public PageResult<WareHouseInfo> ListByCondition(NameValueCollection searchCondtionCollection, NameValueCollection sortCollection, int pageNumber, int pageSize)
        {
            PageResult<WareHouseInfo> result = new PageResult<WareHouseInfo>();
            int skip = (pageNumber - 1) * pageSize;
            int take = pageSize;
            List<WareHouseInfo> list = null;

            using (var DbContext = new MRPDbContext())
            {
                var query = from i in DbContext.WareHouse
                            select new WareHouseInfo()
                            {
                                Id = i.Id,
                                WareHouseCode = i.WareHouseCode,
                                WareHouseName = i.WareHouseName,
                                RegionId = i.RegionId,
                                Address = i.Address,
                                SYS_IsValid = i.SYS_IsValid,
                                SYS_OrderSeq = i.SYS_OrderSeq,
                                SYS_AppId = i.SYS_AppId,
                                SYS_StaffId = i.SYS_StaffId,
                                SYS_StationId = i.SYS_StationId,
                                SYS_DepartmentId = i.SYS_DepartmentId,
                                SYS_CompanyId = i.SYS_CompanyId,
                                SYS_CreateTime = i.SYS_CreateTime
                            };

                #region 条件
                foreach (string key in searchCondtionCollection)
                {
                    string condition = searchCondtionCollection[key];
                    switch (key.ToLower())
                    {
                        case "warehousename":
                            query = query.Where(x => x.WareHouseName.Contains(condition));
                            break;
                        case "regionid":
                            query = query.Where(x => x.RegionId.Equals(condition));
                            break;
                        case "isvalid":
                            int value = Convert.ToInt32(condition);
                            query = query.Where(x => x.SYS_IsValid.Equals(value));
                            break;
                        default:
                            break;
                    }
                }
                #endregion

                result.TotalRecords = query.Count();

                #region 排序
                foreach (string sort in sortCollection)
                {
                    string direct = sortCollection[sort];
                    switch (sort.ToLower())
                    {
                        case "createtime":
                            if (direct.ToLower().Equals("asc"))
                            {
                                query = query.OrderBy(x => new { x.SYS_CreateTime }).Skip(skip).Take(take);
                            }
                            else
                            {
                                query = query.OrderByDescending(x => new { x.SYS_CreateTime }).Skip(skip).Take(take);
                            }
                            break;
                        case "warehousename":
                            if (direct.ToLower().Equals("asc"))
                            {
                                query = query.OrderBy(x => x.WareHouseName).Skip(skip).Take(take);
                            }
                            else
                            {
                                query = query.OrderByDescending(x => x.WareHouseName).Skip(skip).Take(take);
                            }
                            break;
                        default:
                            query = query.OrderByDescending(x => new { x.SYS_OrderSeq }).Skip(skip).Take(take);
                            break;
                    }
                }
                #endregion
                list = query.ToList();
            }

            result.PageSize = pageSize;
            result.PageNumber = pageNumber;
            result.Data = list;
            return result;
        }
开发者ID:liurongjin,项目名称:frame,代码行数:91,代码来源:WareHouseService.cs


示例18: 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;
 }
开发者ID:liurongjin,项目名称:frame,代码行数:14,代码来源:ProductOrderItemBaseService.cs


示例19: Load

 public virtual MaterialWareStockInfo Load(string key)
 {
     MaterialWareStockInfo info = new MaterialWareStockInfo();
     using (var DbContext = new MRPDbContext())
     {
     MaterialWareStock entity = MaterialWareStockRpt.Get(DbContext, key);
     DESwap.MaterialWareStockETD(entity,info);
     }
     return info;
 }
开发者ID:liurongjin,项目名称:frame,代码行数:10,代码来源:MaterialWareStockBaseService.cs


示例20: Load

 public virtual MaterialPurchaseItemInfo Load(string key)
 {
     MaterialPurchaseItemInfo info = new MaterialPurchaseItemInfo();
     using (var DbContext = new MRPDbContext())
     {
     MaterialPurchaseItem entity = MaterialPurchaseItemRpt.Get(DbContext, key);
     DESwap.MaterialPurchaseItemETD(entity,info);
     }
     return info;
 }
开发者ID:liurongjin,项目名称:frame,代码行数:10,代码来源:MaterialPurchaseItemBaseService.cs



注:本文中的sct.svc.mrp.imp.MRPDbContext类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# TypeManagement.GraphDBType类代码示例发布时间:2022-05-26
下一篇:
C# data.OperationResult类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap