Example #1
0
 private void DGW_remont_CellContentClick(object sender, DataGridViewCellEventArgs e)
 {
     int currentRow = int.Parse(e.RowIndex.ToString());
     if (DGW_remont.Columns[e.ColumnIndex] == del_rem && currentRow >= 0)
     {
         string n_s = DGW_remont[4, currentRow].Value.ToString();
         client.dob_red_rem(2, "", "", "", "", n_s, "", "", "");
         DGW_remont.DataSource = client.GetData("GetRem").Tables[0];
         label3.Text = "Количество записей в таблице:" + DGW_remont.RowCount.ToString();
     }
     if (DGW_remont.Columns[e.ColumnIndex] == redact_rem && currentRow >= 0)
     {
         dob_rem rr = new dob_rem();
         rr.nomer_a = DGW_remont[2, currentRow].Value.ToString();
         rr.kor = DGW_remont[3, currentRow].Value.ToString();
         rr.n_sm = DGW_remont[4, currentRow].Value.ToString();
         rr.vid_rem = DGW_remont[5, currentRow].Value.ToString();
         rr.p_org = DGW_remont[6, currentRow].Value.ToString();
         rr.stoimos = DGW_remont[7, currentRow].Value.ToString();
         rr.d_n = DGW_remont[8, currentRow].Value.ToString();
         rr.d_okon = DGW_remont[9, currentRow].Value.ToString();
         rr.flag = 0;
         rr.ShowDialog();
         DGW_remont.DataSource = client.GetData("GetRem").Tables[0];
         label3.Text = "Количество записей в таблице:" + DGW_remont.RowCount.ToString();
     }
 }
Example #2
0
 private void add_rem_Click(object sender, EventArgs e)
 {
     dob_rem dr = new dob_rem();
     dr.ShowDialog();
     DGW_remont.DataSource = client.GetData("GetRem").Tables[0];
     label3.Text = "Количество записей в таблице:" + DGW_remont.RowCount.ToString();
 }