| Line 69... |
Line 69... |
| 69 |
objEH.CatchORA ( OraSession )
|
69 |
objEH.CatchORA ( OraSession )
|
| 70 |
|
70 |
|
| 71 |
OraDatabase.Parameters.Remove "BOM_ID"
|
71 |
OraDatabase.Parameters.Remove "BOM_ID"
|
| 72 |
OraDatabase.Parameters.Remove "USER_ID"
|
72 |
OraDatabase.Parameters.Remove "USER_ID"
|
| 73 |
|
73 |
|
| 74 |
'Dim rsQry, objZIPObject
|
- |
|
| 75 |
'Set rsQry = OraDatabase.DbCreateDynaset( "SELECT bn.BOM_NAME, br.BRANCH_NAME, bn.BOM_NAME ||''|| b.BOM_VERSION ||'.'|| b.BOM_LIFECYCLE AS VERSION FROM BOMS B, BRANCHES BR, BOM_NAMES BN WHERE B.BOM_ID = "& Request("bom_id") &" AND B.BRANCH_ID = BR.BRANCH_ID AND B.BOM_NAME_ID = BN.BOM_NAME_ID", cint(0))
|
- |
|
| 76 |
|
- |
|
| 77 |
'Set objZIPObject = Server.CreateObject("aspZip.EasyZIP")
|
- |
|
| 78 |
|
- |
|
| 79 |
'objZIPObject.ZipFileName = ""& Request.ServerVariables("APPL_PHYSICAL_PATH") &"deployment_manager\downloads\"& rsQry("branch_name") &"\"& rsQry("version") &"\"& DateReversed(Date) &".zip"
|
- |
|
| 80 |
'objZIPObject.ArgsClear
|
- |
|
| 81 |
'objZIPObject.ArgsAdd(""& Request.ServerVariables("APPL_PHYSICAL_PATH") &"deployment_manager\downloads\"& rsQry("branch_name") &"\"& rsQry("version") &"\"& DateReversed(Date) &"\*.*")
|
- |
|
| 82 |
'objZIPObject.Zip
|
- |
|
| 83 |
|
- |
|
| 84 |
'Response.Write "Files Zipped=" & objZIPObject.SuccessCNT & " with Error="& objZIPObject.Error
|
- |
|
| 85 |
'Response.Write(""& Request.ServerVariables("APPL_PHYSICAL_PATH") &"deployment_manager\downloads\"& rsQry("bom_name") &"\"& rsQry("version") &"\"& DateReversed(Date) &".zip")
|
- |
|
| 86 |
|
- |
|
| 87 |
|
- |
|
| 88 |
|
- |
|
| 89 |
'Dim myMail, LocalPath
|
- |
|
| 90 |
'Set myMail=Server.CreateObject("Persits.MailSender")
|
- |
|
| 91 |
'LocalPath = ""& Request.ServerVariables("APPL_PHYSICAL_PATH") &"deployment_manager\downloads\"& rsQry("branch_name") &"\"& rsQry("version") &"\"& DateReversed(Date) &".zip"
|
- |
|
| 92 |
'
|
- |
|
| 93 |
'myMail.Host = SMTP_HOST
|
- |
|
| 94 |
'myMail.Subject="XML BOM Generated from Deployment Manager"
|
- |
|
| 95 |
'myMail.From="releasem@erggroup.com"
|
- |
|
| 96 |
'myMail.AddAddress objAccessControl.UserEmail
|
- |
|
| 97 |
' Attach the file
|
- |
|
| 98 |
'myMail.AddAttachment LocalPath
|
- |
|
| 99 |
'myMail.Body = "Your requested xml files .."
|
- |
|
| 100 |
'myMail.Send
|
- |
|
| 101 |
|
- |
|
| 102 |
'set myMail = nothing
|
- |
|
| 103 |
'set objWSH = nothing
|
- |
|
| 104 |
|
- |
|
| 105 |
'rsQry.Close
|
- |
|
| 106 |
'Set rsQry = nothing
|
- |
|
| 107 |
|
- |
|
| 108 |
'Response.write "<br>You will be emailed shortly with the XML files generated.<br>"
|
- |
|
| 109 |
'Response.write "Go to <a href='\\auperaweb08\wwwTRD\manager_suite_DEVELOPMENT\deployment_manager\downloads'>\\auperaweb08\wwwTRD\manager_suite_DEVELOPMENT\deployment_manager\downloads</a>"
|
- |
|
| 110 |
|
- |
|
| 111 |
Else
|
74 |
Else
|
| 112 |
Response.write "Please specify bom_id. <br>Example:<br> "& SCRIPT_NAME &"?bom_id=1234"
|
75 |
Response.write "Please specify bom_id. <br>Example:<br> "& SCRIPT_NAME &"?bom_id=1234"
|
| 113 |
End If
|
76 |
End If
|
| 114 |
|
77 |
|
| 115 |
'**********************************************************************
|
78 |
'**********************************************************************
|