本文整理汇总了C#中com.Sconit.Entity.MasterData.OrderHead类的典型用法代码示例。如果您正苦于以下问题:C# OrderHead类的具体用法?C# OrderHead怎么用?C# OrderHead使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
OrderHead类属于com.Sconit.Entity.MasterData命名空间,在下文中一共展示了OrderHead类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: btnPrint_Click
protected void btnPrint_Click(object sender, EventArgs e)
{
OrderHead order = new OrderHead();
if (this.tbPartyFrom.Text.Trim() != string.Empty)
{
order.PartyFrom = ThePartyMgr.LoadParty(this.tbPartyFrom.Text.Trim());
}
if (this.tbOrderNo.Text.Trim() != string.Empty)
{
order.OrderNo = this.tbOrderNo.Text.Trim();
}
if (this.tbStartTime.Text.Trim() != string.Empty)
{
order.ReleaseDate = DateTime.Parse(this.tbStartTime.Text.Trim());
}
if (this.tbEndTime.Text.Trim() != string.Empty)
{
order.StartDate = DateTime.Parse(this.tbEndTime.Text.Trim());
}
order.CreateUser = this.CurrentUser;
order.CreateDate = DateTime.Now;
IList<object> list = new List<object>();
IList<WoReceiptView> woReceiptList = TheCriteriaMgr.FindAll<WoReceiptView>(SetCriteria());
list.Add(order);
list.Add(woReceiptList);
string printUrl = TheReportMgr.WriteToFile("WoReceipt.xls", list);
Page.ClientScript.RegisterStartupScript(GetType(), "method", " <script language='javascript' type='text/javascript'>PrintOrder('" + printUrl + "'); </script>");
this.ShowSuccessMessage("MasterData.WoReceipt.Print.Successful");
}
示例2: TryAddOrderOperation
public void TryAddOrderOperation(OrderHead orderHead, int operation, string reference)
{
bool hasOp = false;
foreach (OrderOperation orderOperation in orderHead.OrderOperations)
{
if (orderOperation.Operation == operation)
{
if (orderOperation.Reference == reference
|| (orderOperation.Reference == null && reference == null))
{
hasOp = true;
}
}
}
if (!hasOp)
{
//没有找到Op,新增
RoutingDetail routingDetail = this.routingDetailMgrE.LoadRoutingDetail(orderHead.Routing, operation, reference);
if (routingDetail != null)
{
OrderOperation orderOperation = this.GenerateOrderOperation(orderHead, routingDetail);
this.CreateOrderOperation(orderOperation);
}
else
{
throw new BusinessErrorException("Order.Error.RoutingDetail.Not.Found", orderHead.Routing.Code, operation.ToString(), reference);
}
}
}
示例3: InitPageParameter
public void InitPageParameter(OrderHead orderHead)
{
IList<OrderLocationTransaction> outLocTransList = new List<OrderLocationTransaction>();
foreach (OrderDetail orderDetail in orderHead.OrderDetails)
{
decimal currentReceiveQty = orderDetail.CurrentReceiveQty == null ? 0 : (decimal)orderDetail.CurrentReceiveQty;
decimal currentRejectQty = orderDetail.CurrentRejectQty == null ? 0 : (decimal)orderDetail.CurrentRejectQty;
decimal currentScrapQty = orderDetail.CurrentScrapQty == null ? 0 : (decimal)orderDetail.CurrentScrapQty;
decimal backoutQty = currentReceiveQty + currentRejectQty + currentScrapQty;
foreach (OrderLocationTransaction orderLocTrans in orderDetail.OrderLocationTransactions)
{
if (orderLocTrans.IOType == BusinessConstants.IO_TYPE_IN)
{
orderLocTrans.CurrentReceiveQty = orderLocTrans.UnitQty * currentReceiveQty;
orderLocTrans.CurrentRejectQty = orderLocTrans.UnitQty * currentRejectQty;
orderLocTrans.CurrentScrapQty = orderLocTrans.UnitQty * currentScrapQty;
outLocTransList.Add(orderLocTrans);
}
}
}
this.GV_List.DataSource = outLocTransList;
this.GV_List.DataBind();
}
示例4: GenerateInProcessLocation
public InProcessLocation GenerateInProcessLocation(OrderHead orderHead)
{
InProcessLocation inProcessLocation = new InProcessLocation();
CloneHelper.CopyProperty(orderHead, inProcessLocation, OrderHead2InProcessLocationCloneField);
return inProcessLocation;
}
示例5: GenerateOrderOperation
public OrderOperation GenerateOrderOperation(OrderHead orderHead, RoutingDetail routingDetail)
{
OrderOperation orderOp = new OrderOperation();
CloneHelper.CopyProperty(routingDetail, orderOp, OrderOperationCloneFields);
orderOp.OrderHead = orderHead;
//todo UnitTime��WorkTime����
orderHead.AddOrderOperation(orderOp);
return orderOp;
}
示例6: 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;
}
}
示例7: CreateOrderBinding
public OrderBinding CreateOrderBinding(OrderHead order, Flow bindedFlow, string bindingType)
{
OrderBinding orderBinding = new OrderBinding();
orderBinding.OrderHead = order;
orderBinding.BindedFlow = bindedFlow;
orderBinding.BindingType = bindingType;
this.CreateOrderBinding(orderBinding);
return orderBinding;
}
示例8: InitPageParameter
public void InitPageParameter(OrderHead orderHead)
{
this.GV_List.DataSource = orderHead.OrderDetails;
#region 设置默认LotNo
string lotNo = LotNoHelper.GenerateLotNo();
foreach (OrderDetail orderDetail in orderHead.OrderDetails)
{
orderDetail.HuLotNo = lotNo;
}
#endregion
this.GV_List.DataBind();
}
示例9: GenerateOrderHeadSubsidiary
public void GenerateOrderHeadSubsidiary(OrderHead orderHead)
{
if (orderHead.OrderDetails != null && orderHead.OrderDetails.Count > 0)
{
foreach (OrderDetail orderDetail in orderHead.OrderDetails)
{
this.orderDetailMgr.GenerateOrderDetailSubsidiary(orderDetail);
}
}
#region ������������Operation
if (orderHead.Type != BusinessConstants.CODE_MASTER_ORDER_TYPE_VALUE_PRODUCTION
&& orderHead.Routing != null)
{
this.orderOperationMgr.GenerateOrderOperation(orderHead);
}
#endregion
}
示例10: InitPageParameter
public void InitPageParameter(OrderHead orderHead, bool hasOdd, bool isOddCreateHu)
{
IList<OrderDetail> orderDetailList = new List<OrderDetail>();
foreach (OrderDetail orderDetail in orderHead.OrderDetails)
{
if (orderDetail.CurrentReceiveQty != 0 || orderDetail.CurrentRejectQty != 0 || orderDetail.CurrentScrapQty != 0)
{
orderDetailList.Add(orderDetail);
}
}
this.GV_List.DataSource = orderDetailList;
this.GV_List.DataBind();
if (hasOdd)
{
this.lblIsOddCreateHu.Visible = true;
this.cbIsOddCreateHu.Visible = true;
this.cbIsOddCreateHu.Checked = isOddCreateHu;
}
}
示例11: GetList
private IList<OrderHead> GetList()
{
IList<OrderHead> orderHeadList = new List<OrderHead>();
foreach (GridViewRow gvr in GV_List.Rows)
{
string flowCode = ((Label)gvr.FindControl("lblFlow")).Text;
DateTime startTime = DateTime.Parse(((TextBox)gvr.FindControl("tbStartTime")).Text);
DateTime windowTime = DateTime.Parse(((TextBox)gvr.FindControl("tbWindowTime")).Text);
OrderHead oh = new OrderHead();
oh = TheOrderMgr.TransferFlow2Order(flowCode);
oh.Priority = BusinessConstants.CODE_MASTER_ORDER_PRIORITY_VALUE_NORMAL;
oh.StartTime = startTime;
oh.WindowTime = windowTime;
this.GetDetailControl(gvr).CollectData(oh);
OrderHelper.FilterZeroOrderQty(oh);
orderHeadList.Add(oh);
}
return orderHeadList;
}
示例12: InitPageParameter
public void InitPageParameter(OrderHead orderHead, bool isChanged)
{
if (InLocTransList == null || InLocTransList.Count == 0 || isChanged)
{
InLocTransList = new List<OrderLocationTransaction>();
IDictionary<string, int> detailDic = new Dictionary<string, int>();
foreach (OrderDetail orderDetail in orderHead.OrderDetails)
{
decimal currentReceiveQty = orderDetail.CurrentReceiveQty == null ? 0 : (decimal)orderDetail.CurrentReceiveQty;
decimal currentRejectQty = orderDetail.CurrentRejectQty == null ? 0 : (decimal)orderDetail.CurrentRejectQty;
decimal currentScrapQty = orderDetail.CurrentScrapQty == null ? 0 : (decimal)orderDetail.CurrentScrapQty;
decimal backoutQty = currentReceiveQty + currentRejectQty + currentScrapQty;
foreach (OrderLocationTransaction orderLocTrans in orderDetail.OrderLocationTransactions)
{
if (orderLocTrans.IOType == BusinessConstants.IO_TYPE_OUT)
{
if (detailDic.ContainsKey(orderLocTrans.Item.Code + "-" + orderLocTrans.Operation))
{
InLocTransList[detailDic[orderLocTrans.Item.Code + "-" + orderLocTrans.Operation]].CurrentReceiveQty += orderLocTrans.UnitQty * backoutQty;
InLocTransList[detailDic[orderLocTrans.Item.Code + "-" + orderLocTrans.Operation]].OrderedQty += orderLocTrans.OrderedQty;
if (InLocTransList[detailDic[orderLocTrans.Item.Code + "-" + orderLocTrans.Operation]].UnitQty != 0 && backoutQty != 0)
{
InLocTransList[detailDic[orderLocTrans.Item.Code + "-" + orderLocTrans.Operation]].UnitQty = InLocTransList[detailDic[orderLocTrans.Item.Code + "-" + orderLocTrans.Operation]].CurrentReceiveQty / ((InLocTransList[detailDic[orderLocTrans.Item.Code + "-" + orderLocTrans.Operation]].CurrentReceiveQty - orderLocTrans.UnitQty * backoutQty) / InLocTransList[detailDic[orderLocTrans.Item.Code + "-" + orderLocTrans.Operation]].UnitQty + backoutQty);
}
}
else
{
detailDic.Add(orderLocTrans.Item.Code + "-" + orderLocTrans.Operation, InLocTransList.Count);
orderLocTrans.CurrentReceiveQty = orderLocTrans.UnitQty * backoutQty;
InLocTransList.Add(orderLocTrans);
}
}
}
}
}
this.GV_List.DataSource = InLocTransList;
this.GV_List.DataBind();
}
示例13: InitDetailParamater
private void InitDetailParamater(OrderHead orderHead)
{
Flow currentFlow = this.TheFlowMgr.LoadFlow(orderHead.Flow);
bool isScanHu = currentFlow.IsShipScanHu || currentFlow.IsReceiptScanHu || (currentFlow.CreateHuOption == BusinessConstants.CODE_MASTER_CREATE_HU_OPTION_VALUE_GI) || currentFlow.CreateHuOption == BusinessConstants.CODE_MASTER_CREATE_HU_OPTION_VALUE_GR;
if (this.IsQuick && isScanHu && !this.IsReject)
{
this.ucHuList.InitPageParameter(orderHead);
this.ucList.Visible = false;
this.ucHuList.Visible = true;
}
else
{
if (!currentFlow.IsListDetail)
{
orderHead.OrderDetails = new List<OrderDetail>();
}
this.ucList.CleanPrice();
this.ucList.IsReject = this.IsReject;
this.ucList.InitPageParameter(orderHead);
this.ucList.Visible = true;
this.ucHuList.Visible = false;
}
}
示例14: InitPageParameter
//供新增订单使用,由于还订单还没有保存,所以需要在ViewState中缓存OrderHead
public void InitPageParameter(OrderHead orderHead)
{
this.NewOrEdit = "New";
this.TheOrder = orderHead;
this.TaxRate = TheOrder.TaxCode == null ? decimal.Zero : decimal.Parse(TheOrder.TaxCode);
this.hfTax.Value = this.TaxRate.ToString("0.##");
this.FlowCode = orderHead.Flow;
this.StartTime = orderHead.StartTime > DateTime.Now ? orderHead.StartTime : DateTime.Now;
this.PartyFromCode = orderHead.PartyFrom.Code;
this.PartyToCode = orderHead.PartyTo.Code;
if (orderHead.Currency != null)
{
this.currencyCode = orderHead.Currency.Code;
}
int seqInterval = int.Parse(TheEntityPreferenceMgr.LoadEntityPreference(BusinessConstants.ENTITY_PREFERENCE_CODE_SEQ_INTERVAL).Value);
IList<OrderDetail> orderDetailList = new List<OrderDetail>();
IList<OrderDetail> oldrderDetailList = new List<OrderDetail>();
if (orderHead.OrderDetails != null && orderHead.OrderDetails.Count > 0)
{
foreach (OrderDetail orderDetail in orderHead.OrderDetails)
{
if (OrderHelper.IsOrderDetailValid(orderDetail, orderHead.WindowTime))
{
orderDetailList.Add(orderDetail);
oldrderDetailList.Add(orderDetail);
}
}
}
//经过有效期校验,明细会改变
TheOrder.OrderDetails = oldrderDetailList;
if (this.IsShowPrice && !orderHead.IsShowPrice)
{
this.IsShowPrice = false;
}
if (orderHead.AllowCreateDetail)
{
OrderDetail blankOrderDetail = new OrderDetail();
int seq = int.Parse(TheEntityPreferenceMgr.LoadEntityPreference(BusinessConstants.ENTITY_PREFERENCE_CODE_SEQ_INTERVAL).Value);
if (this.TheOrder.OrderDetails == null || this.TheOrder.OrderDetails.Count == 0)
{
blankOrderDetail.Sequence = seqInterval;
}
else
{
CurrentSeq = this.TheOrder.OrderDetails.Last<OrderDetail>().Sequence + seqInterval;
blankOrderDetail.Sequence = CurrentSeq;
}
blankOrderDetail.IsBlankDetail = true;
orderDetailList.Add(blankOrderDetail);
}
this.GV_List.DataSource = orderDetailList;
this.GV_List.DataBind();
UpdateView(this.TheOrder);
}
示例15: HiddenGVColumn
//根据订单类型隐藏相应列
private void HiddenGVColumn(OrderHead orderHead)
{
#region 按flowtype显示
if (this.ModuleType == BusinessConstants.CODE_MASTER_ORDER_TYPE_VALUE_PROCUREMENT)
{
this.GV_List.Columns[6].Visible = false; //来源库位
this.GV_List.Columns[8].Visible = false; //物料清单
}
else if (this.ModuleType == BusinessConstants.CODE_MASTER_ORDER_TYPE_VALUE_DISTRIBUTION)
{
this.GV_List.Columns[7].Visible = false; //目的库位
this.GV_List.Columns[8].Visible = false; //物料清单
}
else if (this.ModuleType == BusinessConstants.CODE_MASTER_ORDER_TYPE_VALUE_PRODUCTION)
{
this.GV_List.Columns[6].Visible = false; //来源库位
}
else if (this.ModuleType == BusinessConstants.CODE_MASTER_ORDER_TYPE_VALUE_TRANSFER)
{
this.GV_List.Columns[8].Visible = false; //物料清单
}
#endregion
#region 数量字段
if (orderHead.Status == null ||
orderHead.Status == string.Empty ||
orderHead.Status == BusinessConstants.CODE_MASTER_STATUS_VALUE_CREATE)
{
this.GV_List.Columns[10].Visible = false; //已发数量
this.GV_List.Columns[11].Visible = false; //发货数量
this.GV_List.Columns[12].Visible = false; //已收数量
this.GV_List.Columns[13].Visible = false; //收货数量
this.GV_List.Columns[14].Visible = false; //次品数量
this.GV_List.Columns[15].Visible = false; //废品数量
this.GV_List.Columns[20].Visible = orderHead.AllowCreateDetail; //操作按钮
}
else if (orderHead.Status == BusinessConstants.CODE_MASTER_STATUS_VALUE_SUBMIT)
{
this.GV_List.Columns[10].Visible = false; //已发数量
this.GV_List.Columns[11].Visible = false; //发货数量
this.GV_List.Columns[12].Visible = false; //已收数量
this.GV_List.Columns[13].Visible = false; //收货数量
this.GV_List.Columns[14].Visible = false; //次品数量
this.GV_List.Columns[15].Visible = false; //废品数量
this.GV_List.Columns[20].Visible = false; //操作按钮
}
else if (orderHead.Status == BusinessConstants.CODE_MASTER_STATUS_VALUE_CANCEL)
{
this.GV_List.Columns[10].Visible = false; //已发数量
this.GV_List.Columns[11].Visible = false; //发货数量
this.GV_List.Columns[12].Visible = false; //已收数量
this.GV_List.Columns[13].Visible = false; //收货数量
this.GV_List.Columns[14].Visible = false; //次品数量
this.GV_List.Columns[15].Visible = false; //废品数量
this.GV_List.Columns[20].Visible = false; //操作按钮
}
else if (orderHead.Status == BusinessConstants.CODE_MASTER_STATUS_VALUE_INPROCESS)
{
if (this.ModuleType == BusinessConstants.CODE_MASTER_ORDER_TYPE_VALUE_PROCUREMENT)
{
this.GV_List.Columns[10].Visible = false; //已发数量
this.GV_List.Columns[11].Visible = false; //发货数量
this.GV_List.Columns[12].Visible = true; //已收数量
this.GV_List.Columns[13].Visible = false; //收货数量
this.GV_List.Columns[14].Visible = false; //次品数量
this.GV_List.Columns[15].Visible = false; //废品数量
this.GV_List.Columns[20].Visible = false; //操作按钮
}
else if (this.ModuleType == BusinessConstants.CODE_MASTER_ORDER_TYPE_VALUE_DISTRIBUTION)
{
this.GV_List.Columns[10].Visible = true; //已发数量
this.GV_List.Columns[11].Visible = false; //发货数量
this.GV_List.Columns[12].Visible = true; //已收数量
this.GV_List.Columns[13].Visible = false; //收货数量
this.GV_List.Columns[14].Visible = false; //次品数量
this.GV_List.Columns[15].Visible = false; //废品数量
this.GV_List.Columns[20].Visible = false; //操作按钮
}
else if (this.ModuleType == BusinessConstants.CODE_MASTER_ORDER_TYPE_VALUE_PRODUCTION)
{
this.GV_List.Columns[10].Visible = false; //已发数量
this.GV_List.Columns[11].Visible = false; //发货数量
this.GV_List.Columns[12].Visible = true; //已收数量
this.GV_List.Columns[13].Visible = true; //收货数量
this.GV_List.Columns[14].Visible = true; //次品数量
this.GV_List.Columns[15].Visible = true; //废品数量
this.GV_List.Columns[20].Visible = false; //操作按钮
}
else if (this.ModuleType == BusinessConstants.CODE_MASTER_ORDER_TYPE_VALUE_TRANSFER)
{
this.GV_List.Columns[10].Visible = false; //已发数量
this.GV_List.Columns[11].Visible = false; //发货数量
this.GV_List.Columns[12].Visible = false; //已收数量
this.GV_List.Columns[13].Visible = true; //收货数量
this.GV_List.Columns[14].Visible = false; //次品数量
this.GV_List.Columns[15].Visible = false; //废品数量
//.........这里部分代码省略.........