Relative Content

Tag Archive for if-statementwhile-loopconditional-statements

How to prevent the same machine to have two rows of data but for a selected condition it will be allowed?

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);