Home > Net >  How to realize the inventory of the outbound inventory list
How to realize the inventory of the outbound inventory list

Time:10-18

Protected void Button1_Click (object sender, EventArgs e)
{
String name="select MingCheng from TB_Store";
Bool iRet=false;
If (this. TextBox1. Text==name)
{
String SQL2="select Num from TB_Store";
If (this. TextBox4. Text<=SQL2)//this. TextBox4. Text receiving number is' Num
'{
Response. Write (" & lt; script> Alert (' outbound success); Document. The location=document. The location; </script>" );
//insert the reagent of outbound information to TB_ChuKu
String SQL3="insert into TB_ChuKu (MingCheng, No Time, CangKu, LeiBie, Num, Accepter) Values (' + this. TextBox1." Text + "', '" + this. TextBox2. Text +"', '" + this. TextBox3. Text + "', '" + this. DropDownList1. SelectedItem. Text + "', '" + this. DropDownList2. SelectedItem + "', '" + this. TextBox4. Text + "', '" + this. TextBox5. Text + "') ";
/library/update reagent, the amount=number of reagents in the library - the delivery
String SQL4="update TB_Store set Num=Num -" + enclosing TextBox4. Text + "where MingCheng='" + this. TextBox1. Text +"';
}
The else
{
Response. Write (" & lt; script> Alert (' the reagent inventory shortage '); Document. The location=document. The location; </script>" );
}
The else
{
Response. Write (" & lt; script> Alert (' this reagent is not reagent repository '); Document. The location=document. The location; </script>" );
}
========
Code at runtime is not an error, but breaking point is found that the code in the if (this. TextBox1. Text==name) this line of code directly out of the
The code written above, please correct it, thanks for bosses advice and help

CodePudding user response:

You look at this. The TextBox1. What is printed Text, but also pay attention to the case

CodePudding user response:

Add try catch look, really there is no error
  • Related