<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server"> <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"> </asp:ToolkitScriptManager> <div class="ContentClass"> <asp:TabContainer ID="AssetTransactionTab" runat="server" ActiveTabIndex="0" CssClass="Tab" Width="794px" Height="290px"> <asp:TabPanel ID="NewTransaction" runat="server" HeaderText="New Transaction" > <ContentTemplate>
<asp:UpdatePanel ID="DetailUpdatePanel" runat="server"> <ContentTemplate> <table align="center" style="width: 666px"> <tr> <td class="lableColumn"><asp:Label ID="lblAssetID" runat="server" Text="Asset ID:"></asp:Label> </td> <td><asp:DropDownList ID="ddlAssetID" runat="server" DataSourceID="ddlAssetIDSource" DataTextField="AssetDescription" DataValueField="AssetID" CssClass="ddlstyle"></asp:DropDownList> <asp:SqlDataSource ID="ddlAssetIDSource" runat="server" ConnectionString="<%$ ConnectionStrings:DeemahAssetConnectionString %>" SelectCommand="GetAssetDropDown" SelectCommandType="StoredProcedure"> </asp:SqlDataSource> </td> <td class="lableColumn"><asp:Label ID="lblEmployeeID" runat="server" Text="Employee ID:"></asp:Label> </td> <td><asp:DropDownList ID="ddlEmployeeID" runat="server" DataSourceID="ddlEmployeeIDSource" DataTextField="EmployeeName" DataValueField="EmployeeID" CssClass="ddlstyle" Width="200px"></asp:DropDownList> <asp:SqlDataSource ID="ddlEmployeeIDSource" runat="server" ConnectionString="<%$ ConnectionStrings:DeemahAssetConnectionString %>" SelectCommand="GetEmployeeDropDown" SelectCommandType="StoredProcedure"> </asp:SqlDataSource> </td> </tr> <tr> <td class="lableColumn"><asp:Label ID="lblSupplierID" runat="server" Text="Supplier ID:"></asp:Label></td> <td><asp:DropDownList ID="ddlSupplierID" runat="server" DataSourceID="ddlSupplierIDSource" DataTextField="VendorName" DataValueField="VendorID" CssClass="ddlstyle"></asp:DropDownList> <asp:SqlDataSource ID="ddlSupplierIDSource" runat="server" ConnectionString="<%$ ConnectionStrings:DeemahAssetConnectionString %>" SelectCommand="GetVendorDropDown" SelectCommandType="StoredProcedure"> </asp:SqlDataSource> </td> <td class="lableColumn"><asp:Label ID="lblIssuedReceivedDate" runat="server" Text="Issued/Received Date:"></asp:Label></td> <td><asp:TextBox ID="txtIssuedReceivedDate" runat="server" CssClass="txtstyle"></asp:TextBox> <asp:ImageButton ID="imgIssuedReceivedDate" runat="server" ImageUrl="~/Images/btn_calicon.gif" /> <asp:CalendarExtender ID="calIssuedReceivedDate" runat="server" TargetControlID="txtIssuedReceivedDate" PopupButtonID="imgIssuedReceivedDate"> </asp:CalendarExtender></td> </tr> <tr> <td class="lableColumn"><asp:Label ID="lblLocationID" runat="server" Text="Location ID:"></asp:Label></td> <td><asp:DropDownList ID="ddlLocationID" runat="server" DataSourceID="ddlLocationSource" DataTextField="LocationName" DataValueField="LocationID" CssClass="ddlstyle"></asp:DropDownList> <asp:SqlDataSource ID="ddlLocationSource" runat="server" ConnectionString="<%$ ConnectionStrings:DeemahAssetConnectionString %>" SelectCommand="GetLocationDropDown" SelectCommandType="StoredProcedure"> </asp:SqlDataSource> </td> <td><asp:Button ID="btnAdd" runat="server" Text="ADD" CssClass="Btn" onclick="btnAdd_Click"></asp:Button></td> </tr> </table> </ContentTemplate> </asp:UpdatePanel> <div> <asp:UpdatePanel ID="GridUpdatePanel" runat="server"> <ContentTemplate> <asp:GridView ID="GriDisplay" runat="server" AutoGenerateColumns="False"> <Columns> <asp:TemplateField HeaderText="Asset"> </asp:TemplateField> <asp:TemplateField HeaderText="Location"> </asp:TemplateField> </Columns> </asp:GridView> </ContentTemplate> </asp:UpdatePanel> </div> </div> </ContentTemplate> </asp:TabPanel> </asp:TabContainer> </div> </asp:Content>
protected void btnAdd_Click(object sender, EventArgs e) { ArrayList arr = new ArrayList(); arr.Add(int.Parse(ddlAssetID.SelectedValue).ToString()); arr.Add(int.Parse(ddlEmployeeID.SelectedValue).ToString()); GriDisplay.DataSource = arr; GriDisplay.DataBind(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)