Beispiel #1
0
        private void newBeneficaryToolStripMenuItem_Click(object sender, EventArgs e)
        {
            BeneficiaryForm bForm = new BeneficiaryForm(null)
            {
                MdiParent = this
            };

            bForm.Show();
        }
 private void editToolStripMenuItem_Click(object sender, EventArgs e)
 {
     //TODO: Call the edit form with selected item ID
     if (lvBeneficiaries.SelectedItems.Count > 0)
     {
         var             itemIndex     = lvBeneficiaries.SelectedIndices[0];
         var             beneficiaryId = int.Parse(lvBeneficiaries.SelectedItems[0].Text);
         BeneficiaryForm bf            = new BeneficiaryForm(beneficiaryId)
         {
             MdiParent = this.MdiParent
         };
         bf.Show();
         this.Dispose();
     }
 }