本文整理汇总了C#中com.Sconit.Entity.MasterData.OrderHead.GetOrderDetailByFlowDetailIdAndItemCode方法的典型用法代码示例。如果您正苦于以下问题:C# OrderHead.GetOrderDetailByFlowDetailIdAndItemCode方法的具体用法?C# OrderHead.GetOrderDetailByFlowDetailIdAndItemCode怎么用?C# OrderHead.GetOrderDetailByFlowDetailIdAndItemCode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.Sconit.Entity.MasterData.OrderHead
的用法示例。
在下文中一共展示了OrderHead.GetOrderDetailByFlowDetailIdAndItemCode方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CollectData
public void CollectData(OrderHead orderHead)
{
foreach (GridViewRow gvr in GV_List.Rows)
{
int flowDetailId = int.Parse(((HiddenField)gvr.FindControl("hfFlowDetailId")).Value);
string itemCode = ((Label)gvr.FindControl("lblItemCode")).Text;
decimal reqQty = decimal.Parse(((Label)gvr.FindControl("lblOrderedQty")).Text);
orderHead.GetOrderDetailByFlowDetailIdAndItemCode(flowDetailId, itemCode).RequiredQty = reqQty;
orderHead.GetOrderDetailByFlowDetailIdAndItemCode(flowDetailId, itemCode).OrderedQty = reqQty;
}
}
示例2: ConvertShiftPlanScheduleToOrders
public IList<OrderHead> ConvertShiftPlanScheduleToOrders(IList<ShiftPlanSchedule> shiftPlanScheduleList)
{
IList<OrderHead> orderHeadList = new List<OrderHead>();
if (shiftPlanScheduleList != null && shiftPlanScheduleList.Count > 0)
{
foreach (ShiftPlanSchedule sps in shiftPlanScheduleList)
{
decimal orderLotSize = sps.FlowDetail.OrderLotSize.HasValue ? sps.FlowDetail.OrderLotSize.Value : 0;
IList<decimal> reqQtyList = OrderHelper.SplitByOrderLotSize(sps.PlanQty, orderLotSize);
foreach (decimal reqQty in reqQtyList)
{
double leadTime = sps.FlowDetail.Flow.LeadTime.HasValue ? Convert.ToDouble(sps.FlowDetail.Flow.LeadTime.Value) : 0;
OrderHead oh = new OrderHead();
oh = this.TransferFlow2Order(sps.FlowDetail.Flow.Code);
oh.Priority = BusinessConstants.CODE_MASTER_ORDER_PRIORITY_VALUE_NORMAL;
oh.StartTime = shiftMgrE.GetShiftStartTime(sps.ReqDate, sps.Shift.Code);
oh.WindowTime = shiftMgrE.GetShiftEndTime(sps.ReqDate, sps.Shift.Code);
oh.GetOrderDetailByFlowDetailIdAndItemCode(sps.FlowDetail.Id, sps.FlowDetail.Item.Code).RequiredQty = reqQty;
oh.GetOrderDetailByFlowDetailIdAndItemCode(sps.FlowDetail.Id, sps.FlowDetail.Item.Code).OrderedQty = reqQty;
orderHeadList.Add(oh);
}
}
}
OrderHelper.FilterZeroOrderQty(orderHeadList);
return orderHeadList;
}
示例3: ConvertFlowPlanToOrders
public IList<OrderHead> ConvertFlowPlanToOrders(IList<FlowPlan> flowPlanList)
{
IList<OrderHead> orderHeadList = new List<OrderHead>();
if (flowPlanList != null && flowPlanList.Count > 0)
{
foreach (FlowPlan flowPlan in flowPlanList)
{
bool isExist = false;
foreach (OrderHead orderHead in orderHeadList)
{
if (orderHead.Flow.Trim().ToUpper() == flowPlan.FlowDetail.Flow.Code.Trim().ToUpper())
{
orderHead.GetOrderDetailByFlowDetailIdAndItemCode(flowPlan.FlowDetail.Id, flowPlan.FlowDetail.Item.Code).RequiredQty = flowPlan.PlanQty;
orderHead.GetOrderDetailByFlowDetailIdAndItemCode(flowPlan.FlowDetail.Id, flowPlan.FlowDetail.Item.Code).OrderedQty = flowPlan.PlanQty;
isExist = true;
break;
}
}
if (!isExist)
{
double leadTime = flowPlan.FlowDetail.Flow.LeadTime.HasValue ? Convert.ToDouble(flowPlan.FlowDetail.Flow.LeadTime.Value) : 0;
OrderHead oh = new OrderHead();
oh = this.TransferFlow2Order(flowPlan.FlowDetail.Flow.Code);
oh.Priority = BusinessConstants.CODE_MASTER_ORDER_PRIORITY_VALUE_NORMAL;
oh.StartTime = flowPlan.ReqDate.AddHours(-leadTime);
oh.WindowTime = flowPlan.ReqDate;
oh.GetOrderDetailByFlowDetailIdAndItemCode(flowPlan.FlowDetail.Id, flowPlan.FlowDetail.Item.Code).RequiredQty = flowPlan.PlanQty;
oh.GetOrderDetailByFlowDetailIdAndItemCode(flowPlan.FlowDetail.Id, flowPlan.FlowDetail.Item.Code).OrderedQty = flowPlan.PlanQty;
orderHeadList.Add(oh);
}
}
}
OrderHelper.FilterZeroOrderQty(orderHeadList);
return orderHeadList;
}
示例4: ConvertShiftPlanScheduleToOrders
public IList<OrderHead> ConvertShiftPlanScheduleToOrders(IList<ShiftPlanSchedule> shiftPlanScheduleList, decimal leadTime)
{
IList<OrderHead> orderHeadList = new List<OrderHead>();
if (shiftPlanScheduleList != null && shiftPlanScheduleList.Count > 0)
{
foreach (ShiftPlanSchedule sps in shiftPlanScheduleList)
{
decimal orderLotSize = sps.FlowDetail.OrderLotSize.HasValue ? sps.FlowDetail.OrderLotSize.Value : 0;
IList<decimal> reqQtyList = OrderHelper.SplitByOrderLotSize(sps.PlanQty, orderLotSize);
DateTime startTime = shiftMgr.GetShiftStartTime(sps.ReqDate, sps.Shift.Code);
DateTime windowTime = startTime.AddHours(Convert.ToDouble(leadTime));
if (startTime.AddHours((double)(reqQtyList.Count * leadTime)) > shiftMgr.GetShiftEndTime(sps.ReqDate, sps.Shift.Code))
{
throw new BusinessErrorException("MasterData.WindowTime.LaterThanShiftEndTime");
}
foreach (decimal reqQty in reqQtyList)
{
OrderHead oh = new OrderHead();
oh = this.TransferFlow2Order(sps.FlowDetail.Flow.Code);
oh.Priority = BusinessConstants.CODE_MASTER_ORDER_PRIORITY_VALUE_NORMAL;
oh.StartTime = startTime;
oh.WindowTime = windowTime;
oh.GetOrderDetailByFlowDetailIdAndItemCode(sps.FlowDetail.Id, sps.FlowDetail.Item.Code).RequiredQty = reqQty;
oh.GetOrderDetailByFlowDetailIdAndItemCode(sps.FlowDetail.Id, sps.FlowDetail.Item.Code).OrderedQty = reqQty;
orderHeadList.Add(oh);
startTime = windowTime;
windowTime = startTime.AddHours(Convert.ToDouble(leadTime));
}
}
}
OrderHelper.FilterZeroOrderQty(orderHeadList);
return orderHeadList;
}