private ICreateInOutLine CreateInOutLine(InOutCommands.AddLine d) { var line = new CreateInOutLine(); var prdState = GetProductState(d.ProductId); string attrSetInstId = AttributeSetInstanceUtils.CreateAttributeSetInstance(AttributeSetService, AttributeSetInstanceApplicationService, prdState.AttributeSetId, d.AttributeSetInstance); if (_log.IsDebugEnabled) { _log.Debug("Create attribute set instance, id: " + attrSetInstId); } line.LineNumber = d.LineNumber; line.ProductId = prdState.ProductId; line.LocatorId = d.LocatorId; line.AttributeSetInstanceId = attrSetInstId; line.QuantityUomId = d.QuantityUomId; line.MovementQuantity = d.MovementQuantity; line.Description = d.Description; line.Active = true; //todo More proerties??? return(line); }
public override void When(InOutCommands.AddLine c) { var inOut = AssertDocumentStatus(c.DocumentNumber, DocumentStatusIds.Drafted); var createLine = CreateInOutLine(c); var updateInOut = new MergePatchInOut(); updateInOut.DocumentNumber = c.DocumentNumber; updateInOut.Version = inOut.Version; updateInOut.CommandId = c.CommandId; updateInOut.RequesterId = c.RequesterId; updateInOut.InOutLineCommands.Add(createLine); When(updateInOut); }
public void When(InOutCommands.AddLine c) { throw new NotImplementedException();//todo }