private void populatePage() { lblReturnNo.Text = _saleReturn.barcode; lblDate.Text = String.Format("{0:dd/MM/yy hh:mm}", _saleReturn.time_stamp); //customer info lblCustomerInfo.Text = _saleReturn.customer_info; //sale summary grid.AutoGenerateColumns = false; DataTable dt = SaleItem.getReturnedItemSummary(_saleReturn.id); grid.DataSource = dt; Inventory.setAmount(lblTotalAmount, dt.Compute(String.Format("SUM({0})", SaleItem.COL_SUBTOTAL), "").ToString()); Inventory.setCount(lblTotalCounts, dt.Compute(String.Format("SUM({0})", SaleItem.COL_QTY), "").ToString(), dt.Compute(String.Format("SUM({0})", SaleItem.COL_LENGTH), "").ToString()); //notes lblNotes.Text = _saleReturn.notes; }