fix selezione periodo futuro interventi programmati + chkBox x selezionare COSA anticipare..
This commit is contained in:
+23
-1
@@ -1 +1,23 @@
|
||||
|
||||
--------------------------------
|
||||
-- GIA' DISCUSSE
|
||||
--------------------------------
|
||||
- possibilità di anticipare A PIACERE ogni intervento pianificato (con una finestra tipicamente "prox 30 gg", modificabile) --> da mtzProg > Elenco interventi in scadenza, aggiunta "generazione immediata" con magic Wand + ricalcolo a scadenza (standard) del successivo (tanto verifica ripianificazione fatta dopo...)
|
||||
|
||||
|
||||
--------------------------------
|
||||
--- NUOVE
|
||||
--------------------------------
|
||||
- verifica a chiusura degli interventi di manutenzione preventiva/programmata SE la data di chiusura sia molto diversa da quella programmata (tipicamente +/- 1 unità di pianificazione: se è a settimane 1 settimana, se mesi 1 mese...) --> in questo caso CHIEDE SE SI VOGLIANO SPOSTARE prossime scadenze (se ho anticipato 1 mese --> ripianifica a pari scadenza anticipando allo stesso modo, se ho posticipato 2 mesi idem, ripianifica spostando 2 mesi)
|
||||
- possibilità (SOLO x le manutenzioni programmate) di chiudere con un "riprogrammata", ovvero
|
||||
* se ho un intervento tipicamente di "verifica e sostituzione"
|
||||
* ho preso in carico, e fatta verifica (e quindi viene programmato prossimo intervento secondo solita scadenza)
|
||||
* se dopo la verifica vedo che NON serve la sostituzione
|
||||
* se "stile entratico" voglio chiudere ma DEVO rifare verifica...
|
||||
avrò un pulsante speciale di "riprogramma alla data" (default: tra 2 settimane? tu scegli quanto andare avanti come default... sarà comunque modificabile da utente) che
|
||||
* inserisce DA SOLO la nota (ad esempio) "verifica effettuata, riprogrammato alla data 26/07/2017"
|
||||
* SALVA E CHIUDE QUESTO INTERVENTO
|
||||
* ELIMINA INTERVENTO programmato tra 6 mesi E NE INSERISCE UNO tra 14 gg con un testo in cui metto IN AGGIUNTA ALL'INIZIO "RIPROGRAMMATO da num xxx del 12.07.2017"
|
||||
|
||||
per cui A PARTIRE dal 26.07.2017 verrà generato l'intervento... che dato il primo punto POTREBBE VENIRE COMUNQUE ANTICIPATO
|
||||
|
||||
...alla chiusura dell'intervento verrà comunque fatta la verifica di "coerenza delle scadenze" per cui richiesto eventuale riprogrammazione delle scadenze future secondo quanto già indicato sopra
|
||||
@@ -4,173 +4,187 @@ using System.Web.UI;
|
||||
|
||||
public partial class WebUserControls_mod_filtraMtzProg : SteamWare.UserControl
|
||||
{
|
||||
/// <summary>
|
||||
/// evento che segnala la disponibilità di un nuovo stato di filtraggio salvato in sessione...
|
||||
/// </summary>
|
||||
public event EventHandler eh_newFiltroSel;
|
||||
/// <summary>
|
||||
/// evento che segnala la disponibilità di un nuovo stato di filtraggio salvato in sessione...
|
||||
/// </summary>
|
||||
public event EventHandler eh_newFiltroSel;
|
||||
|
||||
// variabile per gridview - potrebbe non servire più FARE!!!
|
||||
protected string _idxGridView;
|
||||
// variabile per gridview - potrebbe non servire più FARE!!!
|
||||
protected string _idxGridView;
|
||||
|
||||
/// <summary>
|
||||
/// inizializzazione valori di default
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
/// <summary>
|
||||
/// inizializzazione valori di default
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
_idxGridView = "idxIntPro";
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
_idxGridView = "idxIntPro";
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
fixOds();
|
||||
checkSelVal();
|
||||
}
|
||||
mod_filtroTipo.eh_selValore += new EventHandler(mod_filtroTipo_eh_selValore);
|
||||
mod_filtroMacchina.eh_selValore += new EventHandler(mod_filtroMacchina_eh_selValore);
|
||||
mod_filtroImpianto.eh_selValore += new EventHandler(mod_filtroImpianto_eh_selValore);
|
||||
mod_periodoAnalisi.eh_doUpdate += new EventHandler(Mod_periodoAnalisi_eh_doUpdate);
|
||||
}
|
||||
|
||||
private void Mod_periodoAnalisi_eh_doUpdate(object sender, EventArgs e)
|
||||
{
|
||||
raiseEvent();
|
||||
fixOds();
|
||||
checkSelVal();
|
||||
}
|
||||
mod_filtroTipo.eh_selValore += new EventHandler(mod_filtroTipo_eh_selValore);
|
||||
mod_filtroMacchina.eh_selValore += new EventHandler(mod_filtroMacchina_eh_selValore);
|
||||
mod_filtroImpianto.eh_selValore += new EventHandler(mod_filtroImpianto_eh_selValore);
|
||||
mod_periodoAnalisi.eh_doUpdate += new EventHandler(Mod_periodoAnalisi_eh_doUpdate);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// verifica se sia possibile preimpostare i valori filtrati...
|
||||
/// </summary>
|
||||
private void checkSelVal()
|
||||
{
|
||||
if (memLayer.ML.isInSessionObject("idxMacchina_filt"))
|
||||
{
|
||||
mod_filtroMacchina.Visible = true;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// imposta ODS dei controlli
|
||||
/// </summary>
|
||||
private void fixOds()
|
||||
{
|
||||
mod_filtroImpianto.ods = odsImpianti;
|
||||
mod_filtroImpianto.txtMostraTutti = traduci("MostraTuttiImpianti");
|
||||
mod_filtroImpianto.txtMostraSoloSelez = traduci("SelezionaImpianti");
|
||||
mod_filtroMacchina.ods = odsMacchine;
|
||||
mod_filtroMacchina.txtMostraTutti = traduci("MostraTuttiMacchine");
|
||||
mod_filtroMacchina.txtMostraSoloSelez = traduci("SelezionaMacchine");
|
||||
mod_filtroTipo.ods = odsTipo;
|
||||
mod_filtroTipo.txtMostraTutti = traduci("MostraTuttiTipo");
|
||||
mod_filtroTipo.txtMostraSoloSelez = traduci("SelezionaTipo");
|
||||
}
|
||||
private void Mod_periodoAnalisi_eh_doUpdate(object sender, EventArgs e)
|
||||
{
|
||||
raiseEvent();
|
||||
}
|
||||
|
||||
void mod_filtroImpianto_eh_selValore(object sender, EventArgs e)
|
||||
/// <summary>
|
||||
/// verifica se sia possibile preimpostare i valori filtrati...
|
||||
/// </summary>
|
||||
private void checkSelVal()
|
||||
{
|
||||
if (memLayer.ML.isInSessionObject("idxMacchina_filt"))
|
||||
{
|
||||
// salvo in sessione il valore selezionato...
|
||||
if (mod_filtroImpianto.valoreInt == 0)
|
||||
{
|
||||
memLayer.ML.emptySessionVal("idxMacchina_filt");
|
||||
}
|
||||
// chiamo procedura che innalza l'evento
|
||||
raiseEvent();
|
||||
mod_filtroMacchina.Visible = true;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// imposta ODS dei controlli
|
||||
/// </summary>
|
||||
private void fixOds()
|
||||
{
|
||||
mod_filtroImpianto.ods = odsImpianti;
|
||||
mod_filtroImpianto.txtMostraTutti = traduci("MostraTuttiImpianti");
|
||||
mod_filtroImpianto.txtMostraSoloSelez = traduci("SelezionaImpianti");
|
||||
mod_filtroMacchina.ods = odsMacchine;
|
||||
mod_filtroMacchina.txtMostraTutti = traduci("MostraTuttiMacchine");
|
||||
mod_filtroMacchina.txtMostraSoloSelez = traduci("SelezionaMacchine");
|
||||
mod_filtroTipo.ods = odsTipo;
|
||||
mod_filtroTipo.txtMostraTutti = traduci("MostraTuttiTipo");
|
||||
mod_filtroTipo.txtMostraSoloSelez = traduci("SelezionaTipo");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// chiamato post modifica valore check/selezione nel selettore filtro impianto
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
public void eh_selectedImpianto(object sender, EventArgs e)
|
||||
void mod_filtroImpianto_eh_selValore(object sender, EventArgs e)
|
||||
{
|
||||
// salvo in sessione il valore selezionato...
|
||||
if (mod_filtroImpianto.valoreInt == 0)
|
||||
{
|
||||
if (mod_filtroImpianto.valoreInt != 0)
|
||||
{
|
||||
if (!mod_filtroMacchina.Visible)
|
||||
{
|
||||
mod_filtroMacchina.Visible = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
mod_filtroMacchina.reset();
|
||||
}
|
||||
mod_filtroMacchina.ods = odsMacchine;
|
||||
}
|
||||
else
|
||||
{
|
||||
mod_filtroMacchina.reset();
|
||||
mod_filtroMacchina.Visible = false;
|
||||
}
|
||||
// salvo in sessione il valore selezionato...
|
||||
if (mod_filtroImpianto.valoreInt != 0)
|
||||
{
|
||||
memLayer.ML.setSessionVal("idxImpianto_filt", mod_filtroImpianto.valoreInt);
|
||||
}
|
||||
else
|
||||
{
|
||||
memLayer.ML.emptySessionVal("idxImpianto_filt");
|
||||
}
|
||||
memLayer.ML.emptySessionVal(string.Format("idxMacchina_filt"));
|
||||
// chiamo procedura che innalza l'evento
|
||||
raiseEvent();
|
||||
memLayer.ML.emptySessionVal("idxMacchina_filt");
|
||||
}
|
||||
// chiamo procedura che innalza l'evento
|
||||
raiseEvent();
|
||||
}
|
||||
|
||||
void mod_filtroMacchina_eh_selValore(object sender, EventArgs e)
|
||||
/// <summary>
|
||||
/// chiamato post modifica valore check/selezione nel selettore filtro impianto
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
public void eh_selectedImpianto(object sender, EventArgs e)
|
||||
{
|
||||
if (mod_filtroImpianto.valoreInt != 0)
|
||||
{
|
||||
// salvo in sessione il valore selezionato...
|
||||
if (mod_filtroMacchina.valoreInt != 0)
|
||||
{
|
||||
memLayer.ML.setSessionVal("idxMacchina_filt", mod_filtroMacchina.valoreInt);
|
||||
}
|
||||
else
|
||||
{
|
||||
memLayer.ML.emptySessionVal("idxMacchina_filt");
|
||||
}
|
||||
// chiamo procedura che innalza l'evento
|
||||
raiseEvent();
|
||||
if (!mod_filtroMacchina.Visible)
|
||||
{
|
||||
mod_filtroMacchina.Visible = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
mod_filtroMacchina.reset();
|
||||
}
|
||||
mod_filtroMacchina.ods = odsMacchine;
|
||||
}
|
||||
void mod_filtroTipo_eh_selValore(object sender, EventArgs e)
|
||||
else
|
||||
{
|
||||
// salvo in sessione il valore selezionato...
|
||||
if (mod_filtroTipo.valoreInt != 0)
|
||||
{
|
||||
memLayer.ML.setSessionVal("idxTipo_filt", mod_filtroTipo.valoreInt);
|
||||
}
|
||||
else
|
||||
{
|
||||
memLayer.ML.emptySessionVal("idxTipo_filt");
|
||||
}
|
||||
// chiamo procedura che innalza l'evento
|
||||
raiseEvent();
|
||||
mod_filtroMacchina.reset();
|
||||
mod_filtroMacchina.Visible = false;
|
||||
}
|
||||
// salvo in sessione il valore selezionato...
|
||||
if (mod_filtroImpianto.valoreInt != 0)
|
||||
{
|
||||
memLayer.ML.setSessionVal("idxImpianto_filt", mod_filtroImpianto.valoreInt);
|
||||
}
|
||||
else
|
||||
{
|
||||
memLayer.ML.emptySessionVal("idxImpianto_filt");
|
||||
}
|
||||
memLayer.ML.emptySessionVal(string.Format("idxMacchina_filt"));
|
||||
// chiamo procedura che innalza l'evento
|
||||
raiseEvent();
|
||||
}
|
||||
|
||||
private void raiseEvent()
|
||||
void mod_filtroMacchina_eh_selValore(object sender, EventArgs e)
|
||||
{
|
||||
// salvo in sessione il valore selezionato...
|
||||
if (mod_filtroMacchina.valoreInt != 0)
|
||||
{
|
||||
if (eh_newFiltroSel != null)
|
||||
{
|
||||
eh_newFiltroSel(this, new EventArgs());
|
||||
}
|
||||
memLayer.ML.setSessionVal("idxMacchina_filt", mod_filtroMacchina.valoreInt);
|
||||
}
|
||||
else
|
||||
{
|
||||
memLayer.ML.emptySessionVal("idxMacchina_filt");
|
||||
}
|
||||
// chiamo procedura che innalza l'evento
|
||||
raiseEvent();
|
||||
}
|
||||
void mod_filtroTipo_eh_selValore(object sender, EventArgs e)
|
||||
{
|
||||
// salvo in sessione il valore selezionato...
|
||||
if (mod_filtroTipo.valoreInt != 0)
|
||||
{
|
||||
memLayer.ML.setSessionVal("idxTipo_filt", mod_filtroTipo.valoreInt);
|
||||
}
|
||||
else
|
||||
{
|
||||
memLayer.ML.emptySessionVal("idxTipo_filt");
|
||||
}
|
||||
// chiamo procedura che innalza l'evento
|
||||
raiseEvent();
|
||||
}
|
||||
|
||||
public bool showPeriodo
|
||||
private void raiseEvent()
|
||||
{
|
||||
if (eh_newFiltroSel != null)
|
||||
{
|
||||
get
|
||||
{
|
||||
return mod_periodoAnalisi.Visible;
|
||||
}
|
||||
set
|
||||
{
|
||||
mod_periodoAnalisi.Visible = value;
|
||||
}
|
||||
eh_newFiltroSel(this, new EventArgs());
|
||||
}
|
||||
/// <summary>
|
||||
/// Imposta periodo del selettore
|
||||
/// </summary>
|
||||
public datario.periodo periodo
|
||||
}
|
||||
|
||||
public bool showPeriodo
|
||||
{
|
||||
get
|
||||
{
|
||||
get
|
||||
{
|
||||
return mod_periodoAnalisi.periodo;
|
||||
}
|
||||
set
|
||||
{
|
||||
mod_periodoAnalisi.periodo = value;
|
||||
}
|
||||
return mod_periodoAnalisi.Visible;
|
||||
}
|
||||
set
|
||||
{
|
||||
mod_periodoAnalisi.Visible = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Imposta periodo del selettore
|
||||
/// </summary>
|
||||
public datario.periodo periodo
|
||||
{
|
||||
get
|
||||
{
|
||||
return mod_periodoAnalisi.periodo;
|
||||
}
|
||||
set
|
||||
{
|
||||
mod_periodoAnalisi.periodo = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Imposta periodo del selettore
|
||||
/// </summary>
|
||||
public intervalloDate intervallo
|
||||
{
|
||||
get
|
||||
{
|
||||
return mod_periodoAnalisi.intervalloAnalisi;
|
||||
}
|
||||
set
|
||||
{
|
||||
mod_periodoAnalisi.intervalloAnalisi = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,51 +1,71 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" Inherits="mod_mtzPrevPending" CodeBehind="mod_mtzPrevPending.ascx.cs" %>
|
||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
|
||||
<div style="text-align: right;">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-3">
|
||||
<asp:CheckBox runat="server" ID="chkAnticipaEnabled" Text='<%# traduci("AbilitaAnticipo")%>' AutoPostBack="True" OnCheckedChanged="chkAnticipaEnabled_CheckedChanged" />
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
</div>
|
||||
<div class="col-xs-3 text-right">
|
||||
<asp:HyperLink ID="hlExportExcel" runat="server" Target="_blank" />
|
||||
</div>
|
||||
</div>
|
||||
<%--<div style="text-align: right;">
|
||||
</div>--%>
|
||||
<div style="font-size: 8pt;">
|
||||
<asp:GridView ID="grView" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" CssClass="table table-striped" DataKeyNames="idxPending" DataSourceID="ods" OnDataBound="grView_DataBound" OnPageIndexChanged="grView_PageIndexChanged">
|
||||
<PagerStyle CssClass="active GridPager" />
|
||||
<PagerSettings Mode="NumericFirstLast" />
|
||||
<SelectedRowStyle CssClass="info" />
|
||||
<EmptyDataTemplate>
|
||||
<asp:Label runat="server" ID="lblNoRecord" Text='<%# traduci("noRecord") %>' />
|
||||
</EmptyDataTemplate>
|
||||
<Columns>
|
||||
<asp:BoundField DataField="data" HeaderText="data" SortExpression="data" DataFormatString="{0:dd/MM/yyyy}"
|
||||
HtmlEncode="false" />
|
||||
<asp:TemplateField HeaderText="nomeImpianto" SortExpression="nomeImpianto" ItemStyle-Width="10em">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label1" runat="server" Text='<%# Eval("codImpianto") %>' />
|
||||
<br />
|
||||
<b>
|
||||
<asp:Label ID="Label2" runat="server" Text='<%# Eval("nomeImpianto") %>' /></b>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="nomeMacchina" SortExpression="nomeMacchina" ItemStyle-Width="15em">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label3" runat="server" Text='<%# Eval("codMacchina") %>' />
|
||||
<br />
|
||||
<b>
|
||||
<asp:Label ID="Label4" runat="server" Text='<%# Eval("nomeMacchina") %>' /></b>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="descrizione" HeaderText="Descrizione" SortExpression="descrizione" />
|
||||
<asp:BoundField DataField="descrPriorita" HeaderText="descrPriorita" SortExpression="descrPriorita" />
|
||||
<asp:CheckBoxField DataField="isFermo" HeaderText="chkImpFermo" SortExpression="isFermo" />
|
||||
<asp:BoundField DataField="descrTipo" HeaderText="descrTipo" SortExpression="descrTipo" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
<asp:Label ID="lblNumRec" runat="server" CssClass="txtMini" />
|
||||
<asp:ObjectDataSource ID="ods" runat="server" SelectMethod="getBySearch" TypeName="GIM_dataLayer.DS_utilityTableAdapters.v_mtzProgPendingExpTableAdapter" OldValuesParameterFormatString="original_{0}">
|
||||
<SelectParameters>
|
||||
<asp:SessionParameter DefaultValue="%" Name="ricerca" SessionField="valoreCercato" Type="String" />
|
||||
<asp:SessionParameter DefaultValue="0" Name="idxTipo" SessionField="idxTipo_filt" Type="Int32" />
|
||||
<asp:SessionParameter DefaultValue="0" Name="idxImpianto" SessionField="idxImpianto_filt" Type="Int32" />
|
||||
<asp:SessionParameter DefaultValue="0" Name="idxMacchina" SessionField="idxMacchina_filt" Type="Int32" />
|
||||
<asp:SessionParameter DefaultValue="" Name="inizio" SessionField="_inizio" Type="DateTime" />
|
||||
<asp:SessionParameter DefaultValue="" Name="fine" SessionField="_fine" Type="DateTime" />
|
||||
</SelectParameters>
|
||||
</asp:ObjectDataSource>
|
||||
<asp:GridView ID="grView" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" CssClass="table table-striped" DataKeyNames="idxPending" DataSourceID="ods" OnDataBound="grView_DataBound" OnPageIndexChanged="grView_PageIndexChanged">
|
||||
<PagerStyle CssClass="active GridPager" />
|
||||
<PagerSettings Mode="NumericFirstLast" />
|
||||
<SelectedRowStyle CssClass="info" />
|
||||
<EmptyDataTemplate>
|
||||
<asp:Label runat="server" ID="lblNoRecord" Text='<%# traduci("noRecord") %>' />
|
||||
</EmptyDataTemplate>
|
||||
<Columns>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" ID="lblidxPending" Text='<%# Eval("idxPending") %>' Visible='<%# chkAnticipaEnabled.Checked %>' Font-Size="6pt" />
|
||||
<asp:CheckBox ID="chkSelect" runat="server" Visible='<%# chkAnticipaEnabled.Checked %>' />
|
||||
</ItemTemplate>
|
||||
<HeaderTemplate>
|
||||
<asp:CheckBox ID="btnSelAll" runat="server" Checked="false" ToolTip='<%# traduci("btnSelAll") %>' OnCheckedChanged="btnSelAll_Click" CssClass="ctrHeaderPager" AutoPostBack="true" Visible='<%# chkAnticipaEnabled.Checked %>' />
|
||||
</HeaderTemplate>
|
||||
<ItemStyle HorizontalAlign="Center"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="data" HeaderText="data" SortExpression="data" DataFormatString="{0:dd/MM/yyyy}"
|
||||
HtmlEncode="false" />
|
||||
<asp:TemplateField HeaderText="nomeImpianto" SortExpression="nomeImpianto" ItemStyle-Width="10em">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label1" runat="server" Text='<%# Eval("codImpianto") %>' />
|
||||
<br />
|
||||
<b>
|
||||
<asp:Label ID="Label2" runat="server" Text='<%# Eval("nomeImpianto") %>' /></b>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="nomeMacchina" SortExpression="nomeMacchina" ItemStyle-Width="15em">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label3" runat="server" Text='<%# Eval("codMacchina") %>' />
|
||||
<br />
|
||||
<b>
|
||||
<asp:Label ID="Label4" runat="server" Text='<%# Eval("nomeMacchina") %>' /></b>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="descrizione" HeaderText="Descrizione" SortExpression="descrizione" />
|
||||
<asp:BoundField DataField="descrPriorita" HeaderText="descrPriorita" SortExpression="descrPriorita" />
|
||||
<asp:CheckBoxField DataField="isFermo" HeaderText="chkImpFermo" SortExpression="isFermo" />
|
||||
<asp:BoundField DataField="descrTipo" HeaderText="descrTipo" SortExpression="descrTipo" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
<asp:Label ID="lblNumRec" runat="server" CssClass="txtMini" />
|
||||
<asp:ObjectDataSource ID="ods" runat="server" SelectMethod="getBySearch" TypeName="GIM_dataLayer.DS_utilityTableAdapters.v_mtzProgPendingExpTableAdapter" OldValuesParameterFormatString="original_{0}">
|
||||
<SelectParameters>
|
||||
<asp:SessionParameter DefaultValue="%" Name="ricerca" SessionField="valoreCercato" Type="String" />
|
||||
<asp:SessionParameter DefaultValue="0" Name="idxTipo" SessionField="idxTipo_filt" Type="Int32" />
|
||||
<asp:SessionParameter DefaultValue="0" Name="idxImpianto" SessionField="idxImpianto_filt" Type="Int32" />
|
||||
<asp:SessionParameter DefaultValue="0" Name="idxMacchina" SessionField="idxMacchina_filt" Type="Int32" />
|
||||
<asp:SessionParameter DefaultValue="" Name="inizio" SessionField="_inizio" Type="DateTime" />
|
||||
<asp:SessionParameter DefaultValue="" Name="fine" SessionField="_fine" Type="DateTime" />
|
||||
</SelectParameters>
|
||||
</asp:ObjectDataSource>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -5,79 +5,120 @@ using System.Web.UI.WebControls;
|
||||
|
||||
public partial class mod_mtzPrevPending : ApplicationUserControl
|
||||
{
|
||||
//public event EventHandler eh_resetSelezione;
|
||||
//public event EventHandler eh_resetSelezione;
|
||||
|
||||
/// <summary>
|
||||
/// evento dati associati a controllo
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void grView_DataBound(object sender, EventArgs e)
|
||||
/// <summary>
|
||||
/// evento dati associati a controllo
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void grView_DataBound(object sender, EventArgs e)
|
||||
{
|
||||
if (grView.Rows.Count > 0)
|
||||
{
|
||||
if (grView.Rows.Count > 0)
|
||||
LinkButton lb;
|
||||
// aggiorno gli headers
|
||||
foreach (TableCell cella in grView.HeaderRow.Cells)
|
||||
{
|
||||
try
|
||||
{
|
||||
LinkButton lb;
|
||||
// aggiorno gli headers
|
||||
foreach (TableCell cella in grView.HeaderRow.Cells)
|
||||
{
|
||||
try
|
||||
{
|
||||
lb = (LinkButton)cella.Controls[0];
|
||||
lb.Text = traduci(lb.Text);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
int totRecord = grView.Rows.Count + grView.PageSize * (grView.PageCount - 1);
|
||||
lblNumRec.Text = string.Format("{0} records of ~ {1}", grView.Rows.Count, totRecord);
|
||||
}
|
||||
else
|
||||
{
|
||||
lblNumRec.Text = "";
|
||||
lb = (LinkButton)cella.Controls[0];
|
||||
lb.Text = traduci(lb.Text);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
int totRecord = grView.Rows.Count + grView.PageSize * (grView.PageCount - 1);
|
||||
lblNumRec.Text = string.Format("{0} records of ~ {1}", grView.Rows.Count, totRecord);
|
||||
}
|
||||
protected override void Page_Load(object sender, EventArgs e)
|
||||
else
|
||||
{
|
||||
base.Page_Load(sender, e);
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
hlExportExcel.Text = traduci("hlExportExcel");
|
||||
hlExportExcel.NavigateUrl = "~/ExcelExportMtzPrevPending";
|
||||
// verifico se devo generare degli interventi di MTZ programmata..
|
||||
try
|
||||
{
|
||||
mtzProgr.obj.processaCodaMtzPro();
|
||||
}
|
||||
catch (Exception errore)
|
||||
{
|
||||
SteamWare.logger.lg.scriviLog(string.Format("Non sono riuscito ad accodare gli interventi di mtz preventiva pending, errore:\r\n {0}", errore), SteamWare.tipoLog.EXCEPTION);
|
||||
}
|
||||
}
|
||||
lblNumRec.Text = "";
|
||||
}
|
||||
}
|
||||
protected override void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
base.Page_Load(sender, e);
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
chkAnticipaEnabled.DataBind();
|
||||
hlExportExcel.Text = traduci("hlExportExcel");
|
||||
hlExportExcel.NavigateUrl = "~/ExcelExportMtzPrevPending";
|
||||
// verifico se devo generare degli interventi di MTZ programmata..
|
||||
try
|
||||
{
|
||||
mtzProgr.obj.processaCodaMtzPro();
|
||||
}
|
||||
catch (Exception errore)
|
||||
{
|
||||
SteamWare.logger.lg.scriviLog(string.Format("Non sono riuscito ad accodare gli interventi di mtz preventiva pending, errore:\r\n {0}", errore), SteamWare.tipoLog.EXCEPTION);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// aggiorno il controllo
|
||||
/// </summary>
|
||||
public void doUpdate()
|
||||
{
|
||||
checkFixOds();
|
||||
//grView.DataBind();
|
||||
}
|
||||
/// <summary>
|
||||
/// aggiorno il controllo
|
||||
/// </summary>
|
||||
public void doUpdate()
|
||||
{
|
||||
checkFixOds();
|
||||
//grView.DataBind();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// sistemo filtraggio con valori selezionati
|
||||
/// </summary>
|
||||
private void checkFixOds()
|
||||
/// <summary>
|
||||
/// sistemo filtraggio con valori selezionati
|
||||
/// </summary>
|
||||
private void checkFixOds()
|
||||
{
|
||||
ods.DataBind();
|
||||
}
|
||||
/// <summary>
|
||||
/// fix filtro post cambio pagina
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void grView_PageIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
doUpdate();
|
||||
}
|
||||
/// <summary>
|
||||
/// seleziona/deseleziona le righe indicate...
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnSelAll_Click(object sender, EventArgs e)
|
||||
{
|
||||
// seleziono tutti i valori visibili nel datagrid
|
||||
CheckBox chkbox = ((CheckBox)sender);
|
||||
bool isChecked = chkbox.Checked;
|
||||
if (!isChecked)
|
||||
{
|
||||
ods.DataBind();
|
||||
chkbox.ToolTip = traduci("btnSelAll");
|
||||
}
|
||||
/// <summary>
|
||||
/// fix filtro post cambio pagina
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void grView_PageIndexChanged(object sender, EventArgs e)
|
||||
else
|
||||
{
|
||||
doUpdate();
|
||||
chkbox.ToolTip = traduci("btnDeselAll");
|
||||
}
|
||||
foreach (GridViewRow riga in grView.Rows)
|
||||
{
|
||||
((CheckBox)riga.FindControl("chkSelect")).Checked = isChecked;
|
||||
}
|
||||
}
|
||||
|
||||
protected void chkAnticipaEnabled_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
// seleziono tutti i valori visibili nel datagrid
|
||||
CheckBox chkbox = ((CheckBox)sender);
|
||||
bool isChecked = chkbox.Checked;
|
||||
if (!isChecked)
|
||||
{
|
||||
chkbox.Text = traduci("AbilitaAnticipo");
|
||||
}
|
||||
else
|
||||
{
|
||||
chkbox.Text = traduci("DisabilitaAnticipo");
|
||||
}
|
||||
// aggiorno il gridview...
|
||||
grView.DataBind();
|
||||
}
|
||||
}
|
||||
+26
-17
@@ -1,10 +1,10 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// <generato automaticamente>
|
||||
// Codice generato da uno strumento.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
|
||||
// il codice viene rigenerato.
|
||||
// </generato automaticamente>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -12,38 +12,47 @@
|
||||
public partial class mod_mtzPrevPending {
|
||||
|
||||
/// <summary>
|
||||
/// hlExportExcel control.
|
||||
/// Controllo chkAnticipaEnabled.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.CheckBox chkAnticipaEnabled;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo hlExportExcel.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.HyperLink hlExportExcel;
|
||||
|
||||
/// <summary>
|
||||
/// grView control.
|
||||
/// Controllo grView.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.GridView grView;
|
||||
|
||||
/// <summary>
|
||||
/// lblNumRec control.
|
||||
/// Controllo lblNumRec.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblNumRec;
|
||||
|
||||
/// <summary>
|
||||
/// ods control.
|
||||
/// Controllo ods.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.ObjectDataSource ods;
|
||||
}
|
||||
|
||||
Binary file not shown.
+64
-56
@@ -4,71 +4,79 @@ using System.Web.UI;
|
||||
|
||||
public partial class mtzProg : System.Web.UI.Page
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
if(!Page.IsPostBack)
|
||||
{
|
||||
mod_filtraMtzProg1.showPeriodo = (TabContainer1.ActiveTabIndex == 1);
|
||||
mod_filtraMtzProg1.periodo = datario.periodo.future;
|
||||
}
|
||||
mod_elencoMtzProg1.eh_newReq += new EventHandler(mod_elencoMtzProg1_eh_newReq);
|
||||
mod_elencoMtzProg1.eh_updateDone += new EventHandler(mod_elencoMtzProg1_eh_updateDone);
|
||||
mod_dettMtzProg1.eh_newInserted += new EventHandler(mod_dettMtzProg1_eh_newInserted);
|
||||
mod_filtraMtzProg1.eh_newFiltroSel += new EventHandler(mod_filtraMtzProg1_eh_newFiltroSel);
|
||||
traduciObj();
|
||||
mod_filtraMtzProg1.showPeriodo = (TabContainer1.ActiveTabIndex == 1);
|
||||
mod_filtraMtzProg1.periodo = datario.periodo.future;
|
||||
}
|
||||
mod_elencoMtzProg1.eh_newReq += new EventHandler(mod_elencoMtzProg1_eh_newReq);
|
||||
mod_elencoMtzProg1.eh_updateDone += new EventHandler(mod_elencoMtzProg1_eh_updateDone);
|
||||
mod_dettMtzProg1.eh_newInserted += new EventHandler(mod_dettMtzProg1_eh_newInserted);
|
||||
mod_filtraMtzProg1.eh_newFiltroSel += new EventHandler(mod_filtraMtzProg1_eh_newFiltroSel);
|
||||
traduciObj();
|
||||
}
|
||||
|
||||
void mod_elencoMtzProg1_eh_updateDone(object sender, EventArgs e)
|
||||
{
|
||||
// update della visualizzazione pre-export in excel
|
||||
mod_mtzPrevPending1.doUpdate();
|
||||
}
|
||||
void mod_elencoMtzProg1_eh_updateDone(object sender, EventArgs e)
|
||||
{
|
||||
// update della visualizzazione pre-export in excel
|
||||
mod_mtzPrevPending1.doUpdate();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// è stato chiamato evento "nuovo filtro" e quindi aggiorno
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
void mod_filtraMtzProg1_eh_newFiltroSel(object sender, EventArgs e)
|
||||
{
|
||||
// update della visualizzazione normale
|
||||
mod_elencoMtzProg1.doUpdate();
|
||||
/// <summary>
|
||||
/// è stato chiamato evento "nuovo filtro" e quindi aggiorno
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
void mod_filtraMtzProg1_eh_newFiltroSel(object sender, EventArgs e)
|
||||
{
|
||||
// update della visualizzazione normale
|
||||
mod_elencoMtzProg1.doUpdate();
|
||||
|
||||
// update della visualizzazione pre-export in excel
|
||||
mod_mtzPrevPending1.doUpdate();
|
||||
}
|
||||
// update della visualizzazione pre-export in excel
|
||||
mod_mtzPrevPending1.doUpdate();
|
||||
}
|
||||
|
||||
private void traduciObj()
|
||||
{
|
||||
((AjaxControlToolkit.TabPanel)TabContainer1.FindControl("TabProgrammaMtz")).HeaderText = traduci("TabProgrammaMtz");
|
||||
((AjaxControlToolkit.TabPanel)TabContainer1.FindControl("TabScadenzeMtz")).HeaderText = traduci("TabScadenzeMtz");
|
||||
}
|
||||
/// <summary>
|
||||
/// wrapper traduzione
|
||||
/// </summary>
|
||||
/// <param name="lemma"></param>
|
||||
/// <returns></returns>
|
||||
public string traduci(object lemma)
|
||||
{
|
||||
return user_std.UtSn.Traduci(lemma.ToString());
|
||||
}
|
||||
private void traduciObj()
|
||||
{
|
||||
((AjaxControlToolkit.TabPanel)TabContainer1.FindControl("TabProgrammaMtz")).HeaderText = traduci("TabProgrammaMtz");
|
||||
((AjaxControlToolkit.TabPanel)TabContainer1.FindControl("TabScadenzeMtz")).HeaderText = traduci("TabScadenzeMtz");
|
||||
}
|
||||
/// <summary>
|
||||
/// wrapper traduzione
|
||||
/// </summary>
|
||||
/// <param name="lemma"></param>
|
||||
/// <returns></returns>
|
||||
public string traduci(object lemma)
|
||||
{
|
||||
return user_std.UtSn.Traduci(lemma.ToString());
|
||||
}
|
||||
|
||||
void mod_dettMtzProg1_eh_newInserted(object sender, EventArgs e)
|
||||
{
|
||||
// nascondo dettaglio inserimento nuovi e aggiorno tabella elenco...
|
||||
mod_dettMtzProg1.Visible = false;
|
||||
mod_elencoMtzProg1.modoInsertMtzPrg = false;
|
||||
mod_elencoMtzProg1.doUpdate();
|
||||
}
|
||||
void mod_dettMtzProg1_eh_newInserted(object sender, EventArgs e)
|
||||
{
|
||||
// nascondo dettaglio inserimento nuovi e aggiorno tabella elenco...
|
||||
mod_dettMtzProg1.Visible = false;
|
||||
mod_elencoMtzProg1.modoInsertMtzPrg = false;
|
||||
mod_elencoMtzProg1.doUpdate();
|
||||
}
|
||||
|
||||
void mod_elencoMtzProg1_eh_newReq(object sender, EventArgs e)
|
||||
{
|
||||
mod_dettMtzProg1.Visible = !mod_dettMtzProg1.Visible;
|
||||
}
|
||||
void mod_elencoMtzProg1_eh_newReq(object sender, EventArgs e)
|
||||
{
|
||||
mod_dettMtzProg1.Visible = !mod_dettMtzProg1.Visible;
|
||||
}
|
||||
|
||||
protected void TabContainer1_ActiveTabChanged(object sender, EventArgs e)
|
||||
protected void TabContainer1_ActiveTabChanged(object sender, EventArgs e)
|
||||
{
|
||||
// se è attivo il tab 1 mostro filtro periodo altrimenti no...
|
||||
mod_filtraMtzProg1.showPeriodo = (TabContainer1.ActiveTabIndex == 1);
|
||||
if (mod_filtraMtzProg1.showPeriodo)
|
||||
{
|
||||
// se è attivo il tab 1 mostro filtro periodo altrimenti no...
|
||||
mod_filtraMtzProg1.showPeriodo = (TabContainer1.ActiveTabIndex == 1);
|
||||
mod_filtraMtzProg1.periodo = datario.periodo.future;
|
||||
intervalloDate intervallo = new intervalloDate();
|
||||
intervallo.inizio = DateTime.Now;
|
||||
intervallo.fine = intervallo.inizio.AddDays(30);
|
||||
mod_filtraMtzProg1.intervallo = intervallo;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user