Update db

Fix metodi elenco UDC by parent/child
Fix metodo show completo dati cartellino da UDC

git-svn-id: https://keyhammer.ath.cx/svn/GMW/trunk@27 365432ac-a1b5-4ffd-bb28-6d3099d32164
This commit is contained in:
samuele
2010-04-28 15:48:05 +00:00
parent b0782671ce
commit dbf058c5eb
13 changed files with 96 additions and 22 deletions
+19 -12
View File
@@ -150,24 +150,28 @@ namespace GMW.WS
double answ = 0;
try
{
answ = DataProxy.obj.taCartellini.stp_getStatoByUdc(UDC)[0].Tara;
answ = DataProxy.obj.taCartellini.stp_getByUdc(UDC)[0].Tara;
}
catch
{ }
return answ;
}
#if false
}
/// <summary>
/// Restituisce l'elenco degli UDC parent di quello specificato
/// </summary>
/// <param name="UDC">codice dell'UDC</param>
/// <returns></returns>
[WebMethod(Description = "Restituisce l'elenco degli UDC parent di quello specificato")]
public string[] UdcInfo_GetParentUdcList(string UDC_rich)
public string[] UdcInfo_GetUdcParentList(string UDC)
{
int numRec = 1; //calcolare!
GMW_data.DS_Applicazione.RelazUDCDataTable tabRelUdc = DataProxy.obj.taRelazUDC.stp_getParent(UDC);
int numRec = tabRelUdc.Rows.Count;
string[] answ = new string[numRec];
// caricare dati!
for (int i = 0; i < numRec; i++)
{
answ[i] = tabRelUdc[i].UDC_parent;
}
return answ;
}
/// <summary>
@@ -176,11 +180,16 @@ namespace GMW.WS
/// <param name="UDC">codice dell'UDC</param>
/// <returns></returns>
[WebMethod(Description = "Restituisce l'elenco degli UDC child di quello specificato")]
public string[] UdcInfo_GetChildUdcList(string UDC_rich)
public string[] UdcInfo_GetUdcChildList(string UDC)
{
int numRec = 1; //calcolare!
GMW_data.DS_Applicazione.RelazUDCDataTable tabRelUdc = DataProxy.obj.taRelazUDC.stp_getChild(UDC);
int numRec = tabRelUdc.Rows.Count;
string[] answ = new string[numRec];
// caricare dati!!!
// caricare dati!
for (int i = 0; i < numRec; i++)
{
answ[i] = tabRelUdc[i].UDC_child;
}
return answ;
}
/// <summary>
@@ -189,13 +198,11 @@ namespace GMW.WS
/// <param name="UDC">codice dell'UDC</param>
/// <returns></returns>
[WebMethod(Description = "Restituisce tutti i dati dell'UDC indicato")]
public GMW.Type.UDC UdcInfo_GetFullData(string UDC_rich)
public GMW.Type.Cartellino UdcInfo_GetFullData(string UDC)
{
GMW.Type.UDC answ = new GMW.Type.UDC();
// caricare dati!!!
GMW.Type.Cartellino answ = new GMW.Type.Cartellino(DataProxy.obj.taCartellini.stp_getByUdc(UDC)[0]);
return answ;
}
#endif
#if false
/// <summary>
/// Controlla che il codice imballo inviato sia valido (pre creazione TARA)
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+47 -3
View File
@@ -10696,11 +10696,23 @@ SELECT UDC_parent, UDC_child FROM RelazUDC WHERE (UDC_child = @UDC_child) AND (U
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
private void InitCommandCollection() {
this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1];
this._commandCollection = new global::System.Data.SqlClient.SqlCommand[3];
this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
this._commandCollection[0].Connection = this.Connection;
this._commandCollection[0].CommandText = "SELECT UDC_parent, UDC_child FROM dbo.RelazUDC";
this._commandCollection[0].CommandType = global::System.Data.CommandType.Text;
this._commandCollection[1] = new global::System.Data.SqlClient.SqlCommand();
this._commandCollection[1].Connection = this.Connection;
this._commandCollection[1].CommandText = "dbo.stp_getUDC_Child";
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("@UDC", global::System.Data.SqlDbType.VarChar, 50, 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_getUDC_Parent";
this._commandCollection[2].CommandType = global::System.Data.CommandType.StoredProcedure;
this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@UDC", global::System.Data.SqlDbType.VarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
@@ -10725,6 +10737,38 @@ SELECT UDC_parent, UDC_child FROM RelazUDC WHERE (UDC_child = @UDC_child) AND (U
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_Applicazione.RelazUDCDataTable stp_getChild(string UDC) {
this.Adapter.SelectCommand = this.CommandCollection[1];
if ((UDC == null)) {
this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value;
}
else {
this.Adapter.SelectCommand.Parameters[1].Value = ((string)(UDC));
}
DS_Applicazione.RelazUDCDataTable dataTable = new DS_Applicazione.RelazUDCDataTable();
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_Applicazione.RelazUDCDataTable stp_getParent(string UDC) {
this.Adapter.SelectCommand = this.CommandCollection[2];
if ((UDC == null)) {
this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value;
}
else {
this.Adapter.SelectCommand.Parameters[1].Value = ((string)(UDC));
}
DS_Applicazione.RelazUDCDataTable dataTable = new DS_Applicazione.RelazUDCDataTable();
this.Adapter.Fill(dataTable);
return dataTable;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
public virtual int Update(DS_Applicazione.RelazUDCDataTable dataTable) {
@@ -12545,7 +12589,7 @@ SELECT UDC, CodCS, CodCliente, RagSociale, Particolare, DescParticolare, Disegno
this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@UDC", global::System.Data.SqlDbType.VarChar, 20, 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_getStatoByUdc";
this._commandCollection[2].CommandText = "dbo.stp_getCartellinoByUdc";
this._commandCollection[2].CommandType = global::System.Data.CommandType.StoredProcedure;
this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@UDC", global::System.Data.SqlDbType.VarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
@@ -12626,7 +12670,7 @@ SELECT UDC, CodCS, CodCliente, RagSociale, Particolare, DescParticolare, Disegno
[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_Applicazione.ElencoCartelliniDataTable stp_getStatoByUdc(string UDC) {
public virtual DS_Applicazione.ElencoCartelliniDataTable stp_getByUdc(string UDC) {
this.Adapter.SelectCommand = this.CommandCollection[2];
if ((UDC == null)) {
this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value;
+26 -3
View File
@@ -613,7 +613,30 @@ SELECT UDC_parent, UDC_child FROM RelazUDC WHERE (UDC_child = @UDC_child) AND (U
<Mapping SourceColumn="UDC_parent" DataSetColumn="UDC_parent" />
<Mapping SourceColumn="UDC_child" DataSetColumn="UDC_child" />
</Mappings>
<Sources />
<Sources>
<DbSource ConnectionRef="GMWConnectionString (Settings)" DbObjectName="GMW.dbo.stp_getUDC_Child" DbObjectType="StoredProcedure" GenerateMethods="Get" GenerateShortCommands="true" GeneratorGetMethodName="stp_getChild" GetMethodModifier="Public" GetMethodName="stp_getChild" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="stp_getChild" UserSourceName="stp_getChild">
<SelectCommand>
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
<CommandText>dbo.stp_getUDC_Child</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="varchar" DbType="AnsiString" Direction="Input" ParameterName="@UDC" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumnNullMapping="false" SourceVersion="Current" />
</Parameters>
</DbCommand>
</SelectCommand>
</DbSource>
<DbSource ConnectionRef="GMWConnectionString (Settings)" DbObjectName="GMW.dbo.stp_getUDC_Parent" DbObjectType="StoredProcedure" GenerateMethods="Get" GenerateShortCommands="true" GeneratorGetMethodName="stp_getParent" GetMethodModifier="Public" GetMethodName="stp_getParent" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="stp_getParent" UserSourceName="stp_getParent">
<SelectCommand>
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
<CommandText>dbo.stp_getUDC_Parent</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="varchar" DbType="AnsiString" Direction="Input" ParameterName="@UDC" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumnNullMapping="false" SourceVersion="Current" />
</Parameters>
</DbCommand>
</SelectCommand>
</DbSource>
</Sources>
</TableAdapter>
<TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="AnagImpiantiTableAdapter" GeneratorDataComponentClassName="AnagImpiantiTableAdapter" Name="AnagImpianti" UserDataComponentName="AnagImpiantiTableAdapter">
<MainSource>
@@ -1068,10 +1091,10 @@ SELECT UDC, CodCS, CodCliente, RagSociale, Particolare, DescParticolare, Disegno
</DbCommand>
</SelectCommand>
</DbSource>
<DbSource ConnectionRef="GMWConnectionString (Settings)" DbObjectName="GMW.dbo.stp_getStatoByUdc" DbObjectType="StoredProcedure" GenerateMethods="Get" GenerateShortCommands="true" GeneratorGetMethodName="stp_getStatoByUdc" GetMethodModifier="Public" GetMethodName="stp_getStatoByUdc" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="stp_getStatoByUdc" UserSourceName="stp_getStatoByUdc">
<DbSource ConnectionRef="GMWConnectionString (Settings)" DbObjectName="GMW.dbo.stp_getCartellinoByUdc" DbObjectType="StoredProcedure" GenerateMethods="Get" GenerateShortCommands="true" GeneratorGetMethodName="stp_getByUdc" GetMethodModifier="Public" GetMethodName="stp_getByUdc" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="stp_getByUdc" UserSourceName="stp_getByUdc">
<SelectCommand>
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
<CommandText>dbo.stp_getStatoByUdc</CommandText>
<CommandText>dbo.stp_getCartellinoByUdc</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="varchar" DbType="AnsiString" Direction="Input" ParameterName="@UDC" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumnNullMapping="false" SourceVersion="Current" />
+2 -2
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="212" ViewPortY="-47" 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="-47" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">
<Shapes>
<Shape ID="DesignTable:AnagStati" ZOrder="19" X="867" Y="533" Height="115" Width="201" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="64" />
<Shape ID="DesignTable:AnagTipoDichiaraz" ZOrder="10" X="1110" Y="696" Height="115" Width="254" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="64" />
@@ -14,7 +14,7 @@
<Shape ID="DesignTable:Impianti2Articoli" ZOrder="15" X="489" Y="35" Height="248" Width="271" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="159" />
<Shape ID="DesignTable:v_ArtInProd" ZOrder="13" X="1187" Y="608" Height="267" Width="271" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="197" />
<Shape ID="DesignTable:StoricoEventi" ZOrder="12" X="855" Y="777" Height="305" Width="221" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
<Shape ID="DesignTable:RelazUDC" ZOrder="9" X="0" Y="42" Height="130" Width="158" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="64" />
<Shape ID="DesignTable:RelazUDC" ZOrder="9" X="27" Y="249" Height="153" Width="201" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="64" />
<Shape ID="DesignTable:AnagImpianti" ZOrder="6" X="853" Y="19" Height="191" Width="224" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="121" />
<Shape ID="DesignTable:AnagCompanySito" ZOrder="5" X="1156" Y="-8" Height="172" Width="253" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="121" />
<Shape ID="DesignTable:AnagBilance" ZOrder="4" X="1261" Y="306" Height="172" Width="244" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="83" />
Binary file not shown.
Binary file not shown.
+1 -1
View File
@@ -53,7 +53,7 @@ public class reportExporter
// tab = (DataTable)GMW_data.DataProxy.obj.taCartellini.getByUdc(UDC);
// break;
case reportRichiesto.CartellinoTara:
tab = (DataTable)GMW_data.DataProxy.obj.taCartellini.stp_getStatoByUdc(UDC);
tab = (DataTable)GMW_data.DataProxy.obj.taCartellini.stp_getByUdc(UDC);
break;
default:
break;
+1 -1
View File
@@ -109,7 +109,7 @@ public class reportPrinter
// tab = (DataTable)GMW_data.DataProxy.obj.taStatoOdpUdc.getByUdc(UDC);
// break;
case reportRichiesto.CartellinoTara:
tab = (DataTable)GMW_data.DataProxy.obj.taCartellini.stp_getStatoByUdc(UDC);
tab = (DataTable)GMW_data.DataProxy.obj.taCartellini.stp_getByUdc(UDC);
break;
default:
break;