Skip to content

How to reset counting?

thanh duong

Asked Mar 31, 2016, 4:26 AM EDT5 answers
Share
LinkedInX

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:

Code
int count = 0;  
  
if ( clause )  
  
{  
  
count++;  
  
txtqty.Text= count.ToString();  
  
}  
  
if ( count ==2)  
  
{  
  
txtNo1.ReadOnly = false;  
txtNo1.Clear();  
txtNo1.Focus();  
txtqty.Text = "0";

So please help me to solve this troule.

Thank you!

4 Answers

Know the answer? Post it. Somebody with the same question will find it here.

  • Vivek Kumar
    0
    Hi,
    Image is not showing and can you describe more what is your requirement. 
    0
  • Vivek Kumar
    0
    Hi,
     Yeah image is coming now but I have still doubt on your question. can you elaborate more?
    • Is this web application or window application?
    • What is the relation between No1,Q'ty, No2 text boxes.
    • What number you can enter into these text boxes.Is it integer or string?
    • Is there any button or when we enter any value in text box then count will increment one more automatic ?
    0
  • 0
    Hi, Thank for your answer, I already found out to solve about this, Thank a million/
    0
  • 1 short reply
    • Vivek Kumar
      0
      You're welcome.
      0