private async void populateEditData(ReceivedNotesDataModel receivedNotes) { this.receivedNotes = receivedNotes; if (receivedNotes.goodsReceived != null) { foreach (var dt in receivedNotes.goodsReceived) { selectedStocks.Add(await DatabaseOperations.getStockById(dt.stockId)); selectedQuantity.Add(dt.quantity); } } getEditData(receivedNotes.orderId); editButton.Enabled = true; deleteButton.Enabled = true; saveButton.Enabled = false; addAllButton.Enabled = false; }
public AddReceivedGoods(ReceivedNotesDataModel receivedNotes) { InitializeComponent(); populateEditData(receivedNotes); }