Esempio n. 1
0
        private void FillBatchesForDraft()
        {
            BatchNumberForDrafts = new List <BatchNumberBase>();

            var serialBanchesForLine = new LineSerialAndBatch(DBName, eDocumentObjectType.oDrafts);
            var tableQuery           = new TableQuery(serialBanchesForLine);

            tableQuery.Where.Add(
                new QueryParam(serialBanchesForLine.Collumns[LineSerialAndBatch.FieldsName.AbsEntry], DocEntry));

            tableQuery.Where.Add(
                new QueryParam(serialBanchesForLine.Collumns[LineSerialAndBatch.FieldsName.LineNum], LineNum));

            var baches = serialBanchesForLine.FillCollection <LineSerialAndBatch>(tableQuery);

            foreach (var lineSerialAndBatch in baches)
            {
                var newBatchForDraft = GetBatchObjectById(lineSerialAndBatch.ObjId);

                if (!newBatchForDraft.GetByKey(lineSerialAndBatch.ObjAbs))
                {
                    continue;
                }

                newBatchForDraft.Quantity = lineSerialAndBatch.Quantity;

                BatchNumberForDrafts.Add(newBatchForDraft);
            }
        }
 public LineSerialAndBatch(LineSerialAndBatch pLineSerialAndBatch)
     : this()
 {
     CopyBy(pLineSerialAndBatch);
 }