示例#1
0
        private void gridViewBranchBank_DoubleClick(object sender, EventArgs e)
        {
            Model.BrankBank brn_bank = gridUtility2.GetSelectedItem <Model.BrankBank>();
            if (brn_bank == null)
            {
                return;
            }
            frmEditBranchBankUpdate obj = new frmEditBranchBankUpdate(brn_bank);

            obj.updateBranch = InsertOrUpdate;
            obj.ShowDialog();
        }
示例#2
0
        private void treeList1_DoubleClick(object sender, EventArgs e)
        {
            TreeList        tree = sender as TreeList;
            TreeListHitInfo hi   = tree.CalcHitInfo(tree.PointToClient(Control.MousePosition));

            if (hi.Node != null)
            {
                TreeListNode node = treeList1.Selection[0];
                if (node.Tag.ToString() == "Parent") //is Parent (BANK)
                {
                    frmEditBankUpdate obj1 = new frmEditBankUpdate(getBankRecord(node));
                    obj1.updateBank = InsertOrUpdate;
                    obj1.ShowDialog();
                }
                else //is Child (Branch)
                {
                    BrankBank bran = getBranchBankRecord(node);
                    frmEditBranchBankUpdate obj2 = new frmEditBranchBankUpdate(bran);
                    obj2.updateBranch = InsertOrUpdate;
                    obj2.ShowDialog();
                }
            }
        }