eDosWeb/Rems2018/Task.aspx
Luc Vandenbroucke 15511972c1 Task Paging
2019-04-24 10:17:35 +02:00

198 lines
13 KiB
Text

<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeBehind="Task.aspx.cs" Inherits="Rems2018.Task" MaintainScrollPositionOnPostback="true" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<telerik:RadGrid ID="RadGrid1" runat="server" AllowAutomaticInserts="True" AllowAutomaticUpdates="True" AllowSorting="True" CellSpacing="-1" GridLines="Both" AllowAutomaticDeletes="True" AllowCustomPaging="True" AllowFilteringByColumn="True" AllowPaging="True" AutoGenerateColumns="False" DataSourceID="sqlDSV_Task" OnItemDataBound="RadGrid1_ItemDataBound" PageSize="5" PagerStyle-Mode="Slider" >
<GroupingSettings CollapseAllTooltip="Collapse all groups" CaseSensitive="false">
</GroupingSettings>
<ExportSettings>
<Pdf PageWidth="">
</Pdf>
<Excel FileExtension="xlsx" Format="Xlsx" />
</ExportSettings>
<ClientSettings AllowColumnsReorder="True">
<Scrolling AllowScroll="True" UseStaticHeaders="True" ScrollHeight="500px" />
</ClientSettings>
<MasterTableView DataKeyNames="ID_Task" CommandItemDisplay="Top" AllowAutomaticDeletes="False" DataSourceID="sqlDSV_Task" EditMode="EditForms" >
<CommandItemSettings ShowExportToExcelButton="True" AddNewRecordText="Add new task" />
<Columns>
<telerik:GridBoundColumn DataField="ID_Task" DataType="System.Int32" HeaderText="ID" UniqueName="ID_Task" ReadOnly="True" SortExpression="ID_Task" HeaderStyle-Width="60px" >
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="InstallationName" HeaderText="Installation" UniqueName="InstallationName" SortExpression="InstallationName" HeaderStyle-Width="100px">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Inst_CODE" HeaderText="Code" UniqueName="Inst_CODE" DataType="System.Int32" SortExpression="Inst_CODE" HeaderStyle-Width="60px" FilterControlAltText="Filter Inst_CODE column" >
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="TaskType_CODE" HeaderText="Task Type" SortExpression="TaskType_CODE" UniqueName="TaskType_CODE" DataType="System.Int32" FilterControlWidth="50px" HeaderStyle-Width="80px">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Task_Name" HeaderText="Task" UniqueName="Task_Name" SortExpression="Task_Name" HeaderStyle-Width="150px">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="TaskDescription" HeaderText="Description" UniqueName="TaskDescription" SortExpression="TaskDescription" HeaderStyle-Width="150px" >
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="EPDRad" HeaderText="EPDRad" UniqueName="EPDRad" SortExpression="EPDRad" FilterControlWidth="50px" HeaderStyle-Width="80px" />
<telerik:GridBoundColumn DataField="AlarmEPDName" HeaderText="AlarmEPD" UniqueName="AlarmEPDName" SortExpression="AlarmEPDName" HeaderStyle-Width="50px" >
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="TaskDateStart" HeaderText="Task Start" SortExpression="TaskDateStart" UniqueName="TaskDateStart" FilterControlAltText="Filter TaskDateStart column" DataType="System.DateTime" DataFormatString="{0:yyyy-MM-dd}"></telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="TaskDateEnd" DataType="System.DateTime" HeaderText="Task End" SortExpression="TaskDateEnd" UniqueName="TaskDateEnd" DataFormatString="{0:yyyy-MM-dd}">
</telerik:GridBoundColumn>
<telerik:GridCheckBoxColumn DataField="TaskEnable" DataType="System.Boolean" HeaderText="Enable" UniqueName="TaskEnable" SortExpression="TaskEnable" HeaderStyle-Width="50px" >
</telerik:GridCheckBoxColumn>
<telerik:GridBoundColumn DataField="FNGain_AnGainValue" DataType="System.Double" HeaderText="FN AN Gain" UniqueName="FNGain_AnGainValue" SortExpression="FNGain_AnGainValue" HeaderStyle-Width="50px" >
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="InstallationActivity" HeaderText="Installation" SortExpression="InstallationActivity" UniqueName="InstallationActivity" />
<telerik:GridBoundColumn DataField="ID_AlarmEPD" DataType="System.Int32" HeaderText="ID AlarmEPD" SortExpression="ID_AlarmEPD" UniqueName="ID_AlarmEPD">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="ID_FNGainANGain" DataType="System.Int32" HeaderText="ID FNGain" SortExpression="ID_FNGainANGain" UniqueName="ID_FNGainANGain">
</telerik:GridBoundColumn>
</Columns>
<EditFormSettings EditFormType="Template">
<FormTemplate>
<table style="width: 500px;">
<tr>
<td style="font-weight: bold">
<asp:Label ID="Label10" runat="server" CssClass="rdfLabel rdfBlock" Text="Installation: "></asp:Label>
</td>
<td>
<telerik:RadComboBox ID="RadComboBox1" runat="server" DataSourceID="SqlDSSelectInst" DataTextField="InstallationName" DataValueField="Inst_CODE" Width="95%" SelectedValue='<%# Bind("Inst_CODE") %>' />
</td>
</tr>
<tr>
<td style="font-weight: bold;">
<asp:Label ID="Label11" runat="server" CssClass="rdfLabel rdfBlock" Text="Task nr. :"></asp:Label>
</td>
<td>
<asp:TextBox ID="Label12" runat="server" CssClass="rdfFieldValue" Text='<%# Bind("TaskType_CODE") %>' />
</td>
</tr>
<tr>
<td style="font-weight: bold">
<asp:Label ID="Label14" runat="server" AssociatedControlID="TaskEnableCheckBox" CssClass="rdfLabel rdfBlock" Text="Actif"></asp:Label>
</td>
<td>
<telerik:RadCheckBox ID="TaskEnableCheckBox" runat="server" Checked='<%# Bind("TaskEnable") %>' />
</td>
</tr>
<tr>
<td style="font-weight: bold">
<asp:Label ID="Label15" runat="server" CssClass="rdfLabel rdfBlock" Text="Name:"></asp:Label>
</td>
<td>
<asp:TextBox ID="Label16" runat="server" CssClass="rdfFieldValue" Text='<%# Bind("Task_Name") %>' />
</td>
</tr>
<tr>
<td style="font-weight: bold">
<asp:Label ID="Label17" runat="server" CssClass="rdfLabel rdfBlock" Text="Description:"></asp:Label>
</td>
<td>
<asp:TextBox ID="Label18" runat="server" CssClass="rdfFieldValue" Text='<%# Bind("TaskDescription") %>' Width="300px" />
</td>
</tr>
<tr>
<td style="font-weight: bold">
<asp:Label ID="Label19" runat="server" CssClass="rdfLabel rdfBlock" Text="Start:"></asp:Label>
</td>
<td>
<telerik:RadDatePicker ID="RadDatePicker1" runat="server" DbSelectedDate='<%# Bind("TaskDateStart") %>' />
</td>
</tr>
<tr>
<td style="font-weight: bold">
<asp:Label ID="Label20" runat="server" CssClass="rdfLabel rdfBlock" Text="End:"></asp:Label>
</td>
<td>
<telerik:RadDatePicker ID="RadDatePicker2" runat="server" DbSelectedDate='<%# Bind("TaskDateEnd") %>' />
</td>
</tr>
<tr>
<td style="font-weight: bold">
<asp:Label ID="Label21" runat="server" CssClass="rdfLabel rdfBlock" Text="EPD Type: "></asp:Label>
</td>
<td>
<telerik:RadComboBox ID="RadComboBoxSelectEPDRad" runat="server" OnSelectedIndexChanged="RadComboBoxSelectEPDRad_SelectedIndexChanged" AutoPostBack="true" Width="95%" SelectedValue='<%# Bind("EPDRad") %>' >
<Items>
<telerik:RadComboBoxItem Value="BG" Text="Beta Gamma" Selected="True" />
<telerik:RadComboBoxItem Value="NG" Text="Neutron Gamma" BackColor="#FFFF80" />
</Items>
</telerik:RadComboBox>
</td>
</tr>
<tr>
<td style="font-weight: bold">
<asp:Label ID="Label22" runat="server" CssClass="rdfLabel rdfBlock" Text="Alarm EPD Level: "></asp:Label>
</td>
<td>
<telerik:RadComboBox ID="RadComboBoxSelectAlarmLevel" runat="server" DataTextField="AlarmEPDName" DataValueField="ID_AlarmEPD" Width="95%" SelectedValue='<%# Bind("ID_AlarmEPD") %>' OnLoad="RadComboBoxSelectAlarmLevel_Load" />
</td>
</tr>
<tr>
<td style="font-weight: bold">
<asp:Label ID="Label23" runat="server" CssClass="rdfLabel rdfBlock" Text="FNGainANGain: "></asp:Label>
</td>
<td>
<telerik:RadComboBox ID="RadComboBox4" runat="server" DataSourceID="SqlDSSelectGain" DataTextField="InstallationActivity" DataValueField="ID_FNGainANGain" Width="95%" SelectedValue='<%# Bind("ID_FNGainANGain") %>' />
</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>
<PagerStyle AlwaysVisible="True" />
</telerik:RadGrid>
<asp:SqlDataSource ID="sqlDSV_Task" runat="server"
ConnectionString="<%$ ConnectionStrings:HPH_REMS_newConnectionString %>"
SelectCommand="SELECT [ID_Task], [InstallationName], [Inst_CODE], [TaskType_CODE], [Task_Name], [TaskDescription], [EPDRad], [AlarmEPDName], [TaskDateStart], [TaskDateEnd], [TaskEnable], [FNGain_AnGainValue], [InstallationActivity],ID_AlarmEPD,ID_FNGainANGain FROM [V_Task]"
InsertCommand="TaskInsert" InsertCommandType="StoredProcedure"
UpdateCommand="TaskUpdate" UpdateCommandType="StoredProcedure"
>
<InsertParameters>
<asp:Parameter Name="Inst_CODE" Type="Int32" />
<asp:Parameter Name="TaskType_CODE" Type="Int32" />
<asp:Parameter Name="Task_Name" Type="String" />
<asp:Parameter Name="TaskDescription" Type="String" />
<asp:Parameter Name="EPDRad" Type="String" />
<asp:Parameter Name="ID_AlarmEPD" Type="Int32" />
<asp:Parameter Name="TaskDateStart" Type="DateTime" />
<asp:Parameter Name="TaskDateEnd" Type="DateTime" />
<asp:Parameter Name="TaskEnable" Type="Boolean" />
<asp:Parameter Name="ID_FNGainANGain" Type="Int32" />
</InsertParameters>
<UpdateParameters>
<asp:Parameter Name="ID_Task" Type="Int32" />
<asp:Parameter Name="Inst_CODE" Type="Int32" />
<asp:Parameter Name="TaskType_CODE" Type="Int32" />
<asp:Parameter Name="Task_Name" Type="String" />
<asp:Parameter Name="TaskDescription" Type="String" />
<asp:Parameter Name="EPDRad" Type="String" />
<asp:Parameter Name="ID_AlarmEPD" Type="Int32" />
<asp:Parameter Name="TaskDateStart" Type="DateTime" />
<asp:Parameter Name="TaskDateEnd" Type="DateTime" />
<asp:Parameter Name="TaskEnable" Type="Boolean" />
<asp:Parameter Name="ID_FNGainANGain" Type="Int32" />
<asp:Parameter Direction="ReturnValue" Name="RETURN_VALUE" Type="Int32" />
</UpdateParameters>
</asp:SqlDataSource>
<asp:SqlDataSource ID="SqlDSSelectInst" runat="server" ConnectionString="<%$ ConnectionStrings:HPH_REMS_newConnectionString %>" SelectCommand="SELECT [Inst_CODE], [InstallationName] FROM [Installation]"></asp:SqlDataSource>
<asp:SqlDataSource ID="SqlDSSelectAlarmLevel" runat="server" ConnectionString="<%$ ConnectionStrings:HPH_REMS_newConnectionString %>"
SelectCommand="SELECT [ID_AlarmEPD], [AlarmEPDName], [EPDRad] FROM [AlarmEPD] where epdrad=@epdrad or @epdrad='*';">
<SelectParameters>
<asp:parameter Name="epdrad" Type="String" />
</SelectParameters>
</asp:SqlDataSource>
<asp:SqlDataSource ID="SqlDSSelectGain" runat="server" ConnectionString="<%$ ConnectionStrings:HPH_REMS_newConnectionString %>" SelectCommand="SELECT [ID_FNGainANGain],[FNGain_ANGainValue]
,[InstallationActivity],[Description] FROM [FNGAinANGain]"></asp:SqlDataSource>
</asp:Content>