enter image description hereThe machines supposedly cannot be duplicated in the DataGridView but for certain condition it can be allowed.
while (read.Read())
{
if (read[“Selected_Problem”] != DBNull.Value && read[“Selected_Problem”].ToString() == “#Temperature Monitoring”)
{
submitToPending2();
ScriptManager.RegisterClientScriptBlock(this, this.GetType(), “alertMessage”, “alert(‘This machine has been notified to Technician.’)”, true);
if (read.HasRows)
{
ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('This machine is currently under the status Pending or Processing. You cannot submit it again.')", true);
clearTextBox();
}
else
{
submitToPending2();
ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('This machine has been notified to Technician.')", true);
//Response.Redirect("operatorView.aspx");
}
//read.Close();
//con.Close();
}
}
read.Close();
con.Close();while (read.Read())
{
if (read["Selected_Problem"] != DBNull.Value && read["Selected_Problem"].ToString() == "#Temperature Monitoring")
{
submitToPending2();
ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('This machine has been notified to Technician.')", true);
if (read.HasRows)
{
ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('This machine is currently under the status Pending or Processing. You cannot submit it again.')", true);
clearTextBox();
}
else
{
submitToPending2();
ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('This machine has been notified to Technician.')", true);
//Response.Redirect("operatorView.aspx");
}
//read.Close();
//con.Close();
}
}
read.Close();
con.Close();
It can be duplicated only after the problem of ‘#Temperature Monitoring’ but just for once.
IZZAT HATTA is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.