private void btnAdd_Click(object sender, EventArgs e) { frmLedger frm = new frmLedger(this); frm.MdiParent = this.MdiParent; frm.Show(); }
private void lstEntry_MouseDoubleClick(object sender, MouseEventArgs e) { int index = this.lstEntry.IndexFromPoint(e.Location); if (index != System.Windows.Forms.ListBox.NoMatches) { Item item = (Item)lstEntry.Items[index]; frmLedger frm = new frmLedger(this, item, false); frm.MdiParent = this.MdiParent; frm.Show(); } }
private void btnCopy_Click(object sender, EventArgs e) { if (lstEntry.SelectedIndex == -1) { return; } Item item = (Item)lstEntry.SelectedItem; frmLedger frm = new frmLedger(this, item, true); frm.MdiParent = this.MdiParent; frm.Show(); }