Exemplo n.º 1
0
        private DataRow addNewNomenclatureRow(long stickerId, long nomenclatureId)
        {
            var newRow = NomenclatureInfo.GetNewRow(this);

            newRow[NomenclatureCode] = stickerId;
            newRow[Nomenclature]     = nomenclatureId;
            newRow.AddRowToTable(this);

            return(newRow);
        }
Exemplo n.º 2
0
        private void addWareRow(Stickers sticker, Cells cell, Nomenclature nomenclature, int quantity, long partyId)
        {
            if (quantity > 0 && !nomenclature.Empty)
            {
                var row = NomenclatureInfo.GetNewRow(this);

                row[Nomenclature]      = nomenclature.Id;
                row[NomenclaturePlan]  = quantity;
                row[NomenclatureParty] = partyId;
                row[NomenclatureCode]  = sticker.Id;
                row[NomenclatureCell]  = cell.Id;

                row.AddRowToTable(this);
            }
        }
Exemplo n.º 3
0
        internal void FixWrongRelations()
        {
            var table = DB.NewQuery("SELECT Pallet, PreviousPallet, -Quantity Quantity FROM [dbo].[GetPalletsRelations] ('0001-01-01',0,0) where Quantity<0 order by Quantity").SelectToTable();

            foreach (DataRow row in table.Rows)
            {
                var rowsQuantity = Convert.ToInt32(row["Quantity"]);
                for (int i = 0; i < rowsQuantity; i++)
                {
                    var newRow = NomenclatureInfo.GetNewRow(this);
                    newRow[PalletCode] = Convert.ToInt64(row["Pallet"]);
                    newRow[FinalCodeOfPreviousPallet] = Convert.ToInt64(row["PreviousPallet"]);
                    newRow[RowState]  = RowsStates.Completed;
                    newRow[FinalCell] = Consts.EmptyCell.Id;

                    newRow.AddRowToTable(this);
                }
            }
        }