String sqlconn = "Data Source=wei//SQLEXPRESS;Initial Catalog=HISDB;Integrated Security=True"; SqlConnection weida = new SqlConnection(sqlconn); weida.Open(); //********************* string sql = "SELECT tkdh FROM tkxx WHERE checked = 'True' AND tkdh='" + ckdh + "'"; SqlCommand check1 = new SqlCommand(sql, weida);
int j = Convert.ToInt32(check1.ExecuteScalar()); if (j > 0) //存在 { Response.Write("<script language='javascript'>alert('该出库记录已经执行退库操作,不能重复退库');</script>"); } else {
}