aggiunto step x assegnazioen amcchina attività pianificate
This commit is contained in:
@@ -6,17 +6,33 @@
|
||||
<div class="card-header">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-4">
|
||||
<div class="col-2">
|
||||
<h4>PODL attivi</h4>
|
||||
</div>
|
||||
<div class="col-4 text-right">
|
||||
<div class="col-2 text-right">
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-text">
|
||||
<asp:CheckBox runat="server" ID="chkUnassigned" AutoPostBack="True" OnCheckedChanged="chkUnassigned_CheckedChanged" Checked="true" />
|
||||
</div>
|
||||
</div>
|
||||
<asp:Label runat="server" ID="lblUnass" CssClass="input-group-text" Text="Mostra SOLO programmate" />
|
||||
<asp:Label runat="server" ID="lblUnass" CssClass="input-group-text small" Text="Mostra SOLO programmate" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4 text-right" runat="server" id="divMachine">
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-text">
|
||||
<asp:CheckBox runat="server" ID="chkReassign" AutoPostBack="True" Checked="false" OnCheckedChanged="chkReassign_CheckedChanged" />
|
||||
</div>
|
||||
</div>
|
||||
<asp:DropDownList runat="server" ID="ddlSelMacchina" CssClass="form-control" DataSourceID="odsMac" DataTextField="label" DataValueField="value" AppendDataBoundItems="true">
|
||||
<asp:ListItem Text="-- Impianto Originale --" Value="" />
|
||||
</asp:DropDownList>
|
||||
<asp:ObjectDataSource runat="server" ID="odsMac" OldValuesParameterFormatString="original_{0}" SelectMethod="getAttive" TypeName="MapoDb.DS_UtilityTableAdapters.v_selMacchineTableAdapter"></asp:ObjectDataSource>
|
||||
<div class="input-group-append">
|
||||
<asp:LinkButton runat="server" ID="lbtReassignMachine" class="btn btn-info" OnClick="lbtReassignMachine_Click"><i class="fa fa-edit" aria-hidden="true"></i> Riassegna</asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4" runat="server" id="divActions">
|
||||
|
||||
@@ -130,6 +130,17 @@ namespace MP_ADM.WebUserControls
|
||||
}
|
||||
}
|
||||
divActions.Visible = showActions;
|
||||
divMachine.Visible = showActions;
|
||||
}
|
||||
|
||||
private void fixSetMachine()
|
||||
{
|
||||
ddlSelMacchina.Enabled = chkReassign.Checked;
|
||||
lbtReassignMachine.Visible = chkReassign.Checked;
|
||||
if (!chkReassign.Checked)
|
||||
{
|
||||
ddlSelMacchina.SelectedIndex = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -157,6 +168,7 @@ namespace MP_ADM.WebUserControls
|
||||
private void updateGrView()
|
||||
{
|
||||
grView.DataBind();
|
||||
checkActions();
|
||||
raiseNewVal();
|
||||
}
|
||||
|
||||
@@ -199,6 +211,11 @@ namespace MP_ADM.WebUserControls
|
||||
checkActions();
|
||||
}
|
||||
|
||||
protected void chkReassign_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
fixSetMachine();
|
||||
}
|
||||
|
||||
protected void chkSelect_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
checkActions();
|
||||
@@ -280,6 +297,30 @@ namespace MP_ADM.WebUserControls
|
||||
updateGrView();
|
||||
}
|
||||
|
||||
protected void lbtReassignMachine_Click(object sender, EventArgs e)
|
||||
{
|
||||
int IdxPromessa = 0;
|
||||
int IdxOdl = 0;
|
||||
string idxMacchina2Reass = ddlSelMacchina.SelectedValue;
|
||||
if (!string.IsNullOrEmpty(idxMacchina2Reass))
|
||||
{
|
||||
foreach (GridViewRow riga in grView.Rows)
|
||||
{
|
||||
if (((CheckBox)riga.FindControl("chkSelect")).Checked && ((CheckBox)riga.FindControl("chkSelect")).Visible)
|
||||
{
|
||||
int.TryParse(((Label)riga.FindControl("lblIdxOdl")).Text, out IdxOdl);
|
||||
if (IdxOdl == 0)
|
||||
{
|
||||
int.TryParse(((Label)riga.FindControl("lblIdxPromessa")).Text, out IdxPromessa);
|
||||
// riassegno!
|
||||
DataLayerObj.taPromOut.updMacchina(IdxPromessa, idxMacchina2Reass);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
updateGrView();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Richiesto abbassamento priorità = ANTICIPA
|
||||
/// </summary>
|
||||
@@ -322,6 +363,7 @@ namespace MP_ADM.WebUserControls
|
||||
{
|
||||
base.OnInit(e);
|
||||
_idxGridView = "IdxPromessa";
|
||||
fixSetMachine();
|
||||
}
|
||||
|
||||
protected override void OnLoad(EventArgs e)
|
||||
@@ -331,6 +373,7 @@ namespace MP_ADM.WebUserControls
|
||||
{
|
||||
grView.PageSize = pageSize;
|
||||
divActions.Visible = false;
|
||||
divMachine.Visible = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -422,6 +465,7 @@ namespace MP_ADM.WebUserControls
|
||||
public void resetSelezione()
|
||||
{
|
||||
divActions.Visible = false;
|
||||
divMachine.Visible = false;
|
||||
memLayer.ML.emptySessionVal(string.Format("{0}_sel", _idxGridView));
|
||||
grView.SelectedIndex = -1;
|
||||
grView.DataBind();
|
||||
|
||||
@@ -32,6 +32,51 @@ namespace MP_ADM.WebUserControls
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblUnass;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo divMachine.
|
||||
/// </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.HtmlControls.HtmlGenericControl divMachine;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo chkReassign.
|
||||
/// </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 chkReassign;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo ddlSelMacchina.
|
||||
/// </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.DropDownList ddlSelMacchina;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo odsMac.
|
||||
/// </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.ObjectDataSource odsMac;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lbtReassignMachine.
|
||||
/// </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.LinkButton lbtReassignMachine;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo divActions.
|
||||
/// </summary>
|
||||
|
||||
@@ -157,10 +157,10 @@
|
||||
<div class="card-body p-1">
|
||||
<div runat="server" id="divConfirm" class="p-1 border border-success table-success my-1">
|
||||
<asp:LinkButton runat="server" ID="lbtDoPlan" CssClass="btn btn-success btn-block" OnClick="lbtDoPlan_Click" OnClientClick="return confirm('Sei sciuro di voler confermare senza modifica le richieste selezionate?');">
|
||||
<i class="fa fa-thumbs-up" aria-hidden="true"></i> APPROVA e PIANIFICA <i class="fa fa-thumbs-up" aria-hidden="true"></i>
|
||||
<div class="small">
|
||||
approvazione e pianificazione richieste selezionate
|
||||
</div>
|
||||
<i class="fa fa-thumbs-up" aria-hidden="true"></i> APPROVA e PIANIFICA <i class="fa fa-thumbs-up" aria-hidden="true"></i>
|
||||
<div class="small">
|
||||
approvazione e pianificazione richieste selezionate
|
||||
</div>
|
||||
</asp:LinkButton>
|
||||
</div>
|
||||
<div runat="server" id="divCreaGrp" class="p-1 border border-primary table-primary">
|
||||
|
||||
Reference in New Issue
Block a user