Advertisement
Advertisement
| 06.17.2008 at 05:03AM PDT, ID: 23491140 |
|
[x]
Attachment Details
|
||
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: 123: 124: 125: 126: 127: 128: 129: 130: 131: 132: 133: 134: 135: 136: 137: 138: 139: 140: 141: 142: 143: 144: 145: 146: 147: 148: 149: 150: 151: 152: 153: 154: 155: 156: 157: 158: 159: 160: 161: 162: 163: 164: 165: 166: 167: 168: 169: 170: 171: 172: 173: 174: 175: 176: 177: 178: 179: 180: 181: 182: 183: 184: 185: 186: 187: 188: 189: 190: 191: |
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Order_Entry.aspx.vb" Inherits="Order_Entry" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
Order Entry</div>
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
DataKeyNames="orderID" DataSourceID="SqlDataSource1">
<Columns>
<asp:CommandField ShowEditButton="True" />
<asp:BoundField DataField="orderID" HeaderText="orderID" ReadOnly="True"
SortExpression="orderID" />
<asp:BoundField DataField="timeSubmitted" HeaderText="timeSubmitted"
SortExpression="timeSubmitted" />
<asp:BoundField DataField="repId" HeaderText="repId" SortExpression="repId" />
<asp:BoundField DataField="salesRep" HeaderText="salesRep"
SortExpression="salesRep" />
<asp:BoundField DataField="customer" HeaderText="customer"
SortExpression="customer" />
<asp:BoundField DataField="address" HeaderText="address"
SortExpression="address" />
<asp:TemplateField HeaderText="model" SortExpression="model">
<EditItemTemplate>
<asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("model") %>'></asp:TextBox>
</EditItemTemplate>
<ItemTemplate>
<asp:DropDownList ID="DropDownList1" runat="server"
DataSourceID="SqlDataSource2" DataTextField="model" DataValueField="model"
SelectedValue='<%# Bind("model") %>'>
</asp:DropDownList>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConflictDetection="CompareAllValues"
ConnectionString="<%$ ConnectionStrings:IMSonlineConnectionString %>"
DeleteCommand="DELETE FROM [tblOrders] WHERE [orderID] = @original_orderID AND [timeSubmitted] = @original_timeSubmitted AND [repId] = @original_repId AND [salesRep] = @original_salesRep AND [customer] = @original_customer AND [address] = @original_address AND [model] = @original_model"
InsertCommand="INSERT INTO [tblOrders] ([orderID], [timeSubmitted], [repId], [salesRep], [customer], [address], [model]) VALUES (@orderID, @timeSubmitted, @repId, @salesRep, @customer, @address, @model)"
OldValuesParameterFormatString="original_{0}"
SelectCommand="SELECT * FROM [tblOrders]"
UpdateCommand="UPDATE [tblOrders] SET [timeSubmitted] = @timeSubmitted, [repId] = @repId, [salesRep] = @salesRep, [customer] = @customer, [address] = @address, [model] = @model WHERE [orderID] = @original_orderID AND [timeSubmitted] = @original_timeSubmitted AND [repId] = @original_repId AND [salesRep] = @original_salesRep AND [customer] = @original_customer AND [address] = @original_address AND [model] = @original_model">
<DeleteParameters>
<asp:Parameter Name="original_orderID" Type="Int32" />
<asp:Parameter Name="original_timeSubmitted" Type="DateTime" />
<asp:Parameter Name="original_repId" Type="Int32" />
<asp:Parameter Name="original_salesRep" Type="String" />
<asp:Parameter Name="original_customer" Type="String" />
<asp:Parameter Name="original_address" Type="String" />
<asp:Parameter Name="original_model" Type="String" />
</DeleteParameters>
<UpdateParameters>
<asp:Parameter Name="timeSubmitted" Type="DateTime" />
<asp:Parameter Name="repId" Type="Int32" />
<asp:Parameter Name="salesRep" Type="String" />
<asp:Parameter Name="customer" Type="String" />
<asp:Parameter Name="address" Type="String" />
<asp:Parameter Name="model" Type="String" />
<asp:Parameter Name="original_orderID" Type="Int32" />
<asp:Parameter Name="original_timeSubmitted" Type="DateTime" />
<asp:Parameter Name="original_repId" Type="Int32" />
<asp:Parameter Name="original_salesRep" Type="String" />
<asp:Parameter Name="original_customer" Type="String" />
<asp:Parameter Name="original_address" Type="String" />
<asp:Parameter Name="original_model" Type="String" />
</UpdateParameters>
<InsertParameters>
<asp:Parameter Name="orderID" Type="Int32" />
<asp:Parameter Name="timeSubmitted" Type="DateTime" />
<asp:Parameter Name="repId" Type="Int32" />
<asp:Parameter Name="salesRep" Type="String" />
<asp:Parameter Name="customer" Type="String" />
<asp:Parameter Name="address" Type="String" />
<asp:Parameter Name="model" Type="String" />
</InsertParameters>
</asp:SqlDataSource>
<asp:SqlDataSource ID="SqlDataSource2" runat="server"
ConnectionString="<%$ ConnectionStrings:IMSonlineConnectionString %>"
SelectCommand="SELECT DISTINCT [model] FROM [tblEquipment]">
</asp:SqlDataSource>
<asp:FormView ID="FormView1" runat="server" DataKeyNames="orderID"
DataSourceID="SqlDataSource1">
<EditItemTemplate>
orderID:
<asp:Label ID="orderIDLabel1" runat="server" Text='<%# Eval("orderID") %>' />
<br />
timeSubmitted:
<asp:TextBox ID="timeSubmittedTextBox" runat="server"
Text='<%# Bind("timeSubmitted") %>' />
<br />
repId:
<asp:TextBox ID="repIdTextBox" runat="server" Text='<%# Bind("repId") %>' />
<br />
salesRep:
<asp:TextBox ID="salesRepTextBox" runat="server"
Text='<%# Bind("salesRep") %>' />
<br />
customer:
<asp:TextBox ID="customerTextBox" runat="server"
Text='<%# Bind("customer") %>' />
<br />
address:
<asp:TextBox ID="addressTextBox" runat="server" Text='<%# Bind("address") %>' />
<br />
model:
<asp:DropDownList ID="DropDownList3" runat="server"
DataSourceID="SqlDataSource2" DataTextField="model" DataValueField="model"
SelectedValue='<%# Bind("model") %>'>
</asp:DropDownList>
<br />
<asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True"
CommandName="Update" Text="Update" />
<asp:LinkButton ID="UpdateCancelButton" runat="server"
CausesValidation="False" CommandName="Cancel" Text="Cancel" />
</EditItemTemplate>
<InsertItemTemplate>
orderID:
<asp:TextBox ID="orderIDTextBox" runat="server" Text='<%# Bind("orderID") %>' />
<br />
timeSubmitted:
<asp:TextBox ID="timeSubmittedTextBox" runat="server"
Text='<%# Bind("timeSubmitted") %>' />
<br />
repId:
<asp:TextBox ID="repIdTextBox" runat="server"
Text='<%# Bind("repId") %>' />
<br />
salesRep:
<asp:TextBox ID="salesRepTextBox" runat="server"
Text='<%# Bind("salesRep") %>' />
<br />
customer:
<asp:TextBox ID="customerTextBox" runat="server"
Text='<%# Bind("customer") %>' />
<br />
address:
<asp:TextBox ID="addressTextBox" runat="server" Text='<%# Bind("address") %>' />
<br />
model:
<asp:TextBox ID="modelTextBox" runat="server" Text='<%# Bind("model") %>' />
<br />
<asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True"
CommandName="Insert" Text="Insert" />
<asp:LinkButton ID="InsertCancelButton" runat="server"
CausesValidation="False" CommandName="Cancel" Text="Cancel" />
</InsertItemTemplate>
<ItemTemplate>
orderID:
<asp:Label ID="orderIDLabel" runat="server" Text='<%# Eval("orderID") %>' />
<br />
timeSubmitted:
<asp:Label ID="timeSubmittedLabel" runat="server"
Text='<%# Bind("timeSubmitted") %>' />
<br />
repId:
<asp:Label ID="repIdLabel" runat="server" Text='<%# Bind("repId") %>' />
<br />
salesRep:
<asp:Label ID="salesRepLabel" runat="server" Text='<%# Bind("salesRep") %>' />
<br />
customer:
<asp:Label ID="customerLabel" runat="server" Text='<%# Bind("customer") %>' />
<br />
address:
<asp:Label ID="addressLabel" runat="server" Text='<%# Bind("address") %>' />
<br />
model:
<asp:DropDownList ID="DropDownList2" runat="server"
DataSourceID="SqlDataSource2" DataTextField="model" DataValueField="model"
SelectedValue='<%# Bind("model") %>'>
</asp:DropDownList>
<br />
<asp:LinkButton ID="EditButton" runat="server" CausesValidation="False"
CommandName="Edit" Text="Edit" />
<asp:LinkButton ID="DeleteButton" runat="server" CausesValidation="False"
CommandName="Delete" Text="Delete" />
<asp:LinkButton ID="NewButton" runat="server" CausesValidation="False"
CommandName="New" onclick="NewButton_Click" Text="New" />
</ItemTemplate>
</asp:FormView>
<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
</form>
</body>
</html>
|