applicate modifiche:
* filtraggio per macchine raggruppate in mtz programmata * export excel filtrato anche per interventi pending git-svn-id: https://keyhammer.ath.cx/svn/WebGIM/trunk@155 3e04ef4b-3b25-4b6c-be27-bb5389ca777b
This commit is contained in:
Binary file not shown.
@@ -37,6 +37,10 @@
|
||||
OldValuesParameterFormatString="original_{0}" FilterExpression=" (codImpianto LIKE '%{0}%') OR (nomeImpianto LIKE '%{0}%') OR (codMacchina LIKE '%{0}%') OR (nomeMacchina LIKE '%{0}%') OR (descrizione LIKE '%{0}%') OR (descrPriorita LIKE '%{0}%') OR (descrTipo LIKE '%{0}%') ">
|
||||
<FilterParameters>
|
||||
<asp:SessionParameter DefaultValue="*" Name="ricerca" SessionField="valoreCercato" />
|
||||
<asp:SessionParameter DefaultValue="0" Name="idxTipo" SessionField="idxTipo_filt"
|
||||
Type="Int32" />
|
||||
<asp:SessionParameter DefaultValue="0" Name="idxMacchina" SessionField="idxMacchina_filt"
|
||||
Type="Int32" />
|
||||
</FilterParameters>
|
||||
</asp:ObjectDataSource>
|
||||
</div>
|
||||
|
||||
@@ -3,8 +3,8 @@ using System.Collections.Generic;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using SteamWare;
|
||||
using System.Web.UI.HtmlControls;
|
||||
using SteamWare;
|
||||
|
||||
public partial class ExcelExportMtzPrevPending : System.Web.UI.Page
|
||||
{
|
||||
@@ -83,7 +83,25 @@ public partial class ExcelExportMtzPrevPending : System.Web.UI.Page
|
||||
public void aggiornamento()
|
||||
{
|
||||
grView.AllowPaging = false;
|
||||
checkFixOds();
|
||||
ods.DataBind();
|
||||
grView.DataBind();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// sistemo filtraggio con valori selezionati
|
||||
/// </summary>
|
||||
private void checkFixOds()
|
||||
{
|
||||
ods.FilterExpression = "( (codImpianto LIKE '%{0}%') OR (nomeImpianto LIKE '%{0}%') OR (codMacchina LIKE '%{0}%') OR (nomeMacchina LIKE '%{0}%') OR (descrizione LIKE '%{0}%') OR (descrPriorita LIKE '%{0}%') OR (descrTipo LIKE '%{0}%') )";
|
||||
if (memLayer.ML.isInSessionObject("idxTipo_filt"))
|
||||
{
|
||||
ods.FilterExpression += " AND (idxTipo = {1})";
|
||||
}
|
||||
if (memLayer.ML.isInSessionObject("idxMacchina_filt"))
|
||||
{
|
||||
ods.FilterExpression += " AND (idxMacchina = {2})";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,19 +1,28 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="mod_dettMtzProg.ascx.cs"
|
||||
Inherits="mod_dettMtzProg" %>
|
||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
|
||||
<table style="background-color:#DFDFDF;">
|
||||
<%@ Register Src="mod_filtro.ascx" TagName="mod_filtro" TagPrefix="uc1" %>
|
||||
<table style="background-color: #DFDFDF;">
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<div style="float:left;">
|
||||
<h3>
|
||||
<asp:Label ID="lblInsNewIntPro" runat="server" />
|
||||
</h3>
|
||||
</div>
|
||||
<div style="float: right; padding-top: 20px;">
|
||||
<uc1:mod_filtro ID="mod_filtroImpianto" runat="server" css="txtMini" Oneh_selValore="eh_selectedImpianto" />
|
||||
<asp:ObjectDataSource ID="odsImpianti" runat="server" OldValuesParameterFormatString="Original_{0}"
|
||||
SelectMethod="GetData" TypeName="DS_utilityTableAdapters.v_selImpiantiTableAdapter">
|
||||
</asp:ObjectDataSource>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td>
|
||||
<asp:Label runat="server" ID="lblDescrMtzPro" /><br />
|
||||
<asp:TextBox runat="server" ID="txtDescrizione" TextMode="MultiLine" Rows="15" Width="420px"
|
||||
CssClass="textEv_1Left"/>
|
||||
CssClass="textEv_1Left" />
|
||||
<asp:RequiredFieldValidator ID="rfvDescrizione" runat="server" ErrorMessage="!!!"
|
||||
ControlToValidate="txtDescrizione" ValidationGroup="inserimento" Display="Dynamic"></asp:RequiredFieldValidator>
|
||||
</td>
|
||||
@@ -22,7 +31,11 @@
|
||||
<asp:Label runat="server" ID="lblMacchineInteressate" />
|
||||
</div>
|
||||
<div style="float: right;">
|
||||
<asp:TextBox runat="server" ID="txtCercaMacchine" Width="8em" Text="*" />
|
||||
|
||||
</div>
|
||||
<div style="float: right;">
|
||||
<asp:Label runat="server" ID="lblTxtCerca" Text="Ricerca"></asp:Label>
|
||||
<asp:TextBox runat="server" ID="txtCercaMacchine" Width="8em" Text="*" OnTextChanged="txtCercaMacchine_TextChanged" />
|
||||
</div>
|
||||
<div>
|
||||
<asp:ListBox ID="listMacchine" runat="server" AutoPostBack="True" DataSourceID="odsMacchine"
|
||||
@@ -54,8 +67,7 @@
|
||||
<div>
|
||||
<asp:Label runat="server" ID="lblPrior" /><br />
|
||||
<asp:DropDownList runat="server" ID="ddlPrior" DataSourceID="odsPrior" DataTextField="label"
|
||||
DataValueField="value" CssClass="textEv_1"
|
||||
ondatabound="ddlPrior_DataBound" />
|
||||
DataValueField="value" CssClass="textEv_1" OnDataBound="ddlPrior_DataBound" />
|
||||
<asp:ObjectDataSource ID="odsPrior" runat="server" OldValuesParameterFormatString="original_{0}"
|
||||
SelectMethod="GetData" TypeName="DS_utilityTableAdapters.v_selPriorTableAdapter">
|
||||
</asp:ObjectDataSource>
|
||||
|
||||
@@ -86,4 +86,47 @@ public partial class mod_dettMtzProg : System.Web.UI.UserControl
|
||||
{
|
||||
ddlPrior.SelectedIndex = 2;
|
||||
}
|
||||
|
||||
protected override void OnInit(EventArgs e)
|
||||
{
|
||||
base.OnInit(e);
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
mod_filtroImpianto.ods = odsImpianti;
|
||||
}
|
||||
}
|
||||
|
||||
/// <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)
|
||||
{
|
||||
checkFixOds();
|
||||
}
|
||||
|
||||
private void checkFixOds()
|
||||
{
|
||||
if (mod_filtroImpianto.valoreInt != 0)
|
||||
{
|
||||
// resetto la selezione...
|
||||
listMacchine.SelectedIndex = -1;
|
||||
// cambio filtro su ods macchine mostrate...
|
||||
if (mod_filtroImpianto.valoreInt > 0)
|
||||
{
|
||||
odsMacchine.FilterExpression = "(label LIKE '%{0}%') AND conditio = " + mod_filtroImpianto.valore;
|
||||
odsMacchine.DataBind();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
odsMacchine.FilterExpression = "(label LIKE '%{0}%')";
|
||||
odsMacchine.DataBind();
|
||||
}
|
||||
}
|
||||
protected void txtCercaMacchine_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
checkFixOds();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="mod_elencoRichieste.ascx.cs"
|
||||
Inherits="mod_elencoRichieste" %>
|
||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
|
||||
<%@ Register Src="~/WebUserControls/mod_periodoAnalisi.ascx" TagName="mod_periodoAnalisi" TagPrefix="uc1" %>
|
||||
<%@ Register Src="~/WebUserControls/mod_periodoAnalisi.ascx" TagName="mod_periodoAnalisi"
|
||||
TagPrefix="uc1" %>
|
||||
<div style="width: 100%; background-color: #cdcdcd; clear: both;" class="bg_plus">
|
||||
<div style="float: left;">
|
||||
<asp:CheckBox runat="server" ID="chkMostraIntChiusi" AutoPostBack="true" OnCheckedChanged="chkMostraIntChiusi_CheckedChanged"
|
||||
@@ -14,9 +15,8 @@
|
||||
<div style="font-size: 8pt; clear: both;">
|
||||
<asp:GridView ID="grView" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False"
|
||||
Width="100%" OnSelectedIndexChanged="grView_SelectedIndexChanged" OnDataBound="grView_DataBound"
|
||||
DataKeyNames="numIntMtz" DataSourceID="ods"
|
||||
OnRowDataBound="grView_RowDataBound"
|
||||
onpageindexchanged="grView_PageIndexChanged">
|
||||
DataKeyNames="numIntMtz" DataSourceID="ods" OnRowDataBound="grView_RowDataBound"
|
||||
OnPageIndexChanged="grView_PageIndexChanged">
|
||||
<RowStyle CssClass="ctrRowStyle" />
|
||||
<AlternatingRowStyle CssClass="ctrAltRowStyle" />
|
||||
<EditRowStyle CssClass="ctrEditRowStyle" />
|
||||
@@ -57,7 +57,7 @@
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="dataOraInsRichiesta" SortExpression="richiesta">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label1" runat="server" Text='<%# Eval("richiesta") %>' />
|
||||
<asp:Label ID="Label1" runat="server" Text='<%# Eval("richiesta") %>' />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="inizioFermata" SortExpression="guasto">
|
||||
@@ -68,12 +68,13 @@
|
||||
<asp:BoundField DataField="matr" HeaderText="matricola" SortExpression="matr" />
|
||||
<asp:TemplateField HeaderText="macrocausa" SortExpression="descrAmbitoGuasto">
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TextBox1" runat="server"
|
||||
Text='<%# Bind("descrAmbitoGuasto") %>'></asp:TextBox>
|
||||
<asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("descrAmbitoGuasto") %>'></asp:TextBox>
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Image ID="imgMtzPrev" runat = "server" ImageUrl="~/images/mtzProg.png" Visible='<%# isMtzProg(Eval("idxAmbito")) %>' />
|
||||
<asp:Label ID="Label8" runat="server" Text='<%# Bind("descrAmbitoGuasto") %>' />
|
||||
<span style="vertical-align: top; white-space: nowrap;">
|
||||
<asp:Label ID="Label8" runat="server" Text='<%# Bind("descrAmbitoGuasto") %>' />
|
||||
</span>
|
||||
<asp:Image ID="imgMtzPrev" runat="server" ImageUrl="~/images/mtzProg.png" Visible='<%# isMtzProg(Eval("idxAmbito")) %>' />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="lblPriorShort" SortExpression="descrPriorita" ItemStyle-HorizontalAlign="Center">
|
||||
@@ -89,8 +90,7 @@
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Center" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="descrTipo" HeaderText="lblTipoGuastoShort"
|
||||
SortExpression="descrTipo" />
|
||||
<asp:BoundField DataField="descrTipo" HeaderText="lblTipoGuastoShort" SortExpression="descrTipo" />
|
||||
<asp:BoundField DataField="nomeImpianto" HeaderText="nomeImpianto" SortExpression="nomeImpianto" />
|
||||
<asp:TemplateField HeaderText="lblMacchina" SortExpression="nomeMacchina">
|
||||
<ItemTemplate>
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 1.7 KiB |
Reference in New Issue
Block a user