<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> Insert - Update Event <% IdIntervention = GetParam("IDInt") DateIntervention = GetParam("DateInterv") WeekNumInt = DatePart("ww",DateIntervention,2,3) IdEmpl = GetParam("IdEmpl") IdTime = GetParam("IdTime") Customer = GetParam("CustInt") idInt = "" openrs rsidEmpl, "select IdEmpl, Initiales from employees where DisableEmpl=0 order by 1" nbempl = 0 while not rsidEmpl.EOF nbempl = nbempl + 1 CBCurrEmpl = GetParam("Empl" & nbempl & "") If CBCurrEmpl = "on" then listempl = listempl & nbempl & "," end if rsidEmpl.MoveNext wend set rsidEmpl = nothing %> listempl = <%=listempl%> <% If IdIntervention = "" then actionupdate = 0 else actionupdate = 1 end if ' If actionupdate = 0 then ' set rs1 = Server.CreateObject("ADODB.recordset") ' SQL1 = "insert into reldatelieupers (" & _ ' "DateInt," & _ ' "IdTime," & _ ' "CustInt," & _ ' "idEmpl," & _ ' "IdInt)" & _ ' " values (" & _ ' ToSQL(DateIntervention, "Text") & "," & _ ' ToSQL(IdTime, "Number") & "," & _ ' ToSQL(Customer, "Text") & "," & _ ' ToSQL(IdEmpl, "Number") & "," & _ ' ToSQL(idInt, "Number") & _ ' ")" ' openrs rs1, SQL1 ' else ' set rs1 = Server.CreateObject("ADODB.recordset") ' sWhere = "id=" & IdIntervention & "" ' SQL1 = "update reldatelieupers set " & _ ' "DateInt=" & ToSQL(DateIntervention, "Text") & _ ' ",IdTime=" & ToSQL(IdTime, "Number") & _ ' ",CustInt=" & ToSQL(Customer, "Text") & _ ' ",idEmpl=" & ToSQL(IdEmpl, "Number") & _ ' ",IdInt=" & ToSQL(idInt, "Number") ' SQL1 = SQL1 & " where " & sWhere ' ' openrs rs1, SQL1 ' end if ' Response.Redirect("EBAgenda.asp#Sem" & WeekNumInt & "") %>