fix vari + loop errore update

This commit is contained in:
Samuele E. Locatelli
2021-01-27 17:32:49 +01:00
parent 2d18d5dd65
commit e1861674a1
8 changed files with 78 additions and 10 deletions
+4 -4
View File
@@ -148,7 +148,7 @@ namespace MP_ADM.WebUserControls
DataLayerObj.taPromOut.updAttiva(IdxPromessa, isAttivabile);
}
}
doUpdate();
updateGrView();
}
/// <summary>
@@ -157,6 +157,7 @@ namespace MP_ADM.WebUserControls
private void updateGrView()
{
grView.DataBind();
raiseNewVal();
}
#endregion Private Methods
@@ -276,7 +277,7 @@ namespace MP_ADM.WebUserControls
}
}
}
doUpdate();
updateGrView();
}
/// <summary>
@@ -390,8 +391,7 @@ namespace MP_ADM.WebUserControls
public void doUpdate()
{
updateGrView();
raiseSelNew();
grView.DataBind();
}
/// <summary>
@@ -105,6 +105,7 @@ namespace MP_ADM.WebUserControls
decimal tempoMinTot = 0;
Dictionary<string, int> ElArticoli = new Dictionary<string, int>();
string CodArt = "";
txtNumPz.Text = "0";
foreach (GridViewRow riga in grView.Rows)
{
QtaRem = 0;
+1
View File
@@ -46,6 +46,7 @@
<asp:DropDownList runat="server" ID="ddlODL" DataSourceID="odsODL" DataTextField="label" DataValueField="value" CssClass="form-control btn-default textCondens" OnSelectedIndexChanged="ddlODL_SelectedIndexChanged" AutoPostBack="True">
</asp:DropDownList>
<asp:HiddenField runat="server" ID="hfIdxMacchina" />
<asp:HiddenField runat="server" ID="hfFiltroAttivabili" />
<asp:ObjectDataSource runat="server" ID="odsODL" OldValuesParameterFormatString="original_{0}" SelectMethod="getUnused" TypeName="MapoDb.DS_UtilityTableAdapters.v_selODLTableAdapter" FilterExpression=" value = 0 OR label like '%{0}%' ">
<FilterParameters>
<asp:ControlParameter ControlID="txtSearchODL" DefaultValue="" Name="value" Type="String" PropertyName="Text" />
+4
View File
@@ -1276,6 +1276,10 @@ namespace MoonProTablet.WebUserControls
{
mod_tempoMSMC.modoTempo = timeMode.MC;
}
// verifico parametro attivabilità come filtraggio
bool OptOdlStartAttivabili = memLayer.ML.cdvb("OptOdlStartAttivabili");
hfFiltroAttivabili.Value = $"{OptOdlStartAttivabili}";
// fix buttons
fixSplitBtn(false);
}
cmp_newODL.eh_newVal += Cmp_newODL_eh_newVal;
+9
View File
@@ -86,6 +86,15 @@ namespace MoonProTablet.WebUserControls
/// </remarks>
protected global::System.Web.UI.WebControls.HiddenField hfIdxMacchina;
/// <summary>
/// Controllo hfFiltroAttivabili.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::System.Web.UI.WebControls.HiddenField hfFiltroAttivabili;
/// <summary>
/// Controllo odsODL.
/// </summary>
+48 -3
View File
@@ -3280,6 +3280,8 @@ namespace MapoDb {
private global::System.Data.DataColumn columnDescCliente;
private global::System.Data.DataColumn columnCodCliente;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
public PromesseOUTDataTable() {
@@ -3497,6 +3499,14 @@ namespace MapoDb {
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
public global::System.Data.DataColumn CodClienteColumn {
get {
return this.columnCodCliente;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
[global::System.ComponentModel.Browsable(false)]
@@ -3556,7 +3566,8 @@ namespace MapoDb {
string DescrMacc,
string Disegno,
string DescArticolo,
string DescCliente) {
string DescCliente,
string CodCliente) {
PromesseOUTRow rowPromesseOUTRow = ((PromesseOUTRow)(this.NewRow()));
object[] columnValuesArray = new object[] {
null,
@@ -3581,7 +3592,8 @@ namespace MapoDb {
DescrMacc,
Disegno,
DescArticolo,
DescCliente};
DescCliente,
CodCliente};
rowPromesseOUTRow.ItemArray = columnValuesArray;
this.Rows.Add(rowPromesseOUTRow);
return rowPromesseOUTRow;
@@ -3634,6 +3646,7 @@ namespace MapoDb {
this.columnDisegno = base.Columns["Disegno"];
this.columnDescArticolo = base.Columns["DescArticolo"];
this.columnDescCliente = base.Columns["DescCliente"];
this.columnCodCliente = base.Columns["CodCliente"];
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
@@ -3685,6 +3698,8 @@ namespace MapoDb {
base.Columns.Add(this.columnDescArticolo);
this.columnDescCliente = new global::System.Data.DataColumn("DescCliente", typeof(string), null, global::System.Data.MappingType.Element);
base.Columns.Add(this.columnDescCliente);
this.columnCodCliente = new global::System.Data.DataColumn("CodCliente", typeof(string), null, global::System.Data.MappingType.Element);
base.Columns.Add(this.columnCodCliente);
this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] {
this.columnidxPromessa}, true));
this.columnidxPromessa.AutoIncrement = true;
@@ -3727,6 +3742,7 @@ namespace MapoDb {
this.columnDescArticolo.MaxLength = 250;
this.columnDescCliente.ReadOnly = true;
this.columnDescCliente.MaxLength = 500;
this.columnCodCliente.MaxLength = 50;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
@@ -8056,6 +8072,22 @@ namespace MapoDb {
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
public string CodCliente {
get {
try {
return ((string)(this[this.tablePromesseOUT.CodClienteColumn]));
}
catch (global::System.InvalidCastException e) {
throw new global::System.Data.StrongTypingException("Il valore della colonna \'CodCliente\' nella tabella \'PromesseOUT\' è DBNull.", e);
}
}
set {
this[this.tablePromesseOUT.CodClienteColumn] = value;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
public bool IsCodMacchinaNull() {
@@ -8163,6 +8195,18 @@ namespace MapoDb {
public void SetDescClienteNull() {
this[this.tablePromesseOUT.DescClienteColumn] = global::System.Convert.DBNull;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
public bool IsCodClienteNull() {
return this.IsNull(this.tablePromesseOUT.CodClienteColumn);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
public void SetCodClienteNull() {
this[this.tablePromesseOUT.CodClienteColumn] = global::System.Convert.DBNull;
}
}
/// <summary>
@@ -11487,6 +11531,7 @@ SELECT idxPromessa, KeyRichiesta, KeyBCode, Attivabile, IdxODL, CodArticolo, Cod
tableMapping.ColumnMappings.Add("Disegno", "Disegno");
tableMapping.ColumnMappings.Add("DescArticolo", "DescArticolo");
tableMapping.ColumnMappings.Add("DescCliente", "DescCliente");
tableMapping.ColumnMappings.Add("CodCliente", "CodCliente");
this._adapter.TableMappings.Add(tableMapping);
}
@@ -11530,7 +11575,7 @@ SELECT idxPromessa, KeyRichiesta, KeyBCode, Attivabile, IdxODL, CodArticolo, Cod
this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@onlyFree", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 1, 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_PODL_insertQuery";
this._commandCollection[4].CommandText = "dbo.stp_PODL_OUT_insertQuery";
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("@KeyRichiesta", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+10 -2
View File
@@ -384,6 +384,7 @@ FROM v_PODL_OUT_exp</CommandText>
<Mapping SourceColumn="Disegno" DataSetColumn="Disegno" />
<Mapping SourceColumn="DescArticolo" DataSetColumn="DescArticolo" />
<Mapping SourceColumn="DescCliente" DataSetColumn="DescCliente" />
<Mapping SourceColumn="CodCliente" DataSetColumn="CodCliente" />
</Mappings>
<Sources>
<DbSource ConnectionRef="MoonPro_ES3ConnectionString (Settings)" DbObjectName="MoonPro_ES3.dbo.stp_PODL_OUT_deleteQuery" DbObjectType="StoredProcedure" GenerateShortCommands="true" GeneratorSourceName="deleteQuery" Modifier="Public" Name="deleteQuery" QueryType="NoData" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDataBy" UserSourceName="deleteQuery">
@@ -424,10 +425,10 @@ FROM v_PODL_OUT_exp</CommandText>
</DbCommand>
</SelectCommand>
</DbSource>
<DbSource ConnectionRef="MoonPro_ES3ConnectionString (Settings)" DbObjectName="MoonPro_ES3.dbo.stp_PODL_insertQuery" DbObjectType="StoredProcedure" GenerateShortCommands="true" GeneratorSourceName="insertQuery" Modifier="Public" Name="insertQuery" QueryType="NoData" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDataBy1" UserSourceName="insertQuery">
<DbSource ConnectionRef="MoonPro_ES3ConnectionString (Settings)" DbObjectName="MoonPro_ES3.dbo.stp_PODL_OUT_insertQuery" DbObjectType="StoredProcedure" GenerateShortCommands="true" GeneratorSourceName="insertQuery" Modifier="Public" Name="insertQuery" QueryType="NoData" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDataBy1" UserSourceName="insertQuery">
<SelectCommand>
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
<CommandText>dbo.stp_PODL_insertQuery</CommandText>
<CommandText>dbo.stp_PODL_OUT_insertQuery</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="@KeyRichiesta" Precision="0" ProviderType="NVarChar" Scale="0" Size="50" SourceColumnNullMapping="false" SourceVersion="Current" />
@@ -1136,6 +1137,13 @@ ORDER BY TotOreRich DESC</CommandText>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="CodCliente" msprop:Generator_ColumnVarNameInTable="columnCodCliente" msprop:Generator_ColumnPropNameInRow="CodCliente" msprop:Generator_ColumnPropNameInTable="CodClienteColumn" msprop:Generator_UserColumnName="CodCliente" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="50" />
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
+1 -1
View File
@@ -12,7 +12,7 @@
<Shape ID="DesignTable:planStatsMacc" ZOrder="15" X="448" Y="292" Height="191" Width="229" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="121" />
<Shape ID="DesignTable:Richieste" ZOrder="2" X="102" Y="683" Height="456" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="330" />
<Shape ID="DesignTable:PromesseIN" ZOrder="3" X="481" Y="717" Height="305" Width="214" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
<Shape ID="DesignTable:PromesseOUT" ZOrder="1" X="833" Y="591" Height="402" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="256" />
<Shape ID="DesignTable:PromesseOUT" ZOrder="1" X="827" Y="580" Height="476" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="311" />
<Shape ID="DesignTable:ConfWeek" ZOrder="14" X="739" Y="56" Height="267" Width="205" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="216" />
<Shape ID="DesignTable:CalStop" ZOrder="13" X="950" Y="61" Height="153" Width="276" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="64" />
<Shape ID="DesignTable:CalDisp" ZOrder="8" X="1169" Y="630" Height="191" Width="273" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="102" />