Sistemati criteri visibilità associazione bolle/odette

git-svn-id: https://keyhammer.ath.cx/svn/GMW/trunk@354 365432ac-a1b5-4ffd-bb28-6d3099d32164
This commit is contained in:
samuele
2011-05-02 06:23:30 +00:00
parent 1151db94a0
commit 94170f910c
9 changed files with 127 additions and 88 deletions
+8
View File
@@ -295,6 +295,13 @@
<Compile Include="WebUserControls\mod_barPlot.ascx.designer.cs">
<DependentUpon>mod_barPlot.ascx</DependentUpon>
</Compile>
<Compile Include="WebUserControls\mod_bolle4odette.ascx.cs">
<DependentUpon>mod_bolle4odette.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="WebUserControls\mod_bolle4odette.ascx.designer.cs">
<DependentUpon>mod_bolle4odette.ascx</DependentUpon>
</Compile>
<Compile Include="WebUserControls\mod_chLang.ascx.cs">
<DependentUpon>mod_chLang.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
@@ -959,6 +966,7 @@
<Content Include="unauthorized.aspx" />
<Content Include="WebMasterPages\TermPageAjax.Master" />
<Content Include="WebMasterPages\TermPage.Master" />
<Content Include="WebUserControls\mod_bolle4odette.ascx" />
<Content Include="WebUserControls\mod_delibera.ascx" />
<Content Include="WebUserControls\mod_elencoListePrelievo.ascx" />
<Content Include="WebUserControls\mod_labAssStampaUdc.ascx" />
@@ -0,0 +1,15 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_bolle4odette.ascx.cs"
Inherits="GMW.WebUserControls.mod_bolle4odette" %>
<div class="filtro_2" style="float: left; white-space: nowrap; width: 100%;">
<div style="float: left;">
<asp:Label runat="server" ID="lblNumBolla" />
<asp:TextBox runat="server" ID="txtNumBolla" />
</div>
<div style="float: left;">
<asp:Label runat="server" ID="lblDataBolla" />
<asp:TextBox runat="server" ID="txtDataBolla" />
</div>
<div style="float: right;">
<asp:Button runat="server" ID="btnDoCreate" />
</div>
</div>
@@ -0,0 +1,25 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace GMW.WebUserControls
{
public partial class mod_bolle4odette : System.Web.UI.UserControl
{
protected void Page_Load(object sender, EventArgs e)
{
btnDoCreate.Text = "Associa bolla - etichette";
lblDataBolla.Text = "Data Bolla";
lblNumBolla.Text = "Num Bolla";
}
/// <summary>
/// evento nuovo valore
/// </summary>
public event EventHandler eh_nuovoValore;
}
}
@@ -0,0 +1,61 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.4952
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace GMW.WebUserControls {
public partial class mod_bolle4odette {
/// <summary>
/// lblNumBolla 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.Label lblNumBolla;
/// <summary>
/// txtNumBolla 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.TextBox txtNumBolla;
/// <summary>
/// lblDataBolla 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.Label lblDataBolla;
/// <summary>
/// txtDataBolla 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.TextBox txtDataBolla;
/// <summary>
/// btnDoCreate 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.Button btnDoCreate;
}
}
+8 -16
View File
@@ -5,7 +5,7 @@
TagPrefix="uc1" %>
<%@ Register Src="mod_periodoAnalisi.ascx" TagName="mod_periodoAnalisi" TagPrefix="uc2" %>
<%@ Register Src="mod_filtro.ascx" TagName="mod_filtro" TagPrefix="uc3" %>
<%@ Register Src="mod_nuovaListaPrelievo.ascx" TagName="mod_nuovaListaPrelievo" TagPrefix="uc4" %>
<%@ Register Src="mod_bolle4odette.ascx" TagName="mod_bolle4odette" TagPrefix="uc4" %>
<table cellpadding="0" cellspacing="0" width="100%">
<tr>
<td colspan="2">
@@ -19,21 +19,13 @@
<asp:ObjectDataSource ID="odsFiltroStati" runat="server" OldValuesParameterFormatString="Original_{0}"
SelectMethod="GetData" TypeName="GMW_data.DS_UtilityTableAdapters.v_selStatiListeTableAdapter">
</asp:ObjectDataSource>
<uc3:mod_filtro ID="mod_filtroTipo" runat="server" Oneh_selValore="eh_selectedTipo"
comboWidth="180" filterChekText="filtraTipoListe" valore="04-OdetSP" isChecked="true"
changeSelEnabled="false" changeCheckVisible="false" />
<asp:ObjectDataSource ID="odsTipoLista" runat="server" OldValuesParameterFormatString="Original_{0}"
SelectMethod="GetData" TypeName="GMW_data.DS_UtilityTableAdapters.v_selTipoListaTableAdapter">
</asp:ObjectDataSource>
</div>
<div style="float: right;">
<asp:Button runat="server" ID="btnForceReload" OnClick="btnForceReload_Click" />
</div>
</div>
<div class="filtro_2" style="white-space: nowrap; padding: 2px;">
<asp:Button runat="server" ID="btnNewLista" OnClick="btnNewLista_Click" />
<uc4:mod_nuovaListaPrelievo ID="mod_nuovaListaPrelievo1" runat="server" bloccaTipoLista="true"
valoreTipoLista="04-OdetSP" />
<div class="filtro_2" style="white-space: nowrap;">
<uc4:mod_bolle4odette ID="mod_bolle4odette1" runat="server" Visible="false" />
</div>
</td>
</tr>
@@ -185,10 +177,10 @@
<asp:Label runat="server" ID="lblCreaOdette" Text="Odette" ToolTip='<%# traduci("lblCreaOdette") %>' />
</HeaderTemplate>
<ItemTemplate>
<asp:ImageButton ID="imgCreaOdette" runat="server" CausesValidation="False"
CommandName="Update" CommandArgument="CreaEtichetteOdette" ToolTip='<%# traduci("CreaEtichetteOdette") %>'
Visible='<%# CreaOdetteEnabled(Eval("CodStatoLista"),Eval("CodTipoLista")) %>' ImageUrl="~/images/wizard.png"
OnClick="img_Click" />
<asp:ImageButton ID="imgCreaOdette" runat="server" CausesValidation="False" CommandName="Update"
CommandArgument="CreaEtichetteOdette" ToolTip='<%# traduci("CreaEtichetteOdette") %>'
Visible='<%# CreaOdetteEnabled(Eval("CodStatoLista"),Eval("CodTipoLista")) %>'
ImageUrl="~/images/wizard.png" OnClick="img_Click" />
</ItemTemplate>
<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
<ItemStyle HorizontalAlign="Center"></ItemStyle>
@@ -205,7 +197,7 @@
<asp:Label ID="lblWarning" runat="server" Visible="false" CssClass="erroreMid" />
<asp:ObjectDataSource ID="ods" runat="server" OldValuesParameterFormatString="Original_{0}"
SelectMethod="getByFilt" TypeName="GMW_data.DS_magazzinoTableAdapters.ElencoListePrelievoTableAdapter"
OnInserting="recuperaFooter" FilterExpression="CodLista LIKE '%{0}%' OR Particolare LIKE '%{0}%' OR DescParticolare LIKE '%{0}%'"
OnInserting="recuperaFooter" FilterExpression="(CodLista LIKE '%{0}%' OR Particolare LIKE '%{0}%' OR DescParticolare LIKE '%{0}%') AND CodTipoLista = '04-OdetSP' "
OnInserted="ods_Updated" OnUpdated="ods_Updated" DeleteMethod="DeleteQuery" OnDeleted="ods_Updated">
<FilterParameters>
<asp:SessionParameter DefaultValue="*" Name="ricerca" SessionField="valoreCercato" />
+8 -43
View File
@@ -290,27 +290,15 @@ namespace GMW.WebUserControls
if (!Page.IsPostBack)
{
btnForceReload.Text = traduci("ReloadDataMatrix");
btnNewLista.Text = traduci("NuovaListaPrelievo");
mod_viewRigheListaPrelievo1.Visible = false;
mod_periodoAnalisi1.setPeriodoFree();
mod_filtroStato.ods = odsFiltroStati;
mod_filtroTipo.ods = odsTipoLista;
// controllo se ci sia richiesta x creare nuova lista, nel caso precompilo valori...
if (memLayer.ML.BoolSessionObj("PrecompilaListaPrelievo"))
{
mod_nuovaListaPrelievo1.Visible = true;
mod_nuovaListaPrelievo1.ParticolareRichiesto = memLayer.ML.StringSessionObj("Particolare_sel");
memLayer.ML.emptySessionVal("PrecompilaListaPrelievo");
}
else
{
mod_nuovaListaPrelievo1.Visible = false;
}
mod_bolle4odette1.Visible = false;
}
// registro evento update
mod_viewRigheListaPrelievo1.eh_nuovoValore += new EventHandler(mod_viewRigheListaPrelievo1_eh_nuovoValore);
mod_periodoAnalisi1.eh_doUpdate += new EventHandler(mod_periodoAnalisi1_eh_doUpdate);
mod_nuovaListaPrelievo1.eh_nuovoValore += new EventHandler(mod_nuovaListaPrelievo1_eh_nuovoValore);
mod_bolle4odette1.eh_nuovoValore += new EventHandler(mod_bolle4odette1_eh_nuovoValore);
}
/// <summary>
@@ -318,11 +306,9 @@ namespace GMW.WebUserControls
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
void mod_nuovaListaPrelievo1_eh_nuovoValore(object sender, EventArgs e)
void mod_bolle4odette1_eh_nuovoValore(object sender, EventArgs e)
{
btnNewLista.Visible = true;
// nascondo crea nuovo
mod_nuovaListaPrelievo1.Visible = false;
mod_bolle4odette1.Visible = false;
// nascondo eventuali dettagli
grView.SelectedIndex = -1;
// aggiorno controllo corrente!
@@ -463,13 +449,13 @@ namespace GMW.WebUserControls
try
{
// !!!FARE!!! controllare che non ci siano già, in tal caso non deve ricreare...
answ = (((int)codStato == (int)statoLista.completata)&& (codTipoLista.ToString() == "04-OdetSP"));
answ = (((int)codStato == (int)statoLista.completata) && (codTipoLista.ToString() == "04-OdetSP"));
}
catch
{ }
return answ;
}
/// <summary>
/// gestione cambio selezione valore
/// </summary>
@@ -656,8 +642,7 @@ namespace GMW.WebUserControls
break;
case "CreaEtichetteOdette":
// mostro modulo per associazione etichette odette / bolla
// !!!FARE!!!
mod_nuovaListaPrelievo1.Visible = true;
mod_bolle4odette1.Visible = true;
// blocco update!
e.Cancel = true;
break;
@@ -681,7 +666,7 @@ namespace GMW.WebUserControls
private void checkFixOds()
{
ods.FilterParameters.Clear();
ods.FilterExpression = "(CodLista LIKE '%{0}%' OR Particolare LIKE '%{0}%' OR DescParticolare LIKE '%{0}%')";
ods.FilterExpression = "(CodLista LIKE '%{0}%' OR Particolare LIKE '%{0}%' OR DescParticolare LIKE '%{0}%') AND CodTipoLista = '04-OdetSP' ";
// parametro ricerca attuale
SessionParameter parametroFiltro = new SessionParameter();
parametroFiltro.SessionField = "valoreCercato";
@@ -698,16 +683,6 @@ namespace GMW.WebUserControls
parametroListaStato.Name = "CodStato";
parametroListaStato.DefaultValue = "0";
ods.FilterParameters.Add(parametroListaStato);
if (mod_filtroTipo.valore != "*")
{
ods.FilterExpression += " AND CodTipoLista = '{2}'";
}
ControlParameter parametroListaTipo = new ControlParameter();
parametroListaTipo.ControlID = "mod_filtroTipo";
parametroListaTipo.PropertyName = "valore";
parametroListaTipo.Name = "CodTipoLista";
parametroListaTipo.DefaultValue = "0";
ods.FilterParameters.Add(parametroListaTipo);
// chiamo procedura che aggiorna ods principale
grView.SelectedIndex = -1;
@@ -761,16 +736,6 @@ namespace GMW.WebUserControls
return traduci(codice.ToString());
}
/// <summary>
/// mostra controllo per creare nuove liste di prelievo
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnNewLista_Click(object sender, EventArgs e)
{
mod_nuovaListaPrelievo1.Visible = true;
btnNewLista.Visible = false;
}
/// <summary>
/// traduce il cod soggetto in cognome-nome operatore
/// </summary>
/// <param name="CodSogg"></param>
+2 -29
View File
@@ -40,24 +40,6 @@ namespace GMW.WebUserControls {
/// </remarks>
protected global::System.Web.UI.WebControls.ObjectDataSource odsFiltroStati;
/// <summary>
/// mod_filtroTipo control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::mod_filtro mod_filtroTipo;
/// <summary>
/// odsTipoLista 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 odsTipoLista;
/// <summary>
/// btnForceReload control.
/// </summary>
@@ -68,22 +50,13 @@ namespace GMW.WebUserControls {
protected global::System.Web.UI.WebControls.Button btnForceReload;
/// <summary>
/// btnNewLista control.
/// mod_bolle4odette1 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.Button btnNewLista;
/// <summary>
/// mod_nuovaListaPrelievo1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::GMW.WebUserControls.mod_nuovaListaPrelievo mod_nuovaListaPrelievo1;
protected global::GMW.WebUserControls.mod_bolle4odette mod_bolle4odette1;
/// <summary>
/// grView control.
Binary file not shown.
Binary file not shown.