<!--#include file="../../include/jschedule/schevent.asp"-->
<%
'jschedule/schevent/propSubmit.asp (Last Update 2001.02.19)
'-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
'   ESMPRO/JMSS WebClient (JSchedule) Version 6.0
'   Copyright (C) NEC Corporation/NEC Soft, Ltd. 2001
'   All rights reserved
'-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
'**Start Encode**

    Dim nSchID
    Dim obj
    Dim obj2
    Dim nNewExclsvTitle
    Dim nNewEntryTitle

    nNewExclsvTitle = Request.Form("nNewExclsvTitle")
    nNewEntryTitle  = Request.Form("nNewEntryTitle")

    nSchID = Session("nSchID")

    '//////////////////////// Tu~bg ///////////////////
    Set obj = Session("jsch").SchEvtData

    Select Case Request.Form("nTabIndex")
        Case "0"
            '*** [Ɩ]^u ***
            Set obj2 = obj.MainJobPage
                obj2.Title         = Request.Form("Title")        'Ɩ
                obj2.Path          = Request.Form("Path")         'Wu
                obj2.Param         = Request.Form("Param")        'p[^
                obj2.Dir           = Request.Form("Dir")          'sfBNg
                obj2.Queue         = Request.Form("Queue")        'WuL[
                obj2.Priority      = Request.Form("Priority")     'D揇
                obj2.OutFlags      = Request.Form("OutFlags")     'Wo͂̊Ď
                obj2.OutFile       = Request.Form("OutFile")      'Wo̓t@C
                obj2.OutType       = Request.Form("OutType")      'Wo̓[hi㏑Eǉj
                If IsNumeric(Request.Form("TimeoutHour")) Then    'soߎԃ^CAEg()
                    obj2.TimeoutHour = Request.Form("TimeoutHour")
                Else
                    obj2.TimeoutHour = CLng(0)
                End If
                If IsNumeric(Request.Form("TimeoutMinute")) Then  'soߎԃ^CAEg()
                    obj2.TimeoutMinute = Request.Form("TimeoutMinute")
                Else
                    obj2.TimeoutMinute = CLng(0)
                End If


        Case "1"
            '*** [Cxg]^u ***
            Set obj2 = obj.EvtPage
                obj2.SchID      = nSchID
                obj2.Event01    = Request.Form("Event01")   'CxgP
                obj2.Event02    = Request.Form("Event02")   'CxgQ
                obj2.Event03    = Request.Form("Event03")   'CxgR
                obj2.Event04    = Request.Form("Event04")   'CxgS
                obj2.Event05    = Request.Form("Event05")   'CxgT
                'LE
                If Request.Form("EffectFlag") = 1 Then
                    obj2.EffectFlag = 1
                Else
                    obj2.EffectFlag = 0
                End If

                'L
                If Request.Form("TermFlag") = 1 Then
                    obj2.TermFlag = CLng(1)
                Else
                    obj2.TermFlag = CLng(0)
                End If

                If Len(Request.Form("nYear"))>0 And Len(Request.Form("nMonth"))>0 And Len(Request.Form("nDay"))>0 Then
                    obj2.Begin = DateSerial(Request.Form("nYear"),Request.Form("nMonth"),Request.Form("nDay"))
                Else
                    obj2.Begin = CDate(0)
                End If

                If Len(Request.Form("nYearTo"))>0 And Len(Request.Form("nMonthTo"))>0 And Len(Request.Form("nDayTo"))>0 Then
                    obj2.End = DateSerial(Request.Form("nYearTo"),Request.Form("nMonthTo"),Request.Form("nDayTo"))
                Else
                    obj2.End = CDate(0)
                End If

        Case "2"
            '///// [rƖ]^u /////
            '*** `FW ***
            If Len(nNewExclsvTitle) > 0 Then
                Session("jsch").JSchExclsvChange CLng(nSchID), CStr(nNewExclsvTitle), CLng(1), CLng(1), Null
            ElseIf Len(nNewEntryTitle) > 0 Then
                Session("jsch").JSchExclsvChange CLng(nSchID), CStr(nNewEntryTitle), CLng(2), CLng(1), Null
            Else
                '*** QƑOɃtbVidvj ***
                Session("jsch").JSchExclsvChange CLng(nSchID), CStr(""), CLng(0), CLng(1), Null

                If Len(nNewExclsvTitle) > 0 Then
                    Session("jsch").JSchExclsvChange CLng(nSchID), CStr(nNewExclsvTitle), CLng(1), CLng(1), Null
                ElseIf Len(nNewEntryTitle) > 0 Then
                    Session("jsch").JSchExclsvChange CLng(nSchID), CStr(nNewEntryTitle), CLng(2), CLng(1), Null
                End If
            End If

    End Select

    '*** IuWFNg ***
    Set obj2 = Nothing
    Set obj  = Nothing

    'Dumping Reecieved Parameters
    'For Each name In Request.Form
    '    Response.Write name & " = " & Request.Form(name) & "<BR>"
    'Next

    'Redirection
    Select Case Request.Form("nNextTabIndex")
        Case "0"
            Response.Redirect("propJob.asp")
        Case "1"
            Response.Redirect("propEvt.asp")
        Case "2"
            Response.Redirect("propExl.asp")
        Case Else
           'Response.Redirect("propJob.asp")
            Response.End
    End Select
%>
