eDosWeb/eDos/TaskNG.aspx
2020-04-08 12:05:08 +02:00

181 lines
13 KiB
Text

<%@ Page Title="TaskNG" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeBehind="TaskNG.aspx.cs" Inherits="Rems2018.TaskNG" 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" AllowFilteringByColumn="True" AllowPaging="True" AutoGenerateColumns="False" DataSourceID="sqlDSV_Task" PagerStyle-Mode="Slider" OnItemCreated="RadGrid1_ItemCreated">
<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="700px" />--%>
</ClientSettings>
<MasterTableView DataKeyNames="ID_Task" CommandItemDisplay="Top" AllowAutomaticDeletes="False" DataSourceID="sqlDSV_Task" EditMode="EditForms">
<CommandItemSettings ShowExportToExcelButton="True" AddNewRecordText="Add new task" />
<Columns>
<telerik:GridButtonColumn CommandName="Edit" Text="Edit" ButtonCssClass="rgEdit" UniqueName="EditColumn" HeaderStyle-Width="30px">
<HeaderStyle Width="30px"></HeaderStyle>
</telerik:GridButtonColumn>
<telerik:GridBoundColumn DataField="ID_Task" DataType="System.Int32" HeaderText="ID" UniqueName="ID_Task" ReadOnly="True" SortExpression="ID_Task" HeaderStyle-Width="90px" FilterControlWidth="60px">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="InstallationName" HeaderText="Installation" UniqueName="InstallationName" SortExpression="InstallationName" FilterControlWidth="100px" HeaderStyle-Width="130px" CurrentFilterFunction="Contains" ShowFilterIcon="false" AutoPostBackOnFilter="true">
</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="110px">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Task_Name" HeaderText="Task" UniqueName="Task_Name" SortExpression="Task_Name" HeaderStyle-Width="200px">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="TaskDescription" HeaderText="Description" UniqueName="TaskDescription" SortExpression="TaskDescription" HeaderStyle-Width="200px">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="EPDRad" HeaderText="EPDRad" UniqueName="EPDRad" SortExpression="EPDRad" FilterControlWidth="50px" HeaderStyle-Width="80px" ReadOnly="true" />
<telerik:GridBoundColumn DataField="AlarmEPDName" HeaderText="AlarmEPD" UniqueName="AlarmEPDName" SortExpression="AlarmEPDName" HeaderStyle-Width="200px">
</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="100px">
</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="Activity" SortExpression="InstallationActivity" UniqueName="InstallationActivity" />
</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="lblTaskType_CODE" 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="Active"></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="Label22" runat="server" CssClass="rdfLabel rdfBlock" Text="Alarm EPD Level: "></asp:Label>
</td>
<td>
<telerik:RadComboBox ID="RadComboBoxSelectAlarmLevel" runat="server" DataSourceID="SqlDSSelectAlarmLevel" DataTextField="AlarmEPDName" DataValueField="ID_AlarmEPD" Width="95%" SelectedValue='<%# Bind("ID_AlarmEPD") %>' />
</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:eDosConnectionString %>"
SelectCommand="TaskNGSelect" SelectCommandType="StoredProcedure"
InsertCommand="TaskNGInsert" InsertCommandType="StoredProcedure"
UpdateCommand="TaskNGUpdate" 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="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="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" />
</UpdateParameters>
</asp:SqlDataSource>
<asp:SqlDataSource ID="SqlDSSelectInst" runat="server" ConnectionString="<%$ ConnectionStrings:eDosConnectionString %>" SelectCommand="InstallationsList" SelectCommandType="StoredProcedure"></asp:SqlDataSource>
<asp:SqlDataSource ID="SqlDSSelectAlarmLevel" runat="server" ConnectionString="<%$ ConnectionStrings:eDosConnectionString %>"
SelectCommand="AlarmEPDList" SelectCommandType="StoredProcedure">
<SelectParameters>
<asp:Parameter DefaultValue="NG" Name="epdrad" Type="String" />
</SelectParameters>
</asp:SqlDataSource>
<asp:SqlDataSource ID="SqlDSSelectGain" runat="server" ConnectionString="<%$ ConnectionStrings:eDosConnectionString %>"
SelectCommand="fngainselect" SelectCommandType="StoredProcedure"></asp:SqlDataSource>
</asp:Content>