当前位置: 首页>>代码示例>>C#>>正文


C# OrderMaster.AddOrderDetail方法代码示例

本文整理汇总了C#中com.Sconit.Entity.ORD.OrderMaster.AddOrderDetail方法的典型用法代码示例。如果您正苦于以下问题:C# OrderMaster.AddOrderDetail方法的具体用法?C# OrderMaster.AddOrderDetail怎么用?C# OrderMaster.AddOrderDetail使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.Sconit.Entity.ORD.OrderMaster的用法示例。


在下文中一共展示了OrderMaster.AddOrderDetail方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CreateExScrapOrder

        public OrderMaster CreateExScrapOrder(MrpExScrap mrpExScrap)
        {
            var newOrder = new OrderMaster();
            Item item = this.itemMgr.GetCacheItem(mrpExScrap.Item);
            mrpExScrap.ItemDescription = item.Description;
            this.genericMgr.Create(mrpExScrap);
            if(mrpExScrap.Item == BusinessConstants.VIRTUALSECTION)
            {
                //nothing todo
            }
            else if(mrpExScrap.ScrapType == CodeMaster.ScheduleType.MES24 || mrpExScrap.ScrapType == CodeMaster.ScheduleType.MES25)
            {
                //只记录废品数,无材料消耗
                DateTime startTime = mrpExScrap.EffectDate;
                DateTime windowTime = mrpExScrap.EffectDate;
                workingCalendarMgr.GetStartTimeAndWindowTime(mrpExScrap.Shift, mrpExScrap.EffectDate, out startTime, out windowTime);

                FlowMaster flowMaster = this.genericMgr.FindById<FlowMaster>(mrpExScrap.Flow);
                newOrder = orderMgr.TransferFlow2Order(flowMaster, false);
                newOrder.Shift = mrpExScrap.Shift;
                newOrder.StartTime = startTime;
                newOrder.WindowTime = windowTime;
                newOrder.EffectiveDate = mrpExScrap.EffectDate;
                newOrder.ReferenceOrderNo = mrpExScrap.Id.ToString();
                newOrder.Priority = CodeMaster.OrderPriority.Normal;

                OrderDetail newOrderDetail = new OrderDetail();
                newOrderDetail.Item = item.Code;
                newOrderDetail.UnitCount = (decimal)item.UnitCount;
                newOrderDetail.Uom = "KG";
                newOrderDetail.BaseUom = item.Uom;
                newOrderDetail.ItemDescription = item.Description;
                newOrderDetail.Sequence = 10;
                newOrderDetail.MinUnitCount = item.UnitCount;
                newOrderDetail.OrderedQty = (decimal)mrpExScrap.ScrapQty;
                newOrderDetail.LocationFrom = flowMaster.LocationFrom;
                newOrderDetail.LocationTo = flowMaster.LocationTo;
                newOrderDetail.CurrentScrapQty = newOrderDetail.OrderedQty;
                newOrderDetail.ScheduleType = mrpExScrap.ScrapType;

                newOrder.ExternalOrderNo = newOrderDetail.ScheduleType.ToString();
                newOrder.AddOrderDetail(newOrderDetail);
                newOrder.SubType = CodeMaster.OrderSubType.Other;
                newOrder.IsQuick = true;
                newOrder.IsShipScanHu = false;
                newOrder.IsReceiveScanHu = false;
                newOrder.CreateHuOption = CodeMaster.CreateHuOption.None;
                orderMgr.CreateOrder(newOrder, true);
                mrpExScrap.OrderNo = newOrder.OrderNo;
            }
            return newOrder;
        }
开发者ID:zhsh1241,项目名称:Sconit5_Shenya,代码行数:52,代码来源:MrpOrderMgrImpl.cs


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