-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGrabaSol.asp
97 lines (81 loc) · 2.78 KB
/
GrabaSol.asp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<%
Response.expires = -1
%>
<!--#INCLUDE FILE="include/conexion.inc" -->
<%
Dim StrSql
Dim Rst
'Response.write("A=" & Trim(Request("A")))
Accion = Ucase(Trim(Request("A")))
Curso = Trim(Request("C"))
Ramo = Trim(Request("R"))
Seccion = Trim(Request("S"))
CodCli = Session("CodCli")
Carrera = Request("CodCarr")
Ano = Session("Ano")
Periodo = Session("Periodo")
Texto = Request("T")
'Response.Write(" A grabar " & Texto)
'Response.End
'Response.Redirect("Horario.asp?P=S")
StrSql = "Select * from tmpSolici "
StrSql = StrSql & " Where Codcli = '" & Codcli & "' "
StrSql = StrSql & " And CodRamo = '" & Curso & "' "
StrSql = StrSql & " And Ano = " & Ano
StrSql = StrSql & " And Periodo = " & Periodo
Set Rst = Session("Conn").Execute (StrSql)
'Response.Write(StrSql + "<br>")
'Response.End
'Response.write("eof = " & Rst.eof)
'Response.End
if not Rst.eof then
Rst.close()
'Response.Write("Accion = " & Accion & "<br>")
if Accion = "D" then
StrSql = "delete tmpSolici "
StrSql = StrSql & " Where Codcli = '" & Codcli & "' "
StrSql = StrSql & " And CodRamo = '" & curso & "' "
StrSql = StrSql & " And Ano = " & Ano
StrSql = StrSql & " And Periodo = " & Periodo
else
if (Seccion <> 0) then
StrSql = "Update tmpSolici set CodSecc = '" & Seccion & "', Glosa = '" & Texto & "', Ramoequiv = '" + Ramo + "' "
StrSql = StrSql & " Where Codcli = '" & Codcli & "' "
StrSql = StrSql & " And CodRamo = '" & Curso & "' "
StrSql = StrSql & " And Ano = " & Ano
StrSql = StrSql & " And Periodo = " & Periodo
else
StrSql = "Update tmpSolici set Glosa = '" & Texto & "' "
StrSql = StrSql & " Where Codcli = '" & Codcli & "' "
StrSql = StrSql & " And CodRamo = '" & Curso & "' "
StrSql = StrSql & " And Ano = " & Ano
StrSql = StrSql & " And Periodo = " & Periodo
end if
end if
Session("Conn").Execute StrSql
'Response.Write(Strsql)
'Response.End
else
'Response.Write("Accion = " & Accion & "<br>")
if Accion <> "D" then
StrSql = "Insert into tmpSolici (Codcli, CodRamo, Codsecc, ano, Periodo, Glosa, codCarr, RamoEquiv) values ("
StrSql = StrSql & "'" & Codcli & "',"
StrSql = StrSql & "'" & Curso & "',"
StrSql = StrSql & "'" & Seccion & "','" & Ano & "','" & Periodo & "', '" & Texto & "', '" & Carrera & "','" + Ramo + "' )"
'Response.Write(Strsql)
Session("Conn").Execute StrSql
end if
end if
'Response.Write(StrSql)
'Response.End
Response.Redirect("Horario.asp?P=N&S=S&T=N")
%>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
</HEAD>
<BODY>
<P> </P>
</BODY>
</HTML>
<!--#INCLUDE file="include/desconexion.inc" -->