Some simple code for barcode import
inventItemBarCode.barcodeSetupId = RetailInventTable::find(itemCode).BarcodeSetupId;
inventItemBarCode.inventDimId = InventDim::findOrCreate(inventDim).inventDimId;
inventItemBarCode.RetailVariantId = InventDimCombination::find(itemCode,inventItemBarCode.inventDimId).RetailVariantId;
inventItemBarCode.itemId = itemCode;
inventItemBarCode.description = InventTable::find(itemCode).defaultProductName();
inventItemBarCode.UnitID = InventTable::find(itemCode).salesUnitId();
inventItemBarCode.qty = qty;
inventItemBarCode.useForInput = NoYes::Yes;
inventItemBarCode.useForPrinting = NoYes::Yes;
inventItemBarCode.itemBarCode = barcode;
if(inventItemBarCode.validateWrite())
inventItemBarCode.insert();
inventItemBarCode.barcodeSetupId = RetailInventTable::find(itemCode).BarcodeSetupId;
inventItemBarCode.inventDimId = InventDim::findOrCreate(inventDim).inventDimId;
inventItemBarCode.RetailVariantId = InventDimCombination::find(itemCode,inventItemBarCode.inventDimId).RetailVariantId;
inventItemBarCode.itemId = itemCode;
inventItemBarCode.description = InventTable::find(itemCode).defaultProductName();
inventItemBarCode.UnitID = InventTable::find(itemCode).salesUnitId();
inventItemBarCode.qty = qty;
inventItemBarCode.useForInput = NoYes::Yes;
inventItemBarCode.useForPrinting = NoYes::Yes;
inventItemBarCode.itemBarCode = barcode;
if(inventItemBarCode.validateWrite())
inventItemBarCode.insert();
Is there any way to debug a DataProvider class, a class that extendes from SRSReportDataProviderBase, When my AOS, my client and my SQL are separated in different servers?Or there is any way to create a unit test or a job, that I could execute the DataProvider class? so I could debug it?
ReplyDeletemake barcode in c#.net