Esempio n. 1
0
 private void btnEditParty_Click(object sender, EventArgs e)
 {
     if (caseparties.SelectedItems[0] != null)
     {
         var selected = casePartiesList[caseparties.SelectedItems[0].Index];
         frmEditCaseParty frmEditCase = new frmEditCaseParty(selected, this);
         frmEditCase.ShowDialog();
     }
 }
Esempio n. 2
0
        private void caseparties_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            ListViewHitTestInfo info = caseparties.HitTest(e.X, e.Y);
            ListViewItem        item = info.Item;

            if (item != null)
            {
                MessageBox.Show("The selected Item Name is: " + item.Text);
                EditCasePartyDTO edit = new EditCasePartyDTO()
                {
                    RowIndex = item.Index,
                    FullName = item.SubItems[4].Text,
                    Address  = item.SubItems[5].Text
                };
                frmEditCaseParty frmEditCase = new frmEditCaseParty(edit);
                frmEditCase.ShowDialog();
            }
            else
            {
                this.caseparties.SelectedItems.Clear();
                MessageBox.Show("No Item is selected");
            }
        }