Update x gestione selezione singola macchina/tutte x ODL
This commit is contained in:
@@ -17,9 +17,22 @@
|
||||
</div>
|
||||
<div class="row pb-3">
|
||||
<div class="col-sm-6">
|
||||
<asp:DropDownList runat="server" ID="ddlODL" DataSourceID="odsODL" DataTextField="label" DataValueField="value" CssClass="form-control form-control-lg btn-dark" OnSelectedIndexChanged="ddlODL_SelectedIndexChanged" AutoPostBack="True">
|
||||
</asp:DropDownList>
|
||||
<asp:ObjectDataSource runat="server" ID="odsODL" OldValuesParameterFormatString="original_{0}" SelectMethod="getUnused" TypeName="MapoDb.DS_UtilityTableAdapters.v_selODLTableAdapter"></asp:ObjectDataSource>
|
||||
<div class="col-auto px-0">
|
||||
<label class="sr-only" for="inlineFormInputGroup">Username</label>
|
||||
<div class="input-group mb-2">
|
||||
<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:ObjectDataSource runat="server" ID="odsODL" OldValuesParameterFormatString="original_{0}" SelectMethod="getUnused" TypeName="MapoDb.DS_UtilityTableAdapters.v_selODLTableAdapter">
|
||||
<SelectParameters>
|
||||
<asp:ControlParameter ControlID="hfIdxMacchina" DefaultValue="0" Name="IdxMacchina" PropertyName="Value" Type="String" />
|
||||
</SelectParameters>
|
||||
</asp:ObjectDataSource>
|
||||
<div class="input-group-append">
|
||||
<asp:CheckBox runat="server" ID="chkTutti" Text="TUTTI" CssClass="btn btn-secondary btn-sm" AutoPostBack="true" OnCheckedChanged="chkTutti_CheckedChanged" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div runat="server" id="divNote" visible="false" class="pt-2">
|
||||
<asp:TextBox runat="server" ID="txtNote" TextMode="MultiLine" Height="4em" CssClass="form-control" placeholder="Note attrezzaggio" />
|
||||
</div>
|
||||
|
||||
@@ -37,6 +37,7 @@ namespace MoonProTablet.WebUserControls
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal(string.Format("idxMacchina-{0}", uid), value);
|
||||
hfIdxMacchina.Value = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
@@ -170,7 +171,7 @@ namespace MoonProTablet.WebUserControls
|
||||
{
|
||||
logger.lg.scriviLog(string.Format("Eccezione in recupero dati currHasOdl! {0}{1}", Environment.NewLine, exc), tipoLog.EXCEPTION);
|
||||
}
|
||||
bool hasNewOdl = DataLayer.obj.taSelOdlFree.getUnused().Rows.Count > 1;
|
||||
bool hasNewOdl = DataLayer.obj.taSelOdlFree.getUnused(idxMacchina).Rows.Count > 1;
|
||||
// sistemo buttons!
|
||||
lbtStartAttr.Enabled = (isEnabled && (!inAttr && hasNewOdl));
|
||||
lbtStartProd.Enabled = (isEnabled && inAttr);
|
||||
@@ -493,6 +494,11 @@ namespace MoonProTablet.WebUserControls
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void ddlODL_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
checkDDL();
|
||||
}
|
||||
|
||||
private void checkDDL()
|
||||
{
|
||||
if (ddlODL.SelectedIndex > 0)
|
||||
{
|
||||
@@ -505,6 +511,7 @@ namespace MoonProTablet.WebUserControls
|
||||
showNoteTC(false);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// mostra/nasconde note
|
||||
/// </summary>
|
||||
@@ -562,6 +569,19 @@ namespace MoonProTablet.WebUserControls
|
||||
checkBtnStatus();
|
||||
}
|
||||
|
||||
|
||||
protected void chkTutti_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
// SE selezionato tutti cambio valore idxMacchina...
|
||||
if(chkTutti.Checked)
|
||||
{
|
||||
hfIdxMacchina.Value = "0";
|
||||
}
|
||||
else
|
||||
{
|
||||
hfIdxMacchina.Value = idxMacchina;
|
||||
}
|
||||
ddlODL.DataBind();
|
||||
checkDDL();
|
||||
}
|
||||
}
|
||||
}
|
||||
+18
@@ -39,6 +39,15 @@ namespace MoonProTablet.WebUserControls {
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.DropDownList ddlODL;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo hfIdxMacchina.
|
||||
/// </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 hfIdxMacchina;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo odsODL.
|
||||
/// </summary>
|
||||
@@ -48,6 +57,15 @@ namespace MoonProTablet.WebUserControls {
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.ObjectDataSource odsODL;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo chkTutti.
|
||||
/// </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.CheckBox chkTutti;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo divNote.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user