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: |
<%@ Page Language="VB" MasterPageFile="~/_m/nonavbars.master" AutoEventWireup="false" CodeFile="jz_trucks.aspx.vb" Inherits="_a_jz_trucks" title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cphMain" Runat="Server">
<h3>Juarez ICT Truck Shipments</h3>
<h4>Add a new truck shipment</h4>
Leave Date: <asp:textbox id="txtLveDate" runat="server" tabindex="1"></asp:textbox>
<asp:imagebutton id="ibtnLveDate" runat="server" imageurl="~/_i/calendar.png" tabindex="2" />
<asp:requiredfieldvalidator id="reqLveDate" runat="server" controltovalidate="txtLveDate"
errormessage="*"></asp:requiredfieldvalidator><br />
Arrive Date: <asp:textbox id="txtArvDate" runat="server" tabindex="3"></asp:textbox>
<asp:imagebutton id="ibtnArvDate" runat="server" imageurl="~/_i/calendar.png" tabindex="4" />
<asp:requiredfieldvalidator id="reqArvDate" runat="server" controltovalidate="txtArvDate"
display="Dynamic" errormessage="*"></asp:requiredfieldvalidator><br />
Initials: <asp:textbox id="txtInitials" runat="server" maxlength="3" tabindex="5"></asp:textbox>
<asp:requiredfieldvalidator id="reqInitials" runat="server" controltovalidate="txtInitials"
display="Dynamic" errormessage="*"></asp:requiredfieldvalidator><br />
<asp:linkbutton id="lbtnJzTrkSubmit" runat="server" tabindex="6">Submit</asp:linkbutton>
<asp:linkbutton id="lbtnJzTrkReset" runat="server" tabindex="7" causesvalidation="False">Reset</asp:linkbutton>
<asp:label id="lblTruckSubmitted" runat="server" forecolor="#00C000" text="Truck shipment successfully submitted."
visible="False"></asp:label><h4>Future Shipments</h4>
<asp:gridview id="GridView1" runat="server" autogeneratecolumns="False" cellpadding="4" datasourceid="srcJzTrucks" emptydatatext="There are current no shipments scheduled." forecolor="#333333" gridlines="None">
<footerstyle backcolor="#990000" font-bold="True" forecolor="White" />
<rowstyle backcolor="#FFFBD6" forecolor="#333333" />
<columns>
<asp:boundfield datafield="leave_date" dataformatstring="(0:d}" headertext="Leaving"
htmlencode="False" sortexpression="leave_date" />
<asp:boundfield datafield="arrive_date" dataformatstring="(0:d}" headertext="Arriving"
htmlencode="False" sortexpression="arrive_date" />
<asp:boundfield datafield="initials" headertext="Submitted By" sortexpression="initials" />
<asp:boundfield datafield="submit_date" dataformatstring="(0:d}" headertext="Submitted"
htmlencodeformatstring="False" sortexpression="submit_date" />
</columns>
<pagerstyle backcolor="#FFCC66" forecolor="#333333" horizontalalign="Center" />
<selectedrowstyle backcolor="#FFCC66" font-bold="True" forecolor="Navy" />
<headerstyle backcolor="#990000" font-bold="True" forecolor="White" />
<alternatingrowstyle backcolor="White" />
</asp:gridview>
<asp:sqldatasource id="srcJzTrucks" runat="server" connectionstring="<%$ ConnectionStrings:conIntranet %>"
selectcommand="SELECT leave_date, arrive_date, initials, submit_date FROM jz_truck WHERE (arrive_date > { fn NOW() }) ORDER BY leave_date, arrive_date">
</asp:sqldatasource>
<ajaxtoolkit:calendarextender id="calxLveDate" runat="server" popupbuttonid="ibtnLveDate" targetcontrolid="txtLveDate">
</ajaxtoolkit:calendarextender>
<ajaxtoolkit:calendarextender id="calxArvDate" runat="server" popupbuttonid="ibtnArvDate" targetcontrolid="txtArvDate">
</ajaxtoolkit:calendarextender>
<ajaxtoolkit:textboxwatermarkextender id="wtrLveDate" runat="server" targetcontrolid="txtLveDate" watermarktext="Enter leave date.">
</ajaxtoolkit:textboxwatermarkextender><ajaxtoolkit:textboxwatermarkextender id="wtrArvDate" runat="server" watermarktext="Enter arrive date."
targetcontrolid="txtArvDate">
</ajaxtoolkit:textboxwatermarkextender>
<ajaxtoolkit:textboxwatermarkextender id="wtrInitials" runat="server" watermarktext="Enter initials."
targetcontrolid="txtInitials">
</ajaxtoolkit:textboxwatermarkextender>
<ajaxtoolkit:maskededitextender id="meeLveDate" masktype="Date" mask="99/99/9999" runat="server" targetcontrolid="txtLveDate">
</ajaxtoolkit:maskededitextender>
<ajaxtoolkit:maskededitextender id="meeArvDate" masktype="Date" mask="99/99/9999" runat="server" targetcontrolid="txtArvDate">
</ajaxtoolkit:maskededitextender>
</asp:Content>
Imports System.IO
Imports System.DateTime
Imports System.Data
Imports System.Data.SqlClient
Imports System.Web.Configuration
Partial Class _a_jz_trucks
Inherits System.Web.UI.Page
Protected Sub lbtnJzTrkReset_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles lbtnJzTrkReset.Click
Me.txtArvDate.Text = ""
Me.txtInitials.Text = ""
Me.txtLveDate.Text = ""
Me.lblTruckSubmitted.Visible = False
End Sub
Protected Sub lbtnJzTrkSubmit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles lbtnJzTrkSubmit.Click
Dim dteLve As Date = Me.txtLveDate.Text
Dim dteArv As Date = Me.txtArvDate.Text
Dim dteSub As Date = Today.ToString()
Dim strInitials As String = Me.txtInitials.Text
Dim connectionString As String = WebConfigurationManager.ConnectionStrings("conIntranet").ConnectionString
Dim con As New SqlConnection(connectionString)
Dim cmdJzTruckInsert As New SqlCommand("INSERT jz_truck (leave_date, arrive_date, submit_date, initials) values (@LveDate, @ArvDate, @SubDate, @Initials)", con)
cmdJzTruckInsert.Parameters.Add("@LveDate", SqlDbType.Date).Value = dteLve
cmdJzTruckInsert.Parameters.Add("@ArvDate", SqlDbType.Date).Value = dteArv
cmdJzTruckInsert.Parameters.Add("@SubDate", SqlDbType.Date).Value = dteSub
cmdJzTruckInsert.Parameters.Add("@Initials", SqlDbType.NVarChar, 50).Value = strInitials
Try
con.Open()
cmdJzTruckInsert.ExecuteNonQuery()
Catch ex As Exception
Finally
con.Close()
End Try
Me.lblTruckSubmitted.Visible = True
End Sub
End Class
|