Merge branch 'develop'
This commit is contained in:
+1
-1
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<publishData>
|
||||
<publishProfile publishUrl="https://10.74.82.218:8172/MsDeploy.axd" deleteExistingFiles="False" ftpAnonymousLogin="False" ftpPassiveMode="True" msdeploySite="Default Web Site/SP_GMW" msdeploySiteID="" msdeployRemoteSitePhysicalPath="" msdeployAllowUntrustedCertificate="True" msdeploySkipExtraFilesOnServer="False" msdeployMarkAsApp="True" profileName="Test218" publishMethod="MSDeploy" replaceMatchingFiles="True" userName="Administrator" savePWD="True" userPWD="AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAA/oPi/XPymEOp3XKJvf8o/wAAAAACAAAAAAADZgAAwAAAABAAAACEKq9jdeQaxhDe68oZKYwpAAAAAASAAACgAAAAEAAAAFTHhR1edBiuZc+n1sCCQqoQAAAALpMq98usuNVjQphuoZJDQRQAAABCRQygcfe9/G9eN+4FovXeMTpB4g==" SelectedForPublish="False" />
|
||||
<publishProfile publishUrl="https://10.74.82.218:8172/MsDeploy.axd" deleteExistingFiles="False" ftpAnonymousLogin="False" ftpPassiveMode="True" msdeploySite="Default Web Site/GMW" msdeploySiteID="" msdeployRemoteSitePhysicalPath="" msdeployAllowUntrustedCertificate="True" msdeploySkipExtraFilesOnServer="False" msdeployMarkAsApp="True" profileName="Test218" publishMethod="MSDeploy" replaceMatchingFiles="True" userName="Administrator" savePWD="True" userPWD="AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAAFmNUguGW/kK/L084ZvFUuQAAAAACAAAAAAADZgAAwAAAABAAAACOKVLdo8vy7xIFWMZN+E6yAAAAAASAAACgAAAAEAAAAKTfvX9pbHpTrLWOqbjSCZkQAAAAfj4xQ2oN9lhMTkawQ0sG7BQAAABx1PZJt9vN0pXYFLElCKHdtizRXw==" SelectedForPublish="True" />
|
||||
</publishData>
|
||||
@@ -161,6 +161,7 @@
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="consumoFusi.aspx" />
|
||||
<Content Include="ExportExcel_SAO.aspx" />
|
||||
<Content Include="fusiTK.aspx" />
|
||||
<Content Include="gestPrinterPost.aspx" />
|
||||
@@ -251,6 +252,13 @@
|
||||
<Compile Include="chLang.aspx.designer.cs">
|
||||
<DependentUpon>chLang.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="consumoFusi.aspx.cs">
|
||||
<DependentUpon>consumoFusi.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="consumoFusi.aspx.designer.cs">
|
||||
<DependentUpon>consumoFusi.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Default.aspx.cs">
|
||||
<DependentUpon>Default.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
@@ -574,6 +582,13 @@
|
||||
<Compile Include="WebUserControls\mod_confMag.ascx.designer.cs">
|
||||
<DependentUpon>mod_confMag.ascx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControls\mod_consumoFusi.ascx.cs">
|
||||
<DependentUpon>mod_consumoFusi.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControls\mod_consumoFusi.ascx.designer.cs">
|
||||
<DependentUpon>mod_consumoFusi.ascx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControls\mod_delibera.ascx.cs">
|
||||
<DependentUpon>mod_delibera.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
@@ -1193,6 +1208,7 @@
|
||||
<Content Include="WebUserControls\mod_barPlot.ascx" />
|
||||
<Content Include="WebUserControls\mod_chLang.ascx" />
|
||||
<Content Include="WebUserControls\mod_confMag.ascx" />
|
||||
<Content Include="WebUserControls\mod_consumoFusi.ascx" />
|
||||
<Content Include="WebUserControls\mod_detailCelle.ascx" />
|
||||
<Content Include="WebUserControls\mod_detailImballi.ascx" />
|
||||
<Content Include="WebUserControls\mod_detailOperatori.ascx" />
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
<add key="IdxPosizioneOdette" value="24" xdt:Transform="SetAttributes" xdt:Locator="Match(key)" />
|
||||
<add key="IdxPosizioneLiquidi" value="24" xdt:Transform="SetAttributes" xdt:Locator="Match(key)" />
|
||||
<add key="IdxPosizioneTrattamenti" value="8484" xdt:Transform="SetAttributes" xdt:Locator="Match(key)" />
|
||||
<add key="IdxPosizioneFusi" value="3" xdt:Transform="SetAttributes" xdt:Locator="Match(key)" />
|
||||
<!--Setup stampa cartellini-->
|
||||
<add key="printerCartCompleto" value="\\SRV-DEV01\MPC2500-Copy" xdt:Transform="SetAttributes" xdt:Locator="Match(key)" />
|
||||
<add key="printerCartAnime" value="\\SRV-DEV01\MPC2500-Copy"/>
|
||||
|
||||
@@ -43,6 +43,7 @@
|
||||
<add key="IdxPosizioneOdette" value="24" xdt:Transform="SetAttributes" xdt:Locator="Match(key)" />
|
||||
<add key="IdxPosizioneLiquidi" value="24" xdt:Transform="SetAttributes" xdt:Locator="Match(key)" />
|
||||
<add key="IdxPosizioneTrattamenti" value="8484" xdt:Transform="SetAttributes" xdt:Locator="Match(key)" />
|
||||
<add key="IdxPosizioneFusi" value="3" xdt:Transform="SetAttributes" xdt:Locator="Match(key)" />
|
||||
<!--Setup stampa cartellini-->
|
||||
<add key="printerCartCompleto" value="\\SRV-DEV01\MPC2500-Copy" xdt:Transform="SetAttributes" xdt:Locator="Match(key)" />
|
||||
<add key="printerCartAnime" value="\\SRV-PRODTK01\Kyocera_FS-1370dn" xdt:Transform="SetAttributes" xdt:Locator="Match(key)" />
|
||||
|
||||
+1
-1
@@ -61,7 +61,7 @@
|
||||
<add key="appName" value="GMW" />
|
||||
<add key="SiteName" value="Tekal" />
|
||||
<add key="mainRev" value="2.1" />
|
||||
<add key="minRev" value="515" />
|
||||
<add key="minRev" value="516" />
|
||||
<add key="copyRight" value="SteamWare © 2010-2012" />
|
||||
<add key="_allowForceUser" value="true" />
|
||||
<add key="_safePages" value="jumper.aspx#unauthorized.aspx#allegati.aspx#forceUser.aspx#login.aspx#test.aspx#istruzioni.aspx#Test.aspx" />
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_consumoFusi.ascx.cs" Inherits="GMW.WebUserControls.mod_consumoFusi" %>
|
||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||
<asp:Panel runat="server" ID="pnlAll" CssClass="stileAttesa" Height="100%">
|
||||
<div style="height: 100%;">
|
||||
<div style="float: none; text-align: center; margin: auto;">
|
||||
<div class="fullPageHeader">
|
||||
<div style="float: left;">
|
||||
<asp:Label runat="server" ID="lblPostazione" />
|
||||
</div>
|
||||
<div style="float: right;">
|
||||
<asp:Label runat="server" ID="lblPrinter" />
|
||||
</div>
|
||||
<div>
|
||||
<asp:Label runat="server" ID="lblCurrentPage" Text="Pag Corrente" Font-Size="16pt" ForeColor="White" />
|
||||
<br />
|
||||
<asp:HyperLink runat="server" ID="hlMenu" NavigateUrl="~/menu.aspx" Text="Main Menu" />
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<asp:Label runat="server" ID="lblGitterBoxAttivo" Font-Size="36pt" Text="- no data -" />
|
||||
</div>
|
||||
<div class="msgBoxBarcode">
|
||||
<asp:Label runat="server" ID="lblMessaggi" Text="attesa input utente" Font-Size="18pt" />
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div style="float: none; padding: 4px; text-align: center; margin: auto;">
|
||||
<div>
|
||||
<asp:Label runat="server" ID="lblBarcode" Text="Barcode" />
|
||||
<br />
|
||||
<asp:TextBox runat="server" ID="txtBarcode" Height="60px" Width="480px" Font-Size="32pt" AutoPostBack="True" Style="text-align: center" />
|
||||
<asp:AutoCompleteExtender ID="aceParticolare" runat="server" TargetControlID="txtBarcode" ServicePath="~/WS/AutoCompletamento.asmx" ServiceMethod="elencoParticolari" MinimumPrefixLength="2" CompletionInterval="200" />
|
||||
</div>
|
||||
<div style="padding-top: 10; padding-bottom: 10;">
|
||||
<div style="padding-top: 10; padding-bottom: 10;">
|
||||
<asp:Label runat="server" ID="lblConsuma" Font-Size="24pt" />
|
||||
</div>
|
||||
|
||||
<div style="padding-top: 10; padding-bottom: 10;">
|
||||
<asp:Button ID="btnConsuma" runat="server" Font-Size="20pt" Height="120px" OnClick="btnConsuma_Click" Width="300px" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</asp:Panel>
|
||||
@@ -0,0 +1,308 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using SteamWare;
|
||||
using GMW_data;
|
||||
|
||||
namespace GMW.WebUserControls
|
||||
{
|
||||
public partial class mod_consumoFusi : System.Web.UI.UserControl
|
||||
{
|
||||
/// <summary>
|
||||
/// caricamento pagina
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
calcolaPostazione();
|
||||
traduciObj();
|
||||
}
|
||||
doChecks();
|
||||
lblGitterBoxAttivo.Text = "";
|
||||
if (currUdcFrom != "")
|
||||
{
|
||||
lblGitterBoxAttivo.Text += string.Format("UDC FROM: <b>{0}</b>", currUdcFrom);
|
||||
}
|
||||
if (lblGitterBoxAttivo.Text == "")
|
||||
{
|
||||
lblGitterBoxAttivo.Text = "...";
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// effettua controlli visibilità
|
||||
/// </summary>
|
||||
private void doChecks()
|
||||
{
|
||||
checkBarcode();
|
||||
checkConsuma();
|
||||
}
|
||||
/// <summary>
|
||||
/// sistemo labels oggetti
|
||||
/// </summary>
|
||||
private void traduciObj()
|
||||
{
|
||||
// labels
|
||||
lblPostazione.Text = string.Format("{2}: {0} ({1})", postazione_name, postazione_IP, traduci("postazione"));
|
||||
lblPrinter.Text = string.Format("{1}: {0}", postazione_printer, traduci("stampante"));
|
||||
lblCurrentPage.Text = traduci(PagCorrente);
|
||||
// buttons
|
||||
btnConsuma.Text = traduci("btnConsumaUdcF10");
|
||||
}
|
||||
/// <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>
|
||||
/// 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 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 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 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>
|
||||
/// indica UDC FROM (F10) selezionato
|
||||
/// </summary>
|
||||
protected string currUdcFrom
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj("currUdcFrom");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("currUdcFrom", value, false);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// indica se i caratteri vadano forzati a maiuscoli
|
||||
/// </summary>
|
||||
public bool forceUppercase
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.confReadBool("forceUppercase");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// decodifica il tipo barcode acquisito
|
||||
/// </summary>
|
||||
public tipoCodiceBarcode tipoBCode
|
||||
{
|
||||
get
|
||||
{
|
||||
tipoCodiceBarcode answ = tipoCodiceBarcode.ND;
|
||||
int trovati = 0;
|
||||
// controllo non si tratti di un comando...
|
||||
string preCmd = memLayer.ML.confReadString("prefComandi");
|
||||
if (barcodeIn.StartsWith(preCmd))
|
||||
{
|
||||
answ = tipoCodiceBarcode.Comando;
|
||||
}
|
||||
// controllo se sia un particolare "P"
|
||||
else if (barcodeIn.StartsWith("P"))
|
||||
{
|
||||
answ = tipoCodiceBarcode.Particolare;
|
||||
}
|
||||
else
|
||||
{
|
||||
try
|
||||
{
|
||||
// cerco tra gitterbox (UDC)...
|
||||
trovati = MagClass.magazzino.taCartellini.getByUdc(barcodeIn).Rows.Count;
|
||||
if (trovati > 0)
|
||||
{
|
||||
answ = tipoCodiceBarcode.UDC;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// valore barcode
|
||||
/// </summary>
|
||||
public string barcodeIn
|
||||
{
|
||||
get
|
||||
{
|
||||
return txtBarcode.Text.Trim();
|
||||
}
|
||||
set
|
||||
{
|
||||
txtBarcode.Text = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// controlla se ci sia un barcode
|
||||
/// </summary>
|
||||
private void checkBarcode()
|
||||
{
|
||||
if (barcodeIn != "")
|
||||
{
|
||||
DS_Applicazione.ElencoCartelliniRow rigaCart;
|
||||
string tipoImballo = "";
|
||||
lblMessaggi.Text = string.Format("Barcode digitato: {0}", barcodeIn);
|
||||
switch (tipoBCode)
|
||||
{
|
||||
|
||||
case tipoCodiceBarcode.UDC:
|
||||
// procedo solo se UDC esistente
|
||||
if (MagClass.magazzino.checkUDC(barcodeIn))
|
||||
{
|
||||
// cerco di recuperare riga UDC
|
||||
try
|
||||
{
|
||||
rigaCart = DataProxy.obj.taCartellini.stp_getByUdc(barcodeIn)[0];
|
||||
tipoImballo = rigaCart.CodImballo;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
// salvo UDC from
|
||||
currUdcFrom = barcodeIn;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
lblMessaggi.Text += " - codice <b>non riconosciuto</b>!";
|
||||
pnlAll.CssClass = "stileComandoND";
|
||||
break;
|
||||
}
|
||||
barcodeIn = "";
|
||||
}
|
||||
else
|
||||
{
|
||||
lblMessaggi.Text = "...attesa barcode...";
|
||||
}
|
||||
//grView.DataBind();
|
||||
txtBarcode.Focus();
|
||||
}
|
||||
/// <summary>
|
||||
/// controllo abilitazione consumo
|
||||
/// </summary>
|
||||
private void checkConsuma()
|
||||
{
|
||||
bool consumaOk = false;
|
||||
if (currUdcFrom != "")
|
||||
{
|
||||
consumaOk = true;
|
||||
}
|
||||
btnConsuma.Enabled = consumaOk;
|
||||
}
|
||||
/// <summary>
|
||||
/// genera i barcode di
|
||||
/// - trattamenti
|
||||
/// - nuovo x pezzi liquidi
|
||||
/// e lancia la relativa stampa
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnConsuma_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (currUdcFrom != "")
|
||||
{
|
||||
// controllo se UDC non sia già consumato...
|
||||
if (MagClass.magazzino.udcMpIsConsumabile(currUdcFrom))
|
||||
{
|
||||
// consumo UDC
|
||||
MagClass.magazzino.scaricaUdcMpWip(currUdcFrom, Request.UserHostName);
|
||||
}
|
||||
// indico UDC consumato!
|
||||
lblMessaggi.Text = string.Format("{0} {1}", traduci("effettuatoConsumoUDC"), currUdcFrom);
|
||||
currUdcFrom = "";
|
||||
lblGitterBoxAttivo.Text = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+123
@@ -0,0 +1,123 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace GMW.WebUserControls {
|
||||
|
||||
|
||||
public partial class mod_consumoFusi {
|
||||
|
||||
/// <summary>
|
||||
/// pnlAll 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.Panel pnlAll;
|
||||
|
||||
/// <summary>
|
||||
/// lblPostazione 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.Label lblPostazione;
|
||||
|
||||
/// <summary>
|
||||
/// lblPrinter 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.Label lblPrinter;
|
||||
|
||||
/// <summary>
|
||||
/// lblCurrentPage 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.Label lblCurrentPage;
|
||||
|
||||
/// <summary>
|
||||
/// hlMenu 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.HyperLink hlMenu;
|
||||
|
||||
/// <summary>
|
||||
/// lblGitterBoxAttivo 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.Label lblGitterBoxAttivo;
|
||||
|
||||
/// <summary>
|
||||
/// lblMessaggi 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.Label lblMessaggi;
|
||||
|
||||
/// <summary>
|
||||
/// lblBarcode 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.Label lblBarcode;
|
||||
|
||||
/// <summary>
|
||||
/// txtBarcode 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.TextBox txtBarcode;
|
||||
|
||||
/// <summary>
|
||||
/// aceParticolare control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::AjaxControlToolkit.AutoCompleteExtender aceParticolare;
|
||||
|
||||
/// <summary>
|
||||
/// lblConsuma 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.Label lblConsuma;
|
||||
|
||||
/// <summary>
|
||||
/// btnConsuma 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.Button btnConsuma;
|
||||
}
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,5 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/WebMasterPages/AjaxSimpleFull.Master" AutoEventWireup="true" CodeBehind="consumoFusi.aspx.cs" Inherits="GMW.consumoFusi" %>
|
||||
<%@ Register src="WebUserControls/mod_consumoFusi.ascx" tagname="mod_consumoFusi" tagprefix="uc1" %>
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
|
||||
<uc1:mod_consumoFusi ID="mod_consumoFusi1" runat="server" />
|
||||
</asp:Content>
|
||||
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace GMW
|
||||
{
|
||||
public partial class consumoFusi : System.Web.UI.Page
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Generated
+24
@@ -0,0 +1,24 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace GMW {
|
||||
|
||||
|
||||
public partial class consumoFusi {
|
||||
|
||||
/// <summary>
|
||||
/// mod_consumoFusi1 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::GMW.WebUserControls.mod_consumoFusi mod_consumoFusi1;
|
||||
}
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -420,6 +420,8 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="SqlScripts\V1.2\GMW_410_TEKAL\Sincroniz da TK_GMWTest a TK_GMW NON USARE.txt" />
|
||||
<None Include="SqlScripts\V2.1\GMW_00516.sql" />
|
||||
<None Include="SqlScripts\Vocabolario\vocab_516.sql" />
|
||||
<None Include="SqlScripts\V2.1\GMW_00514.sql" />
|
||||
<None Include="SqlScripts\Vocabolario\vocab_514.sql" />
|
||||
<None Include="SqlScripts\V2.1\GMW_00512.sql" />
|
||||
|
||||
@@ -509,16 +509,16 @@ namespace GMW_data
|
||||
/// <param name="CodStampo">Codice dello stampo</param>
|
||||
/// <param name="Esponente">codice dell'esponente dello stampo</param>
|
||||
/// <param name="Figura">Codice figura</param>
|
||||
/// <param name="DataRif">Data di rif per la dichiarazione</param>
|
||||
/// <param name="TurnoRif">Turno di rif per la dichiarazione</param>
|
||||
/// <param name="CodImballo">codice dell'imballo (tipo cassone) - string LIBERO (non facciamo controlli in input)</param>
|
||||
/// <param name="CodSoggetto">codice dell'operatore</param>
|
||||
/// <param name="UDC_Parent">codice dell'UDC parent (UDC della tara)</param>
|
||||
/// <param name="tara">peso in kg (0 se non noto) da associare all'UDC come tara del contenitore</param>
|
||||
/// <param name="CodImballo">codice dell'imballo (tipo cassone) - string LIBERO (non facciamo controlli in input)</param>
|
||||
/// <param name="CodTipoDichiarazione">tipo di dichiarazione (vedere relativa anagrafica consentita, es U=uomo, M=macchina...)</param>
|
||||
/// <param name="CodSoggetto">codice dell'operatore</param>
|
||||
/// <param name="Quantita">numero pezzi associati all'UDC</param>
|
||||
/// <param name="PesoTot">Peso totale rilevato</param>
|
||||
/// <param name="PesoCad">Peso unitario rilevato</param>
|
||||
/// <param name="DataRif">Data di rif per la dichiarazione</param>
|
||||
/// <param name="TurnoRif">Turno di rif per la dichiarazione</param>
|
||||
/// <param name="CodStato">Codice dello stato del pezzo (da anagrafica: sabbiato, ...)</param>
|
||||
/// <param name="CodMag">Codice del magazzino in cui inserire l'UDC</param>
|
||||
/// <param name="defIdxPosiz">NOME della posizione default in cui creare UDC</param>
|
||||
|
||||
@@ -0,0 +1,578 @@
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
INSERT INTO dbo.Permessi
|
||||
VALUES ('POST_fusiCons', 'consumoFusi.aspx', 4, 5, 'ConsFusi', 'ConsFusiExpl')
|
||||
go
|
||||
|
||||
commit transaction
|
||||
go
|
||||
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
INSERT INTO dbo.Permessi2Funzione
|
||||
VALUES ('POST_fusiCons', N'GMW_consFusi', 'S')
|
||||
go
|
||||
|
||||
commit transaction
|
||||
go
|
||||
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
UPDATE AnagPosizioni
|
||||
set idxposizione=3
|
||||
WHERE IdxPosizione=7
|
||||
go
|
||||
|
||||
commit transaction
|
||||
go
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
INSERT INTO dbo.TabTranPosizEventi
|
||||
VALUES (N'UDC_CONS', 3, -3, 0, NULL, N'consumo fusi')
|
||||
INSERT INTO dbo.TabTranPosizEventi
|
||||
VALUES (N'UDC_FUSI', 0, 3, 49, N'Fusi', N'creazione UDC fusi (creare magazzino e blocco x fusi e sostituire 49)')
|
||||
go
|
||||
|
||||
commit transaction
|
||||
go
|
||||
|
||||
set xact_abort on
|
||||
go
|
||||
|
||||
begin transaction
|
||||
go
|
||||
|
||||
set ANSI_NULLS on
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_UDC_insNewFull
|
||||
*
|
||||
* crea un nuovo record nella TabStatoOdpUdc FULL (con pesi, qta...) e restituisce il codice UDC appena creato
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2010.04.28
|
||||
*
|
||||
****************************************/
|
||||
alter PROCEDURE stp_UDC_insNewFull
|
||||
(
|
||||
@CodCS VARCHAR(2),
|
||||
@Flusso VARCHAR(2),
|
||||
@Anno VARCHAR(2),
|
||||
@CodCliente VARCHAR(6),
|
||||
@Particolare VARCHAR(15),
|
||||
@CodImpianto AS VARCHAR(50),
|
||||
@CodStampo VARCHAR(8),
|
||||
@Esponente VARCHAR(6),
|
||||
@Figura VARCHAR(4),
|
||||
@DataFus DATETIME,
|
||||
@TurnoFus INT,
|
||||
@CodImballo VARCHAR(15),
|
||||
@CodSoggetto VARCHAR(17),
|
||||
@Tara FLOAT,
|
||||
@IdxPosizione INT,
|
||||
@CodTipoDichiaraz CHAR(1),
|
||||
@CodEvento VARCHAR(10),
|
||||
@Qta DECIMAL(10,2),
|
||||
@PesoTot FLOAT,
|
||||
@PesoCad FLOAT,
|
||||
@CodStato VARCHAR(50),
|
||||
@UDC_parent VARCHAR(50),
|
||||
@DoDeleteUdcParent BIT,
|
||||
@Note NVARCHAR(500)
|
||||
)
|
||||
AS
|
||||
|
||||
-- DECLARE iniziali
|
||||
DECLARE @UDC AS VARCHAR(50)
|
||||
DECLARE @RagSociale AS VARCHAR(35)
|
||||
DECLARE @DescParticolare AS VARCHAR(30)
|
||||
DECLARE @DescImpianto AS VARCHAR(50)
|
||||
DECLARE @DisegnoGrezzo AS VARCHAR(30)
|
||||
DECLARE @NumCont AS INT
|
||||
DECLARE @numFlu AS INT
|
||||
DECLARE @numUdc AS INT
|
||||
DECLARE @nextUdc AS INT
|
||||
DECLARE @IdxCella AS INT
|
||||
|
||||
SET @UDC_parent = UPPER(@UDC_parent) -- nel caso sia passato in minuscolo
|
||||
|
||||
------------------------------------------------------------------------------------------------------
|
||||
-- Caricamento Dati da anagrafica
|
||||
------------------------------------------------------------------------------------------------------
|
||||
-- cerco la ragione sociale...
|
||||
SET @RagSociale = ISNULL(
|
||||
(
|
||||
SELECT RagSociale
|
||||
FROM RilPro.AnagClienti
|
||||
WHERE (CodCliente = @CodCliente)
|
||||
)
|
||||
, '')
|
||||
|
||||
-- Cerco descrizione del particolare...
|
||||
SET @DescParticolare = ISNULL(
|
||||
(
|
||||
SELECT DescParticolare
|
||||
FROM RilPro.AnagParticolari
|
||||
WHERE (Particolare = @Particolare)
|
||||
)
|
||||
, 'ND')
|
||||
|
||||
-- se non lo trova provo anche nell'anagrafica leghe
|
||||
IF(@DescParticolare = 'ND')-- OR (@DescParticolare is null)
|
||||
BEGIN
|
||||
SET @DescParticolare = ISNULL(
|
||||
(
|
||||
SELECT DescLega
|
||||
FROM RilPro.AnagLeghe
|
||||
WHERE ('L'+CodLega = @Particolare)
|
||||
)
|
||||
, '')
|
||||
END
|
||||
-- cerco codice disegno grezzo
|
||||
SET @DisegnoGrezzo = ISNULL(
|
||||
(
|
||||
SELECT DisegnoGrezzo
|
||||
FROM RilPro.AnagParticolari
|
||||
WHERE (Particolare = @Particolare)
|
||||
)
|
||||
, '')
|
||||
|
||||
-- cerco descrizione Impianto
|
||||
SET @DescImpianto = ISNULL(
|
||||
(
|
||||
SELECT DescImpianto
|
||||
FROM AnagImpianti
|
||||
WHERE (CodImpianto = @CodImpianto)
|
||||
)
|
||||
, '')
|
||||
|
||||
|
||||
-- Calcolo contatore intero successivo x il contenitore...
|
||||
SET @NumCont = (
|
||||
SELECT ISNULL(MAX(NumCont), 0) + 1 AS NumCont
|
||||
FROM ElencoCartellini
|
||||
WHERE (Particolare = @Particolare)
|
||||
AND (DataFus = @DataFus)
|
||||
AND (TurnoFus = @TurnoFus)
|
||||
AND (CodImpianto = @CodImpianto)
|
||||
AND (CodStampo = @CodStampo)
|
||||
AND (Figura = @Figura)
|
||||
)
|
||||
|
||||
|
||||
------------------------------------------------------------------------------------------------------
|
||||
|
||||
------------------------------------------------------------------------------------------------------
|
||||
-- Flusso
|
||||
------------------------------------------------------------------------------------------------------
|
||||
-- controllo se esiste il flusso (bilancia)...
|
||||
SET @numFlu = (
|
||||
SELECT count(*)
|
||||
FROM AnagBilance
|
||||
WHERE CodBilancia = @Flusso
|
||||
)
|
||||
-- ...sennò lo creo...
|
||||
IF(@numFlu = 0)
|
||||
BEGIN
|
||||
-- se c'è inserisco in tab
|
||||
INSERT INTO AnagBilance(CodBilancia, DescrImpianto, CodCS)
|
||||
VALUES (@Flusso, @Flusso, @CodCS)
|
||||
END
|
||||
------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
------------------------------------------------------------------------------------------------------
|
||||
-- UDC
|
||||
------------------------------------------------------------------------------------------------------
|
||||
-- controllo se ci sia già un UDC per company / flusso anno
|
||||
BEGIN TRAN
|
||||
-- cerco nella tab contatori se esiste contatore x il flusso
|
||||
-- controllo se record c'è...
|
||||
IF EXISTS( SELECT TOP 1 Flusso FROM ContatoriUdc
|
||||
WHERE CodCS = @CodCS
|
||||
AND Flusso = @Flusso
|
||||
AND Anno = @Anno )
|
||||
BEGIN
|
||||
-- se c'è incremento di 1 in tab
|
||||
UPDATE ContatoriUdc
|
||||
SET LastIdx = LastIdx + 1
|
||||
WHERE CodCS = @CodCS
|
||||
AND Flusso = @Flusso
|
||||
AND Anno = @Anno
|
||||
END
|
||||
ELSE
|
||||
BEGIN
|
||||
-- lo creo!
|
||||
INSERT INTO ContatoriUdc(CodCS, Flusso, Anno, LastIdx)
|
||||
VALUES (@CodCS, @Flusso, @Anno, 1)
|
||||
END
|
||||
-- aggiorno numero UDC
|
||||
SET @numUdc = (
|
||||
SELECT LastIdx
|
||||
FROM ContatoriUdc
|
||||
WHERE CodCS = @CodCS
|
||||
AND Flusso = @Flusso
|
||||
AND Anno = @Anno
|
||||
)
|
||||
COMMIT TRAN
|
||||
------------------------------------------------------------------------------------------------------
|
||||
|
||||
------------------------------------------------------------------------------------------------------
|
||||
-- Ciclo principale x inserimento nuovo record
|
||||
------------------------------------------------------------------------------------------------------
|
||||
BEGIN TRAN
|
||||
-- ottengo il nuovo codice UDC completo
|
||||
SET @UDC = dbo.componiUdc(@CodCS, @Flusso, @Anno, @numUdc)
|
||||
|
||||
-- inserisco un nuovo record
|
||||
INSERT INTO ElencoCartellini(UDC, CodCS, CodCliente, RagSociale, Particolare, DescParticolare, DisegnoGrezzo, Esponente, CodImpianto, DescImpianto, CodStampo, Figura, DataFus, TurnoFus, CodImballo, CodSoggetto, NumCont, Tara, Qta, CodStato, IdxPosizione, PesoTot, PesoCad, CreateDate, ModDate, Note, CodEvento)
|
||||
VALUES (@UDC, @CodCS, @CodCliente, @RagSociale, @Particolare, @DescParticolare, @DisegnoGrezzo, @Esponente, @CodImpianto, @DescImpianto, @CodStampo, @Figura, @DataFus, @TurnoFus, @CodImballo, @CodSoggetto, @NumCont, @Tara, @Qta, @CodStato, @IdxPosizione, @PesoTot, @PesoCad, GETDATE(), GETDATE(), @Note, @CodEvento)
|
||||
|
||||
-- inserisco relazione parent-child tra UDC vecchio (tara) e nuovo (pesa) SSE UDC_Parent valido
|
||||
IF((NOT @UDC_parent IS NULL) AND (NOT @UDC_parent = ''))
|
||||
BEGIN
|
||||
INSERT INTO RelazUDC(UDC_parent, UDC_child)
|
||||
VALUES (@UDC_parent, @UDC)
|
||||
END
|
||||
COMMIT TRAN
|
||||
|
||||
------------------------------------------------------------------------------------------------------
|
||||
|
||||
------------------------------------------------------------------------------------------------------
|
||||
-- Ciclo secondario x eventuale cancellazione UDC tara parent e inserimento in posizione
|
||||
------------------------------------------------------------------------------------------------------
|
||||
-- se richiesto elimino l'UDC parent (tara)
|
||||
IF(@DoDeleteUdcParent = 1)
|
||||
BEGIN
|
||||
DELETE FROM ElencoCartellini WHERE UDC = @UDC_parent
|
||||
END
|
||||
|
||||
-- cerco in TabTranPosizEventi record x calcolare cella
|
||||
DECLARE @IdxBloccoTo INT
|
||||
SET @IdxBloccoTo = 0
|
||||
|
||||
/* da testare...
|
||||
SET @IdxBloccoTo = (
|
||||
SELECT ISNULL(
|
||||
(
|
||||
SELECT IdxBloccoTo
|
||||
FROM TabTranPosizEventi
|
||||
WHERE CodEvento = @CodEvento
|
||||
AND IdxPosizione = 0
|
||||
AND IdxPosizioneTo = @IdxPosizione
|
||||
AND CodStatoTo = @CodStato
|
||||
), 0)
|
||||
)
|
||||
-- se non lo trovo cerco con CodStatoTo null...
|
||||
IF(@IdxBloccoTo = 0)
|
||||
BEGIN
|
||||
SET @IdxBloccoTo = (
|
||||
SELECT ISNULL(
|
||||
(
|
||||
SELECT IdxBloccoTo
|
||||
FROM TabTranPosizEventi
|
||||
WHERE CodEvento = @CodEvento
|
||||
AND IdxPosizione = 0
|
||||
AND IdxPosizioneTo = @IdxPosizione
|
||||
), 0)
|
||||
)
|
||||
END
|
||||
*/
|
||||
|
||||
-- se NON HO trovato una conf x @IdxBloccoTo utilizzo questo valore utilizzo modalità "vecchia"
|
||||
IF(@IdxBloccoTo = 0)
|
||||
BEGIN
|
||||
-- calcolo la prima cella della posizione indicata..
|
||||
SET @IdxCella = (
|
||||
SELECT TOP 1 c.IdxCella
|
||||
FROM Celle c INNER JOIN Blocchi b ON c.IdxBlocco=b.IdxBlocco
|
||||
WHERE b.CodMag = CAST(@IdxPosizione AS NVARCHAR(50))
|
||||
)
|
||||
END
|
||||
ELSE
|
||||
BEGIN
|
||||
-- calcolo la prima cella della posizione indicata..
|
||||
SET @IdxCella = (
|
||||
SELECT TOP 1 c.IdxCella
|
||||
FROM Celle c
|
||||
WHERE c.IdxBlocco = @IdxBloccoTo
|
||||
)
|
||||
END
|
||||
|
||||
|
||||
-- inserisco il cartellino nella prima cella della posizione indicata...
|
||||
INSERT INTO PosizioneUdcCorrente(UDC, IdxCella, CodCS, DataRif, CodSoggetto)
|
||||
VALUES(@Udc, @IdxCella, @CodCs, GETDATE(), @CodSoggetto)
|
||||
------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
------------------------------------------------------------------------------------------------------
|
||||
-- restituisco la tab dati con l'udc appena inserito
|
||||
------------------------------------------------------------------------------------------------------
|
||||
SELECT *
|
||||
FROM ElencoCartellini
|
||||
WHERE UDC = @UDC
|
||||
------------------------------------------------------------------------------------------------------
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
/***************************************
|
||||
* STORED stp_UDC_insNewFull_fixUDC
|
||||
*
|
||||
* crea un nuovo record nella TabStatoOdpUdc FULL (con pesi, qta...) avendo in entrata il codice UDC da
|
||||
|
||||
utilizzare
|
||||
*
|
||||
* Steamware, S.E.L.
|
||||
* mod: 2011.12.07
|
||||
*
|
||||
****************************************/
|
||||
alter PROCEDURE stp_UDC_insNewFull_fixUDC
|
||||
(
|
||||
@UDC AS NVARCHAR(50),
|
||||
@CodCS VARCHAR(2),
|
||||
@Flusso VARCHAR(2),
|
||||
@Anno VARCHAR(2),
|
||||
@CodCliente VARCHAR(6),
|
||||
@Particolare VARCHAR(15),
|
||||
@CodImpianto AS VARCHAR(50),
|
||||
@CodStampo VARCHAR(8),
|
||||
@Esponente VARCHAR(6),
|
||||
@Figura VARCHAR(4),
|
||||
@DataFus DATETIME,
|
||||
@TurnoFus INT,
|
||||
@CodImballo VARCHAR(15),
|
||||
@CodSoggetto VARCHAR(17),
|
||||
@Tara FLOAT,
|
||||
@IdxPosizione INT,
|
||||
@CodTipoDichiaraz CHAR(1),
|
||||
@CodEvento VARCHAR(10),
|
||||
@Qta DECIMAL(10,2),
|
||||
@PesoTot FLOAT,
|
||||
@PesoCad FLOAT,
|
||||
@CodStato VARCHAR(50),
|
||||
@UDC_parent VARCHAR(50),
|
||||
@DoDeleteUdcParent BIT,
|
||||
@Note NVARCHAR(500)
|
||||
)
|
||||
AS
|
||||
|
||||
-- DECLARE iniziali
|
||||
DECLARE @RagSociale AS VARCHAR(35)
|
||||
DECLARE @DescParticolare AS VARCHAR(30)
|
||||
DECLARE @DescImpianto AS VARCHAR(50)
|
||||
DECLARE @DisegnoGrezzo AS VARCHAR(30)
|
||||
DECLARE @NumCont AS INT
|
||||
DECLARE @numFlu AS INT
|
||||
DECLARE @numUdc AS INT
|
||||
DECLARE @nextUdc AS INT
|
||||
DECLARE @IdxCella AS INT
|
||||
|
||||
------------------------------------------------------------------------------------------------------
|
||||
-- Caricamento Dati da anagrafica
|
||||
------------------------------------------------------------------------------------------------------
|
||||
-- cerco la ragione sociale...
|
||||
SET @RagSociale = ISNULL(
|
||||
(
|
||||
SELECT RagSociale
|
||||
FROM RilPro.AnagClienti
|
||||
WHERE (CodCliente = @CodCliente)
|
||||
)
|
||||
, '')
|
||||
|
||||
-- Cerco descrizione del particolare...
|
||||
SET @DescParticolare = ISNULL(
|
||||
(
|
||||
SELECT DescParticolare
|
||||
FROM RilPro.AnagParticolari
|
||||
WHERE (Particolare = @Particolare)
|
||||
)
|
||||
, 'ND')
|
||||
|
||||
-- se non lo trova provo anche nell'anagrafica leghe
|
||||
IF(@DescParticolare = 'ND')-- OR (@DescParticolare is null)
|
||||
BEGIN
|
||||
SET @DescParticolare = ISNULL(
|
||||
(
|
||||
SELECT DescLega
|
||||
FROM RilPro.AnagLeghe
|
||||
WHERE ('L'+CodLega = @Particolare)
|
||||
)
|
||||
, '')
|
||||
END
|
||||
-- cerco codice disegno grezzo
|
||||
SET @DisegnoGrezzo = ISNULL(
|
||||
(
|
||||
SELECT DisegnoGrezzo
|
||||
FROM RilPro.AnagParticolari
|
||||
WHERE (Particolare = @Particolare)
|
||||
)
|
||||
, '')
|
||||
|
||||
-- cerco descrizione Impianto
|
||||
SET @DescImpianto = ISNULL(
|
||||
(
|
||||
SELECT DescImpianto
|
||||
FROM AnagImpianti
|
||||
WHERE (CodImpianto = @CodImpianto)
|
||||
)
|
||||
, '')
|
||||
|
||||
|
||||
|
||||
-- Calcolo contatore intero successivo x il contenitore...
|
||||
SET @NumCont = (
|
||||
SELECT ISNULL(MAX(NumCont), 0) + 1 AS NumCont
|
||||
FROM ElencoCartellini
|
||||
WHERE (Particolare = @Particolare)
|
||||
AND (DataFus = @DataFus)
|
||||
AND (TurnoFus = @TurnoFus)
|
||||
AND (CodImpianto = @CodImpianto)
|
||||
AND (CodStampo = @CodStampo)
|
||||
AND (Figura = @Figura)
|
||||
)
|
||||
|
||||
|
||||
------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
------------------------------------------------------------------------------------------------------
|
||||
-- Ciclo principale x inserimento nuovo record
|
||||
------------------------------------------------------------------------------------------------------
|
||||
BEGIN TRAN
|
||||
|
||||
-- inserisco un nuovo record
|
||||
INSERT INTO ElencoCartellini(UDC, CodCS, CodCliente, RagSociale, Particolare, DescParticolare,
|
||||
|
||||
DisegnoGrezzo, Esponente, CodImpianto, DescImpianto, CodStampo, Figura, DataFus, TurnoFus, CodImballo,
|
||||
|
||||
CodSoggetto, NumCont, Tara, Qta, CodStato, IdxPosizione, PesoTot, PesoCad, CreateDate, ModDate, Note, CodEvento)
|
||||
VALUES (@UDC, @CodCS, @CodCliente, @RagSociale, @Particolare, @DescParticolare, @DisegnoGrezzo,
|
||||
|
||||
@Esponente, @CodImpianto, @DescImpianto, @CodStampo, @Figura, @DataFus, @TurnoFus, @CodImballo,
|
||||
|
||||
@CodSoggetto, @NumCont, @Tara, @Qta, @CodStato, @IdxPosizione, @PesoTot, @PesoCad, GETDATE(), GETDATE(),
|
||||
|
||||
@Note, @CodEvento)
|
||||
|
||||
-- inserisco relazione parent-child tra UDC vecchio (tara) e nuovo (pesa) SSE UDC_Parent valido
|
||||
IF((NOT @UDC_parent IS NULL) AND (NOT @UDC_parent = ''))
|
||||
BEGIN
|
||||
INSERT INTO RelazUDC(UDC_parent, UDC_child)
|
||||
VALUES (@UDC_parent, @UDC)
|
||||
END
|
||||
COMMIT TRAN
|
||||
|
||||
------------------------------------------------------------------------------------------------------
|
||||
|
||||
------------------------------------------------------------------------------------------------------
|
||||
-- Ciclo secondario x eventuale cancellazione UDC tara parent e inserimento in posizione
|
||||
------------------------------------------------------------------------------------------------------
|
||||
-- se richiesto elimino l'UDC parent (tara)
|
||||
IF(@DoDeleteUdcParent = 1)
|
||||
BEGIN
|
||||
DELETE FROM ElencoCartellini WHERE UDC = @UDC_parent
|
||||
END
|
||||
|
||||
-- cerco in TabTranPosizEventi record x calcolare cella
|
||||
DECLARE @IdxBloccoTo INT
|
||||
SET @IdxBloccoTo = 0
|
||||
|
||||
/* da testare...
|
||||
SET @IdxBloccoTo = (
|
||||
SELECT ISNULL(
|
||||
(
|
||||
SELECT IdxBloccoTo
|
||||
FROM TabTranPosizEventi
|
||||
WHERE CodEvento = @CodEvento
|
||||
AND IdxPosizione = 0
|
||||
AND IdxPosizioneTo = @IdxPosizione
|
||||
AND CodStatoTo = @CodStato
|
||||
), 0)
|
||||
)
|
||||
-- se non lo trovo cerco con CodStatoTo null...
|
||||
IF(@IdxBloccoTo = 0)
|
||||
BEGIN
|
||||
SET @IdxBloccoTo = (
|
||||
SELECT ISNULL(
|
||||
(
|
||||
SELECT IdxBloccoTo
|
||||
FROM TabTranPosizEventi
|
||||
WHERE CodEvento = @CodEvento
|
||||
AND IdxPosizione = 0
|
||||
AND IdxPosizioneTo = @IdxPosizione
|
||||
), 0)
|
||||
)
|
||||
END
|
||||
*/
|
||||
|
||||
-- se NON HO trovato una conf x @IdxBloccoTo utilizzo questo valore utilizzo modalità "vecchia"
|
||||
IF(@IdxBloccoTo = 0)
|
||||
BEGIN
|
||||
-- calcolo la prima cella della posizione indicata..
|
||||
SET @IdxCella = (
|
||||
SELECT TOP 1 c.IdxCella
|
||||
FROM Celle c INNER JOIN Blocchi b ON c.IdxBlocco=b.IdxBlocco
|
||||
WHERE b.CodMag = CAST(@IdxPosizione AS NVARCHAR(50))
|
||||
)
|
||||
END
|
||||
ELSE
|
||||
BEGIN
|
||||
-- calcolo la prima cella della posizione indicata..
|
||||
SET @IdxCella = (
|
||||
SELECT TOP 1 c.IdxCella
|
||||
FROM Celle c
|
||||
WHERE c.IdxBlocco = @IdxBloccoTo
|
||||
)
|
||||
END
|
||||
|
||||
-- inserisco il cartellino nella prima cella della posizione indicata..
|
||||
INSERT INTO PosizioneUdcCorrente(UDC, IdxCella, CodCS, DataRif, CodSoggetto)
|
||||
VALUES(@Udc, @IdxCella, @CodCs, GETDATE(), @CodSoggetto)
|
||||
------------------------------------------------------------------------------------------------------
|
||||
|
||||
------------------------------------------------------------------------------------------------------
|
||||
-- restituisco la tab dati con l'udc appena inserito
|
||||
------------------------------------------------------------------------------------------------------
|
||||
SELECT *
|
||||
FROM ElencoCartellini
|
||||
WHERE UDC = @UDC
|
||||
------------------------------------------------------------------------------------------------------
|
||||
|
||||
RETURN
|
||||
go
|
||||
|
||||
commit
|
||||
go
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
INSERT INTO [dbo].[LogUpdateDb] ([Versione],[Data]) VALUES(516, GETDATE())
|
||||
GO
|
||||
|
||||
SELECT TOP 10 * FROM LogUpdateDb ORDER BY Versione DESC
|
||||
@@ -0,0 +1,10 @@
|
||||
exec stp_insNewLemma 'ConsFusi', 'Consumo Fusi'
|
||||
exec stp_insNewLemma 'ConsFusiExpl', 'Gestione Consumo Fusi'
|
||||
|
||||
|
||||
|
||||
|
||||
INSERT INTO [dbo].[LogUpdateDb] ([Versione],[Data]) VALUES(516, GETDATE())
|
||||
GO
|
||||
|
||||
SELECT TOP 10 * FROM LogUpdateDb ORDER BY Versione DESC
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user