コード例 #1
0
        private void btnCreateBranchBank_Click(object sender, EventArgs e)
        {
            frmCreateBranchBankUpdate obj = new frmCreateBranchBankUpdate(gridUtility1.GetSelectedItem <Model.Bank>());

            obj.AddnewBranch = InsertOrUpdate;
            obj.ShowDialog();
        }
コード例 #2
0
ファイル: frmChooseToCreate.cs プロジェクト: quangphat/TmTech
 private void btnSave_Click(object sender, System.EventArgs e)
 {
     if (rbtnBank.Checked)
     {
         frmCreateBankUpdate obj1 = new frmCreateBankUpdate();
         obj1.addnewBank = Insert;
         obj1.ShowDialog();
         Close();
     }
     if (rbtnBranch.Checked)
     {
         Model.Bank bank;
         bank = cbbBank.SelectedItem as Model.Bank;
         //using (Interface.IUnitOfWork uow = new Repository.UnitOfWork())
         //{
         //    bank = uow.BankRepository.Find(Convert.ToInt32(cbbBank.SelectedValue));
         //    uow.Commit();
         //}
         if (bank == null)
         {
             return;
         }
         frmCreateBranchBankUpdate obj2 = new frmCreateBranchBankUpdate(bank);
         obj2.AddnewBranch = Insert;
         obj2.ShowDialog();
         Close();
     }
 }