private void refreshCurrentBatchCost(string name) { DataTable data = getService.getData("select top 1 * from " + app.objects["batches"] + " b, " + app.objects["stocks"] + " s where b.name = '" + name + "'and b.id = s.bid"); if (data.Rows.Count > 0) { int balance = data.Rows[0].Field <int>("Cost"); if (balance == 0) { totalBalanceLabel.Text = "0.00"; } else { totalBalanceLabel.Text = app.toMoneyOf(balance); } } else { totalBalanceLabel.Text = "0.00"; } accountBalancePanel.Show(); }