nuovo installer con sistemazione progetto VBx permessi + fix caricamento odette

git-svn-id: https://keyhammer.ath.cx/svn/GMW/trunk@359 365432ac-a1b5-4ffd-bb28-6d3099d32164
This commit is contained in:
samuele
2011-05-05 15:07:27 +00:00
parent d2fdbe233a
commit 8f342227ea
45 changed files with 1487 additions and 751 deletions
+4 -4
View File
@@ -63,7 +63,7 @@
<add key="appName" value="GMW" />
<add key="SiteName" value="Ambivere"/>
<add key="mainRev" value="1.0" />
<add key="minRev" value="370"/>
<add key="minRev" value="375"/>
<add key="copyRight" value="SteamWare © 2010-2011" />
<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" />
@@ -166,14 +166,14 @@
<add key="_adminEmail" value="samuele@steamware.net" />
<add key="_logDir" value="~/logs/" />
<add key="_smtpCli" value="keyhammer.ath.cx" />
<add key="GMWConnectionString" value="Data Source=10.74.82.217\sql2008r2;Initial Catalog=SP_GMW;Persist Security Info=True;User ID=sa;Password=keyhammer" />
<add key="GMWConnectionString" value="Data Source=10.74.82.217\sql2008r2;Initial Catalog=SP_GMW_prod;Persist Security Info=True;User ID=sa;Password=keyhammer" />
<add key="SP_produzioneConnectionString" value="Data Source=10.74.82.217\SQL2008R2;Initial Catalog=SP_produzione;Persist Security Info=True;User ID=sa;Password=keyhammer" />
<add key="PermessiConnectionString" value="Data Source=10.74.82.217\sql2008r2;Initial Catalog=SP_GMW;Persist Security Info=True;User ID=sa;Password=keyhammer" />
<add key="PermessiConnectionString" value="Data Source=10.74.82.217\sql2008r2;Initial Catalog=SP_GMW_prod;Persist Security Info=True;User ID=sa;Password=keyhammer" />
<add key="UtenteCdcConnectionString" value="Data Source=10.74.82.217\sql2008r2;Initial Catalog=SteamWare_Anagrafica;Persist Security Info=True;User ID=sa;Password=keyhammer" />
<add key="VocabolarioConnectionString" value="Data Source=10.74.82.217\sql2008r2;Initial Catalog=SteamWare_Vocabolario;Persist Security Info=True;User ID=sa;Password=keyhammer" />
</appSettings>
<connectionStrings>
<add name="GMW_data.Properties.Settings.GMWConnectionString" connectionString="Data Source=10.74.82.217\sql2008r2;Initial Catalog=SP_GMW;Persist Security Info=True;User ID=sa;Password=keyhammer" providerName="System.Data.SqlClient"/>
<add name="GMW_data.Properties.Settings.GMWConnectionString" connectionString="Data Source=10.74.82.217\sql2008r2;Initial Catalog=SP_GMW_prod;Persist Security Info=True;User ID=sa;Password=keyhammer" providerName="System.Data.SqlClient"/>
</connectionStrings>
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
@@ -1,6 +1,18 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_bolle4odette.ascx.cs"
Inherits="GMW.WebUserControls.mod_bolle4odette" %>
<div class="filtro_2" style="float: left; white-space: nowrap; width: 100%;">
<div style="float: left;">
<asp:Label runat="server" ID="lblRaggMag" />
<asp:TextBox runat="server" ID="txtRaggMag" Width="2em" Text="SP" />
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="!!!"
ValidationGroup="genOdette" ControlToValidate="txtRaggMag" />
</div>
<div style="float: left;">
<asp:Label runat="server" ID="lblGrBolle" />
<asp:TextBox runat="server" ID="txtGrBolle" Width="1em" Text="0" />
<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ErrorMessage="!!!"
ValidationGroup="genOdette" ControlToValidate="txtGrBolle" />
</div>
<div style="float: left;">
<asp:Label runat="server" ID="lblNumBolla" />
<asp:TextBox runat="server" ID="txtNumBolla" Width="8em" />
@@ -31,12 +31,24 @@ namespace GMW.WebUserControls
protected void btnDoCreate_Click(object sender, EventArgs e)
{
// cerco bolla sennò mostro errore...
string CodLista = memLayer.ML.StringSessionObj("CodListaOd_sel");
decimal NumBolla = Convert.ToDecimal(txtNumBolla.Text.Trim());
decimal DatBolla = Convert.ToDecimal(txtDataBolla.Text.Trim());
if (bollaEsistente(NumBolla, DatBolla))
string RaggMag = txtRaggMag.Text.Trim();
string GrpBolla = txtGrBolle.Text.Trim();
string particolare = "";
try
{
particolare = MagClass.magazzino.taElencoListePrelievo.getByCodLista(CodLista)[0].Particolare;
}
catch
{
logger.lg.scriviLog(string.Format("Particolare non trovato per codLista {0}", CodLista), tipoLog.ERROR);
}
if (Odette.mgr.checkCodBolla(RaggMag, GrpBolla, NumBolla, DatBolla, particolare))
{
// chiamo creazione etichette!
Odette.mgr.creaOdetteByBollaPackList(memLayer.ML.StringSessionObj("CodLista_sel"), NumBolla, DatBolla, ddlLingua.SelectedValue);
Odette.mgr.creaOdetteByBollaPackList(CodLista, RaggMag, GrpBolla, NumBolla, DatBolla, particolare, ddlLingua.SelectedValue);
lblWarning.Visible = false;
lblWarning.Text = "";
// sollevo evento new!
@@ -48,32 +60,26 @@ namespace GMW.WebUserControls
else
{
lblWarning.Visible = true;
lblWarning.Text = "Bolla non trovata!";
if (Odette.mgr.taBORI.getByKeyPart(RaggMag, GrpBolla, NumBolla, DatBolla).Rows.Count > 0)
{
lblWarning.Text = traduci("MismatchParticolare");
}
else
{
lblWarning.Text = traduci("BollaNonTrovata");
}
}
}
/// <summary>
/// effettua ricerca delle bolle
/// wrapper traduzione
/// </summary>
/// <param name="numBolla"></param>
/// <param name="dataBolla"></param>
/// <param name="lemma"></param>
/// <returns></returns>
public bool bollaEsistente(decimal numBolla, decimal dataBolla)
public string traduci(object lemma)
{
bool answ = false;
try
{
// cerco se c'è già...
answ = Odette.mgr.taBORI.getByBolla(numBolla, dataBolla).Rows.Count > 0;
// se non c'è provo a caricare con stored di caricamento singolo...
if (!answ)
{
Odette.mgr.taBORI.caricaDatiBolla(numBolla, dataBolla);
answ = Odette.mgr.taBORI.getByBolla(numBolla, dataBolla).Rows.Count > 0;
}
}
catch
{ }
return answ;
return user_std.UtSn.Traduci(lemma.ToString());
}
}
}
@@ -13,6 +13,60 @@ namespace GMW.WebUserControls {
public partial class mod_bolle4odette {
/// <summary>
/// lblRaggMag 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 lblRaggMag;
/// <summary>
/// txtRaggMag 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 txtRaggMag;
/// <summary>
/// RequiredFieldValidator2 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.RequiredFieldValidator RequiredFieldValidator2;
/// <summary>
/// lblGrBolle 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 lblGrBolle;
/// <summary>
/// txtGrBolle 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 txtGrBolle;
/// <summary>
/// RequiredFieldValidator3 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.RequiredFieldValidator RequiredFieldValidator3;
/// <summary>
/// lblNumBolla control.
/// </summary>
@@ -128,7 +128,7 @@
<asp:ImageButton ID="imgIniziaListaPrelievo" runat="server" CausesValidation="False"
CommandName="Update" CommandArgument="iniziaListaPrelievo" ToolTip='<%# traduci("IniziaListaPrelievo") %>'
Visible='<%# iniziaEnabled(Eval("CodStatoLista")) %>' ImageUrl="~/images/apply_s.png"
Enabled="false" OnClick="img_Click" />
Enabled="true" OnClick="img_Click" />
<cc1:ConfirmButtonExtender ID="cbeInizia" runat="server" ConfirmText='<%# traduci("confermaIniziaLista")%>'
TargetControlID="imgIniziaListaPrelievo" />
</ItemTemplate>
@@ -143,7 +143,7 @@
<asp:ImageButton ID="imgCompletaListaPrelievo" runat="server" CausesValidation="False"
CommandName="Update" CommandArgument="completaListaPrelievo" ToolTip='<%# traduciCodSogg(Eval("CodSoggetto")) %>'
Visible='<%# completaEnabled(Eval("CodStatoLista")) %>' ImageUrl="~/images/apply_s.png"
Enabled="false" OnClick="img_Click" />
Enabled="true" OnClick="img_Click" />
<cc1:ConfirmButtonExtender ID="cbeCompleta" runat="server" ConfirmText='<%# traduci("confermaCompletaLista")%>'
TargetControlID="imgCompletaListaPrelievo" />
</ItemTemplate>
@@ -28,12 +28,12 @@
DataValueField="value" AutoPostBack="True" OnSelectedIndexChanged="ddlTipoLista_SelectedIndexChanged">
</asp:DropDownList>
<asp:ObjectDataSource ID="odsTipoLista" runat="server" OldValuesParameterFormatString="original_{0}"
SelectMethod="GetData" TypeName="GMW_data.DS_UtilityTableAdapters.v_selTipoListaTableAdapter">
</asp:ObjectDataSource>
SelectMethod="GetData" TypeName="GMW_data.DS_UtilityTableAdapters.v_selTipoListaTableAdapter"
FilterExpression="value='04-OdetSP'"></asp:ObjectDataSource>
</td>
<td>
<asp:TextBox ID="txtParticolare" runat="server"
OnTextChanged="txtParticolare_TextChanged" AutoPostBack="True" />
<asp:TextBox ID="txtParticolare" runat="server" OnTextChanged="txtParticolare_TextChanged"
AutoPostBack="True" />
<asp:RequiredFieldValidator ID="rfvParticolare" runat="server" ErrorMessage="!!!"
ControlToValidate="txtParticolare" Display="Dynamic" />
<asp:AutoCompleteExtender ID="aceParticolare" runat="server" TargetControlID="txtParticolare"
@@ -87,8 +87,7 @@
<asp:Label ID="lblDestinatario" runat="server" Text='<%# traduci("Destinatario") %>' />
<asp:ComboBox ID="ddlDestinatario" runat="server" DataTextField="label" DataValueField="value"
AutoCompleteMode="SuggestAppend" DropDownStyle="DropDownList" AutoPostBack="True"
DataSourceID="odsDestinatario" CssClass="WindowsStyle" MaxLength="0"
style="display: inline;" />
DataSourceID="odsDestinatario" CssClass="WindowsStyle" MaxLength="0" Style="display: inline;" />
<asp:ObjectDataSource ID="odsDestinatario" runat="server" OldValuesParameterFormatString="original_{0}"
SelectMethod="getByConditio" TypeName="GMW_data.DS_UtilityTableAdapters.v_selDestinatariListePrelievoTableAdapter">
<SelectParameters>
@@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.4927
// Runtime Version:2.0.50727.4952
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
+8 -11
View File
@@ -12,9 +12,6 @@
<div style="float: left;">
<uc2:mod_periodoAnalisi ID="mod_periodoAnalisi1" runat="server" />
</div>
<div style="float: right;">
<asp:Button runat="server" ID="btnForceReload" OnClick="btnForceReload_Click" />
</div>
</div>
<div class="filtro_2" style="white-space: nowrap;">
<uc4:mod_bolle4odette ID="mod_bolle4odette1" runat="server" Visible="false" />
@@ -26,14 +23,14 @@
<asp:GridView ID="grView" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False"
OnSelectedIndexChanged="grView_SelectedIndexChanged" OnDataBound="grView_DataBound"
DataKeyNames="CodLista" DataSourceID="ods" OnRowUpdating="grView_RowUpdating">
<RowStyle CssClass="ctrRowStyle" />
<AlternatingRowStyle CssClass="ctrAltRowStyle" />
<EditRowStyle CssClass="ctrEditRowStyle" />
<SelectedRowStyle CssClass="ctrSelRowStyle" />
<FooterStyle CssClass="ctrFooter" />
<PagerStyle CssClass="ctrHeaderPager" ForeColor="White" HorizontalAlign="Center" />
<HeaderStyle CssClass="ctrHeaderPager" ForeColor="White" Font-Bold="True" />
<EmptyDataRowStyle CssClass="ctrRowStyle" />
<RowStyle CssClass="ctrRowStyleRed" />
<AlternatingRowStyle CssClass="ctrAltRowStyleRed" />
<EditRowStyle CssClass="ctrEditRowStyleRed" />
<SelectedRowStyle CssClass="ctrSelRowStyleRed" />
<FooterStyle CssClass="ctrFooterRed" />
<PagerStyle CssClass="ctrHeaderPagerRed" ForeColor="White" HorizontalAlign="Center" />
<HeaderStyle CssClass="ctrHeaderPagerRed" ForeColor="White" Font-Bold="True" />
<EmptyDataRowStyle CssClass="ctrRowStyleRed" />
<EmptyDataTemplate>
<asp:Label runat="server" ID="lblNoRecord" Text='<%# traduci("noRecord") %>' />
</EmptyDataTemplate>
+1 -11
View File
@@ -286,10 +286,9 @@ namespace GMW.WebUserControls
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
_idxGridView = "CodLista";
_idxGridView = "CodListaOd";
if (!Page.IsPostBack)
{
btnForceReload.Text = traduci("ReloadBolle");
mod_viewOdette1.Visible = false;
mod_periodoAnalisi1.setPeriodoFree();
mod_bolle4odette1.Visible = false;
@@ -604,15 +603,6 @@ namespace GMW.WebUserControls
return url;
}
/// <summary>
/// forza ricaricamento dati datamatrix/gitterbox/odette
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnForceReload_Click(object sender, EventArgs e)
{
Odette.mgr.taBORI.stp_BORI_caricaDatiNew();
}
/// <summary>
/// formatta una stringa x lo stato dell'odette (create/totale
/// </summary>
-9
View File
@@ -22,15 +22,6 @@ namespace GMW.WebUserControls {
/// </remarks>
protected global::mod_periodoAnalisi mod_periodoAnalisi1;
/// <summary>
/// btnForceReload 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 btnForceReload;
/// <summary>
/// mod_bolle4odette1 control.
/// </summary>
+9 -9
View File
@@ -8,14 +8,14 @@
DataKeyNames="CampoUDC" DataSourceID="ods" OnPageIndexChanged="grView_PageIndexChanged"
OnSorted="grView_Sorted" OnRowUpdating="grView_RowUpdating" OnRowEditing="grView_RowEditing"
OnRowCancelingEdit="grView_RowCancelingEdit" OnRowDeleted="grView_RowDeleted">
<RowStyle CssClass="ctrRowStyle" />
<AlternatingRowStyle CssClass="ctrAltRowStyle" />
<EditRowStyle CssClass="ctrEditRowStyle" />
<SelectedRowStyle CssClass="ctrSelRowStyle" />
<FooterStyle CssClass="ctrFooter" />
<PagerStyle CssClass="ctrHeaderPager" ForeColor="White" HorizontalAlign="Center" />
<HeaderStyle CssClass="ctrHeaderPager" ForeColor="White" Font-Bold="True" />
<EmptyDataRowStyle CssClass="ctrRowStyle" />
<RowStyle CssClass="ctrRowStyleRed" />
<AlternatingRowStyle CssClass="ctrAltRowStyleRed" />
<EditRowStyle CssClass="ctrEditRowStyleRed" />
<SelectedRowStyle CssClass="ctrSelRowStyleRed" />
<FooterStyle CssClass="ctrFooterRed" />
<PagerStyle CssClass="ctrHeaderPagerRed" ForeColor="White" HorizontalAlign="Center" />
<HeaderStyle CssClass="ctrHeaderPagerRed" ForeColor="White" Font-Bold="True" />
<EmptyDataRowStyle CssClass="ctrRowStyleRed" />
<Columns>
<asp:TemplateField ShowHeader="False">
<HeaderTemplate>
@@ -53,7 +53,7 @@
<asp:ObjectDataSource ID="ods" runat="server" OldValuesParameterFormatString="Original_{0}"
SelectMethod="getByCodLista" TypeName="GMW_data.DS_OdetteTableAdapters.OdetteTableAdapter">
<SelectParameters>
<asp:SessionParameter DefaultValue="*" Name="CodLista" SessionField="CodLista_sel"
<asp:SessionParameter DefaultValue="*" Name="CodLista" SessionField="CodListaOd_sel"
Type="String" />
</SelectParameters>
</asp:ObjectDataSource>
Binary file not shown.
Binary file not shown.
Binary file not shown.
+1 -1
View File
@@ -7,7 +7,7 @@
<add key="appName" value="GMW"/>
<add key="SiteName" value="Ambivere"/>
<add key="mainRev" value="1.0"/>
<add key="minRev" value="370"/>
<add key="minRev" value="375"/>
<add key="copyRight" value="SteamWare © 2010-2011"/>
<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"/>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+118 -30
View File
@@ -4664,7 +4664,7 @@ SELECT CDMFS, GRBOS, DTBOS, NRBOS, CDARS, NRRGS, CDINB, RA1ND, RA2ND, CAPND, CIT
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
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 CDMFS, GRBOS, DTBOS, NRBOS, CDARS, NRRGS, CDINB, RA1ND, RA2ND, CAPND, CITND, RASCL, INDCL, CAPCL, LOCCL, PROCL, INEND, CRAGCL, TELND, CCDMOL, CCDPTR, EPLAVO, NRC1B, ECMM01, DEPAR, RCARTC, PERND, CCDET1, ECDNAE, ECDNA1, EESPMD, PELDB, QTCNS FROM RawData.BORI202J";
@@ -4674,8 +4674,11 @@ SELECT CDMFS, GRBOS, DTBOS, NRBOS, CDARS, NRRGS, CDINB, RA1ND, RA2ND, CAPND, CIT
this._commandCollection[1].CommandText = "dbo.stp_BORI_caricaDatiBolla";
this._commandCollection[1].CommandType = global::System.Data.CommandType.StoredProcedure;
this._commandCollection[1].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[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@numB", global::System.Data.SqlDbType.Decimal, 5, global::System.Data.ParameterDirection.Input, 6, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@dataB", global::System.Data.SqlDbType.Decimal, 5, global::System.Data.ParameterDirection.Input, 8, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RaggrMagazz", global::System.Data.SqlDbType.NVarChar, 2, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@GruppoBolle", global::System.Data.SqlDbType.NVarChar, 1, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@NumeroBolla", global::System.Data.SqlDbType.NVarChar, 6, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DataBolla", global::System.Data.SqlDbType.NVarChar, 8, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Particolare", 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_BORI_getByBolla";
@@ -4685,9 +4688,23 @@ SELECT CDMFS, GRBOS, DTBOS, NRBOS, CDARS, NRRGS, CDINB, RA1ND, RA2ND, CAPND, CIT
this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@dataB", global::System.Data.SqlDbType.Decimal, 5, global::System.Data.ParameterDirection.Input, 8, 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_BORI_caricaDatiNew";
this._commandCollection[3].CommandText = "dbo.stp_BORI_getByBollaFull";
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("@RaggrMagazz", global::System.Data.SqlDbType.NVarChar, 2, 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("@GruppoBolle", global::System.Data.SqlDbType.NVarChar, 1, 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("@NumeroBolla", global::System.Data.SqlDbType.Decimal, 5, global::System.Data.ParameterDirection.Input, 6, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DataBolla", global::System.Data.SqlDbType.Decimal, 5, global::System.Data.ParameterDirection.Input, 8, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Particolare", global::System.Data.SqlDbType.NVarChar, 15, global::System.Data.ParameterDirection.Input, 0, 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_BORI_getByBollaPart";
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("@RaggrMagazz", global::System.Data.SqlDbType.NVarChar, 2, 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("@GruppoBolle", global::System.Data.SqlDbType.NVarChar, 1, 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("@NumeroBolla", global::System.Data.SqlDbType.Decimal, 5, global::System.Data.ParameterDirection.Input, 6, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DataBolla", global::System.Data.SqlDbType.Decimal, 5, global::System.Data.ParameterDirection.Input, 8, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
@@ -4734,6 +4751,80 @@ SELECT CDMFS, GRBOS, DTBOS, NRBOS, CDARS, NRRGS, CDINB, RA1ND, RA2ND, CAPND, CIT
return dataTable;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)]
public virtual DS_Odette.BORI202JDataTable getByKeyFull(string RaggrMagazz, string GruppoBolle, global::System.Nullable<decimal> NumeroBolla, global::System.Nullable<decimal> DataBolla, string Particolare) {
this.Adapter.SelectCommand = this.CommandCollection[3];
if ((RaggrMagazz == null)) {
this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value;
}
else {
this.Adapter.SelectCommand.Parameters[1].Value = ((string)(RaggrMagazz));
}
if ((GruppoBolle == null)) {
this.Adapter.SelectCommand.Parameters[2].Value = global::System.DBNull.Value;
}
else {
this.Adapter.SelectCommand.Parameters[2].Value = ((string)(GruppoBolle));
}
if ((NumeroBolla.HasValue == true)) {
this.Adapter.SelectCommand.Parameters[3].Value = ((decimal)(NumeroBolla.Value));
}
else {
this.Adapter.SelectCommand.Parameters[3].Value = global::System.DBNull.Value;
}
if ((DataBolla.HasValue == true)) {
this.Adapter.SelectCommand.Parameters[4].Value = ((decimal)(DataBolla.Value));
}
else {
this.Adapter.SelectCommand.Parameters[4].Value = global::System.DBNull.Value;
}
if ((Particolare == null)) {
this.Adapter.SelectCommand.Parameters[5].Value = global::System.DBNull.Value;
}
else {
this.Adapter.SelectCommand.Parameters[5].Value = ((string)(Particolare));
}
DS_Odette.BORI202JDataTable dataTable = new DS_Odette.BORI202JDataTable();
this.Adapter.Fill(dataTable);
return dataTable;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)]
public virtual DS_Odette.BORI202JDataTable getByKeyPart(string RaggrMagazz, string GruppoBolle, global::System.Nullable<decimal> NumeroBolla, global::System.Nullable<decimal> DataBolla) {
this.Adapter.SelectCommand = this.CommandCollection[4];
if ((RaggrMagazz == null)) {
this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value;
}
else {
this.Adapter.SelectCommand.Parameters[1].Value = ((string)(RaggrMagazz));
}
if ((GruppoBolle == null)) {
this.Adapter.SelectCommand.Parameters[2].Value = global::System.DBNull.Value;
}
else {
this.Adapter.SelectCommand.Parameters[2].Value = ((string)(GruppoBolle));
}
if ((NumeroBolla.HasValue == true)) {
this.Adapter.SelectCommand.Parameters[3].Value = ((decimal)(NumeroBolla.Value));
}
else {
this.Adapter.SelectCommand.Parameters[3].Value = global::System.DBNull.Value;
}
if ((DataBolla.HasValue == true)) {
this.Adapter.SelectCommand.Parameters[4].Value = ((decimal)(DataBolla.Value));
}
else {
this.Adapter.SelectCommand.Parameters[4].Value = global::System.DBNull.Value;
}
DS_Odette.BORI202JDataTable dataTable = new DS_Odette.BORI202JDataTable();
this.Adapter.Fill(dataTable);
return dataTable;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
public virtual int Update(DS_Odette.BORI202JDataTable dataTable) {
@@ -5672,41 +5763,38 @@ SELECT CDMFS, GRBOS, DTBOS, NRBOS, CDARS, NRRGS, CDINB, RA1ND, RA2ND, CAPND, CIT
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
public virtual int caricaDatiBolla(global::System.Nullable<decimal> numB, global::System.Nullable<decimal> dataB) {
public virtual int caricaDatiBolla(string RaggrMagazz, string GruppoBolle, string NumeroBolla, string DataBolla, string Particolare) {
global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[1];
if ((numB.HasValue == true)) {
command.Parameters[1].Value = ((decimal)(numB.Value));
}
else {
if ((RaggrMagazz == null)) {
command.Parameters[1].Value = global::System.DBNull.Value;
}
if ((dataB.HasValue == true)) {
command.Parameters[2].Value = ((decimal)(dataB.Value));
}
else {
command.Parameters[1].Value = ((string)(RaggrMagazz));
}
if ((GruppoBolle == null)) {
command.Parameters[2].Value = global::System.DBNull.Value;
}
global::System.Data.ConnectionState previousConnectionState = command.Connection.State;
if (((command.Connection.State & global::System.Data.ConnectionState.Open)
!= global::System.Data.ConnectionState.Open)) {
command.Connection.Open();
else {
command.Parameters[2].Value = ((string)(GruppoBolle));
}
int returnValue;
try {
returnValue = command.ExecuteNonQuery();
if ((NumeroBolla == null)) {
command.Parameters[3].Value = global::System.DBNull.Value;
}
finally {
if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
command.Connection.Close();
}
else {
command.Parameters[3].Value = ((string)(NumeroBolla));
}
if ((DataBolla == null)) {
command.Parameters[4].Value = global::System.DBNull.Value;
}
else {
command.Parameters[4].Value = ((string)(DataBolla));
}
if ((Particolare == null)) {
command.Parameters[5].Value = global::System.DBNull.Value;
}
else {
command.Parameters[5].Value = ((string)(Particolare));
}
return returnValue;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
public virtual int stp_BORI_caricaDatiNew() {
global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[3];
global::System.Data.ConnectionState previousConnectionState = command.Connection.State;
if (((command.Connection.State & global::System.Data.ConnectionState.Open)
!= global::System.Data.ConnectionState.Open)) {
+26 -4
View File
@@ -215,8 +215,11 @@ SELECT CDMFS, GRBOS, DTBOS, NRBOS, CDARS, NRRGS, CDINB, RA1ND, RA2ND, CAPND, CIT
<CommandText>dbo.stp_BORI_caricaDatiBolla</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="numeric" DbType="Decimal" Direction="Input" ParameterName="@numB" Precision="6" ProviderType="Decimal" Scale="0" Size="5" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="numeric" DbType="Decimal" Direction="Input" ParameterName="@dataB" Precision="8" ProviderType="Decimal" Scale="0" Size="5" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="nvarchar" DbType="String" Direction="Input" ParameterName="@RaggrMagazz" Precision="0" ProviderType="NVarChar" Scale="0" Size="2" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="nvarchar" DbType="String" Direction="Input" ParameterName="@GruppoBolle" Precision="0" ProviderType="NVarChar" Scale="0" Size="1" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="nvarchar" DbType="String" Direction="Input" ParameterName="@NumeroBolla" Precision="0" ProviderType="NVarChar" Scale="0" Size="6" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="nvarchar" DbType="String" Direction="Input" ParameterName="@DataBolla" Precision="0" ProviderType="NVarChar" Scale="0" Size="8" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="nvarchar" DbType="String" Direction="Input" ParameterName="@Particolare" Precision="0" ProviderType="NVarChar" Scale="0" Size="15" SourceColumnNullMapping="false" SourceVersion="Current" />
</Parameters>
</DbCommand>
</SelectCommand>
@@ -233,12 +236,31 @@ SELECT CDMFS, GRBOS, DTBOS, NRBOS, CDARS, NRRGS, CDINB, RA1ND, RA2ND, CAPND, CIT
</DbCommand>
</SelectCommand>
</DbSource>
<DbSource ConnectionRef="GMWConnectionString (Settings)" DbObjectName="SP_GMW.dbo.stp_BORI_caricaDatiNew" DbObjectType="StoredProcedure" GenerateShortCommands="true" GeneratorSourceName="stp_BORI_caricaDatiNew" Modifier="Public" Name="stp_BORI_caricaDatiNew" QueryType="NoData" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDataBy1" UserSourceName="stp_BORI_caricaDatiNew">
<DbSource ConnectionRef="GMWConnectionString (Settings)" DbObjectName="SP_GMW.dbo.stp_BORI_getByBollaFull" DbObjectType="StoredProcedure" GenerateMethods="Get" GenerateShortCommands="true" GeneratorGetMethodName="getByKeyFull" GetMethodModifier="Public" GetMethodName="getByKeyFull" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="getByKeyFull" UserSourceName="getByKeyFull">
<SelectCommand>
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
<CommandText>dbo.stp_BORI_caricaDatiNew</CommandText>
<CommandText>dbo.stp_BORI_getByBollaFull</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="@RaggrMagazz" Precision="0" ProviderType="NVarChar" Scale="0" Size="2" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="nvarchar" DbType="String" Direction="Input" ParameterName="@GruppoBolle" Precision="0" ProviderType="NVarChar" Scale="0" Size="1" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="numeric" DbType="Decimal" Direction="Input" ParameterName="@NumeroBolla" Precision="6" ProviderType="Decimal" Scale="0" Size="5" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="numeric" DbType="Decimal" Direction="Input" ParameterName="@DataBolla" Precision="8" ProviderType="Decimal" Scale="0" Size="5" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="nvarchar" DbType="String" Direction="Input" ParameterName="@Particolare" Precision="0" ProviderType="NVarChar" Scale="0" Size="15" SourceColumnNullMapping="false" SourceVersion="Current" />
</Parameters>
</DbCommand>
</SelectCommand>
</DbSource>
<DbSource ConnectionRef="GMWConnectionString (Settings)" DbObjectName="SP_GMW.dbo.stp_BORI_getByBollaPart" DbObjectType="StoredProcedure" GenerateMethods="Get" GenerateShortCommands="true" GeneratorGetMethodName="getByKeyPart" GeneratorSourceName="FillBy" GetMethodModifier="Public" GetMethodName="getByKeyPart" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="getByKeyPart" UserSourceName="getByKeyPart">
<SelectCommand>
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
<CommandText>dbo.stp_BORI_getByBollaPart</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="@RaggrMagazz" Precision="0" ProviderType="NVarChar" Scale="0" Size="2" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="nvarchar" DbType="String" Direction="Input" ParameterName="@GruppoBolle" Precision="0" ProviderType="NVarChar" Scale="0" Size="1" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="numeric" DbType="Decimal" Direction="Input" ParameterName="@NumeroBolla" Precision="6" ProviderType="Decimal" Scale="0" Size="5" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="numeric" DbType="Decimal" Direction="Input" ParameterName="@DataBolla" Precision="8" ProviderType="Decimal" Scale="0" Size="5" SourceColumnNullMapping="false" SourceVersion="Current" />
</Parameters>
</DbCommand>
</SelectCommand>
+3 -3
View File
@@ -6,9 +6,9 @@
</autogenerated>-->
<DiagramLayout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ex:showrelationlabel="False" ViewPortX="0" ViewPortY="0" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">
<Shapes>
<Shape ID="DesignTable:BORI202J" ZOrder="3" X="848" Y="147" Height="362" Width="224" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
<Shape ID="DesignTable:Odette" ZOrder="2" X="237" Y="227" Height="381" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
<Shape ID="DesignTable:stp_OdetteStatoCreate" ZOrder="1" X="734" Y="647" Height="115" Width="276" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="64" />
<Shape ID="DesignTable:BORI202J" ZOrder="1" X="848" Y="147" Height="381" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
<Shape ID="DesignTable:Odette" ZOrder="3" X="237" Y="227" Height="381" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
<Shape ID="DesignTable:stp_OdetteStatoCreate" ZOrder="2" X="734" Y="647" Height="115" Width="276" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="64" />
</Shapes>
<Connectors />
</DiagramLayout>
+46 -13
View File
@@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.4927
// Runtime Version:2.0.50727.4952
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -22361,7 +22361,7 @@ SELECT CodLista, UDC, Qta, Proposto, Prelevato FROM RigheListePrelievo WHERE (Co
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
private void InitCommandCollection() {
this._commandCollection = new global::System.Data.SqlClient.SqlCommand[9];
this._commandCollection = new global::System.Data.SqlClient.SqlCommand[10];
this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
this._commandCollection[0].Connection = this.Connection;
this._commandCollection[0].CommandText = "SELECT CodLista, UDC, Qta, Proposto, Prelevato FROM dbo.RigheListePrelievo";
@@ -22399,25 +22399,31 @@ SELECT CodLista, UDC, Qta, Proposto, Prelevato FROM RigheListePrelievo WHERE (Co
this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodLista", global::System.Data.SqlDbType.VarChar, 12, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[6] = new global::System.Data.SqlClient.SqlCommand();
this._commandCollection[6].Connection = this.Connection;
this._commandCollection[6].CommandText = "dbo.stp_RLP_sbloccaNonPrelevate";
this._commandCollection[6].CommandText = "dbo.stp_RLP_eliminaNonPrelevate";
this._commandCollection[6].CommandType = global::System.Data.CommandType.StoredProcedure;
this._commandCollection[6].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[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodLista", global::System.Data.SqlDbType.NVarChar, 12, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@UDC", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[7] = new global::System.Data.SqlClient.SqlCommand();
this._commandCollection[7].Connection = this.Connection;
this._commandCollection[7].CommandText = "dbo.stp_RLP_updateQty";
this._commandCollection[7].CommandText = "dbo.stp_RLP_sbloccaNonPrelevate";
this._commandCollection[7].CommandType = global::System.Data.CommandType.StoredProcedure;
this._commandCollection[7].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[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@UDC", global::System.Data.SqlDbType.VarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Qta", global::System.Data.SqlDbType.Decimal, 9, global::System.Data.ParameterDirection.Input, 18, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodLista", global::System.Data.SqlDbType.NVarChar, 12, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@UDC", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[8] = new global::System.Data.SqlClient.SqlCommand();
this._commandCollection[8].Connection = this.Connection;
this._commandCollection[8].CommandText = "dbo.stp_UDC_upsertPrelevato";
this._commandCollection[8].CommandText = "dbo.stp_RLP_updateQty";
this._commandCollection[8].CommandType = global::System.Data.CommandType.StoredProcedure;
this._commandCollection[8].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[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodLista", global::System.Data.SqlDbType.NVarChar, 12, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@UDC", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@UDC", global::System.Data.SqlDbType.VarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Qta", global::System.Data.SqlDbType.Decimal, 9, global::System.Data.ParameterDirection.Input, 18, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[9] = new global::System.Data.SqlClient.SqlCommand();
this._commandCollection[9].Connection = this.Connection;
this._commandCollection[9].CommandText = "dbo.stp_UDC_upsertPrelevato";
this._commandCollection[9].CommandType = global::System.Data.CommandType.StoredProcedure;
this._commandCollection[9].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[9].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodLista", global::System.Data.SqlDbType.NVarChar, 12, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[9].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@UDC", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
@@ -22516,7 +22522,7 @@ SELECT CodLista, UDC, Qta, Proposto, Prelevato FROM RigheListePrelievo WHERE (Co
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)]
public virtual DS_magazzino.RigheListePrelievoDataTable upsertPrelevato(string CodLista, string UDC) {
this.Adapter.SelectCommand = this.CommandCollection[8];
this.Adapter.SelectCommand = this.CommandCollection[9];
if ((CodLista == null)) {
this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value;
}
@@ -22763,7 +22769,7 @@ SELECT CodLista, UDC, Qta, Proposto, Prelevato FROM RigheListePrelievo WHERE (Co
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
public virtual int stp_RLP_sbloccaNonPrelevate(string CodLista, string UDC) {
public virtual int stp_RLP_eliminaNonPrelevate(string CodLista) {
global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[6];
if ((CodLista == null)) {
command.Parameters[1].Value = global::System.DBNull.Value;
@@ -22771,6 +22777,33 @@ SELECT CodLista, UDC, Qta, Proposto, Prelevato FROM RigheListePrelievo WHERE (Co
else {
command.Parameters[1].Value = ((string)(CodLista));
}
global::System.Data.ConnectionState previousConnectionState = command.Connection.State;
if (((command.Connection.State & global::System.Data.ConnectionState.Open)
!= global::System.Data.ConnectionState.Open)) {
command.Connection.Open();
}
int returnValue;
try {
returnValue = command.ExecuteNonQuery();
}
finally {
if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
command.Connection.Close();
}
}
return returnValue;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
public virtual int stp_RLP_sbloccaNonPrelevate(string CodLista, string UDC) {
global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[7];
if ((CodLista == null)) {
command.Parameters[1].Value = global::System.DBNull.Value;
}
else {
command.Parameters[1].Value = ((string)(CodLista));
}
if ((UDC == null)) {
command.Parameters[2].Value = global::System.DBNull.Value;
}
@@ -22797,7 +22830,7 @@ SELECT CodLista, UDC, Qta, Proposto, Prelevato FROM RigheListePrelievo WHERE (Co
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
public virtual int stp_RLP_updateQty(string UDC, global::System.Nullable<decimal> Qta) {
global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[7];
global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[8];
if ((UDC == null)) {
command.Parameters[1].Value = global::System.DBNull.Value;
}
File diff suppressed because it is too large Load Diff
+3 -3
View File
@@ -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="89" ViewPortY="1085" 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="-10" ViewPortY="709" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">
<Shapes>
<Shape ID="DesignTable:ElencoCartellini" ZOrder="3" X="79" Y="230" Height="552" Width="250" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="368" />
<Shape ID="DesignTable:AnagMag" ZOrder="8" X="1008" Y="389" Height="229" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="102" />
@@ -19,7 +19,7 @@
<Shape ID="DesignTable:V_MagazziniOverview" ZOrder="23" X="733" Y="1102" Height="286" Width="232" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="178" />
<Shape ID="DesignTable:V_DettMagPart" ZOrder="10" X="1027" Y="998" Height="381" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
<Shape ID="DesignTable:TipoListaPrelievo" ZOrder="18" X="735" Y="891" Height="172" Width="224" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="102" />
<Shape ID="DesignTable:RigheListePrelievo" ZOrder="15" X="83" Y="820" Height="288" Width="256" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="102" />
<Shape ID="DesignTable:RigheListePrelievo" ZOrder="15" X="83" Y="820" Height="307" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="121" />
<Shape ID="DesignTable:ElencoListePrelievo" ZOrder="2" X="430" Y="879" Height="381" Width="231" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
<Shape ID="DesignTable:v_righeListePrelievoPosizione" ZOrder="16" X="400" Y="1301" Height="343" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="235" />
<Shape ID="DesignTable:v_particolariEsponenteFigura" ZOrder="24" X="1042" Y="1386" Height="229" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="121" />
@@ -123,7 +123,7 @@
<Y>949</Y>
</Point>
<Point>
<X>339</X>
<X>383</X>
<Y>949</Y>
</Point>
</RoutePoints>
+3
View File
@@ -195,6 +195,8 @@
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<None Include="SqlScripts\GMW_00365.sql" />
<None Include="SqlScripts\GMW_00361.sql" />
<None Include="SqlScripts\GMW_00350.sql" />
<None Include="SqlScripts\GMW_00345.sql" />
<None Include="SqlScripts\GMW_00340.sql" />
@@ -249,6 +251,7 @@
<None Include="SqlScripts\GMW_00200.sql" />
<None Include="SqlScripts\GMW_00225.sql" />
<None Include="SqlScripts\GMW_00230.sql" />
<None Include="SqlScripts\GMW_00360.sql" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+5 -3
View File
@@ -891,7 +891,7 @@ namespace GMW_data
DS_magazzino.TipoListaPrelievoRow rigaTipoLista = tabellaTipoLista[0];
// leggo da righe lista prelievo il dato udc che mi serve
DS_magazzino.RigheListePrelievoDataTable tabellaRigheListaPrelievo = taRigheListePrelievo.getByCodLista(CodLista);
DS_magazzino.RigheListePrelievoDataTable tabellaRigheListaPrelievo = taRigheListePrelievo.getByCodListaPrelevate(CodLista);
DS_magazzino.RigheListePrelievoRow rigaListaPrelievo = tabellaRigheListaPrelievo[0];
// leggo il codice della cella...
@@ -908,7 +908,9 @@ namespace GMW_data
// dopo aver spostato UDC sistemo eventuali Righe di Prelievo x lo stesso UDC pending...
magazzino.taRigheListePrelievo.stp_RLP_sbloccaNonPrelevate(CodLista, _UDC);
}
// libero le righe non prelevate...
magazzino.taRigheListePrelievo.stp_RLP_eliminaNonPrelevate(CodLista);
// aggiorno stato lista
taElencoListePrelievo.updateStato(CodSoggetto, CodLista, (int)statoLista.completata);
answ = esitoOperazione.ok;
}
@@ -983,7 +985,7 @@ namespace GMW_data
DS_magazzino.TipoListaPrelievoRow rigaTipoLista = tabellaTipoLista[0];
// leggo da righe lista prelievo il dato udc che mi serve
DS_magazzino.RigheListePrelievoDataTable tabellaRigheListaPrelievo = taRigheListePrelievo.getByCodLista(CodLista);
DS_magazzino.RigheListePrelievoDataTable tabellaRigheListaPrelievo = taRigheListePrelievo.getByCodListaPrelevate(CodLista);
DS_magazzino.RigheListePrelievoRow rigaListaPrelievo = tabellaRigheListaPrelievo[0];
// leggo il codice della cella...
+26 -21
View File
@@ -110,10 +110,13 @@ namespace GMW_data
/// carica i dati per l'etichetta Odette provenienti dalla bolla indicata
/// </summary>
/// <param name="UDC"></param>
/// <param name="RaggMag"></param>
/// <param name="GrpBolla"></param>
/// <param name="numBolla">codice bolla</param>
/// <param name="dataBolla">data bolla formato YYYYMMDD</param>
/// <param name="particolare"></param>
/// <returns></returns>
protected bool caricaDatiBollaEtichettaOdette(string UDC, decimal numBolla, decimal dataBolla)
protected bool caricaDatiBollaEtichettaOdette(string UDC, string RaggMag, string GrpBolla, decimal numBolla, decimal dataBolla, string particolare)
{
bool answ = false;
string ragSocCli = "";
@@ -139,7 +142,7 @@ namespace GMW_data
int trovati = 0;
try
{
DS_Odette.BORI202JDataTable tabAs400 = taBORI.getByBolla(numBolla, dataBolla);
DS_Odette.BORI202JDataTable tabAs400 = taBORI.getByKeyFull(RaggMag, GrpBolla, numBolla, dataBolla, particolare);
trovati = tabAs400.Rows.Count;
if (trovati >= 1)
{
@@ -152,9 +155,9 @@ namespace GMW_data
indirCli = rigaAs.RA2ND.Trim();
capCittCli = string.Format("{0} {1}", rigaAs.CAPND.Trim(), rigaAs.CITND.Trim());
// campo2
destP1 = rigaAs.INEND.Substring(0,15).Trim();
destP1 = rigaAs.INEND.Substring(0, 15).Trim();
destP2 = rigaAs.INEND.Substring(15, 15).Trim();
if (rigaAs.CRAGCL.Trim()=="13" || rigaAs.TELND.Substring(18,2)=="13")
if (rigaAs.CRAGCL.Trim() == "13" || rigaAs.TELND.Substring(18, 2) == "13")
{
destP3 = "/S";
}
@@ -213,7 +216,7 @@ namespace GMW_data
{
try
{
taOdette.updateValAs400(UDC, ragSocCli, indirCli, capCittCli, destinatario, "","", pesoNetto, pesoLordo, numColli, disPart, descPart, codPart, codImb, codMaz, codNael);
taOdette.updateValAs400(UDC, ragSocCli, indirCli, capCittCli, destinatario, "", "", pesoNetto, pesoLordo, numColli, disPart, descPart, codPart, codImb, codMaz, codNael);
answ = true;
}
catch
@@ -242,28 +245,27 @@ namespace GMW_data
{
return user_std.UtSn.Traduci(lemma, lingua);
}
/// <summary>
/// verifica l'esistenza di una bolla dato il suo codice + data
/// </summary>
/// <param name="numBolla">codice bolla</param>
/// <param name="dataBolla">data bolla formato YYYYMMDD</param>
/// <param name="RaggMag">cod raggr magazzino</param>
/// <param name="GrpBolla">gruppo bolla</param>
/// <param name="numBolla">codice bolla NUMERICO</param>
/// <param name="dataBolla">data bolla formato numerico YYYYMMDD</param>
/// <param name="particolare">codice particolare</param>
/// <returns></returns>
public bool checkCodBolla(decimal numBolla, decimal dataBolla)
public bool checkCodBolla(string RaggMag, string GrpBolla, decimal numBolla, decimal dataBolla, string particolare)
{
bool answ = false;
int righeBolla = 0;
try
{
righeBolla = taBORI.getByBolla(numBolla, dataBolla).Rows.Count;
// provo a caricarle con stored...
taBORI.caricaDatiBolla(RaggMag, GrpBolla, numBolla.ToString(), dataBolla.ToString(), particolare);
// rileggo se presenti...
righeBolla = taBORI.getByKeyFull(RaggMag, GrpBolla, Convert.ToDecimal(numBolla), Convert.ToDecimal(dataBolla), particolare).Rows.Count;
answ = (righeBolla >= 1);
if (!answ)
{
// provo a caricarle con stored...
taBORI.caricaDatiBolla(numBolla, dataBolla);
// rileggo se presenti...
righeBolla = taBORI.getByBolla(numBolla, dataBolla).Rows.Count;
answ = (righeBolla >= 1);
}
}
catch
{ }
@@ -272,12 +274,15 @@ namespace GMW_data
/// <summary>
/// crea tutte le righe encessarie alal stampa dei cartellini Odette dati lista di prelievo, bolla da associare
/// </summary>
/// <param name="CodLista"></param>
/// <param name="CodLista">codice lista di prelievo</param>
/// <param name="RaggMag">cod raggr magazzino</param>
/// <param name="GrpBolla">gruppo bolla</param>
/// <param name="numBolla">codice bolla NUMERICO</param>
/// <param name="dataBolla">data bolla formato numerico YYYYMMDD</param>
/// <param name="particolare">codice particolare</param>
/// <param name="Lingua">IT/EN/...</param>
/// <returns></returns>
public bool creaOdetteByBollaPackList(string CodLista, decimal numBolla, decimal dataBolla, string lingua)
public bool creaOdetteByBollaPackList(string CodLista, string RaggMag, string GrpBolla, decimal numBolla, decimal dataBolla, string particolare, string lingua)
{
bool answ = false;
int totUdc = 0;
@@ -294,7 +299,7 @@ namespace GMW_data
logger.lg.scriviLog(string.Format("Errore: non ci sono UDC da creare per la PackList {0}", CodLista), tipoLog.ERROR);
}
// in primis comunque verifico che la bolla ci sia altrimenti non procedo (anche se avrebbe già dovuto controllare...)
if (checkCodBolla(numBolla, dataBolla) && totUdc > 0)
if (checkCodBolla(RaggMag, GrpBolla, numBolla, dataBolla, particolare) && totUdc > 0)
{
// leggo elenco UDC da packing list
foreach (DS_magazzino.RigheListePrelievoRow rigaUdc in ElencoUdc)
@@ -304,7 +309,7 @@ namespace GMW_data
// per ogni riga inserisco traduzione nella lingua richiesta
caricaEtichetteLinguaPerOdette(rigaUdc.UDC, lingua);
// vado a caricare i dati dalla tab dei dati bolle
caricaDatiBollaEtichettaOdette(rigaUdc.UDC, numBolla, dataBolla);
caricaDatiBollaEtichettaOdette(rigaUdc.UDC, RaggMag, GrpBolla, numBolla, dataBolla, particolare);
// effettuo check della riga odette e determino se sia conforme
updateStatoOdette(rigaUdc.UDC);
}
+192
View File
@@ -0,0 +1,192 @@
set xact_abort on
go
begin transaction
go
set ANSI_NULLS on
go
/***************************************
* STORED stp_ComAs_lastComandoByStored
*
* Ottiene il record dell'ultimo comando inviato ad AS400 dato il nome della stored con Test = 0
*
* Steamware, S.E.L.
* mod: 2011.03.30
*
****************************************/
create PROCEDURE stp_ComAs_lastComandoByStored
(
@Stored NVARCHAR(100)
)
AS
-- restituisce le righe richieste
SELECT TOP 1 *
FROM RawData.AS400_Comandi
WHERE (Stored = @Stored) AND Test = 0
ORDER BY DataEsecuzione DESC
RETURN
go
commit
go
drop procedure stp_BORI_caricaDatiNew
go
set xact_abort on
go
begin transaction
go
set ANSI_NULLS on
go
/*****************************************
* STORED stp_BORI_caricaDatiBolla
*
* richiama la stored di caricamento da AS400 x la bolla indicata
*
* Steamware, S.E.L.
* mod: 2011.04.28
*
****************************************/
alter PROCEDURE stp_BORI_caricaDatiBolla
(
@RaggrMagazz NVARCHAR(2) ,
@GruppoBolle NVARCHAR(1) ,
@NumeroBolla NVARCHAR(6) ,
@DataBolla NVARCHAR(8) ,
@Particolare NVARCHAR(15)
)
AS
SET NOCOUNT ON;
--DECLARE @RaggrMagazz AS NVARCHAR(2) = N'SP'
--DECLARE @GruppoBolle AS NVARCHAR(1) = N'0'
--DECLARE @NumeroBolla AS NVARCHAR(6) = N'678'
--DECLARE @DataBolla AS NVARCHAR(8) = N'20110421'
--DECLARE @Particolare AS NVARCHAR(15) = N'P00528536146'
-- Prima cancello i dati della se già presenti bolla poi li carico
DELETE SP_GMW.RawData.BORI202J
WHERE CDMFS = @RaggrMagazz
AND GRBOS = @GruppoBolle
AND NRBOS = @NumeroBolla
AND DTBOS = @DataBolla
AND CDARS = @Particolare
DECLARE @SQL AS NVARCHAR(4000)
DECLARE @SqlOK AS INT;
SET @SqlOK = 0;
-- ATTENZIONE!!! i parametri non devono essere nulli altrimenti la stringa ritornata è nulla
/*
Prima estraggo i dati della bolla dal file in AS400 in una tabella temporanea
Poi va letta la tabella temporanea per creare i dati per la stampa Odette
NON VA BENE, SE ESEGUONO IN DUE LA STAMPA PUO ANDARE IN CONFLITTO
*/
--IF OBJECT_ID(N'tempdb..##TabTemp') IS NOT NULL -- ##TabTemp Tabella temporanea globale altrimenti non riesco ad usarla
-- DROP TABLE ##TabTemp;
-- SET @SQL = 'SELECT * INTO ##TabTemp FROM OPENQUERY(P65220DC,
BEGIN TRY
SET @SQL = 'INSERT INTO SP_GMW.RawData.BORI202J SELECT * FROM OPENQUERY(P65220DC,
''SELECT
CDMFS
,GRBOS
,DTBOS
,NRBOS
,CDARS
,NRRGS
,CDINB
,RA1ND
,RA2ND
,CAPND
,CITND
,RASCL
,INDCL
,CAPCL
,LOCCL
,PROCL
,INEND
,CRAGCL
,TELND
,CCDMOL
,CCDPTR
,EPLAVO
,NRC1B
,ECMM01
,DEPAR
,RCARTC
,PERND
,CCDET1
,ECDNAE
,ECDNA1
,EESPMD
,PELDB
,QTCNS
FROM POSN_AZI.BORI202J
WHERE ATV08 <> ''''A''''
'
-- commemntare le righe successive per estrarre tutto
-- Parametri di selezione della bolla
SET @SQL = @SQL + ' AND CDMFS = ''''' + @RaggrMagazz + ''''' '
SET @SQL = @SQL + ' AND GRBOS = ''''' + @GruppoBolle + ''''' '
SET @SQL = @SQL + ' AND NRBOS = ' + @NumeroBolla + ' '
SET @SQL = @SQL + ' AND DTBOS = ' + @DataBolla + ' '
SET @SQL = @SQL + ' AND CDARS = ''''' + @Particolare + ''''' '
SET @SQL = @SQL + ''' )';
EXEC sp_executesql @SQL
END TRY
BEGIN CATCH
-- PRINT ERROR_NUMBER()
SET @SqlOK = ERROR_NUMBER();
-- Uso RAISERROR mandare in errore la procedura e x per tornare le info
-- sull'errore originale che ha portato l'esecuzione nel blocco CATCH
--DECLARE @ErrorMessage NVARCHAR(4000);
--DECLARE @ErrorSeverity INT;
--DECLARE @ErrorState INT;
--SELECT @ErrorMessage = ERROR_MESSAGE(),@ErrorSeverity = ERROR_SEVERITY(),@ErrorState = ERROR_STATE();
--RAISERROR (@ErrorMessage,@ErrorSeverity,@ErrorState); -- Se non uso RAISERROR la procedura non mi da errore es. se schedulata
END CATCH
-- MANCA IL TEST SE VA IN ERRORE E IL SALVATAGGIO NEL LOG AS400
-- Memorizzo il comando per verifica T-SQL e l'esito del comando se 0 è OK
--INSERT INTO RawData.AS400_Comandi
--SELECT GETDATE(), 'stp_CaricaDatiBolladaAs400', @SQL, @SqlOK;
-- Carico i dati della Temp table nel file di appoggio
-- INSERT INTO SP_GMW.RawData.BORI202J
-- SELECT * FROM ##TabTemp
RETURN
go
commit
go
-- registro versione...
INSERT INTO [dbo].[LogUpdateDb] ([Versione],[Data]) VALUES(361, GETDATE())
GO
+331
View File
@@ -0,0 +1,331 @@
set xact_abort on
go
begin transaction
go
set ANSI_NULLS on
go
/*****************************************
* STORED stp_BORI_getByBolla
*
* Cerca la bolla richiesta x chiave
*
* Steamware, S.E.L.
* mod: 2011.05.05
*
****************************************/
alter PROCEDURE stp_BORI_getByBolla
(
@RaggrMagazz NVARCHAR(2),
@GruppoBolle NVARCHAR(1),
@NumeroBolla NUMERIC(6,0),
@DataBolla NUMERIC(8,0),
@Particolare NVARCHAR(15)
)
AS
SELECT *
FROM RawData.BORI202J
WHERE CDMFS = @RaggrMagazz
AND GRBOS = @GruppoBolle
AND NRBOS = @NumeroBolla
AND DTBOS = @DataBolla
AND CDARS = @Particolare
RETURN
go
/*****************************************
* STORED stp_BORI_getByBollaFull
*
* Cerca la bolla richiesta x chiave completa
*
* Steamware, S.E.L.
* mod: 2011.05.05
*
****************************************/
create PROCEDURE stp_BORI_getByBollaFull
(
@RaggrMagazz NVARCHAR(2),
@GruppoBolle NVARCHAR(1),
@NumeroBolla NUMERIC(6,0),
@DataBolla NUMERIC(8,0),
@Particolare NVARCHAR(15)
)
AS
SELECT *
FROM RawData.BORI202J
WHERE CDMFS = @RaggrMagazz
AND GRBOS = @GruppoBolle
AND NRBOS = @NumeroBolla
AND DTBOS = @DataBolla
AND CDARS = @Particolare
RETURN
go
/*****************************************
* STORED stp_BORI_getByBollaPart
*
* Cerca la bolla richiesta x chiave parziale (no particolare)
*
* Steamware, S.E.L.
* mod: 2011.05.05
*
****************************************/
create PROCEDURE stp_BORI_getByBollaPart
(
@RaggrMagazz NVARCHAR(2),
@GruppoBolle NVARCHAR(1),
@NumeroBolla NUMERIC(6,0),
@DataBolla NUMERIC(8,0)
)
AS
SELECT *
FROM RawData.BORI202J
WHERE CDMFS = @RaggrMagazz
AND GRBOS = @GruppoBolle
AND NRBOS = @NumeroBolla
AND DTBOS = @DataBolla
RETURN
go
commit
go
set xact_abort on
go
begin transaction
go
DELETE FROM dbo.Permessi2Funzione WHERE COD_PERMESSO='MAG_logico' and COD_FUNZIONE=N'GMW_user'
go
commit transaction
go
set xact_abort on
go
begin transaction
go
set ANSI_NULLS on
go
/***************************************
* STORED stp_RLP_eliminaNonPrelevate
*
* elimina eventuali righe non prelevate
*
* Steamware, S.E.L.
* mod: 2010.08.31
*
****************************************/
create PROCEDURE stp_RLP_eliminaNonPrelevate
(
@CodLista NVARCHAR(12)
)
AS
DELETE FROM RigheListePrelievo
WHERE CodLista = @CodLista
AND Prelevato = 0
RETURN
go
commit
go
set xact_abort on
go
begin transaction
go
set ANSI_NULLS on
go
/*****************************************
* STORED stp_DtMtrx_import
*
* Recupera dati Gitterbox/DataMatrix partendo leggendo dati successivi all'ultimo import e importanto in tab GMW
*
* Steamware, S.E.L.
* mod: 2011.04.29
*
****************************************/
alter PROCEDURE stp_DtMtrx_import
(
@CodCS VARCHAR(2),
@IdxPosizione INT
)
AS
------------------------------------------------------------------------------------------------------
-- leggo data ultimo import (o creo record...)
------------------------------------------------------------------------------------------------------
DECLARE @nomeFlusso AS NVARCHAR(50)
DECLARE @lastImport AS DATETIME
DECLARE @trovati AS INT
-- imposto valori
SET @nomeFlusso = 'DataMatrix'
SET @lastImport = DATEADD(yy,-10,GETDATE()) -- inizializzo a -10 anni ...
-- sistemo tab registrazione import...
BEGIN TRAN
-- cerco nella tab log ultima data caricamento
SET @trovati = (
SELECT COUNT(*)
FROM logImportFlussi
WHERE NomeFlusso = @nomeFlusso
)
-- controllo se record c'è...
IF(@trovati > 0)
BEGIN
SET @lastImport = ( SELECT LastImport FROM LogImportFlussi WHERE NomeFlusso = @nomeFlusso )
END
ELSE
BEGIN
-- lo creo!
INSERT INTO LogImportFlussi(NomeFlusso, LastImport)
VALUES (@nomeFlusso, @lastImport)
END
COMMIT TRAN
------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------
-- ora gestisco il vero caricamento...
------------------------------------------------------------------------------------------------------
-- filtro e salvo in tabella... gitterbox validi SOLO se iniziano per "U"
DECLARE @newData TABLE
(
CodDataMatrix numeric(23, 0) ,
CodGitterbox char(10) ,
NumConchiglia int ,
NumDisegno numeric(7, 0) ,
EsponenteDisegno tinyint ,
CodDifettoScarto varchar(5) ,
InizioPreparazione smalldatetime ,
FinePreparazione smalldatetime ,
InizioIniezione smalldatetime ,
FineIniezione smalldatetime ,
MagDestinazione varchar(2) ,
DataImport smalldatetime
)
INSERT INTO @newData
SELECT CodDataMatrix, CodGitterbox, NumConchiglia, NumDisegno, EsponenteDisegno, CodDifettoScarto, InizioPreparazione, FinePreparazione, InizioIniezione, FineIniezione, MagDestinazione, DataImport
FROM v_trasfDataMatrix
WHERE DataImport > @lastImport AND LEFT(CodGitterbox, 1) = 'U'
-- creo UDC da gitterbox nuovi
INSERT INTO ElencoCartellini(UDC, Particolare, DataFus)
SELECT DISTINCT nd.CodGitterbox, null, MIN( InizioIniezione)
FROM @newData nd LEFT OUTER JOIN ElencoCartellini ec ON nd.CodGitterbox COLLATE SQL_Latin1_General_CP1_CI_AS = ec.UDC
WHERE ec.UDC IS NULL
GROUP BY nd.CodGitterbox
DECLARE @udc NVARCHAR(50)
DECLARE @Particolare NVARCHAR(50)
DECLARE @NumDisegno NVARCHAR(50)
DECLARE @EsponenteDisegno NVARCHAR(50)
DECLARE @Qta INT
DECLARE @IdxCellaTo INT
DECLARE @adesso DATETIME
DECLARE @posTrovate INT
SET @adesso = GETDATE()
SET @posTrovate = 0
DECLARE cursoreImport CURSOR FOR
SELECT nd.CodGitterbox, tp.Particolare, tp.NumDisegno, tp.EsponenteDisegno, dbo.getNumDatamatrix(nd.CodGitterbox) FROM @newData nd
INNER JOIN v_transcParticolari tp ON nd.NumDisegno = tp.NumDisegno AND nd.EsponenteDisegno = tp.EsponenteDisegno
OPEN cursoreImport
FETCH NEXT FROM cursoreImport INTO @udc, @Particolare, @NumDisegno, @EsponenteDisegno, @Qta
WHILE @@FETCH_STATUS = 0
BEGIN
-- aggiorno gli UDC gitterbox esistenti per quantità tra quelli dei dati da importare...
UPDATE ElencoCartellini
SET CodCS = @CodCS,
IdxPosizione = @IdxPosizione,
CreateDate = @adesso,
Particolare = @Particolare,
DisegnoGrezzo = @NumDisegno,
Esponente = @EsponenteDisegno,
Qta = @Qta,
Figura = '',
CodImballo ='',
Tara = 0,
PesoTot = 0,
PesoCad = 0,
CodStato = 'Fin',
NumCont = 1,
TurnoFus = 0,
ModDate = @adesso
WHERE UDC = @udc
-- indico cella UDC corrente... calcolo la prima cella della nuova posizione...
SET @IdxCellaTo = (
SELECT TOP 1 IdxCella FROM Celle
WHERE IdxBlocco = (
SELECT IdxBlocco FROM Blocchi
WHERE CodMag=CAST(@IdxPosizione AS NVARCHAR(50)))
)
-- controllo se posizione non ancora creata...
SET @posTrovate = ( SELECT COUNT(*) FROM PosizioneUdcCorrente WHERE UDC = @udc )
IF( @posTrovate =0)
BEGIN
INSERT INTO PosizioneUdcCorrente
VALUES (@udc, @IdxCellaTo, @CodCS, @adesso)
END
FETCH NEXT FROM cursoreImport INTO @udc, @Particolare, @NumDisegno, @EsponenteDisegno, @Qta
END
CLOSE cursoreImport
DEALLOCATE cursoreImport
-- inserisco datamatrix da ultimo import
INSERT INTO ElencoDataMatrix
SELECT * FROM @newData
-- aggiorno dati ultimo caricamento
SET @lastImport = ( SELECT ISNULL(MAX(DataImport),@lastImport) FROM @newData )
UPDATE LogImportFlussi
SET LastImport = @lastImport
WHERE NomeFlusso = @nomeFlusso
RETURN
go
commit
go
-- registro versione...
INSERT INTO [dbo].[LogUpdateDb] ([Versione],[Data]) VALUES(365, GETDATE())
GO
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+9 -9
View File
@@ -164,17 +164,17 @@
"InstallerClass" = "11:FALSE"
"CustomActionData" = "8:"
}
"{4AA51A2D-7D85-4A59-BA75-B0809FC8B380}:_D319A61185C34B1AB060068A19672F73"
"{4AA51A2D-7D85-4A59-BA75-B0809FC8B380}:_7519A185BED94AE08BB460F3DF76B696"
{
"Name" = "8:Primary output from IISConsoleVB (Active)"
"Condition" = "8:"
"Object" = "8:_8BDD7AA9D46A46EC80880F83F13C902E"
"FileType" = "3:2"
"InstallAction" = "3:1"
"Arguments" = "8:[TARGETVDIR]"
"Arguments" = "8:[TARGETVDIR] \"Windows\""
"EntryPoint" = "8:"
"Sequence" = "3:3"
"Identifier" = "8:_4ECCCB51_69BD_4F9C_9117_6F45F3260059"
"Identifier" = "8:_8D0C72B2_F3A1_486C_8832_02DE186F7359"
"InstallerClass" = "11:FALSE"
"CustomActionData" = "8:"
}
@@ -349,14 +349,14 @@
{
"Name" = "8:Microsoft Visual Studio"
"ProductName" = "8:GMW"
"ProductCode" = "8:{33571C57-DCDE-46D3-8BA4-37F8EB24358A}"
"PackageCode" = "8:{76659B99-604B-442B-AE85-C2433B4C927D}"
"ProductCode" = "8:{A692FCF3-B3AD-4325-8309-47B77F8A359C}"
"PackageCode" = "8:{A2242B3B-61AA-46B1-B359-B26D7D784AE1}"
"UpgradeCode" = "8:{C9BC0732-DC92-4336-BAC9-A05A5D2A97C0}"
"RestartWWWService" = "11:TRUE"
"RemovePreviousVersions" = "11:TRUE"
"RemovePreviousVersions" = "11:FALSE"
"DetectNewerInstalledVersion" = "11:TRUE"
"InstallAllUsers" = "11:FALSE"
"ProductVersion" = "8:1.0.355"
"ProductVersion" = "8:1.0.374"
"Manufacturer" = "8:SteamWare s.r.l."
"ARPHELPTELEPHONE" = "8:+39-035460560"
"ARPHELPLINK" = "8:http://www.steamware.net"
@@ -829,7 +829,7 @@
}
"{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_4FD0E5B75A7F47B79080EC0983BE6583"
{
"SourcePath" = "8:..\\..\\SetDirectoryPermission\\obj\\Release\\SetDirectoryPermission.exe"
"SourcePath" = "8:..\\..\\SetDirectoryPermission\\obj\\Debug\\SetDirectoryPermission.exe"
"TargetName" = "8:"
"Tag" = "8:"
"Folder" = "8:_5606017201AE45B480A8ABD8B8D68264"
@@ -857,7 +857,7 @@
}
"{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_8BDD7AA9D46A46EC80880F83F13C902E"
{
"SourcePath" = "8:..\\..\\IISCustomActionVB\\IISConsoleVB\\obj\\Release\\IISConsoleVB.exe"
"SourcePath" = "8:..\\..\\IISCustomActionVB\\IISConsoleVB\\obj\\Debug\\IISConsoleVB.exe"
"TargetName" = "8:"
"Tag" = "8:"
"Folder" = "8:_5606017201AE45B480A8ABD8B8D68264"
Binary file not shown.