private void VehicleButtonClick(object sender, EventArgs e) { Button btn = sender as Button; using (var dialog = new ManageTrips()) { dialog.trip_id = btn.Tag.ToString(); dialog.ShowDialog(); } }
private void header_grid_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e) { if (e.ColumnIndex > 0 && e.RowIndex >= 0) { if (header_grid.CurrentCell.Value != null) { ManageTrips dialog = new ManageTrips(); dialog.trip_id = header_grid.SelectedCells[0].Value.ToString(); dialog.ShowDialog(); } } }
private void calendarView1_ItemDoubleClick(object sender, MouseEventArgs e) { using (var dialog = new ManageTrips()) { AppointmentView item = sender as AppointmentView; if (item != null) { Appointment ap = item.Appointment; dialog.trip_id = ap.Subject; dialog.ShowDialog(); } } }
private void AppManageContextItem_Click(object sender, EventArgs e) { ButtonItem mi = sender as ButtonItem; if (mi != null) { AppointmentView view = mi.Parent.Tag as AppointmentView; using (var dialog = new ManageTrips()) { Appointment ap = view.Appointment; dialog.trip_id = ap.Subject; dialog.ShowDialog(); } } }
private void btnManageTrip_Click(object sender, EventArgs e) { if (header_grid.RowCount == 0) { MessageBox.Show("Please click Trips to load lists of trips", "MESSAGE", MessageBoxButtons.OK, MessageBoxIcon.Information); } else if (header_grid.CurrentCell.Value == null) { } else if (header_grid.CurrentCell.ColumnIndex == 0) { } else { ManageTrips dialog = new ManageTrips(); dialog.trip_id = header_grid.SelectedCells[0].Value.ToString(); dialog.ShowDialog(); } }