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();
Его можно дублировать только после проблемы «#Мониторинг температуры», но только один раз.
Предположительно, машины не могут дублироваться в DataGridView< /code> но при определенных условиях это можно разрешить. [code]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(); [/code] Его можно дублировать только после проблемы «#Мониторинг температуры», но только один раз.