private void editBank() { if (!this.toolBarButton2.Enabled) { return; } if (this.dvBanks.Count > 0) { BindingManagerBase bm = (BindingManagerBase)this.BindingContext[this.dvBanks]; BPS.BLL.Bank.DataSets.dsBanks.BanksRow rw = (BPS.BLL.Bank.DataSets.dsBanks.BanksRow)((DataRowView)bm.Current).Row; EditBank eb = new EditBank(rw, this.bllCity); eb.ShowDialog(); if (eb.DialogResult == DialogResult.OK) { bllBank.Update(); } } }
public static bool AddBankDialog(BPS.BLL.Bank.coBanks bll, BPS.BLL.City.coCities bllC) { BPS.BLL.Bank.DataSets.dsBanks.BanksRow rw = bll.DataSet.Banks.NewBanksRow(); EditBank eb = new EditBank(rw, bllC); eb.ShowDialog(); if (eb.DialogResult == DialogResult.OK) { bll.DataSet.Banks.AddBanksRow(rw); bll.Update(); return(true); } return(false); }