private void loadInOutComboBox() { DataTable items = DisplayTools.getComboBoxPattern(); DataRow row1 = items.NewRow(); DataRow row2 = items.NewRow(); row1["value"] = 0; row1["display"] = "Plătit"; row2["value"] = 1; row2["display"] = "Încasat"; items.Rows.Add(row1); items.Rows.Add(row2); DisplayTools.setComboBoxSource(comboBox1, items); }
private void loadAccountsComboBox() { DataTable items = DisplayTools.getComboBoxPattern(); if (Core.CurrentProfile.HasAccounts) { for (int i = 0; i < Core.CurrentProfile.Accounts.Length; i++) { DataRow row = items.NewRow(); Account account = Core.CurrentProfile.Accounts[i]; row["value"] = account.Id; row["display"] = account.Name + " " + account.Balance + " " + account.ACurrency.Simbol; items.Rows.Add(row); } } DisplayTools.setComboBoxSource(comboBox4, items); }
private void loadTargetsComboBox() { DataTable items = DisplayTools.getComboBoxPattern(); if (Core.CurrentProfile.HasTargets) { for (int i = 0; i < Core.CurrentProfile.Targets.Length; i++) { DataRow row = items.NewRow(); row["value"] = Core.CurrentProfile.Targets[i].Id; row["display"] = Core.CurrentProfile.Targets[i].Name; items.Rows.Add(row); } } DataRow other = items.NewRow(); other["value"] = -1; other["display"] = "Altul:"; items.Rows.Add(other); DisplayTools.setComboBoxSource(comboBox3, items); }
private void FillAccountsComboBox() { DataTable items = DisplayTools.getComboBoxPattern(); if (Core.CurrentProfile.HasAccounts) { for (int i = 0; i < Core.CurrentProfile.Accounts.Length; i++) { Account account = Core.CurrentProfile.Accounts[i]; DataRow row = items.NewRow(); row["value"] = account.Id; row["display"] = account.Name + " " + account.Balance + " " + account.ACurrency.Simbol; items.Rows.Add(row); } } else { DataRow row = items.NewRow(); row["value"] = 0; row["display"] = "Nu aveti inca nici un cont."; items.Rows.Add(row); } DisplayTools.setComboBoxSource(comboBox1, items); }