private void btn_Modify_Click(object sender, EventArgs e) { //Manager.Expert expert = new Manager.Expert(selected.SubItems[3].Text,selected.SubItems[4].Text,selected.SubItems[5].Text,selected.SubItems[6].Text, // selected.SubItems[7].Text,selected.SubItems[8].Text,selected.SubItems[9].Text,selected.SubItems[1].Text,selected.SubItems[2].Text); if (lstVw_ActorsList.SelectedItems.Count > 0) { //Get the selected Actor. ListViewItem selected = lstVw_ActorsList.SelectedItems[0]; //Modify an Expert account. if (rdbtn_Expert.Checked) { Manager.Expert expert = new Manager.Expert(selected.SubItems[3].Text, selected.SubItems[4].Text, selected.SubItems[5].Text, selected.SubItems[6].Text, selected.SubItems[7].Text, selected.SubItems[8].Text, selected.SubItems[9].Text, selected.SubItems[1].Text, selected.SubItems[2].Text); frm_ModifyActor modifActor = new frm_ModifyActor("Expert", expert); modifActor.ShowDialog(); loadListView(); } else//Modify a Technician account. { Manager.Technician tech = new Manager.Technician(selected.SubItems[3].Text, selected.SubItems[4].Text, selected.SubItems[5].Text, selected.SubItems[6].Text, selected.SubItems[7].Text, selected.SubItems[8].Text, selected.SubItems[9].Text, selected.SubItems[1].Text, selected.SubItems[2].Text); frm_ModifyActor modifActor = new frm_ModifyActor("Technicien", tech); modifActor.ShowDialog(); loadListView(); } loadListView(); } else { MessageBox.Show(this, "Pas d'intervenant sélectionné!", "Message d'erreur", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }
private void btn_Modify_Click(object sender, EventArgs e) { //Manager.Expert expert = new Manager.Expert(selected.SubItems[3].Text,selected.SubItems[4].Text,selected.SubItems[5].Text,selected.SubItems[6].Text, // selected.SubItems[7].Text,selected.SubItems[8].Text,selected.SubItems[9].Text,selected.SubItems[1].Text,selected.SubItems[2].Text); if (lstVw_ActorsList.SelectedItems.Count > 0) { //Get the selected Actor. ListViewItem selected = lstVw_ActorsList.SelectedItems[0]; //Modify an Expert account. if (rdbtn_Expert.Checked) { Manager.Expert expert = new Manager.Expert(selected.SubItems[3].Text, selected.SubItems[4].Text, selected.SubItems[5].Text, selected.SubItems[6].Text, selected.SubItems[7].Text, selected.SubItems[8].Text, selected.SubItems[9].Text, selected.SubItems[1].Text, selected.SubItems[2].Text); frm_ModifyActor modifActor = new frm_ModifyActor("Expert", expert); modifActor.ShowDialog(); loadListView(); } else//Modify a Technician account. { Manager.Technician tech = new Manager.Technician(selected.SubItems[3].Text, selected.SubItems[4].Text, selected.SubItems[5].Text, selected.SubItems[6].Text, selected.SubItems[7].Text, selected.SubItems[8].Text, selected.SubItems[9].Text, selected.SubItems[1].Text, selected.SubItems[2].Text); frm_ModifyActor modifActor = new frm_ModifyActor("Technicien", tech); modifActor.ShowDialog(); loadListView(); } loadListView(); } else MessageBox.Show(this, "Pas d'intervenant sélectionné!", "Message d'erreur", MessageBoxButtons.OK, MessageBoxIcon.Warning); }