private void btnNewEntry_Click(object sender, EventArgs e) { NewEntryDlg dialog = new NewEntryDlg(DateTime.Parse((string)lbTimeEntries.Items[selectedListBoxIndex])); dialog.TimeEntryAdded += ProcessItem; dialog.ShowDialog(); }
private void billingGrid_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex >= 0) { BillingItem item = billingGrid.Rows[e.RowIndex].Tag as BillingItem; NewEntryDlg dialog = new NewEntryDlg(item.AssociatedDate, item, true); dialog.TimeEntryAdded += ProcessItem; dialog.ShowDialog(); } }
private void btnEditTime_Click(object sender, EventArgs e) { if (billingGrid.SelectedRows.Count == 1) { BillingItem item = billingGrid.SelectedRows[0].Tag as BillingItem; NewEntryDlg dialog = new NewEntryDlg(item.AssociatedDate, item, true); dialog.TimeEntryAdded += ProcessItem; dialog.ShowDialog(); } }