Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 2812

Moving Webform App to Appeon (12.5/2015)

$
0
0

Greeting all,

 

I would like to convert an existing webform based reporting application to Appeon.

 

I have had it running for several years and it works fine except for the fact that we are upgrading our browsers to IE 11, so I have to attend to this.

 

The code below shows that I am using MapVirtualPath to keep track of where I am saving the file for each user in their session directory.

 

How does this work in Appeon?  Do I do a simple SAVEAS and Appeon automatically keeps track of where the file is so I can add it as an attachment?

 

Also, am I prevented from using DOTNET code to send the email and must I use Roland's code (not that I have a problem with it, Roland    ) or can I continue to deploy system.dll and keep this code in place?

 

Also, are there other advantages where maybe now in Appeon, I can saveas excel and not lose my calculated fields (which I hate) and not have to save the file as HTML?

 

Can I offer up a download dialogue so the user can simply click to save the document on their desktop?

 

Thanks all!!

 

Paul

 

 

string user

user = left(email, (pos(email, "@")-1))

 

string filename

string filepathname

 

#if defined PBWEBFORM then

 

  filepathname = MapVirtualPath("c:\OnDemand Comp 1-3 Report For-" + account + ".xls")

 

  filename = "c:\OnDemand Comp 1-3 Report For-" + account + ".xls"

 

  long returncode

 

  returncode = dw_2.saveas(filename,HTMLTable! ,true)

 

  if returncode = 1 then

 

  string ToAddress2

  ToAddress2 = email

 

  string bodytext

  bodytext = 'Dear Valued XXX Customer, ' + '~r~n' + '~r~n' + 'Please find attached the requested trip report in Microsoft Excel format.' + '~r~n' + '~r~n' + 'Thank you,' + '~r~n' + '~r~n' + 'XXX Billing Operations' + '~r~n' + '1-XXX'

 

  string sStartDate

  sStartDate = string(start_date, "MM/DD/YYYY")

  sStartDate = left(sStartDate,2) + "-" + mid(sStartDate,4,2) + "-" + right(sStartDate,4)

 

  string sEndDate

  sEndDate = string(end_date, "MM/DD/YYYY")

  sEndDate = left(sEndDate,2) + "-" + mid(sEndDate,4,2) + "-" + right(sEndDate,4)

 

  string subject

  subject = 'XXX Customer Report for Account ' + account + ' for Dates: ' + sStartDate + " To " + sEndDate

  string fromaddresstext

  fromaddresstext = "billing@xxx.com"

 

// #if defined PBWEBFORM then

  System.Net.mail.MailMessage message

  message = create  System.Net.mail.MailMessage

  message.subject = subject

  message.body = bodytext

 

  System.Net.Mail.MailAddress fromaddress

  fromaddress = create System.Net.Mail.MailAddress("billing@xxx.com", "XXX Billing Operations")

  message.From = fromAddress

 

  System.Net.Mail.MailAddress toaddress

  message.To.Add(email);

 

  System.Net.Mail.Attachment attach

  attach = create System.Net.Mail.Attachment(filepathname,"application/xls")

  Helper.Mail.AddAttachment(message, attach);

 

  System.Net.Mail.SmtpClient smtpclient

  smtpclient = create  System.Net.Mail.SmtpClient

  smtpclient.host = "webapp3.ftl.com"

  smtpclient.port = 25

  smtpclient.send(message) 

 

  mle_1.show()

  mle_1.text = "The Excel Export was sent to " + email

 

  cb_email_report.hide()

  cb_get_data.show()

 

  else

  mle_1.show()

  mle_1.text = "Sorry, there was a problem generating the file."

 

  end if

 

#end if


Viewing all articles
Browse latest Browse all 2812

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>