eDosWeb/eDos/ReserveBadges.aspx
Luc Vandenbroucke 45ee0c2ae9 Reserve Badges
2022-08-08 16:34:09 +02:00

94 lines
6.8 KiB
Text

<%@ Page Title="ReserveBadge" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeBehind="ReserveBadges.aspx.cs" Inherits="eDos2021.ReserveBadges" %>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<telerik:RadDatePicker runat="server" ID="dt" />
<telerik:RadGrid runat="server" ID="rbGrid" AllowAutomaticDeletes="True" AllowAutomaticInserts="True" AllowAutomaticUpdates="True" AutoGenerateEditColumn="True" DataSourceID="ds1" AutoGenerateDeleteColumn="True" >
<GroupingSettings CollapseAllTooltip="Collapse all groups"></GroupingSettings>
<ExportSettings>
<Pdf PageWidth="">
</Pdf>
</ExportSettings>
<MasterTableView AutoGenerateColumns="False" DataKeyNames="ID" DataSourceID="ds1" CommandItemDisplay="Top" EditMode="EditForms" >
<RowIndicatorColumn ShowNoSortIcon="False"></RowIndicatorColumn>
<ExpandCollapseColumn ShowNoSortIcon="False"></ExpandCollapseColumn>
<Columns>
<telerik:GridBoundColumn DataField="ID" DataType="System.Int32" HeaderText="ID" ReadOnly="True" ShowNoSortIcon="False" SortExpression="ID" UniqueName="ID">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Date" DataType="System.DateTime" HeaderText="Date" ShowNoSortIcon="False" SortExpression="Date" UniqueName="Date" ReadOnly="true" DataFormatString="{0:yyyy-MM-dd}">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="ReserveID" DataType="System.Int32" HeaderText="ReserveID" ShowNoSortIcon="False" SortExpression="ReserveID" UniqueName="ReserveID">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="BadgeName" DataType="System.String" HeaderText="Reserve" ShowNoSortIcon="False" SortExpression="BadgeName" UniqueName="BadgeName" ReadOnly="true">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="PersID" DataType="System.Int32" HeaderText="PersID" ShowNoSortIcon="False" SortExpression="PersID" UniqueName="PersID">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="PersonName" DataType="System.String" HeaderText="Reserve" ShowNoSortIcon="False" SortExpression="PersonName" UniqueName="PersonName" ReadOnly="true">
</telerik:GridBoundColumn>
</Columns>
<EditFormSettings EditFormType="Template" >
<FormTemplate>
<table>
<tr>
<td style="font-weight: bold">
<asp:Label ID="Label1" runat="server" CssClass="rdfLabel rdfBlock" Text="Select the Badge: "></asp:Label>
</td>
<td>
<telerik:RadComboBox ID="RadComboBoxSelectBadge" runat="server" AppendDataBoundItems="true" DataSourceID="SqlDSSelectBadge" DataTextField="displayName" DataValueField="ReserveID" Width="95%" SelectedValue='<%# Bind("ReserveID") %>'>
<Items>
<telerik:RadComboBoxItem Text="-" Value="0" />
</Items>
</telerik:RadComboBox>
</td>
</tr>
<tr>
<td style="font-weight: bold">
<asp:Label ID="Label3" runat="server" CssClass="rdfLabel rdfBlock" Text="Select the Person: "></asp:Label>
</td>
<td>
<telerik:RadComboBox ID="RadComboBoxSelectPerson" runat="server" AppendDataBoundItems="true" DataSourceID="SqlDSSelectPerson" DataTextField="displayName" DataValueField="PersID" Width="95%" SelectedValue='<%# Bind("PersID") %>'>
<Items>
<telerik:RadComboBoxItem Text="-" Value="0" />
</Items>
</telerik:RadComboBox>
</td>
</tr>
</table>
<div class="rdfCommandButtons">
<hr class="rdfHr" />
<telerik:RadButton RenderMode="Lightweight" ID="UpdateButton" runat="server" ButtonType="SkinnedButton" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>' Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>' ToolTip="Update" />
<telerik:RadButton RenderMode="Lightweight" ID="CancelButton" runat="server" ButtonType="SkinnedButton" CausesValidation="False" CommandName="Cancel" Text="Cancel" ToolTip="Cancel" />
</div>
</FormTemplate>
</EditFormSettings>
</MasterTableView>
</telerik:RadGrid>
<asp:SqlDataSource ID="ds1" runat="server" ConnectionString="<%$ ConnectionStrings:eDosConnectionString %>" DeleteCommand="ReserveAssignmentsDelete" DeleteCommandType="StoredProcedure" InsertCommand="ReserveAssignmentsInsert" InsertCommandType="StoredProcedure" SelectCommand="ReserveAssignmentsSelect" SelectCommandType="StoredProcedure" UpdateCommand="ReserveAssignmentsUpdate" UpdateCommandType="StoredProcedure" CancelSelectOnNullParameter="false" OnInserting="ds1_Inserting">
<DeleteParameters>
<asp:Parameter Name="ID" Type="Int32" />
</DeleteParameters>
<InsertParameters>
<asp:Parameter DbType="Date" Name="Date" ConvertEmptyStringToNull="true" />
<asp:Parameter Name="ReserveID" Type="Int32" />
<asp:Parameter Name="PersID" Type="Int32" />
</InsertParameters>
<SelectParameters>
<asp:ControlParameter ControlID="dt" Name="date" PropertyName="SelectedDate" Type="DateTime" />
</SelectParameters>
<UpdateParameters>
<asp:Parameter Name="ID" Type="Int32" />
<asp:Parameter DbType="Date" Name="Date" />
<asp:Parameter Name="ReserveID" Type="Int32" />
<asp:Parameter Name="PersID" Type="Int32" />
</UpdateParameters>
</asp:SqlDataSource>
<asp:SqlDataSource ID="SqlDSSelectPerson" runat="server" ConnectionString="<%$ ConnectionStrings:eDosConnectionString %>" SelectCommand="PersonList" SelectCommandType="StoredProcedure"></asp:SqlDataSource>
<asp:SqlDataSource ID="SqlDSSelectBadge" runat="server" ConnectionString="<%$ ConnectionStrings:eDosConnectionString %>" SelectCommand="ReserveBadgesList" SelectCommandType="StoredProcedure"></asp:SqlDataSource>
</asp:Content>