thanh duong

thanh duong

  • NA
  • 5
  • 902

How to reset counting?

Mar 31 2016 8:26 AM

Hi,

I'm sorry because i don't know where i can post this thread,

I have a form as below

When I input value into textbox No1, this textbox automatic change to read only = true

After I input into tetxbox No2, Q'ty will be change 1/2 until it's become 2/2.

In this time textbox No1 change from read only = true to false and q'ty will be reset to 0 and counting again,

My code is example but it's working not true:

  1. int count = 0;  
  2.   
  3. if ( clause )  
  4.   
  5. {  
  6.   
  7. count++;  
  8.   
  9. txtqty.Text= count.ToString();  
  10.   
  11. }  
  12.   
  13. if ( count ==2)  
  14.   
  15. {  
  16.   
  17. txtNo1.ReadOnly = false;  
  18. txtNo1.Clear();  
  19. txtNo1.Focus();  
  20. txtqty.Text = "0";  

So please help me to solve this troule.

Thank you!


Answers (5)