private void button16_Click_1(object sender, EventArgs e) { Form25 f = new Form25(); f.katalogpacjenta = katalogpacjenta; //bool mamid = false; //int id = 0; if (listView2.SelectedItems.Count == 1) { string id = listView2.SelectedItems[0].SubItems[4].Text; f.id = id; f.edyt = true; if (f.ShowDialog() == DialogResult.OK) { //odświeżyć listview odsiezbadaniadodatkowe(); } } }
private void button41_Click(object sender, EventArgs e) { Form25 f = new Form25(); f.katalogpacjenta = katalogpacjenta; bool mamid = false; int id = 0; while (mamid == false) { if (Directory.Exists(System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal) + "\\Badanie Neurologiczne by Konrad Stawiski\\" + katalogpacjenta + "badania_dodatkowe\\" + id)) { id++; mamid = false; } else { mamid = true; Directory.CreateDirectory(System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal) + "\\Badanie Neurologiczne by Konrad Stawiski\\" + katalogpacjenta + "badania_dodatkowe\\" + id); } } f.id = Convert.ToString(id); if (f.ShowDialog() == DialogResult.OK) { //odświeżyć listview odsiezbadaniadodatkowe(); } }