79 lines
2.6 KiB
C#
79 lines
2.6 KiB
C#
using SteamWare;
|
|
using System;
|
|
|
|
namespace MP_ADM
|
|
{
|
|
public partial class GestKIT : BasePage
|
|
{
|
|
#region Private Methods
|
|
|
|
private void checkEnabled()
|
|
{
|
|
bool optPar = memLayer.ML.CRB("OptAdmKitEnabled");
|
|
divContent.Visible = optPar;
|
|
lblDataImportOut.Visible = !optPar;
|
|
string messaggio = "";
|
|
if (!optPar)
|
|
{
|
|
messaggio = "Attenzione: Gestione KIT disabilitata";
|
|
lblDataImportOut.Text = messaggio;
|
|
}
|
|
}
|
|
|
|
private void Mod_barcode_eh_comandoRegistrato(object sender, EventArgs e)
|
|
{
|
|
// verifico input su KIT x comando completo
|
|
string BCodeVal = mod_barcode.BCodeVal;
|
|
// se è un ORDINE... procedo!
|
|
if (BCodeVal.IndexOf("OPR") == 0)
|
|
{
|
|
// aggiungo ordine...
|
|
mod_gestKIT.addOrdArt(mod_barcode.codOrd, mod_barcode.codArt, mod_barcode.descArt, mod_barcode.qta);
|
|
mod_gestKIT.lastInput = "";
|
|
}
|
|
else
|
|
{
|
|
mod_gestKIT.lastInput = mod_barcode.BCodeVal;
|
|
}
|
|
mod_gestKIT.doUpdate();
|
|
}
|
|
|
|
private void Mod_barcode_eh_dataRead(object sender, EventArgs e)
|
|
{
|
|
// verifico input su KIT x lettura "grezza"
|
|
string rawInput = mod_barcode.rawInput;
|
|
mod_gestKIT.lastInput = rawInput;
|
|
mod_gestKIT.doUpdate();
|
|
}
|
|
|
|
private void Mod_gestKIT_eh_selKit(object sender, EventArgs e)
|
|
{
|
|
// invio ultimo kit creato a barcode...
|
|
mod_barcode.BCodeVal = mod_gestKIT.lastKitMade;
|
|
mod_barcode.processInput();
|
|
}
|
|
|
|
#endregion Private Methods
|
|
|
|
#region Protected Methods
|
|
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
if (!Page.IsPostBack)
|
|
{
|
|
((MoonPro)this.Master).showSearch = false;
|
|
}
|
|
checkEnabled();
|
|
string codPre = memLayer.ML.CRS("OptAdmKit_CodPre");
|
|
mod_barcode.codOrdPre = codPre != "" ? codPre : "KIT";
|
|
mod_gestPromODL.codOrdPre = mod_barcode.codOrdPre;
|
|
mod_gestPromODL.enableSelFase = memLayer.ML.CRB("OptBCode_enbSelFase");
|
|
mod_gestPromODL.CodGruppo = memLayer.ML.CRS("OptBCode_CodGruppo");
|
|
mod_barcode.eh_comandoRegistrato += Mod_barcode_eh_comandoRegistrato;
|
|
mod_barcode.eh_dataRead += Mod_barcode_eh_dataRead;
|
|
mod_gestKIT.eh_selKit += Mod_gestKIT_eh_selKit;
|
|
}
|
|
|
|
#endregion Protected Methods
|
|
}
|
|
} |