commit di sicurezza prima di modifiche al dataset
git-svn-id: https://keyhammer.ath.cx/svn/GMW/trunk@102 365432ac-a1b5-4ffd-bb28-6d3099d32164
This commit is contained in:
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -13,7 +13,11 @@
|
||||
<asp:Label ID="lblTest" runat="server" Text="Label"></asp:Label>
|
||||
|
||||
</div>
|
||||
<asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="Button" />
|
||||
<asp:Button ID="Button1" runat="server" onclick="Button1_Click"
|
||||
Text="Test Insert Liste Prelievo" />
|
||||
<br />
|
||||
<asp:Button ID="Button2" runat="server" Text="Test Modifica Lista"
|
||||
onclick="Button2_Click" />
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -18,7 +18,11 @@ namespace GMW
|
||||
protected void Button1_Click(object sender, EventArgs e)
|
||||
{
|
||||
MagClass.magazzino.creaListaPrelievo("MA", "20", "P00505005162", "NEUTRO", "10", 1500, "I0054");
|
||||
}
|
||||
|
||||
protected void Button2_Click(object sender, EventArgs e)
|
||||
{
|
||||
MagClass.magazzino.iniziaListaPrelievo("MA", "KMA100600005", "0000000000000080");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Generated
+9
@@ -39,5 +39,14 @@ namespace GMW {
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Button Button1;
|
||||
|
||||
/// <summary>
|
||||
/// Button2 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 Button2;
|
||||
}
|
||||
}
|
||||
|
||||
Generated
+30
-1
@@ -16771,7 +16771,7 @@ SELECT CodLista, CodTipoLista, CodCS, DataCreaz, CodCliente, RagSociale, CodSogg
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
private void InitCommandCollection() {
|
||||
this._commandCollection = new global::System.Data.SqlClient.SqlCommand[3];
|
||||
this._commandCollection = new global::System.Data.SqlClient.SqlCommand[4];
|
||||
this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
|
||||
this._commandCollection[0].Connection = this.Connection;
|
||||
this._commandCollection[0].CommandText = "SELECT * FROM dbo.ElencoListePrelievo";
|
||||
@@ -16801,6 +16801,13 @@ SELECT CodLista, CodTipoLista, CodCS, DataCreaz, CodCliente, RagSociale, CodSogg
|
||||
this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Esponente", global::System.Data.SqlDbType.NVarChar, 6, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
|
||||
this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodImballo", global::System.Data.SqlDbType.NVarChar, 15, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
|
||||
this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@QtaTot", global::System.Data.SqlDbType.Decimal, 9, global::System.Data.ParameterDirection.Input, 10, 2, 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_updateCodSoggettoListePrelievo";
|
||||
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("@NewCodSoggetto", global::System.Data.SqlDbType.NChar, 16, 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("@CodListaAttuale", global::System.Data.SqlDbType.VarChar, 12, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
@@ -16929,6 +16936,28 @@ SELECT CodLista, CodTipoLista, CodCS, DataCreaz, CodCliente, RagSociale, CodSogg
|
||||
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_magazzino.ElencoListePrelievoDataTable updateCodSoggetto(string NewCodSoggetto, string CodListaAttuale) {
|
||||
this.Adapter.SelectCommand = this.CommandCollection[3];
|
||||
if ((NewCodSoggetto == null)) {
|
||||
this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value;
|
||||
}
|
||||
else {
|
||||
this.Adapter.SelectCommand.Parameters[1].Value = ((string)(NewCodSoggetto));
|
||||
}
|
||||
if ((CodListaAttuale == null)) {
|
||||
this.Adapter.SelectCommand.Parameters[2].Value = global::System.DBNull.Value;
|
||||
}
|
||||
else {
|
||||
this.Adapter.SelectCommand.Parameters[2].Value = ((string)(CodListaAttuale));
|
||||
}
|
||||
DS_magazzino.ElencoListePrelievoDataTable dataTable = new DS_magazzino.ElencoListePrelievoDataTable();
|
||||
this.Adapter.Fill(dataTable);
|
||||
return dataTable;
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
|
||||
public virtual int Update(DS_magazzino.ElencoListePrelievoDataTable dataTable) {
|
||||
|
||||
+514
-502
File diff suppressed because it is too large
Load Diff
@@ -19,7 +19,7 @@
|
||||
<Shape ID="DesignTable:V_MagazziniOverview" ZOrder="8" X="659" Y="1045" Height="343" Width="271" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="235" />
|
||||
<Shape ID="DesignTable:V_DettMagPart" ZOrder="7" X="993" Y="985" Height="362" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
|
||||
<Shape ID="DesignTable:TipoListaPrelievo" ZOrder="5" X="671" Y="892" Height="134" Width="244" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="83" />
|
||||
<Shape ID="DesignTable:ElencoListePrelievo" ZOrder="1" X="359" Y="805" Height="309" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="228" />
|
||||
<Shape ID="DesignTable:ElencoListePrelievo" ZOrder="1" X="344" Y="812" Height="326" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="228" />
|
||||
<Shape ID="DesignTable:RigheListePrelievo" ZOrder="4" X="52" Y="850" Height="172" Width="252" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="121" />
|
||||
</Shapes>
|
||||
<Connectors>
|
||||
@@ -99,11 +99,11 @@
|
||||
<RoutePoints>
|
||||
<Point>
|
||||
<X>671</X>
|
||||
<Y>959</Y>
|
||||
<Y>966</Y>
|
||||
</Point>
|
||||
<Point>
|
||||
<X>659</X>
|
||||
<Y>959</Y>
|
||||
<X>644</X>
|
||||
<Y>966</Y>
|
||||
</Point>
|
||||
</RoutePoints>
|
||||
</Connector>
|
||||
@@ -122,12 +122,12 @@
|
||||
<Connector ID="DesignRelation:FK_RigheListePrelievo_ElencoListePrelievo1" ZOrder="2" LineWidth="11">
|
||||
<RoutePoints>
|
||||
<Point>
|
||||
<X>359</X>
|
||||
<Y>821</Y>
|
||||
<X>344</X>
|
||||
<Y>828</Y>
|
||||
</Point>
|
||||
<Point>
|
||||
<X>266</X>
|
||||
<Y>821</Y>
|
||||
<Y>828</Y>
|
||||
</Point>
|
||||
<Point>
|
||||
<X>266</X>
|
||||
|
||||
@@ -292,13 +292,29 @@ namespace GMW_data
|
||||
|
||||
// la query recupera la lista in base al CodLista o TAB o RIGA
|
||||
|
||||
//DS_magazzino.ElencoListePrelievoDataTable tabella = taElencoListePrelievo.getByCodLista(CodLista);
|
||||
//DS_magazzino.ElencoListePrelievoRow riga = taElencoListePrelievo.getByCodLista(CodLista)[0];
|
||||
DS_magazzino.ElencoListePrelievoDataTable tabella = taElencoListePrelievo.getByCodLista(CodLista);
|
||||
DS_magazzino.ElencoListePrelievoRow riga = tabella[0];
|
||||
|
||||
//if (tabella.Rows.Count > 0)
|
||||
//{
|
||||
|
||||
//}
|
||||
// se la lista esiste...
|
||||
if (tabella.Rows.Count > 0)
|
||||
{
|
||||
// se la lista è ancora non completata
|
||||
if (riga.Completata == false)
|
||||
{
|
||||
taElencoListePrelievo.updateCodSoggetto(CodSoggetto, CodLista);
|
||||
answ = esitoOperazione.ok;
|
||||
}
|
||||
// se è già completata dà errore
|
||||
else
|
||||
{
|
||||
answ = esitoOperazione.errore_readOnly;
|
||||
}
|
||||
}
|
||||
// se la lista non esiste dai errore
|
||||
else
|
||||
{
|
||||
answ = esitoOperazione.errore;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user