eDosWeb/Rems2018/CommentToInstallation.aspx
2019-05-06 16:30:26 +02:00

174 lines
12 KiB
Text

<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeBehind="CommentToInstallation.aspx.cs" Inherits="Rems2018.CommentToInstallation" %>
<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="sqlDSCommentToInstallation" AutoGenerateEditColumn="True">
<GroupingSettings CollapseAllTooltip="Collapse all groups"></GroupingSettings>
<ExportSettings>
<Pdf PageWidth="">
</Pdf>
<Excel FileExtension="xlsx" Format="Xlsx" />
</ExportSettings>
<ClientSettings AllowColumnsReorder="True">
</ClientSettings>
<MasterTableView DataKeyNames="ID_CommentToInstallation" CommandItemDisplay="Top" AllowAutomaticDeletes="False" DataSourceID="sqlDSCommentToInstallation" >
<CommandItemSettings ShowExportToExcelButton="True" />
<Columns>
<telerik:GridBoundColumn DataField="ID_CommentToInstallation" DataType="System.Int32" HeaderText="ID_CommentToInstallation" UniqueName="ID_CommentToInstallation" FilterControlAltText="Filter ID_CommentToInstallation column" ReadOnly="True" SortExpression="ID_CommentToInstallation">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="FNameAgent" HeaderText="FNameAgent" UniqueName="FNameAgent" FilterControlAltText="Filter FNameAgent column" SortExpression="FNameAgent">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="LNameAgent" FilterControlAltText="Filter LNameAgent column" HeaderText="LNameAgent" SortExpression="LNameAgent" UniqueName="LNameAgent">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="FNameHPH" HeaderText="FNameHPH" UniqueName="FNameHPH" FilterControlAltText="Filter FNameHPH column" SortExpression="FNameHPH">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="LNameHPH" HeaderText="LNameHPH" UniqueName="LNameHPH" SortExpression="LNameHPH" FilterControlAltText="Filter LNameHPH column">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Inst_CODE" HeaderText="Code" UniqueName="Inst_CODE" SortExpression="Inst_CODE">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="InstallationName" HeaderText="InstallationName" UniqueName="InstallationName" FilterControlAltText="Filter InstallationName column" SortExpression="InstallationName" ReadOnly="true">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Comment" HeaderText="Comment" UniqueName="Comment" FilterControlAltText="Filter Comment column" SortExpression="Comment">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="CommentDate" HeaderText="CommentDate" UniqueName="CommentDate" FilterControlAltText="Filter CommentDate column" SortExpression="CommentDate" DataType="System.DateTime">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="CommentDateStart" FilterControlAltText="Filter CommentDateStart column" HeaderText="CommentDateStart" SortExpression="CommentDateStart" UniqueName="CommentDateStart" DataType="System.DateTime">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="CommentDateSTOP" DataType="System.DateTime" FilterControlAltText="Filter CommentDateSTOP column" HeaderText="CommentDateSTOP" SortExpression="CommentDateSTOP" UniqueName="CommentDateSTOP">
</telerik:GridBoundColumn>
</Columns>
<EditFormSettings EditFormType="Template">
<FormTemplate>
<table>
<tr>
<td style="font-weight: bold">
<asp:Label ID="Label3" runat="server" CssClass="rdfLabel rdfBlock" Text="Installation: "></asp:Label>
</td>
<td>
<telerik:RadComboBox ID="RadComboBoxSelectInst" runat="server"
DataSourceID="SqlDSSelectInst"
DataTextField="InstallationName"
DataValueField="Inst_CODE"
SelectedValue ='<%# Bind("Inst_CODE") %>'
Width="95%">
</telerik:RadComboBox>
</td>
</tr>
<tr>
<td style="font-weight: bold">
<asp:Label ID="Label10" runat="server" CssClass="rdfLabel rdfBlock" Text="Comment:"></asp:Label>
</td>
<td>
<asp:TextBox ID="Label11" runat="server" CssClass="rdfFieldValue" Text='<%# Bind("Comment") %>' />
</td>
</tr>
<tr>
<td style="font-weight: bold">
<asp:Label ID="Label12" runat="server" CssClass="rdfLabel rdfBlock" Text="Date Start:"></asp:Label>
</td>
<td>
<telerik:RadDatePicker ID="RadDatePicker1" runat="server" DbSelectedDate='<%# Bind("CommentDateSTART") %>' />
</td>
</tr>
<tr>
<td style="font-weight: bold">
<asp:Label ID="Label13" runat="server" CssClass="rdfLabel rdfBlock" Text="Date Stop:"></asp:Label>
</td>
<td>
<telerik:RadDatePicker ID="RadDatePicker2" runat="server" DbSelectedDate='<%# Bind("CommentDateSTOP") %>' />
</td>
</tr>
<tr>
<td style="font-weight: bold">
<asp:Label ID="Label7" runat="server" CssClass="rdfLabel rdfBlock" Text="Register by (Agent SC): "></asp:Label>
</td>
<td>
<telerik:RadComboBox ID="RadComboBoxSelectAgentSC" runat="server" DataSourceID="SqlDSSelectAgentSC"
DataTextField="FullName"
DataValueField="PersID" Width="95%">
</telerik:RadComboBox>
</td>
</tr>
<tr>
<td style="font-weight: bold">
<asp:Label ID="Label8" runat="server" CssClass="rdfLabel rdfBlock" Text="Register by (HPHResp): "></asp:Label>
</td>
<td>
<telerik:RadComboBox ID="RadComboBoxSelectHPH" runat="server" DataSourceID="SqlDSSelectHPHResp"
DataTextField="FullName"
DataValueField="PersID" Width="95%">
</telerik:RadComboBox>
</td>
</tr>
<tr>
<td style="font-weight: bold">
<asp:Label ID="Label6" runat="server" CssClass="rdfLabel rdfBlock" Text="Date of the registration:"></asp:Label>
</td>
<td>
<telerik:RadDatePicker ID="CommentDate" runat="server" DbSelectedDate='<%# Bind("CommentDate") %>' />
</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>
<<--! Na Edit moet een controle dat alles ingevuld is behalve Agent SC of verantwoordelijk. Dus 1 van de 2 is voldoen -->
<asp:SqlDataSource ID="sqlDSCommentToInstallation" runat="server"
ConnectionString="<%$ ConnectionStrings:HPH_REMS_newConnectionString %>"
SelectCommand="CommentToInstallationSelect" SelectCommandType="StoredProcedure"
DeleteCommand="CommentToInstalltionDelete" DeleteCommandType="StoredProcedure"
InsertCommand="CommentToInstallationInsert" InsertCommandType="StoredProcedure"
UpdateCommand="CommentToInstallationUpdate" UpdateCommandType="StoredProcedure">
<DeleteParameters>
<asp:Parameter Name="ID_CommentToInstallation" Type="Int32" />
</DeleteParameters>
<InsertParameters>
<asp:Parameter Name="PersID_AgentSC" Type="Int32" />
<asp:Parameter Name="PersID_HPHResp" Type="Int32" />
<asp:Parameter Name="Inst_CODE" Type="Int32" />
<asp:Parameter Name="Comment" Type="String" />
<asp:Parameter DbType="Date" Name="CommentDate" />
<asp:Parameter DbType="Date" Name="CommentDateSTART" />
<asp:Parameter DbType="Date" Name="CommentDateSTOP" />
</InsertParameters>
<UpdateParameters>
<asp:Parameter Name="ID_CommentToInstallation" Type="Int32" />
<asp:Parameter Name="PersID_AgentSC" Type="Int32" />
<asp:Parameter Name="PersID_HPHResp" Type="Int32" />
<asp:Parameter Name="Inst_CODE" Type="Int32" />
<asp:Parameter Name="Comment" Type="String" />
<asp:Parameter DbType="Date" Name="CommentDate" />
<asp:Parameter DbType="Date" Name="CommentDateSTART" />
<asp:Parameter DbType="Date" Name="CommentDateSTOP" />
</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="SqlDSSelectAgentSC" runat="server" ConnectionString="<%$ ConnectionStrings:HPH_REMS_newConnectionString %>" SelectCommand="SELECT [PersID], [LastName], [FirstName], FullName=[LastName]+' '+[FirstName] FROM [V_SelectAgent SC]"></asp:SqlDataSource>
<asp:SqlDataSource ID="SqlDSSelectHPHResp" runat="server" ConnectionString="<%$ ConnectionStrings:HPH_REMS_newConnectionString %>" SelectCommand="SELECT [PersID], [FirstName], [LastName], FullName=[LastName]+' '+[FirstName] FROM [V_SelectHPHResp]"></asp:SqlDataSource>
</asp:Content>