7a64c126f3
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)
138 lines
4.9 KiB
C#
138 lines
4.9 KiB
C#
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
|
|
{ }
|
|
}
|
|
}
|
|
}
|