Continuo integrazione moduli
in classi "condivise" x finiti e finiti supercubati; aggiunto nuovo layer intermedio con + classi "specifiche" (alla fine sarà da valutare se tenere 1 o 2 layer in GMW_data)
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -9,7 +9,7 @@ using GMW_data;
|
||||
|
||||
namespace GMW.WebUserControls
|
||||
{
|
||||
public partial class mod_finiti : GMW_data.UserControl
|
||||
public partial class mod_finiti : GMW_data.UserControlBCodeMan
|
||||
{
|
||||
/// <summary>
|
||||
/// flusso associato (hard coded) a sterrati
|
||||
@@ -96,16 +96,6 @@ namespace GMW.WebUserControls
|
||||
base.ristampaUdc(tipoUdcRist, udcReq);
|
||||
}
|
||||
/// <summary>
|
||||
/// udc da stampare
|
||||
/// </summary>
|
||||
protected string udcReq
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj("udcSelSAO");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// controlla particolare selezionato
|
||||
/// </summary>
|
||||
private void checkParticolare()
|
||||
@@ -116,14 +106,7 @@ namespace GMW.WebUserControls
|
||||
// aggiungo descrizione del particolare
|
||||
string descr = "";
|
||||
string disegno = "";
|
||||
try
|
||||
{
|
||||
DS_magazzino.AnagParticolariRow riga = MagClass.magazzino.taAnagPart.likeSearch(currParticolare, memLayer.ML.StringSessionObj("CodCS"))[0];
|
||||
descr = riga.DescParticolare;
|
||||
disegno = string.Format("( {0} )", riga.DisegnoGrezzo);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
getDescrDisegnoParticolare(currParticolare, ref descr, ref disegno);
|
||||
lblDescrAttivo.Text = descr;
|
||||
lblDisegno.Text = disegno;
|
||||
}
|
||||
@@ -154,53 +137,6 @@ namespace GMW.WebUserControls
|
||||
btnEmptyNote.Text = traduci("btnEmptyNote");
|
||||
}
|
||||
/// <summary>
|
||||
/// restituisce il nome della pagina corrente
|
||||
/// </summary>
|
||||
protected string PagCorrente
|
||||
{
|
||||
get
|
||||
{
|
||||
string answ = "";
|
||||
Uri MyUrl = Request.Url;
|
||||
string delimStr = "/";
|
||||
char[] delimiter = delimStr.ToCharArray();
|
||||
string[] finalUrl = MyUrl.LocalPath.ToString().Split(delimiter);
|
||||
int n = finalUrl.Length;
|
||||
answ = finalUrl[n - 1].ToString();
|
||||
DataLayer_AnagGen.PermessiRow riga = (DataLayer_AnagGen.PermessiRow)user_std.UtSn.permessi.Select(string.Format("URL = '{0}'", answ))[0];
|
||||
answ = riga.NOME;
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// indica il codice articolo correntemente selezionato
|
||||
/// </summary>
|
||||
protected string currParticolare
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj(string.Format("currParticolare_{0}", uid));
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal(string.Format("currParticolare_{0}", uid), value, memLayer.ML.confReadBool("keepParticolareSel"));
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// indica il codice articolo "originale" in caso di trascodifica GRZ/GRZ o GRZ/LVT
|
||||
/// </summary>
|
||||
protected string origParticolare
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj(string.Format("origParticolare_{0}", uid));
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal(string.Format("origParticolare_{0}", uid), value, memLayer.ML.confReadBool("keepParticolareSel"));
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// indica UDC correntemente selezionato
|
||||
/// </summary>
|
||||
protected string currUDC
|
||||
|
||||
@@ -9,7 +9,7 @@ using GMW_data;
|
||||
|
||||
namespace GMW.WebUserControls
|
||||
{
|
||||
public partial class mod_finitiSuperCub : GMW_data.UserControl
|
||||
public partial class mod_finitiSuperCub : GMW_data.UserControlBCodeMan
|
||||
{
|
||||
/// <summary>
|
||||
/// flusso associato (hard coded) a sterrati
|
||||
@@ -95,16 +95,6 @@ namespace GMW.WebUserControls
|
||||
base.ristampaUdc(tipoUdcRist, udcReq);
|
||||
}
|
||||
/// <summary>
|
||||
/// udc da stampare
|
||||
/// </summary>
|
||||
protected string udcReq
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj("udcSelSAO");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// controlla particolare selezionato
|
||||
/// </summary>
|
||||
private void checkParticolare()
|
||||
@@ -115,14 +105,7 @@ namespace GMW.WebUserControls
|
||||
// aggiungo descrizione del particolare
|
||||
string descr = "";
|
||||
string disegno = "";
|
||||
try
|
||||
{
|
||||
DS_magazzino.AnagParticolariRow riga = MagClass.magazzino.taAnagPart.likeSearch(currParticolare, memLayer.ML.StringSessionObj("CodCS"))[0];
|
||||
descr = riga.DescParticolare;
|
||||
disegno = string.Format("( {0} )", riga.DisegnoGrezzo);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
getDescrDisegnoParticolare(currParticolare, ref descr, ref disegno);
|
||||
lblDescrAttivo.Text = descr;
|
||||
lblDisegno.Text = disegno;
|
||||
}
|
||||
@@ -153,53 +136,6 @@ namespace GMW.WebUserControls
|
||||
btnEmptyNote.Text = traduci("btnEmptyNote");
|
||||
}
|
||||
/// <summary>
|
||||
/// restituisce il nome della pagina corrente
|
||||
/// </summary>
|
||||
protected string PagCorrente
|
||||
{
|
||||
get
|
||||
{
|
||||
string answ = "";
|
||||
Uri MyUrl = Request.Url;
|
||||
string delimStr = "/";
|
||||
char[] delimiter = delimStr.ToCharArray();
|
||||
string[] finalUrl = MyUrl.LocalPath.ToString().Split(delimiter);
|
||||
int n = finalUrl.Length;
|
||||
answ = finalUrl[n - 1].ToString();
|
||||
DataLayer_AnagGen.PermessiRow riga = (DataLayer_AnagGen.PermessiRow)user_std.UtSn.permessi.Select(string.Format("URL = '{0}'", answ))[0];
|
||||
answ = riga.NOME;
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// indica il codice articolo correntemente selezionato
|
||||
/// </summary>
|
||||
protected string currParticolare
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj(string.Format("currParticolare_{0}", uid));
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal(string.Format("currParticolare_{0}", uid), value, memLayer.ML.confReadBool("keepParticolareSel"));
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// indica il codice articolo "originale" in caso di trascodifica GRZ/GRZ o GRZ/LVT
|
||||
/// </summary>
|
||||
protected string origParticolare
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj(string.Format("origParticolare_{0}", uid));
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal(string.Format("origParticolare_{0}", uid), value, memLayer.ML.confReadBool("keepParticolareSel"));
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// indica UDC correntemente selezionato
|
||||
/// </summary>
|
||||
protected string currUDC
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -243,6 +243,9 @@
|
||||
<Compile Include="UserControl.cs">
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="UserControlBCodeMan.cs">
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="utils.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
||||
+10
-61
@@ -66,74 +66,23 @@ namespace GMW_data
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// IDX cella associata alla linea corrente
|
||||
/// restituisce il nome della pagina corrente
|
||||
/// </summary>
|
||||
protected int idxCella
|
||||
{
|
||||
get
|
||||
{
|
||||
int answ = 0;
|
||||
if (memLayer.ML.isInSessionObject(string.Format("IdxCella_{0}", uid)))
|
||||
{
|
||||
answ = memLayer.ML.IntSessionObj(string.Format("IdxCella_{0}", uid));
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal(string.Format("IdxCella_{0}", uid), value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Codice AL associato alla cella corrente...
|
||||
/// </summary>
|
||||
protected string AlByCella
|
||||
public string PagCorrente
|
||||
{
|
||||
get
|
||||
{
|
||||
string answ = "";
|
||||
try
|
||||
{
|
||||
// tolto 2015.06.25
|
||||
//// se avesse perso codice cella rimando a pagina default...
|
||||
//if (Postazione.currCodCella == "") Response.Redirect("Default.aspx");
|
||||
answ = string.Format("ALF00{0}", Postazione.currCodCella);
|
||||
// controllo se esista AL sennò lo creo...
|
||||
if (MagClass.magazzino.taEA.getByAL(answ).Rows.Count == 0)
|
||||
{
|
||||
MagClass.magazzino.taEA.Insert(answ, true, DateTime.Now, MagClass.magazzino.CodSoggCurrUser, "", "");
|
||||
}
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
Uri MyUrl = Request.Url;
|
||||
string delimStr = "/";
|
||||
char[] delimiter = delimStr.ToCharArray();
|
||||
string[] finalUrl = MyUrl.LocalPath.ToString().Split(delimiter);
|
||||
int n = finalUrl.Length;
|
||||
answ = finalUrl[n - 1].ToString();
|
||||
DataLayer_AnagGen.PermessiRow riga = (DataLayer_AnagGen.PermessiRow)user_std.UtSn.permessi.Select(string.Format("URL = '{0}'", answ))[0];
|
||||
answ = riga.NOME;
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Richiesta (ri)stampa UDC
|
||||
/// </summary>
|
||||
/// <param name="tipoUdc">Tipo Udc (x messaggio log/SAO)</param>
|
||||
/// <param name="udcReq">Codice UDC</param>
|
||||
public void ristampaUdc(string tipoUdc, string udcReq)
|
||||
{
|
||||
bool fatto = false;
|
||||
// registro ri-stampa UDC
|
||||
DateTime adesso = DateTime.Now;
|
||||
// calcolo particolare...
|
||||
DS_magazzino.ElencoCartelliniRow rigaUDC;
|
||||
string particolare = "";
|
||||
try
|
||||
{
|
||||
rigaUDC = MagClass.magazzino.taCartellini.getByUdc(udcReq)[0];
|
||||
particolare = rigaUDC.Particolare;
|
||||
fatto = MagClass.magazzino.ristampaUdc(udcReq, Postazione.printer, Request.UserHostName);
|
||||
}
|
||||
catch
|
||||
{
|
||||
logger.lg.scriviLog(string.Format("Errore recupero particolare UDC {0} {1}", tipoUdc, udcReq), tipoLog.EXCEPTION);
|
||||
}
|
||||
if (fatto) MagClass.magazzino.taSAO.insertQuery(adesso, MagClass.magazzino.CodSoggCurrUser, Postazione.name, Postazione.IP, udcReq, particolare, "stampaUDC", string.Format("Ri-Stampato UDC {0}", tipoUdc));
|
||||
raiseEvent(ucEvType.ReqUpdateParent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,137 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using SteamWare;
|
||||
|
||||
namespace GMW_data
|
||||
{
|
||||
public class UserControlBCodeMan : GMW_data.UserControl
|
||||
{
|
||||
/// <summary>
|
||||
/// IDX cella associata alla linea corrente
|
||||
/// </summary>
|
||||
protected int idxCella
|
||||
{
|
||||
get
|
||||
{
|
||||
int answ = 0;
|
||||
if (memLayer.ML.isInSessionObject(string.Format("IdxCella_{0}", uid)))
|
||||
{
|
||||
answ = memLayer.ML.IntSessionObj(string.Format("IdxCella_{0}", uid));
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal(string.Format("IdxCella_{0}", uid), value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Codice AL associato alla cella corrente...
|
||||
/// </summary>
|
||||
protected string AlByCella
|
||||
{
|
||||
get
|
||||
{
|
||||
string answ = "";
|
||||
try
|
||||
{
|
||||
// tolto 2015.06.25
|
||||
//// se avesse perso codice cella rimando a pagina default...
|
||||
//if (Postazione.currCodCella == "") Response.Redirect("Default.aspx");
|
||||
answ = string.Format("ALF00{0}", Postazione.currCodCella);
|
||||
// controllo se esista AL sennò lo creo...
|
||||
if (MagClass.magazzino.taEA.getByAL(answ).Rows.Count == 0)
|
||||
{
|
||||
MagClass.magazzino.taEA.Insert(answ, true, DateTime.Now, MagClass.magazzino.CodSoggCurrUser, "", "");
|
||||
}
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Richiesta (ri)stampa UDC
|
||||
/// </summary>
|
||||
/// <param name="tipoUdc">Tipo Udc (x messaggio log/SAO)</param>
|
||||
/// <param name="udcReq">Codice UDC</param>
|
||||
public void ristampaUdc(string tipoUdc, string udcReq)
|
||||
{
|
||||
bool fatto = false;
|
||||
// registro ri-stampa UDC
|
||||
DateTime adesso = DateTime.Now;
|
||||
// calcolo particolare...
|
||||
DS_magazzino.ElencoCartelliniRow rigaUDC;
|
||||
string particolare = "";
|
||||
try
|
||||
{
|
||||
rigaUDC = MagClass.magazzino.taCartellini.getByUdc(udcReq)[0];
|
||||
particolare = rigaUDC.Particolare;
|
||||
fatto = MagClass.magazzino.ristampaUdc(udcReq, Postazione.printer, Request.UserHostName);
|
||||
}
|
||||
catch
|
||||
{
|
||||
logger.lg.scriviLog(string.Format("Errore recupero particolare UDC {0} {1}", tipoUdc, udcReq), tipoLog.EXCEPTION);
|
||||
}
|
||||
if (fatto) MagClass.magazzino.taSAO.insertQuery(adesso, MagClass.magazzino.CodSoggCurrUser, Postazione.name, Postazione.IP, udcReq, particolare, "stampaUDC", string.Format("Ri-Stampato UDC {0}", tipoUdc));
|
||||
raiseEvent(ucEvType.ReqUpdateParent);
|
||||
}
|
||||
/// <summary>
|
||||
/// udc da stampare
|
||||
/// </summary>
|
||||
protected string udcReq
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj("udcSelSAO");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// indica il codice articolo correntemente selezionato
|
||||
/// </summary>
|
||||
protected string currParticolare
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj(string.Format("currParticolare_{0}", uid));
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal(string.Format("currParticolare_{0}", uid), value, memLayer.ML.confReadBool("keepParticolareSel"));
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// indica il codice articolo "originale" in caso di trascodifica GRZ/GRZ o GRZ/LVT o LVT/LVT
|
||||
/// </summary>
|
||||
protected string origParticolare
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj(string.Format("origParticolare_{0}", uid));
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal(string.Format("origParticolare_{0}", uid), value, memLayer.ML.confReadBool("keepParticolareSel"));
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Recupera descrizione e disegno dato un particolare
|
||||
/// </summary>
|
||||
/// <param name="CodParticolare"></param>
|
||||
/// <param name="descr"></param>
|
||||
/// <param name="disegno"></param>
|
||||
public void getDescrDisegnoParticolare(string CodParticolare, ref string descr, ref string disegno)
|
||||
{
|
||||
try
|
||||
{
|
||||
DS_magazzino.AnagParticolariRow riga = MagClass.magazzino.taAnagPart.likeSearch(CodParticolare, CodCs)[0];
|
||||
descr = riga.DescParticolare;
|
||||
disegno = string.Format("( {0} )", riga.DisegnoGrezzo);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user