Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int rtn = 0;
- int amt=0;
- if (str == "GRI")
- {
- for (int n = 0; n <= dataGridView1.RowCount - 1; n++)
- {
- rtn = 0;
- amt = 0;
- bool chk =(bool)dataGridView1.Rows[n].Cells[4].Value;
- if (chk)
- {
- dataGridView1.Rows[n].Cells[2].ReadOnly = false;
- rtn +=Convert.ToInt32(dataGridView1.Rows[n].Cells[2].Value);
- amt += Convert.ToInt32(dataGridView1.Rows[n].Cells[2].Value) * Convert.ToInt32(dataGridView1.Rows[n].Cells[3].Value);
- }
- else
- {
- }
- }
- }
- totpcslbl.Text = rtn.ToString();
- totamtrtnlbl.Text = amt.ToString();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement