Exemplo n.º 1
0
        private void lnkAddDependent_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            var frm = new DependentsForm
            {
                Operation      = CrudOperation.Add,
                PolicyHolderId = Id,
                ServiceCalls   = ServiceCalls
            };

            frm.FormClosed += (o, args) => AddNewDependentToList(o);

            frm.ShowDialog(this);
            frm.Dispose();
        }
Exemplo n.º 2
0
        private void grdDependents_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            var dataItem = (Dependent)grdDependents.Rows[e.RowIndex].DataBoundItem;
            var frm      = new DependentsForm()
            {
                DependentId    = dataItem.Id,
                PolicyHolderId = Id,
                Operation      = CrudOperation.Update,
                ServiceCalls   = ServiceCalls
            };

            frm.FormClosed += (o, args) => AddNewDependentToList(o);

            frm.ShowDialog(this);
            frm.Dispose();
        }