示例#1
0
文件: BanksList.cs 项目: Kiselb/bps
 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();
         }
     }
 }
示例#2
0
文件: BanksList.cs 项目: Kiselb/bps
        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);
        }