Advertisement
Guest User

Untitled

a guest
Mar 21st, 2019
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. int rtn = 0;
  2. int amt=0;
  3. if (str == "GRI")
  4. {
  5. for (int n = 0; n <= dataGridView1.RowCount - 1; n++)
  6. {
  7. rtn = 0;
  8. amt = 0;
  9. bool chk =(bool)dataGridView1.Rows[n].Cells[4].Value;
  10. if (chk)
  11. {
  12. dataGridView1.Rows[n].Cells[2].ReadOnly = false;
  13. rtn +=Convert.ToInt32(dataGridView1.Rows[n].Cells[2].Value);
  14. amt += Convert.ToInt32(dataGridView1.Rows[n].Cells[2].Value) * Convert.ToInt32(dataGridView1.Rows[n].Cells[3].Value);
  15. }
  16. else
  17. {
  18.  
  19. }
  20. }
  21. }
  22. totpcslbl.Text = rtn.ToString();
  23. totamtrtnlbl.Text = amt.ToString();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement