selezione dossier --> mostra schede inserite...
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_elencoDossiers.ascx.cs" Inherits="CMS_SC.WebUserControls.mod_elencoDossiers" %>
|
||||
<asp:GridView ID="grView" runat="server" AutoGenerateColumns="False" DataKeyNames="IdxDossier" DataSourceID="ods" CssClass="table table-striped" AllowPaging="True" AllowSorting="True" OnSelectedIndexChanged="grView_SelectedIndexChanged">
|
||||
<Columns>
|
||||
<asp:TemplateField ShowHeader="False" ItemStyle-Wrap="false">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="lbSelect" runat="server" CausesValidation="False" CommandName="Select" ToolTip="Select" CssClass="fa fa-search fa-2x" />
|
||||
</ItemTemplate>
|
||||
<HeaderTemplate>
|
||||
<asp:LinkButton ID="lbtReset" runat="server" OnClick="btnReset_Click" CssClass="btn btn-default" Visible="true"><i class="fa fa-refresh"></i> <%: traduci("Reset") %></asp:LinkButton>
|
||||
</HeaderTemplate>
|
||||
<ItemStyle Wrap="False"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Matricola" SortExpression="Matricola">
|
||||
<ItemTemplate>
|
||||
<b><asp:Label ID="Label2" runat="server" Text='<%# Eval("Matricola") %>' /></b>
|
||||
<br />
|
||||
<asp:Label ID="Label3" runat="server" Text='<%# Eval("DescrMacchina") %>' Font-Size="0.8em" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Schede" SortExpression="NumSchede">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label1" runat="server" Text='<%# Eval("NumSchede") + " (" +Eval("NumMisEff")+"/"+ Eval("NumMisReq") +")" %>' ToolTip="Num Schede (misure effettuate / misure richieste)" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="Stato" HeaderText="Stato" SortExpression="Stato" />
|
||||
<asp:TemplateField ShowHeader="False" ItemStyle-Wrap="false">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="lbDelete" runat="server" CausesValidation="False" CommandName="Delete" ToolTip="Delete" OnClientClick='<%# SteamWare.jsUtils.getCBE("confermaDel") %>' CssClass="fa fa-trash fa-2x" />
|
||||
</ItemTemplate>
|
||||
|
||||
<ItemStyle Wrap="False"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<PagerStyle CssClass="bg-primary" />
|
||||
<SelectedRowStyle CssClass="info" />
|
||||
</asp:GridView>
|
||||
<asp:ObjectDataSource ID="ods" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" TypeName="CMS_SC_Data.DS_ApplicazioneTableAdapters.ElencoDossierTableAdapter" FilterExpression=" Matricola LIKE '%{0}%' ">
|
||||
<FilterParameters>
|
||||
<asp:SessionParameter DefaultValue="*" Name="ricerca" SessionField="searchVal" />
|
||||
</FilterParameters>
|
||||
</asp:ObjectDataSource>
|
||||
@@ -0,0 +1,96 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using CMS_SC_Data;
|
||||
using SteamWare;
|
||||
|
||||
namespace CMS_SC.WebUserControls
|
||||
{
|
||||
public partial class mod_elencoDossiers : System.Web.UI.UserControl
|
||||
{
|
||||
/// <summary>
|
||||
/// selezione valore in DettScheda
|
||||
/// </summary>
|
||||
public event EventHandler eh_selezioneValore;
|
||||
/// <summary>
|
||||
/// sollevo evento selezione
|
||||
/// </summary>
|
||||
protected void raiseEvent()
|
||||
{
|
||||
// sollevo evento nuovo valore...
|
||||
if (eh_selezioneValore != null)
|
||||
{
|
||||
eh_selezioneValore(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// dimensione pagina grid view
|
||||
/// </summary>
|
||||
public int pageSize
|
||||
{
|
||||
get
|
||||
{
|
||||
return grView.PageSize;
|
||||
}
|
||||
set
|
||||
{
|
||||
grView.PageSize = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// dossier selezionato
|
||||
/// </summary>
|
||||
public int idxDossier
|
||||
{
|
||||
get
|
||||
{
|
||||
int answ = 0;
|
||||
try
|
||||
{
|
||||
answ = Convert.ToInt32(grView.SelectedDataKey["IdxDossier"]);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// selezione scheda...
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void grView_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
raiseEvent();
|
||||
}
|
||||
protected void btnReset_Click(object sender, EventArgs e)
|
||||
{
|
||||
resetSelezione();
|
||||
}
|
||||
/// <summary>
|
||||
/// resetto selezione
|
||||
/// </summary>
|
||||
private void resetSelezione()
|
||||
{
|
||||
grView.SelectedIndex = -1;
|
||||
grView.DataBind();
|
||||
raiseEvent();
|
||||
}
|
||||
/// <summary>
|
||||
/// wrapper traduzione
|
||||
/// </summary>
|
||||
/// <param name="lemma"></param>
|
||||
/// <returns></returns>
|
||||
public string traduci(string lemma)
|
||||
{
|
||||
return user_std.UtSn.Traduci(lemma);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace CMS_SC.WebUserControls {
|
||||
|
||||
|
||||
public partial class mod_elencoDossiers {
|
||||
|
||||
/// <summary>
|
||||
/// grView control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.GridView grView;
|
||||
|
||||
/// <summary>
|
||||
/// ods control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.ObjectDataSource ods;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_elencoSchedeDossier.ascx.cs" Inherits="CMS_SC.WebUserControls.mod_elencoSchedeDossier" %>
|
||||
<asp:GridView ID="grView" runat="server" AutoGenerateColumns="False" DataKeyNames="IdxDossier,CodScheda,Vers,NumScheda" DataSourceID="ods" CssClass="table table-striped" AllowPaging="True" AllowSorting="True" OnSelectedIndexChanged="grView_SelectedIndexChanged">
|
||||
<EmptyDataTemplate>
|
||||
<asp:Label runat="server" ID="lblNoRecord" Text='<%# traduci("NoRecords") %>' />
|
||||
</EmptyDataTemplate>
|
||||
<Columns>
|
||||
<asp:BoundField DataField="IdxDossier" HeaderText="IdxDossier" SortExpression="IdxDossier" ReadOnly="True" />
|
||||
<asp:BoundField DataField="CodScheda" HeaderText="CodScheda" ReadOnly="True" SortExpression="CodScheda" />
|
||||
<asp:BoundField DataField="Vers" HeaderText="Vers" ReadOnly="True" SortExpression="Vers" />
|
||||
<asp:BoundField DataField="NumScheda" HeaderText="NumScheda" ReadOnly="True" SortExpression="NumScheda" />
|
||||
<asp:BoundField DataField="Descrizione" HeaderText="Descrizione" SortExpression="Descrizione" />
|
||||
</Columns>
|
||||
<PagerStyle CssClass="bg-primary" />
|
||||
<SelectedRowStyle CssClass="info" />
|
||||
</asp:GridView>
|
||||
<asp:ObjectDataSource ID="ods" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="getByDossier" TypeName="CMS_SC_Data.DS_ApplicazioneTableAdapters.SchemaCollMaccTableAdapter" DeleteMethod="Delete" InsertMethod="Insert" UpdateMethod="Update">
|
||||
<DeleteParameters>
|
||||
<asp:Parameter Name="Original_IdxDossier" Type="Int32" />
|
||||
<asp:Parameter Name="Original_CodScheda" Type="String" />
|
||||
<asp:Parameter Name="Original_Vers" Type="Int32" />
|
||||
<asp:Parameter Name="Original_NumScheda" Type="Int32" />
|
||||
<asp:Parameter Name="Original_Descrizione" Type="String" />
|
||||
</DeleteParameters>
|
||||
<InsertParameters>
|
||||
<asp:Parameter Name="IdxDossier" Type="Int32" />
|
||||
<asp:Parameter Name="CodScheda" Type="String" />
|
||||
<asp:Parameter Name="Vers" Type="Int32" />
|
||||
<asp:Parameter Name="NumScheda" Type="Int32" />
|
||||
<asp:Parameter Name="Descrizione" Type="String" />
|
||||
</InsertParameters>
|
||||
<SelectParameters>
|
||||
<asp:ControlParameter ControlID="hfIdxDossier" Name="IdxDossier" PropertyName="Value" Type="Int32" />
|
||||
</SelectParameters>
|
||||
<UpdateParameters>
|
||||
<asp:Parameter Name="Descrizione" Type="String" />
|
||||
<asp:Parameter Name="Original_IdxDossier" Type="Int32" />
|
||||
<asp:Parameter Name="Original_CodScheda" Type="String" />
|
||||
<asp:Parameter Name="Original_Vers" Type="Int32" />
|
||||
<asp:Parameter Name="Original_NumScheda" Type="Int32" />
|
||||
<asp:Parameter Name="Original_Descrizione" Type="String" />
|
||||
</UpdateParameters>
|
||||
</asp:ObjectDataSource>
|
||||
<asp:HiddenField runat="server" ID="hfIdxDossier" />
|
||||
@@ -0,0 +1,94 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using CMS_SC_Data;
|
||||
using SteamWare;
|
||||
|
||||
namespace CMS_SC.WebUserControls
|
||||
{
|
||||
public partial class mod_elencoSchedeDossier : System.Web.UI.UserControl
|
||||
{
|
||||
/// <summary>
|
||||
/// selezione valore in DettScheda
|
||||
/// </summary>
|
||||
public event EventHandler eh_selezioneValore;
|
||||
/// <summary>
|
||||
/// sollevo evento selezione
|
||||
/// </summary>
|
||||
protected void raiseEvent()
|
||||
{
|
||||
// sollevo evento nuovo valore...
|
||||
if (eh_selezioneValore != null)
|
||||
{
|
||||
eh_selezioneValore(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// dimensione pagina grid view
|
||||
/// </summary>
|
||||
public int pageSize
|
||||
{
|
||||
get
|
||||
{
|
||||
return grView.PageSize;
|
||||
}
|
||||
set
|
||||
{
|
||||
grView.PageSize = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// dossier selezionato
|
||||
/// </summary>
|
||||
public string idxDossier
|
||||
{
|
||||
get
|
||||
{
|
||||
return hfIdxDossier.Value;
|
||||
}
|
||||
set
|
||||
{
|
||||
hfIdxDossier.Value = value;
|
||||
grView.DataBind();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// selezione scheda...
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void grView_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
raiseEvent();
|
||||
}
|
||||
protected void btnReset_Click(object sender, EventArgs e)
|
||||
{
|
||||
resetSelezione();
|
||||
}
|
||||
/// <summary>
|
||||
/// resetto selezione
|
||||
/// </summary>
|
||||
private void resetSelezione()
|
||||
{
|
||||
grView.SelectedIndex = -1;
|
||||
grView.DataBind();
|
||||
raiseEvent();
|
||||
}
|
||||
/// <summary>
|
||||
/// wrapper traduzione
|
||||
/// </summary>
|
||||
/// <param name="lemma"></param>
|
||||
/// <returns></returns>
|
||||
public string traduci(string lemma)
|
||||
{
|
||||
return user_std.UtSn.Traduci(lemma);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace CMS_SC.WebUserControls {
|
||||
|
||||
|
||||
public partial class mod_elencoSchedeDossier {
|
||||
|
||||
/// <summary>
|
||||
/// grView control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.GridView grView;
|
||||
|
||||
/// <summary>
|
||||
/// ods control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.ObjectDataSource ods;
|
||||
|
||||
/// <summary>
|
||||
/// hfIdxDossier control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.HiddenField hfIdxDossier;
|
||||
}
|
||||
}
|
||||
@@ -13,7 +13,7 @@
|
||||
<HeaderStyle CssClass="ctrHeaderPager" ForeColor="White" Font-Bold="True" />
|
||||
<EmptyDataRowStyle CssClass="ctrRowStyle" />--%>
|
||||
<EmptyDataTemplate>
|
||||
<asp:Label runat="server" ID="lblNoRecord" Text='<%# traduci("noRecord") %>' />
|
||||
<asp:Label runat="server" ID="lblNoRecord" Text='<%# traduci("NoRecords") %>' />
|
||||
</EmptyDataTemplate>
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Lingua" SortExpression="Lingua">
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<HeaderStyle CssClass="ctrHeaderPager" ForeColor="White" Font-Bold="True" />
|
||||
<EmptyDataRowStyle CssClass="ctrRowStyle" />--%>
|
||||
<EmptyDataTemplate>
|
||||
<asp:Label runat="server" ID="lblNoRecord" Text='<%# traduci("noRecord") %>' />
|
||||
<asp:Label runat="server" ID="lblNoRecord" Text='<%# traduci("NoRecords") %>' />
|
||||
</EmptyDataTemplate>
|
||||
<Columns>
|
||||
<asp:TemplateField ShowHeader="False" ItemStyle-HorizontalAlign="Center">
|
||||
|
||||
Reference in New Issue
Block a user