avanzamento gestione KIT anime
This commit is contained in:
@@ -595,6 +595,7 @@
|
||||
<Content Include="WebUserControls\mod_finitiSuperCub.ascx" />
|
||||
<Content Include="WebUserControls\mod_FusiSterr.ascx" />
|
||||
<Content Include="WebUserControls\mod_GestMatrUser.ascx" />
|
||||
<Content Include="WebUserControls\mod_kitAnime.ascx" />
|
||||
<Content Include="WebUserControls\mod_LiqDtAnom.ascx" />
|
||||
<Content Include="WebUserControls\mod_listAL.ascx" />
|
||||
<Content Include="WebUserControls\mod_listDtx.ascx" />
|
||||
@@ -1732,6 +1733,13 @@
|
||||
<Compile Include="WebUserControls\mod_gestPrinterPost.ascx.designer.cs">
|
||||
<DependentUpon>mod_gestPrinterPost.ascx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControls\mod_kitAnime.ascx.cs">
|
||||
<DependentUpon>mod_kitAnime.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControls\mod_kitAnime.ascx.designer.cs">
|
||||
<DependentUpon>mod_kitAnime.ascx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControls\mod_labAssStampaUdc.ascx.cs">
|
||||
<DependentUpon>mod_labAssStampaUdc.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
|
||||
+3
-2
@@ -2,7 +2,8 @@
|
||||
|
||||
<%@ Register Src="WebUserControls/mod_selLineaNtDt.ascx" TagName="mod_selLineaNtDt" TagPrefix="uc1" %>
|
||||
<%@ Register Src="WebUserControls/mod_storicoAzioniOperatore.ascx" TagName="mod_storicoAzioniOperatore" TagPrefix="uc2" %>
|
||||
<%@ Register Src="WebUserControls/mod_anime.ascx" TagName="mod_anime" TagPrefix="uc3" %>
|
||||
<%@ Register Src="~/WebUserControls/mod_kitAnime.ascx" TagPrefix="uc1" TagName="mod_kitAnime" %>
|
||||
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
|
||||
</asp:Content>
|
||||
@@ -31,7 +32,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<uc3:mod_anime ID="mod_anime1" runat="server" />
|
||||
<uc1:mod_kitAnime runat="server" ID="mod_kitAnime" animeExt="false" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -25,8 +25,8 @@ namespace GMW
|
||||
// update vari...
|
||||
doUpdate();
|
||||
mod_storicoAzioniOperatore1.eh_stampa += new EventHandler(mod_storicoAzioniOperatore1_eh_stampa);
|
||||
mod_anime1.doUpdate();
|
||||
mod_anime1.eh_reqUpdate += mod_PostRX_NT1_eh_reqUpdate;
|
||||
mod_kitAnime.doUpdate();
|
||||
mod_kitAnime.eh_reqUpdate += mod_PostRX_NT1_eh_reqUpdate;
|
||||
mod_selLineaNtDt1.eh_lineSelected += mod_selLineaNtDt1_eh_doRefresh;
|
||||
mod_selLineaNtDt1.eh_showHideStorico += mod_selLineaNtDt1_eh_showHideStorico;
|
||||
}
|
||||
@@ -47,7 +47,7 @@ namespace GMW
|
||||
private void mod_selLineaNtDt1_eh_doRefresh(object sender, EventArgs e)
|
||||
{
|
||||
doUpdate();
|
||||
mod_anime1.doUpdate();
|
||||
mod_kitAnime.doUpdate();
|
||||
}
|
||||
/// <summary>
|
||||
/// richiesta update del controllo SAO
|
||||
@@ -74,7 +74,7 @@ namespace GMW
|
||||
/// <param name="e"></param>
|
||||
void mod_storicoAzioniOperatore1_eh_stampa(object sender, EventArgs e)
|
||||
{
|
||||
mod_anime1.ristampa();
|
||||
mod_kitAnime.ristampa();
|
||||
}
|
||||
/// <summary>
|
||||
/// sistemo visualizzazione pannelli
|
||||
@@ -83,7 +83,7 @@ namespace GMW
|
||||
{
|
||||
// default: moduli visibili (non serve linea)..
|
||||
bool enableBtn = true;
|
||||
mod_anime1.Visible = enableBtn;
|
||||
mod_kitAnime.Visible = enableBtn;
|
||||
fixStorico();
|
||||
}
|
||||
/// <summary>
|
||||
|
||||
Generated
+2
-2
@@ -67,12 +67,12 @@ namespace GMW {
|
||||
protected global::System.Web.UI.WebControls.Label lblWarning;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo mod_anime1.
|
||||
/// Controllo mod_kitAnime.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::GMW.WebUserControls.mod_anime mod_anime1;
|
||||
protected global::GMW.WebUserControls.mod_kitAnime mod_kitAnime;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,7 +62,13 @@
|
||||
<div style="white-space: nowrap;">
|
||||
<asp:ImageButton ID="imgDelete" runat="server" CausesValidation="False" CommandName="Delete" ToolTip='<%# traduci("Delete") %>' Visible='<%# Eval("CodKIT").ToString()!="" %>' ImageUrl="~/images/elimina_m.png" OnClientClick='<%# SteamWare.jsUtils.getCBE("confermaDel") %>' />
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<div style="white-space: nowrap;">
|
||||
<asp:ImageButton ID="imgUpdate2" runat="server" CausesValidation="False" CommandName="Update" ToolTip='<%# traduci("Update") %>' ImageUrl="~/images/apply_m.png" />
|
||||
<asp:ImageButton ID="imgCancel2" runat="server" CausesValidation="False" CommandName="Cancel" ToolTip='<%# traduci("Cancel") %>' ImageUrl="~/images/cancel_m.png" />
|
||||
</div>
|
||||
</EditItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Center" Width="2em"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_kitAnime.ascx.cs" Inherits="GMW.WebUserControls.mod_kitAnime" %>
|
||||
|
||||
<% if (false)
|
||||
{ %>
|
||||
<webopt:BundleReference ID="BundleReference1" runat="server" Path="~/Content/css" />
|
||||
<webopt:BundleReference ID="BundleReference2" runat="server" Path="~/Content/themes/base/css" />
|
||||
<% } %>
|
||||
|
||||
<asp:HiddenField runat="server" id="hfAnimeExt" />
|
||||
<div class="row">
|
||||
<div class="col-sm-4 col-lg-3">
|
||||
Elenco UDC nel KIT
|
||||
<br />
|
||||
esterno: <%: animeExt.ToString() %>
|
||||
</div>
|
||||
<div class="col-sm-4 col-lg-6">
|
||||
<div>
|
||||
<asp:Label runat="server" ID="lblParticolareAttivo" Font-Size="3em" Text="" />
|
||||
</div>
|
||||
<div>
|
||||
<asp:Label runat="server" ID="lblDescrAttivo" Font-Size="2em" Text="" ToolTip="particolare" />
|
||||
<br />
|
||||
<asp:Label runat="server" ID="lblDisegno" Font-Size="1.8em" Text="" ForeColor="#FFFFFF" Font-Bold="true" ToolTip="disegno" />
|
||||
</div>
|
||||
<div>
|
||||
<div id="divBarcode" runat="server">
|
||||
<div>
|
||||
<div>
|
||||
<asp:Label runat="server" ID="lblBarcode" Text="Barcode" />
|
||||
</div>
|
||||
<asp:TextBox runat="server" ID="txtBarcode" Height="1.2em" Width="100%" Font-Size="3em" AutoPostBack="True" Style="text-align: center" />
|
||||
</div>
|
||||
</div>
|
||||
<div id="divNote" runat="server">
|
||||
<div>
|
||||
<%: traduci("Note") %>
|
||||
</div>
|
||||
<div>
|
||||
<asp:TextBox runat="server" ID="txtNote" Height="4em" Width="100%" Font-Size="2em" TextMode="MultiLine" TabIndex="2" />
|
||||
<asp:Button runat="server" ID="btnEmptyNote" Height="3em" Width="100%" OnClick="btnEmptyNote_Click" CssClass="btn btn-default" TabIndex="3" />
|
||||
</div>
|
||||
<div style="padding: 4px 0px;">
|
||||
<asp:LinkButton runat="server" ID="lbtStampaUDC" Width="100%" CssClass="btn btn-warning btn-lg" TabIndex="4" OnClick="lbtStampaUDC_Click"><i aria-hidden='true' class='fa fa-print fa-2x'></i> <%: traduci("lbtGeneraUDC") %></asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4 col-lg-3">
|
||||
<div class="panel panel-primary panel-sm">
|
||||
<div class="panel-heading">
|
||||
<b><%: traduci("lblQtaPart") %></b>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<asp:TextBox runat="server" ID="txtQta" Height="56px" Width="100%" Font-Size="28pt" Style="text-align: center" AutoPostBack="true" TabIndex="1" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,561 @@
|
||||
using GMW_data;
|
||||
using SteamWare;
|
||||
using System;
|
||||
using System.Web.UI;
|
||||
|
||||
namespace GMW.WebUserControls
|
||||
{
|
||||
public partial class mod_kitAnime : System.Web.UI.UserControl
|
||||
{
|
||||
/// <summary>
|
||||
/// flusso associato (hard coded) a ANIME
|
||||
/// </summary>
|
||||
protected string flusso = "AN";
|
||||
/// <summary>
|
||||
/// stato associato (hard coded) a ANIME
|
||||
/// </summary>
|
||||
protected string statoUDC = "Anim";
|
||||
/// <summary>
|
||||
/// dati x verifica CodSoggetto / matricola
|
||||
/// </summary>
|
||||
protected string preCodSogg = memLayer.ML.AppConf["prefCodSogg"];
|
||||
/// <summary>
|
||||
/// Imposta se le anime del KIT siano di origine INT o EXT
|
||||
/// </summary>
|
||||
public bool animeExt
|
||||
{
|
||||
set
|
||||
{
|
||||
hfAnimeExt.Value = value.ToString();
|
||||
}
|
||||
get
|
||||
{
|
||||
bool answ = false;
|
||||
bool.TryParse(hfAnimeExt.Value, out answ);
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// gestione eh update
|
||||
/// </summary>
|
||||
public event EventHandler eh_reqUpdate;
|
||||
/// <summary>
|
||||
/// stringa UID univoca
|
||||
/// </summary>
|
||||
public string uid
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.UniqueID.Replace("$", "_").Replace("-", "_");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// caricamento pagina
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
Postazione.messaggiText = "";
|
||||
Postazione.warningText = "";
|
||||
traduciObj();
|
||||
checkNumKeyIn();
|
||||
}
|
||||
doChecks();
|
||||
if (currKitAnime!= "")
|
||||
{
|
||||
lblParticolareAttivo.Text = string.Format("KIT Anime selezionato <b>{0}</b>", currKitAnime);
|
||||
// aggiungo descrizione del particolare
|
||||
string descr = "";
|
||||
string disegno = "";
|
||||
try
|
||||
{
|
||||
var riga = MagClass.magazzino.taAK.getByKey(currKitAnime)[0];
|
||||
descr = riga.Descrizione;
|
||||
disegno = string.Format("KIT ANIME {0}", currKitAnime);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
lblDescrAttivo.Text = descr;
|
||||
lblDisegno.Text = disegno;
|
||||
}
|
||||
else
|
||||
{
|
||||
lblParticolareAttivo.Text = "...";
|
||||
lblDescrAttivo.Text = "";
|
||||
lblDisegno.Text = "";
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// verifico se ci sia in sessione un input da NumKeyb e nel caso lometto in barcodeIn e processo...
|
||||
/// </summary>
|
||||
private void checkNumKeyIn()
|
||||
{
|
||||
if (memLayer.ML.isInSessionObject("numKeyIn"))
|
||||
{
|
||||
barcodeIn = memLayer.ML.StringSessionObj("numKeyIn");
|
||||
// svuoto valore in sessione...
|
||||
memLayer.ML.emptySessionVal("numKeyIn");
|
||||
// controllo barcode...
|
||||
checkBarcode();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// richiesta (ri)stampa UDC
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
public void ristampa()
|
||||
{
|
||||
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 Anime {0}", udcReq), tipoLog.EXCEPTION);
|
||||
}
|
||||
if (fatto) MagClass.magazzino.taSAO.insertQuery(adesso, MagClass.magazzino.CodSoggCurrUser, Postazione.name, Postazione.IP, udcReq, particolare, "stampaUDC", "Ri-Stampato UDC Anime");
|
||||
// raise dell'evento
|
||||
if (eh_reqUpdate != null)
|
||||
{
|
||||
eh_reqUpdate(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// udc da stampare
|
||||
/// </summary>
|
||||
protected string udcReq
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj("udcSelSAO");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// effettua controlli visibilità
|
||||
/// </summary>
|
||||
private void doChecks()
|
||||
{
|
||||
checkBarcode();
|
||||
checkStampa();
|
||||
}
|
||||
/// <summary>
|
||||
/// sistemo labels oggetti
|
||||
/// </summary>
|
||||
private void traduciObj()
|
||||
{
|
||||
//txtBox
|
||||
qta = pezziKitAnime;
|
||||
// buttons
|
||||
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>
|
||||
/// wrapper traduzione
|
||||
/// </summary>
|
||||
/// <param name="lemma"></param>
|
||||
/// <returns></returns>
|
||||
public string traduci(object lemma)
|
||||
{
|
||||
return user_std.UtSn.Traduci(lemma.ToString());
|
||||
}
|
||||
/// <summary>
|
||||
/// indica il codice currKitAnime correntemente selezionato
|
||||
/// </summary>
|
||||
protected string currKitAnime
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj(string.Format("currKitAnime_{0}", uid));
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal(string.Format("currKitAnime_{0}", uid), value, memLayer.ML.confReadBool("keepParticolareSel"));
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// indica se i caratteri vadano forzati a maiuscoli
|
||||
/// </summary>
|
||||
public bool forceUppercase
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.confReadBool("forceUppercase");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// num pezzi kit anime
|
||||
/// </summary>
|
||||
public int pezziKitAnime
|
||||
{
|
||||
get
|
||||
{
|
||||
int answ = 0;
|
||||
try
|
||||
{
|
||||
answ = MagClass.magazzino.taAK.getByKey(currKitAnime)[0].QtaKIT;
|
||||
|
||||
}
|
||||
catch
|
||||
{
|
||||
answ = 0;
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// valore barcode
|
||||
/// </summary>
|
||||
public string barcodeIn
|
||||
{
|
||||
get
|
||||
{
|
||||
return txtBarcode.Text.Trim();
|
||||
}
|
||||
set
|
||||
{
|
||||
txtBarcode.Text = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// qta pezzi x UDC
|
||||
/// </summary>
|
||||
public int qta
|
||||
{
|
||||
get
|
||||
{
|
||||
int _qta = 0;
|
||||
try
|
||||
{
|
||||
_qta = Convert.ToInt32(txtQta.Text.Trim());
|
||||
}
|
||||
catch
|
||||
{
|
||||
_qta = memLayer.ML.cdvi("QtaImballoAnime");
|
||||
}
|
||||
return _qta;
|
||||
}
|
||||
set
|
||||
{
|
||||
txtQta.Text = value.ToString();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// controlla se ci sia un barcode
|
||||
/// </summary>
|
||||
private void checkBarcode()
|
||||
{
|
||||
if (barcodeIn != "")
|
||||
{
|
||||
Postazione.messaggiText = string.Format("Barcode digitato: {0}", barcodeIn);
|
||||
switch (MagClass.tipoBCode_L2K(barcodeIn))
|
||||
{
|
||||
case tipoCodiceBarcode.KitAnime:
|
||||
// imposto il KitAnime corrente
|
||||
currKitAnime = barcodeIn;
|
||||
// controllo esista il KitAnime scansionato
|
||||
var tabRes = MagClass.magazzino.taAK.getByKey(currKitAnime);
|
||||
if (tabRes.Rows.Count == 0)
|
||||
{
|
||||
currKitAnime = "";
|
||||
Postazione.messaggiText += traduci("ERR-ANM-002");
|
||||
Postazione.CssClass = "stileComandoKo";
|
||||
}
|
||||
else
|
||||
{
|
||||
Postazione.messaggiText += traduci("kitSelected");
|
||||
Postazione.CssClass = "stileComandoOk";
|
||||
}
|
||||
// imposto QTA da KIT anime
|
||||
qta = pezziKitAnime;
|
||||
// mostro dettaglio composizione KIT ANIME con qta già correttamente moltiplicata
|
||||
break;
|
||||
case tipoCodiceBarcode.Operatore:
|
||||
// calcolo matricola utente
|
||||
int MatrUtente = -1;
|
||||
if (barcodeIn.StartsWith(preCodSogg))
|
||||
{
|
||||
MatrUtente = DataProxy.obj.taTrascSogg.getByKey(barcodeIn, 0)[0].CodMatricola;
|
||||
}
|
||||
else
|
||||
{
|
||||
MatrUtente = Convert.ToInt32(barcodeIn);
|
||||
}
|
||||
if (MatrUtente >= 0)
|
||||
{
|
||||
// salvo in sessione operatore con AUTH
|
||||
OpAuth.startOpAuth(MatrUtente);
|
||||
// mostro che ho autorizzato...
|
||||
Postazione.messaggiText += traduci("userAuthRec");
|
||||
Postazione.CssClass = "stileComandoOk";
|
||||
// svuoto particolare e qta...
|
||||
currKitAnime = "";
|
||||
qta = 0;
|
||||
Response.Redirect(user_std.pagCorrente);
|
||||
}
|
||||
else
|
||||
{
|
||||
Postazione.messaggiText += traduci("ERR-BCD-001");
|
||||
Postazione.CssClass = "stileComandoND";
|
||||
}
|
||||
break;
|
||||
default:
|
||||
// cerco se sia "0" = reset utente...
|
||||
if (barcodeIn == memLayer.ML.CRS("resetCodSogg"))
|
||||
{
|
||||
// salvo in sessione operatore con AUTH
|
||||
OpAuth.stopAuth();
|
||||
// mostro che ho autorizzato...
|
||||
Postazione.messaggiText += traduci("userAuthRem");
|
||||
Postazione.CssClass = "stileComandoOk";
|
||||
Response.Redirect(user_std.pagCorrente);
|
||||
}
|
||||
Postazione.messaggiText += traduci("ERR-BCD-001");
|
||||
Postazione.CssClass = "stileComandoND";
|
||||
break;
|
||||
}
|
||||
barcodeIn = "";
|
||||
}
|
||||
doUpdate();
|
||||
}
|
||||
/// <summary>
|
||||
/// aggiorna tabella + focus a barcode
|
||||
/// </summary>
|
||||
public void doUpdate()
|
||||
{
|
||||
updateKit();
|
||||
// raise dell'evento
|
||||
if (eh_reqUpdate != null)
|
||||
{
|
||||
eh_reqUpdate(this, new EventArgs());
|
||||
}
|
||||
checkStampa();
|
||||
txtBarcode.Focus();
|
||||
}
|
||||
/// <summary>
|
||||
/// aggiorna visualizzazioen dati particolare
|
||||
/// </summary>
|
||||
private void updateKit()
|
||||
{
|
||||
if (currKitAnime != "")
|
||||
{
|
||||
lblParticolareAttivo.Text = string.Format("{0} <b>{1}</b>", traduci("particSel"), currKitAnime);
|
||||
// aggiungo descrizione del particolare
|
||||
string descr = "";
|
||||
string disegno = "";
|
||||
try
|
||||
{
|
||||
var riga = MagClass.magazzino.taAK.getByKey(currKitAnime)[0];
|
||||
descr = riga.Descrizione;
|
||||
disegno = string.Format("KIT ANIME {0}", currKitAnime);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
lblDescrAttivo.Text = descr;
|
||||
lblDisegno.Text = disegno;
|
||||
}
|
||||
else
|
||||
{
|
||||
lblParticolareAttivo.Text = "...";
|
||||
lblDescrAttivo.Text = "";
|
||||
lblDisegno.Text = "";
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// controllo l'abilitazione alla stampa UDC:
|
||||
/// - particolare ok
|
||||
/// - qta > 0
|
||||
/// altrimenti disabilito btn stampa
|
||||
/// </summary>
|
||||
private void checkStampa()
|
||||
{
|
||||
bool stampaOk = false;
|
||||
if (currKitAnime != "" && qta > 0)
|
||||
{
|
||||
stampaOk = true;
|
||||
}
|
||||
divNote.Visible = stampaOk;
|
||||
}
|
||||
/// <summary>
|
||||
/// genera i barcode di
|
||||
/// - anime
|
||||
/// e lancia la relativa stampa
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void lbtStampaUDC_Click(object sender, EventArgs e)
|
||||
{
|
||||
bool needsRedirect = false;
|
||||
// verifico postazione x procedere...
|
||||
if (Postazione.printer != "n.d.")
|
||||
{
|
||||
// verifico auth utente OPPURE se NON sia richiesta...
|
||||
if (OpAuth.isAuth || !OpAuth.opAuthReq)
|
||||
{
|
||||
string newUdcChild = "";
|
||||
string noteTrim = txtNote.Text.Trim();
|
||||
// effettuo controlli che cod_soggetto e cod particolare siano disponibili...
|
||||
string codSogg = "";
|
||||
string KitAnime = "";
|
||||
try
|
||||
{
|
||||
codSogg = MagClass.magazzino.CodSoggCurrUser;
|
||||
KitAnime = currKitAnime;
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
if (codSogg != "" && KitAnime != "")
|
||||
{
|
||||
// genero cartellino liquidi
|
||||
DateTime adesso = DateTime.Now;
|
||||
try
|
||||
{
|
||||
#if false
|
||||
// creo nuovo UDC del trattamento liquidi
|
||||
newUdcChild = MagClass.magazzino.creaUdc(flusso, "", KitAnime, "", "", "", "", "", 0, memLayer.ML.cdv("CodImballoAnime"), "U", codSogg, qta, 0, 0, adesso, 0, statoUDC, memLayer.ML.cdvi("IdxPosizioneAnime"), "IdxPosizioneAnime", "UDC_ANIMA", noteTrim, "", adesso.Year, Request.UserHostName);
|
||||
|
||||
if (OpAuth.isAuth)
|
||||
{
|
||||
// salvo attributo dell'OpAuth...
|
||||
MagClass.magazzino.taAtt2UDC.Insert(newUdcChild, memLayer.ML.CRS("attrOpAuth"), OpAuth.currAuth.CodSoggetto, DateTime.Now, codSogg);
|
||||
// consumo una auth...
|
||||
OpAuth.currAuth.remAuth--;
|
||||
if (OpAuth.currAuth.remAuth == 0)
|
||||
{
|
||||
OpAuth.stopAuth();
|
||||
needsRedirect = true;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
// registro creazione nuovo UDC
|
||||
MagClass.magazzino.taSAO.insertQuery(adesso, codSogg, Postazione.name, Postazione.IP, newUdcChild, KitAnime, "creaUDC", string.Format("Creato nuovo UDC Anime - qta:{0} {1}", qta, noteTrim));
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
httpLog(string.Format("Errore creazione UDC anime: {0}", exc), tipoLog.EXCEPTION);
|
||||
}
|
||||
// se ho cart stampo!
|
||||
if (newUdcChild != "")
|
||||
{
|
||||
// ora stampo il nuovo cartellino!!!
|
||||
MagClass.magazzino.stampaUdc(newUdcChild, Postazione.printer, tipoCartellino.cartAnime, Request.UserHostName);
|
||||
// incremento timing...
|
||||
adesso = DateTime.Now;
|
||||
adesso = adesso.AddSeconds(1);
|
||||
// registro stampa nuovo UDC
|
||||
MagClass.magazzino.taSAO.insertQuery(adesso, codSogg, Postazione.name, Postazione.IP, newUdcChild, KitAnime, "stampaUDC", "Stampato UDC Anime");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
httpLog(string.Format("Errore persi utente/particolare, ricarico!"), tipoLog.ERROR);
|
||||
Response.Redirect("~/login.aspx");
|
||||
}
|
||||
//
|
||||
}
|
||||
else
|
||||
{
|
||||
Postazione.messaggiText = traduci("noOpAuth");
|
||||
Postazione.CssClass = "stileComandoKo";
|
||||
httpLog(string.Format("Errore manca OpAuth x UDC anime"), tipoLog.ERROR);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Response.Redirect("~/menu.aspx");
|
||||
}
|
||||
// raise dell'evento
|
||||
if (eh_reqUpdate != null)
|
||||
{
|
||||
eh_reqUpdate(this, new EventArgs());
|
||||
}
|
||||
if (needsRedirect)
|
||||
{
|
||||
Response.Redirect(user_std.pagCorrente);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// wrapper per log con salvataggio dell'IP del chiamante
|
||||
/// </summary>
|
||||
/// <param name="_testoPre"></param>
|
||||
/// <returns></returns>
|
||||
public bool httpLog(string _testoPre)
|
||||
{
|
||||
bool answ = false;
|
||||
string postazione_IP = "";
|
||||
try
|
||||
{
|
||||
postazione_IP = string.Format(" | {0} | ", Request.UserHostName);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
logger.lg.scriviLog(postazione_IP + _testoPre);
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// wrapper per log con salvataggio dell'IP del chiamante
|
||||
/// </summary>
|
||||
/// <param name="_testoPre"></param>
|
||||
/// <returns></returns>
|
||||
public bool httpLog(string testoLog, tipoLog tipo)
|
||||
{
|
||||
bool answ = false;
|
||||
string postazione_IP = "";
|
||||
try
|
||||
{
|
||||
postazione_IP = string.Format(" | {0} | ", Request.UserHostName);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
logger.lg.scriviLog(postazione_IP + testoLog, tipo);
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// svuoto le note
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnEmptyNote_Click(object sender, EventArgs e)
|
||||
{
|
||||
txtNote.Text = "";
|
||||
Postazione.messaggiText = traduci("AttesaBCode");
|
||||
Postazione.CssClass = "stileAttesa";
|
||||
// raise dell'evento
|
||||
if (eh_reqUpdate != null)
|
||||
{
|
||||
eh_reqUpdate(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+141
@@ -0,0 +1,141 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <generato automaticamente>
|
||||
// Codice generato da uno strumento.
|
||||
//
|
||||
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
|
||||
// il codice viene rigenerato.
|
||||
// </generato automaticamente>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace GMW.WebUserControls {
|
||||
|
||||
|
||||
public partial class mod_kitAnime {
|
||||
|
||||
/// <summary>
|
||||
/// Controllo BundleReference1.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::Microsoft.AspNet.Web.Optimization.WebForms.BundleReference BundleReference1;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo BundleReference2.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::Microsoft.AspNet.Web.Optimization.WebForms.BundleReference BundleReference2;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo hfAnimeExt.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.HiddenField hfAnimeExt;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblParticolareAttivo.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblParticolareAttivo;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblDescrAttivo.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblDescrAttivo;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblDisegno.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblDisegno;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo divBarcode.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlGenericControl divBarcode;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblBarcode.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblBarcode;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo txtBarcode.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox txtBarcode;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo divNote.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlGenericControl divNote;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo txtNote.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox txtNote;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo btnEmptyNote.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Button btnEmptyNote;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lbtStampaUDC.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.LinkButton lbtStampaUDC;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo txtQta.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox txtQta;
|
||||
}
|
||||
}
|
||||
@@ -4734,7 +4734,7 @@ SELECT CodKIT, Descrizione, QtaKIT FROM AnagKit WHERE (CodKIT = @CodKIT)</Comman
|
||||
<Mapping SourceColumn="QtaKIT" DataSetColumn="QtaKIT" />
|
||||
</Mappings>
|
||||
<Sources>
|
||||
<DbSource ConnectionRef="GMWConnectionString (Settings)" DbObjectName="TK_GMW.dbo.stp_AK_deleteQuery" DbObjectType="StoredProcedure" GenerateShortCommands="true" GeneratorSourceName="deleteQuery" Modifier="Public" Name="deleteQuery" QueryType="NoData" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDataBy1" UserSourceName="deleteQuery">
|
||||
<DbSource ConnectionRef="GMWConnectionString (Settings)" DbObjectName="TK_GMW.dbo.stp_AK_deleteQuery" DbObjectType="StoredProcedure" GenerateShortCommands="true" GeneratorSourceName="deleteQuery" Modifier="Public" Name="deleteQuery" QueryType="NoData" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDataBy" UserSourceName="deleteQuery">
|
||||
<SelectCommand>
|
||||
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
|
||||
<CommandText>dbo.stp_AK_deleteQuery</CommandText>
|
||||
@@ -4745,7 +4745,18 @@ SELECT CodKIT, Descrizione, QtaKIT FROM AnagKit WHERE (CodKIT = @CodKIT)</Comman
|
||||
</DbCommand>
|
||||
</SelectCommand>
|
||||
</DbSource>
|
||||
<DbSource ConnectionRef="GMWConnectionString (Settings)" DbObjectName="TK_GMW.dbo.stp_AK_insertQuery" DbObjectType="StoredProcedure" GenerateShortCommands="true" GeneratorSourceName="insertQuery" Modifier="Public" Name="insertQuery" QueryType="NoData" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDataBy" UserSourceName="insertQuery">
|
||||
<DbSource ConnectionRef="GMWConnectionString (Settings)" DbObjectName="TK_GMW.dbo.stp_AK_getByKey" DbObjectType="StoredProcedure" GenerateMethods="Get" GenerateShortCommands="true" GeneratorGetMethodName="getByKey" GetMethodModifier="Public" GetMethodName="getByKey" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="getByKey" UserSourceName="getByKey">
|
||||
<SelectCommand>
|
||||
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
|
||||
<CommandText>dbo.stp_AK_getByKey</CommandText>
|
||||
<Parameters>
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="nvarchar" DbType="String" Direction="Input" ParameterName="@CodKIT" Precision="0" ProviderType="NVarChar" Scale="0" Size="15" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
</Parameters>
|
||||
</DbCommand>
|
||||
</SelectCommand>
|
||||
</DbSource>
|
||||
<DbSource ConnectionRef="GMWConnectionString (Settings)" DbObjectName="TK_GMW.dbo.stp_AK_insertQuery" DbObjectType="StoredProcedure" GenerateShortCommands="true" GeneratorSourceName="insertQuery" Modifier="Public" Name="insertQuery" QueryType="NoData" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDataBy1" UserSourceName="insertQuery">
|
||||
<SelectCommand>
|
||||
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
|
||||
<CommandText>dbo.stp_AK_insertQuery</CommandText>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
Changes to this file may cause incorrect behavior and will be lost if
|
||||
the code is regenerated.
|
||||
</autogenerated>-->
|
||||
<DiagramLayout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ex:showrelationlabel="False" ViewPortX="375" ViewPortY="565" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">
|
||||
<DiagramLayout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ex:showrelationlabel="False" ViewPortX="-71" ViewPortY="565" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">
|
||||
<Shapes>
|
||||
<Shape ID="DesignTable:ElencoCartellini" ZOrder="6" X="147" Y="204" Height="457" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="306" />
|
||||
<Shape ID="DesignTable:AnagMag" ZOrder="45" X="1334" Y="24" Height="273" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="122" />
|
||||
@@ -36,15 +36,15 @@
|
||||
<Shape ID="DesignTable:stp_UDC_FifoByParticolareBlocco" ZOrder="36" X="1301" Y="2025" Height="181" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="122" />
|
||||
<Shape ID="DesignTable:ElencoPostazioni" ZOrder="21" X="1300" Y="1272" Height="250" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="122" />
|
||||
<Shape ID="DesignTable:AnagLinee" ZOrder="37" X="1304" Y="1551" Height="457" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="306" />
|
||||
<Shape ID="DesignTable:stp_ParticolareInOutOk" ZOrder="19" X="874" Y="2042" Height="113" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="54" />
|
||||
<Shape ID="DesignTable:stp_ParticolareInOutOk" ZOrder="19" X="874" Y="2086" Height="113" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="54" />
|
||||
<Shape ID="DesignTable:Attr2UDC" ZOrder="12" X="125" Y="718" Height="296" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="168" />
|
||||
<Shape ID="DesignTable:ElencoAssiemi" ZOrder="26" X="-215" Y="285" Height="434" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="283" />
|
||||
<Shape ID="DesignTable:AL2UDC" ZOrder="18" X="-211" Y="-25" Height="273" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="122" />
|
||||
<Shape ID="DesignTable:ElencoTrattamenti" ZOrder="24" X="-219" Y="723" Height="434" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="283" />
|
||||
<Shape ID="DesignTable:v_A2U2D" ZOrder="41" X="-213" Y="1173" Height="250" Width="231" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="145" />
|
||||
<Shape ID="DesignTable:UDC_check4delete" ZOrder="38" X="-218" Y="1443" Height="113" Width="299" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="54" />
|
||||
<Shape ID="DesignTable:UDC_check4delete" ZOrder="38" X="-218" Y="1441" Height="113" Width="299" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="54" />
|
||||
<Shape ID="DesignTable:RelKit2Part" ZOrder="5" X="1203" Y="2224" Height="227" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="99" />
|
||||
<Shape ID="DesignTable:AnagKit" ZOrder="3" X="760" Y="2196" Height="227" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="99" />
|
||||
<Shape ID="DesignTable:AnagKit" ZOrder="3" X="760" Y="2196" Height="250" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="99" />
|
||||
</Shapes>
|
||||
<Connectors>
|
||||
<Connector ID="DesignRelation:FK_PosizioneUdcCorrente_ElencoCartellini" ZOrder="57" LineWidth="11">
|
||||
|
||||
Generated
+31
-8
@@ -46379,7 +46379,7 @@ SELECT CodKIT, Descrizione, QtaKIT FROM AnagKit WHERE (CodKIT = @CodKIT)";
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
|
||||
private void InitCommandCollection() {
|
||||
this._commandCollection = new global::System.Data.SqlClient.SqlCommand[4];
|
||||
this._commandCollection = new global::System.Data.SqlClient.SqlCommand[5];
|
||||
this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
|
||||
this._commandCollection[0].Connection = this.Connection;
|
||||
this._commandCollection[0].CommandText = "SELECT CodKIT, Descrizione, QtaKIT FROM dbo.AnagKit";
|
||||
@@ -46392,21 +46392,27 @@ SELECT CodKIT, Descrizione, QtaKIT FROM AnagKit WHERE (CodKIT = @CodKIT)";
|
||||
this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_CodKIT", global::System.Data.SqlDbType.NVarChar, 15, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
|
||||
this._commandCollection[2] = new global::System.Data.SqlClient.SqlCommand();
|
||||
this._commandCollection[2].Connection = this.Connection;
|
||||
this._commandCollection[2].CommandText = "dbo.stp_AK_insertQuery";
|
||||
this._commandCollection[2].CommandText = "dbo.stp_AK_getByKey";
|
||||
this._commandCollection[2].CommandType = global::System.Data.CommandType.StoredProcedure;
|
||||
this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
|
||||
this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodKIT", global::System.Data.SqlDbType.NVarChar, 15, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
|
||||
this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Descrizione", global::System.Data.SqlDbType.VarChar, 250, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
|
||||
this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@QtaKIT", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
|
||||
this._commandCollection[3] = new global::System.Data.SqlClient.SqlCommand();
|
||||
this._commandCollection[3].Connection = this.Connection;
|
||||
this._commandCollection[3].CommandText = "dbo.stp_AK_updateQuery";
|
||||
this._commandCollection[3].CommandText = "dbo.stp_AK_insertQuery";
|
||||
this._commandCollection[3].CommandType = global::System.Data.CommandType.StoredProcedure;
|
||||
this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
|
||||
this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_CodKIT", global::System.Data.SqlDbType.NVarChar, 15, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
|
||||
this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodKIT", global::System.Data.SqlDbType.NVarChar, 15, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
|
||||
this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Descrizione", global::System.Data.SqlDbType.VarChar, 250, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
|
||||
this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@QtaKIT", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
|
||||
this._commandCollection[4] = new global::System.Data.SqlClient.SqlCommand();
|
||||
this._commandCollection[4].Connection = this.Connection;
|
||||
this._commandCollection[4].CommandText = "dbo.stp_AK_updateQuery";
|
||||
this._commandCollection[4].CommandType = global::System.Data.CommandType.StoredProcedure;
|
||||
this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
|
||||
this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_CodKIT", global::System.Data.SqlDbType.NVarChar, 15, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
|
||||
this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodKIT", global::System.Data.SqlDbType.NVarChar, 15, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
|
||||
this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Descrizione", global::System.Data.SqlDbType.VarChar, 250, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
|
||||
this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@QtaKIT", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
@@ -46433,6 +46439,23 @@ SELECT CodKIT, Descrizione, QtaKIT FROM AnagKit WHERE (CodKIT = @CodKIT)";
|
||||
return dataTable;
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
|
||||
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
|
||||
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)]
|
||||
public virtual DS_magazzino.AnagKitDataTable getByKey(string CodKIT) {
|
||||
this.Adapter.SelectCommand = this.CommandCollection[2];
|
||||
if ((CodKIT == null)) {
|
||||
this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value;
|
||||
}
|
||||
else {
|
||||
this.Adapter.SelectCommand.Parameters[1].Value = ((string)(CodKIT));
|
||||
}
|
||||
DS_magazzino.AnagKitDataTable dataTable = new DS_magazzino.AnagKitDataTable();
|
||||
this.Adapter.Fill(dataTable);
|
||||
return dataTable;
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
|
||||
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
|
||||
@@ -46617,7 +46640,7 @@ SELECT CodKIT, Descrizione, QtaKIT FROM AnagKit WHERE (CodKIT = @CodKIT)";
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
|
||||
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
|
||||
public virtual int insertQuery(string CodKIT, string Descrizione, global::System.Nullable<int> QtaKIT) {
|
||||
global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[2];
|
||||
global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[3];
|
||||
if ((CodKIT == null)) {
|
||||
command.Parameters[1].Value = global::System.DBNull.Value;
|
||||
}
|
||||
@@ -46657,7 +46680,7 @@ SELECT CodKIT, Descrizione, QtaKIT FROM AnagKit WHERE (CodKIT = @CodKIT)";
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
|
||||
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
|
||||
public virtual int updateQuery(string Original_CodKIT, string CodKIT, string Descrizione, global::System.Nullable<int> QtaKIT) {
|
||||
global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[3];
|
||||
global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[4];
|
||||
if ((Original_CodKIT == null)) {
|
||||
command.Parameters[1].Value = global::System.DBNull.Value;
|
||||
}
|
||||
|
||||
@@ -3364,6 +3364,71 @@ namespace GMW_data
|
||||
return answ;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Decodifica il tipo barcode acquisito
|
||||
/// checkL3 = verifica i livelli sino L3
|
||||
/// L1: comandi/matricole/DT e BCD
|
||||
/// L2: KIT (Anime)
|
||||
/// </summary>
|
||||
public static tipoCodiceBarcode tipoBCode_L2K(string valore)
|
||||
{
|
||||
tipoCodiceBarcode answ = tipoCodiceBarcode.ND;
|
||||
int matricola = -1;
|
||||
// provo a convertire in intero barcode x verifica eventuale matricola...
|
||||
try
|
||||
{
|
||||
matricola = Convert.ToInt32(valore);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
// controllo non si tratti di un comando...
|
||||
string preCmd = memLayer.ML.AppConf["prefComandi"];
|
||||
string preDT = memLayer.ML.AppConf["prefDateTime"];
|
||||
string preBCD = memLayer.ML.AppConf["prefBCode"];
|
||||
string preCodSogg = memLayer.ML.AppConf["prefCodSogg"];
|
||||
if (valore.StartsWith(preCmd))
|
||||
{
|
||||
answ = tipoCodiceBarcode.Comando;
|
||||
}
|
||||
else if ((TermClass.Ter.riconosciBarcode(valore) == tipoCodiceBarcode.KitAnime))
|
||||
{
|
||||
answ = tipoCodiceBarcode.KitAnime;
|
||||
}
|
||||
else if (valore.StartsWith(preBCD))
|
||||
{
|
||||
answ = tipoCodiceBarcode.BarCodeCMD;
|
||||
}
|
||||
else if (valore.StartsWith(preDT))
|
||||
{
|
||||
// se lungh = 2+10 (DT+yyMMddHHmm) è SOLO datetime, altrimenti è DateTimeLine
|
||||
if (valore.Length > 12)
|
||||
{
|
||||
answ = tipoCodiceBarcode.DateTimeLine;
|
||||
}
|
||||
else
|
||||
{
|
||||
answ = tipoCodiceBarcode.DateTime;
|
||||
}
|
||||
}
|
||||
else if (valore.StartsWith(preCodSogg))
|
||||
{
|
||||
// cerco cod soggetto...
|
||||
if (DataProxy.obj.taTrascSogg.getByKey(valore, 0).Rows.Count == 1)
|
||||
{
|
||||
answ = tipoCodiceBarcode.Operatore;
|
||||
}
|
||||
}
|
||||
else if (matricola >= 0)
|
||||
{
|
||||
if (DataProxy.obj.taTrascSogg.getByKey("", matricola).Rows.Count == 1)
|
||||
{
|
||||
answ = tipoCodiceBarcode.Operatore;
|
||||
}
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region area utenti
|
||||
|
||||
+15
-3
@@ -9,7 +9,7 @@ namespace GMW_data
|
||||
public class TermClass
|
||||
{
|
||||
#region area table adapters
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// init dei table adapters
|
||||
/// </summary>
|
||||
@@ -238,7 +238,15 @@ namespace GMW_data
|
||||
answ = tipoCodiceBarcode.Operatore;
|
||||
break;
|
||||
case "K":
|
||||
answ = tipoCodiceBarcode.ListaPrelievo;
|
||||
// se è "KITAN" allora è tipo KIT...
|
||||
if (barcodeIN.Substring(0, 5) == "KITAN")
|
||||
{
|
||||
answ = tipoCodiceBarcode.KitAnime;
|
||||
}
|
||||
else
|
||||
{
|
||||
answ = tipoCodiceBarcode.ListaPrelievo;
|
||||
}
|
||||
break;
|
||||
//case "P":
|
||||
//case "A":
|
||||
@@ -359,7 +367,11 @@ public enum tipoCodiceBarcode
|
||||
/// <summary>
|
||||
/// Marcatore DataOra e Linea
|
||||
/// </summary>
|
||||
DateTimeLine
|
||||
DateTimeLine,
|
||||
/// <summary>
|
||||
/// Tipologia di KIT ANIME
|
||||
/// </summary>
|
||||
KitAnime
|
||||
}
|
||||
/// <summary>
|
||||
/// elenco degli esiti per una sessione di login da terminalino
|
||||
|
||||
Reference in New Issue
Block a user