// редактирование и удаление аудитории private void DGW_au_CellContentClick(object sender, DataGridViewCellEventArgs e) { int currentRow = int.Parse(e.RowIndex.ToString()); if (DGW_au.Columns[e.ColumnIndex] == Del && currentRow >= 0) { string naud = DGW_au[2, currentRow].Value.ToString(); string kor = DGW_au[3, currentRow].Value.ToString(); client.dob_red_aud(2, kor, naud, "","","","","","","","",""); DGW_au.DataSource = client.GetData("GetAud").Tables[0]; label1.Text = "Количество записей в таблице:" + DGW_au.RowCount.ToString(); } if (DGW_au.Columns[e.ColumnIndex] == redact && currentRow >= 0) { dob_aud ra = new dob_aud(); ra.korp = DGW_au[3, currentRow].Value.ToString(); ra.Nn = DGW_au[2, currentRow].Value.ToString(); ra.po = DGW_au[5, currentRow].Value.ToString(); ra.pl = DGW_au[9, currentRow].Value.ToString(); ra.v_a = DGW_au[4, currentRow].Value.ToString(); ra.vm = DGW_au[7, currentRow].Value.ToString(); ra.specil = DGW_au[6, currentRow].Value.ToString(); ra.nal_pr = DGW_au[8, currentRow].Value.ToString(); ra.vis = DGW_au[10, currentRow].Value.ToString(); ra.shi = DGW_au[11, currentRow].Value.ToString(); ; ra.dli = DGW_au[12, currentRow].Value.ToString(); ; ra.flag = 0; ra.ShowDialog(); DGW_au.DataSource = client.GetData("GetAud").Tables[0]; label1.Text = "Количество записей в таблице:" + DGW_au.RowCount.ToString(); } }
//добавить аудиторию private void dob_aud_Click(object sender, EventArgs e) { dob_aud da = new dob_aud(); da.ShowDialog(); DGW_au.DataSource = client.GetData("GetAud").Tables[0]; label1.Text = "Количество записей в таблице:" + DGW_au.RowCount.ToString(); }