Advertisement
| Hall of Fame |
|
[x]
Posted via EE Mobile
|
||
Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again. |
||
| Question |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
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: 98: 99: 100: 101: 102: 103: 104: 105: 106: 107: 108: 109: 110: 111: 112: 113: 114: 115: 116: 117: 118: 119: 120: 121: 122: |
<script language="VB" runat="server">
Dim myConnection As Data.SqlClient.SqlConnection
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Dim rightNow As DateTime = DateTime.Now
lblDateRequested.Text = String.Format("{0:d}", rightNow)
myConnection = New Data.SqlClient.SqlConnection("Server=FMASQL;database=ITProjects;User ID=WebDept;Password=***")
End Sub
Protected Sub btnSubmit_Click(ByVal sender As Object, ByVal e As System.EventArgs)
Dim Requestor As String
Requestor = txtPreparedby.SelectedItem.ToString
Dim PT As String = " <a href=""http://appserv1/ProjectTracker/ProjAdminAssign1.aspx"">Go to Project Tracker</a> "
Dim myUserEmail As String = Requestor
Dim myMessageSubject As String = "Your Project has been submitted"
Dim BossMessageSubject As String = "A new project has been submitted"
Dim eMailSent As Boolean
Dim myBossEmail As String = "j****"
Dim mySenderEMail As String = "webmaster***"
Dim SendMessageBodyUser = "Your project was submitted!<br /><br/> "
SendMessageBodyUser += "<b>Form Information </b> "
SendMessageBodyUser += "<b>Prepared by:</b>" & " " & txtPreparedby.SelectedItem.Text & " " + "<br /><br/>"
SendMessageBodyUser += "<b>Project Title:</b> " & txtProjectTitle.Text & " " + "<br /><br/>"
SendMessageBodyUser += "<b>Objective:</b>" & txtProjectObjective.Text & " " + "<br /><br/>"
SendMessageBodyUser += "<b>Scope:</b>" & txtProjectScope.Text & " " + "<br /><br/>"
SendMessageBodyUser += "<b>Justification:</b>" & txtProjectJustification.Text & " " + "<br /><br/>"
SendMessageBodyUser += "<b>Requested Completion Date:</b>" & txtRequestedCompletionDate.Text & " " + "<br /><br/>"
SendMessageBodyUser += "<b>Project Sponsors:</b><br /><br/>"
SendMessageBodyUser += "<b>Specifications:</b>" & txtProjSpec.SelectedItem.Text & " " + "<br /><br/>"
SendMessageBodyUser += "<b>Obstacles:</b>" & txtProjObst.SelectedItem.Text & " " + "<br /><br/>"
SendMessageBodyUser += "<b>Testing:</b>" & txtProjTester.SelectedItem.Text & " " + "<br /><br/>"
SendMessageBodyUser += "<b>Sign Off:</b>" & txtProjAccept.SelectedItem.Text & " " + "<br /><br/>"
SendMessageBodyUser += "<b>File Location:</b>" & txtFileLocation.Text & " " + "<br /><br/>"
Dim SendMessageBodyBoss = "A new project has been submitted!<br /><br/> "
SendMessageBodyBoss += "V***, a project needs to be assigned " + PT + "<br /><br/>"
SendMessageBodyBoss += "<b>Form Information </b> "
SendMessageBodyBoss += "<b>Prepared by:</b>" & " " & txtPreparedby.SelectedItem.Text & " " + "<br /><br/>"
SendMessageBodyBoss += "<b>Project Title:</b> " & txtProjectTitle.Text & " " + "<br /><br/>"
SendMessageBodyBoss += "<b>Objective:</b>" & txtProjectObjective.Text & " " + "<br /><br/>"
SendMessageBodyBoss += "<b>Scope:</b>" & txtProjectScope.Text & " " + "<br /><br/>"
SendMessageBodyBoss += "<b>Justification:</b>" & txtProjectJustification.Text & " " + "<br /><br/>"
SendMessageBodyBoss += "<b>Requested Completion Date:</b>" & txtRequestedCompletionDate.Text & " " + "<br /><br/>"
SendMessageBodyBoss += "<b>Project Sponsors:</b><br /><br/>"
SendMessageBodyBoss += "<b>Specifications:</b>" & txtProjSpec.SelectedItem.Text & " " + "<br /><br/>"
SendMessageBodyBoss += "<b>Obstacles:</b>" & txtProjObst.SelectedItem.Text & " " + "<br /><br/>"
SendMessageBodyBoss += "<b>Testing:</b>" & txtProjTester.SelectedItem.Text & " " + "<br /><br/>"
SendMessageBodyBoss += "<b>Sign Off:</b>" & txtProjAccept.SelectedItem.Text & " " + "<br /><br/>"
SendMessageBodyBoss += "<b>File Location:</b>" & txtFileLocation.Text & " " + "<br /><br/>"
'This will send message 1
eMailSent = SendMail(myUserEmail, myMessageSubject, SendMessageBodyUser, mySenderEMail)
If eMailSent = False Then
'email was not sent escape
End If
'This will send message 2
eMailSent = SendMail(myBossEmail, bossMessageSubject, SendMessageBodyBoss, mySenderEMail)
If eMailSent = False Then
'email was not sent escape
End If
Try
Dim insertProject As New Data.SqlClient.SqlCommand("INSERT INTO tblProjects (RequestorID,ProjectTitle,Objective,ProjectScope,ProjectJustification,RequestedCompletionDate,ProjSpec,ProjObst, ProjTester,ProjAccept,FileLocation,DateRequested,StatusID) VALUES (@RequestorID,@ProjectTitle, @Objective,@ProjectScope,@ProjectJustification,@RequestedCompletionDate,@ProjSpec,@ProjObst,@ProjTester,@ProjAccept, @FileLocation,@DateRequested,@StatusID);", myConnection)
insertProject.Parameters.AddWithValue("@RequestorID", txtPreparedby.SelectedValue)
insertProject.Parameters.AddWithValue("@ProjectTitle", txtProjectTitle.Text)
insertProject.Parameters.AddWithValue("@Objective", txtProjectObjective.Text)
insertProject.Parameters.AddWithValue("@ProjectScope", txtProjectScope.Text)
insertProject.Parameters.AddWithValue("@ProjectJustification", txtProjectJustification.Text)
insertProject.Parameters.AddWithValue("@RequestedCompletionDate", txtRequestedCompletionDate.Text)
insertProject.Parameters.AddWithValue("@ProjSpec", txtProjSpec.SelectedValue)
insertProject.Parameters.AddWithValue("@ProjObst", txtProjObst.SelectedValue)
insertProject.Parameters.AddWithValue("@ProjTester", txtProjTester.SelectedValue)
insertProject.Parameters.AddWithValue("@ProjAccept", txtProjAccept.SelectedValue)
insertProject.Parameters.AddWithValue("@FileLocation", txtFileLocation.Text)
insertProject.Parameters.AddWithValue("@DateRequested", lblDateRequested.Text)
insertProject.Parameters.AddWithValue("@StatusID", 6)
myConnection.Open()
insertProject.ExecuteNonQuery()
myConnection.Close()
Catch ex As Exception
lblResponse.Text = "Error saving: " & ex.Message.ToString
End Try
lblResponse.Text = "Your Project has been submitted"
End Sub
Function SendMail(ByVal toEmailId, ByVal messagesubject, ByVal sendBody, ByVal sendFrom)
Dim mail As New MailMessage()
Try
'your email sending code
'Set the priority - options are High, Low, and Normal
mail.Priority = MailPriority.High
'send the message
Dim smtp As New SmtpClient("192.168.0.37")
smtp.Send(Mail)
Return True 'all worked fine
Catch
Return False 'something went wrong
Finally
End Try
End Function
</script>
|