private void immediateMediate_Click(object sender, EventArgs e) { using (AddAppointments nyApp = new AddAppointments()) { //nese ka nevoj per ndrrim hapet forma i mbushim te dhanat edhe i ruajm ne listen siper nyApp.ShowDialog(); if (nyApp.DialogResult == DialogResult.OK) { dalAppointments.Insert(nyApp.NewAppointment); } } }
private void dgNotifications_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e) { Vehicle vehicle = (Vehicle)dgNotifications.Rows[e.RowIndex].DataBoundItem; if (_getAll == true) { ViewVehicle(vehicle); } else { using (AddAppointments nyApp = new AddAppointments(vehicle)) { //nese ka nevoj per ndrrim hapet forma i mbushim te dhanat edhe i ruajm ne listen siper nyApp.ShowDialog(); if (nyApp.DialogResult == DialogResult.OK) { dalAppointments.Insert(nyApp.NewAppointment); } } } }