Refresh gestione pagina SAO, non mostra dati am comportamento consistente

This commit is contained in:
samuele
2012-09-26 15:06:17 +02:00
parent 719e37a19a
commit ca8ff2678e
8 changed files with 204 additions and 179 deletions
BIN
View File
Binary file not shown.
+5 -3
View File
@@ -141,6 +141,8 @@
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Drawing" />
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.ServiceModel" />
<Reference Include="System.Web" />
<Reference Include="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
@@ -180,6 +182,7 @@
<Content Include="images\stampaUDC_l.png" />
<Content Include="images\stampaUDC_m.png" />
<Content Include="images\stampaUDC_s.png" />
<Content Include="logs\PlaceHolder.file" />
<Content Include="managerSAO.aspx" />
<Content Include="stampe.aspx" />
<Content Include="Web.config">
@@ -1157,6 +1160,8 @@
<Content Include="images\flusso_SP.png" />
<Content Include="images\flusso_TK.png" />
<Content Include="packages.config" />
<Content Include="PDF\PlaceHolder.file" />
<Content Include="temp\PlaceHolder.file" />
<None Include="Web.config.GMW" />
<None Include="Web.config.SP_test" />
<None Include="Web.config.TK_test">
@@ -1292,11 +1297,8 @@
<Content Include="WebUserControls\mod_animeMult.ascx" />
</ItemGroup>
<ItemGroup>
<Folder Include="logs\" />
<Folder Include="PDF\" />
<Folder Include="Reports\SP\" />
<Folder Include="Reports\TK\" />
<Folder Include="temp\" />
</ItemGroup>
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
+2 -2
View File
@@ -13,7 +13,7 @@
<asp:Button runat="server" ID="btnElimina" Width="120px" Text="elimina" Visible="false"
OnClick="btnElimina_Click" />
</div>
<%--<div style="font-size: x-small;">
<div style="font-size: x-small;">
<asp:GridView ID="grView" runat="server" EnableModelValidation="True" Width="100%"
AllowPaging="True" DataSourceID="odsSAO" PageSize="20" AutoGenerateColumns="False"
DataKeyNames="idxEvento" OnSelectedIndexChanged="grView_SelectedIndexChanged">
@@ -74,4 +74,4 @@
<asp:SessionParameter Name="codPostazione" Type="String" SessionField="postazione_name" />
</SelectParameters>
</asp:ObjectDataSource>
</div>--%>
</div>
+179 -174
View File
@@ -41,6 +41,111 @@ namespace GMW.WebUserControls
memLayer.ML.setSessionVal("udcSelSAO", value);
}
}
/// <summary>
/// definisce se sia possibile cambiare le postazioni
/// </summary>
public bool canSelPost
{
get
{
return filtroPostazione.changeSelEnabled;
}
set
{
filtroPostazione.changeSelEnabled = value;
}
}
/// <summary>
/// calcola postazione corrente (ip, name, printer)
/// </summary>
private void calcolaPostazione()
{
postazione_IP = Request.UserHostName;
postazione_name = dnsUtils.DetermineCompName(postazione_IP);
// cerco stampante x postazione
postazione_printer = "n.d.";
try
{
DS_Applicazione.ElencoPostazioniDataTable tabPost = DataProxy.obj.taElPost.getByCod(postazione_name);
if (tabPost.Rows.Count > 0)
{
postazione_printer = tabPost[0].stampante;
}
else
{
tabPost = DataProxy.obj.taElPost.getByCod("default");
postazione_printer = tabPost[0].stampante;
}
}
catch
{ }
}
/// <summary>
/// udc da stampare
/// </summary>
protected string udcReq
{
get
{
return memLayer.ML.StringSessionObj("udcSelSAO");
}
}
/// <summary>
/// indica ip della postazione corrente
/// </summary>
protected string postazione_IP
{
get
{
return memLayer.ML.StringSessionObj("postazione_IP");
}
set
{
memLayer.ML.setSessionVal("postazione_IP", value);
}
}
/// <summary>
/// indica name della postazione corrente
/// </summary>
protected string postazione_name
{
get
{
return memLayer.ML.StringSessionObj("postazione_name");
}
set
{
memLayer.ML.setSessionVal("postazione_name", value);
}
}
/// <summary>
/// indica stampante associata alla postazione corrente
/// </summary>
protected string postazione_printer
{
get
{
return memLayer.ML.StringSessionObj("postazione_printer");
}
set
{
memLayer.ML.setSessionVal("postazione_printer", value);
}
}
/// <summary>
/// idxPosizione abilitata x cancellazione
/// </summary>
public int idxPosizione2del
{
get
{
return memLayer.ML.IntSessionObj(string.Format("idxPosizione_{0}", this.ID));
}
set
{
memLayer.ML.setSessionVal(string.Format("idxPosizione_{0}", this.ID), value);
}
}
#endregion
@@ -87,7 +192,7 @@ namespace GMW.WebUserControls
#endregion
#region controllo visualizzazione dati
#region controlli ed utility x visualizzazione dati
/// <summary>
/// ssitema visualizzazione dal filtraggi
@@ -135,35 +240,6 @@ namespace GMW.WebUserControls
aggiornaElencoRighe();
#endif
}
#endregion
#if false
/// <summary>
/// gestione evento selezione
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
public void filtroPostazione_eh_selValore(object sender, EventArgs e)
{
checkFixOds();
//postazione_name = filtroPostazione.valore;
}
/// <summary>
/// sistema visibilità/abilitazione buttons
/// </summary>
private void setBtnState()
{
btnElimina.Visible = memLayer.ML.confReadBool("userCanDelUdc");
bool abilita = false;
if (idxEvento > 0 && udcSel != "")
{
abilita = true;
}
btnStampa.Enabled = abilita;
btnElimina.Enabled = abilita;
}
/// <summary>
/// restituisce url immagine da cod azione
/// </summary>
@@ -181,13 +257,18 @@ namespace GMW.WebUserControls
return answ;
}
/// <summary>
/// reset della selezione
/// sistema visibilità/abilitazione buttons
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnReset_Click(object sender, EventArgs e)
private void setBtnState()
{
resetSelezione();
btnElimina.Visible = memLayer.ML.confReadBool("userCanDelUdc");
bool abilita = false;
if (idxEvento > 0 && udcSel != "")
{
abilita = true;
}
btnStampa.Enabled = abilita;
btnElimina.Enabled = abilita;
}
/// <summary>
/// resetta la selezione dei valori in caso di modifiche su altri controlli
@@ -201,41 +282,6 @@ namespace GMW.WebUserControls
setBtnState();
}
/// <summary>
/// gestione evento select
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void grView_SelectedIndexChanged(object sender, EventArgs e)
{
// salvo idxEvento x abilitare buttons
idxEvento = Convert.ToInt32(grView.SelectedDataKey["idxEvento"]);
// salvo UDC x reprint
string udc = "";
try
{
udc = MagClass.magazzino.taSAO.getByIdxEvento(idxEvento)[0].UDC;
}
catch
{ }
if (udc != "")
{
// verifico UDC valido (non cancellato!!!)
if (MagClass.magazzino.checkUDC(udc))
{
udcSel = udc;
}
else
{
udcSel = "";
}
}
else
{
udcSel = "";
}
setBtnState();
}
/// <summary>
/// forza update controllo
/// </summary>
public void doUpdate()
@@ -244,100 +290,11 @@ namespace GMW.WebUserControls
memLayer.ML.setSessionVal("dataToPost", DateTime.Now.AddDays(1));
grView.DataBind();
}
/// <summary>
/// idxPosizione abilitata x cancellazione
/// </summary>
public int idxPosizione2del
{
get
{
return memLayer.ML.IntSessionObj(string.Format("idxPosizione_{0}", this.ID));
}
set
{
memLayer.ML.setSessionVal(string.Format("idxPosizione_{0}", this.ID), value);
}
}
/// <summary>
/// udc da stampare
/// </summary>
protected string udcReq
{
get
{
return memLayer.ML.StringSessionObj("udcSelSAO");
}
}
/// <summary>
/// indica ip della postazione corrente
/// </summary>
protected string postazione_IP
{
get
{
return memLayer.ML.StringSessionObj("postazione_IP");
}
set
{
memLayer.ML.setSessionVal("postazione_IP", value);
}
}
/// <summary>
/// indica name della postazione corrente
/// </summary>
protected string postazione_name
{
get
{
return memLayer.ML.StringSessionObj("postazione_name");
}
set
{
memLayer.ML.setSessionVal("postazione_name", value);
}
}
/// <summary>
/// calcola postazione corrente (ip, name, printer)
/// </summary>
private void calcolaPostazione()
{
postazione_IP = Request.UserHostName;
postazione_name = dnsUtils.DetermineCompName(postazione_IP);
// cerco stampante x postazione
postazione_printer = "n.d.";
try
{
DS_Applicazione.ElencoPostazioniDataTable tabPost = DataProxy.obj.taElPost.getByCod(postazione_name);
if (tabPost.Rows.Count > 0)
{
postazione_printer = tabPost[0].stampante;
}
else
{
tabPost = DataProxy.obj.taElPost.getByCod("default");
postazione_printer = tabPost[0].stampante;
}
}
catch
{ }
}
/// <summary>
/// indica stampante associata alla postazione corrente
/// </summary>
protected string postazione_printer
{
get
{
return memLayer.ML.StringSessionObj("postazione_printer");
}
set
{
memLayer.ML.setSessionVal("postazione_printer", value);
}
}
#endif
#endregion
#region controlli interazione (buttons, gridviews)
/// <summary>
/// richiede stampa
/// </summary>
@@ -410,18 +367,66 @@ namespace GMW.WebUserControls
#endif
}
/// <summary>
/// definisce se sia possibile cambiare le postazioni
/// reset della selezione
/// </summary>
public bool canSelPost
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnReset_Click(object sender, EventArgs e)
{
get
{
return filtroPostazione.changeSelEnabled;
}
set
{
filtroPostazione.changeSelEnabled = value;
}
#if false
resetSelezione();
#endif
}
/// <summary>
/// gestione evento select
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void grView_SelectedIndexChanged(object sender, EventArgs e)
{
#if false
// salvo idxEvento x abilitare buttons
idxEvento = Convert.ToInt32(grView.SelectedDataKey["idxEvento"]);
// salvo UDC x reprint
string udc = "";
try
{
udc = MagClass.magazzino.taSAO.getByIdxEvento(idxEvento)[0].UDC;
}
catch
{ }
if (udc != "")
{
// verifico UDC valido (non cancellato!!!)
if (MagClass.magazzino.checkUDC(udc))
{
udcSel = udc;
}
else
{
udcSel = "";
}
}
else
{
udcSel = "";
}
setBtnState();
#endif
}
/// <summary>
/// gestione evento selezione
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
public void filtroPostazione_eh_selValore(object sender, EventArgs e)
{
checkFixOds();
#if false
postazione_name = filtroPostazione.valore;
#endif
}
#endregion
}
}
+18
View File
@@ -47,5 +47,23 @@ namespace GMW.WebUserControls {
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Button btnElimina;
/// <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>
/// odsSAO 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 odsSAO;
}
}
BIN
View File
Binary file not shown.
Binary file not shown.
Binary file not shown.