If CheckBox1.Checked = True Then If ExitTimeOut1 = "" Then 'MsgBox("This record - " & Empno & " already have been " & ExitTimeOut1 & ". Please choose other records.", MsgBoxStyle.Critical) TextBox4.Enabled = False TextBox5.Enabled = False TextBox6.Enabled = False CheckBox2.Enabled = False CheckBox3.Enabled = False CheckBox4.Enabled = False GridViewExcel.Enabled = False Alert("This record - " & Empno & " already have been " & ExitTimeOut1 & ". Please choose other records.") 'result = Convert.ToString(ExitTimeOut1) Else MyComm2.CommandText = "update ExitPassDetails set ExitTimeOut1 = '" & ExitTimeOut1 & "' where ExitID = '" & id & "' " sqlconnect2.Open() Dim result2 As Data.SqlClient.SqlDataReader = MyComm2.ExecuteReader(Data.CommandBehavior.CloseConnection) result2.Read() 'Dim MyMessage = "This record - " & Empno & " already Out." 'ShowMessage(MyMessage, Page) 'MsgBox(id & " - " & Empno & " Successfully.") Alert("This record - " & Empno & " already out " & ExitTimeOut1 & ".") 'lblMsg.Text = "This record - " & Empno & " already Out." sqlconnect2.Close() End If End If If CheckBox2.Checked = True Then If ExitTimeIn1 = "" Then ' MsgBox("This record - " & Empno & " already have been " & ExitTimeIn1 & ". Please choose other records.", MsgBoxStyle.Critical) TextBox3.Enabled = False TextBox4.Enabled = False TextBox6.Enabled = False CheckBox1.Enabled = False CheckBox3.Enabled = False CheckBox4.Enabled = False GridViewExcel.Enabled = False Alert("This record - " & Empno & " already have been " & ExitTimeIn1 & ". Please choose other records.") Else MyComm2.CommandText = "update ExitPassDetails set ExitTimeIn1 = '" & ExitTimeIn1 & "' where ExitID = '" & id & "' " sqlconnect2.Open() Dim result2 As Data.SqlClient.SqlDataReader = MyComm2.ExecuteReader(Data.CommandBehavior.CloseConnection) result2.Read() 'Dim MyMessage = "This record - " & Empno & " Already In." 'ShowMessage(MyMessage, Page) ' MsgBox(id & " - " & Empno & " Successfully.") Alert("This record - " & Empno & " already in " & ExitTimeIn1 & ".") sqlconnect2.Close() End If End If End If
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)