fixed refresh
This commit is contained in:
@@ -48,6 +48,12 @@ namespace MP_ADM
|
||||
doRefreshChild();
|
||||
}
|
||||
|
||||
private void Cmp_PODL_OUT_eh_nuovoValore(object sender, EventArgs e)
|
||||
{
|
||||
cmp_planStats.doReset();
|
||||
cmp_planApprove.doUpdate();
|
||||
}
|
||||
|
||||
private void toggleVisibility()
|
||||
{
|
||||
divPromOUT.Visible = !divPromOUT.Visible;
|
||||
@@ -85,6 +91,7 @@ namespace MP_ADM
|
||||
cmp_planApprove.eh_resetSelezione += Cmp_planApprove_eh_resetSelezione;
|
||||
cmp_planApprove.eh_selValore += Cmp_planApprove_eh_selValore;
|
||||
cmp_planApprove.eh_nuovoValore += Cmp_planApprove_eh_nuovoValore;
|
||||
cmp_PODL_OUT.eh_nuovoValore += Cmp_PODL_OUT_eh_nuovoValore;
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
@@ -45,34 +45,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<%-- <div class="bg-dark text-light" style="white-space: nowrap; padding: 2px;">
|
||||
<div class="row">
|
||||
<div class="col-4"></div>
|
||||
<div class="col-4">
|
||||
<asp:LinkButton ID="lbtNewPODL" runat="server" OnClick="lbtNewPODL_Click" CssClass="btn btn-block btn-primary text-light"><i class="fa fa-plus"></i> PROMESSA ODL <i class="fa fa-list-ol"></i></asp:LinkButton>
|
||||
</div>
|
||||
<div class="col-4"></div>
|
||||
</div>
|
||||
<uc1:mod_newPromessaODL runat="server" ID="mod_newPromessaODL" />
|
||||
</div>--%>
|
||||
<div id="divEditQta" runat="server" visible="false" class="ctrSelRowStyle" style="white-space: nowrap; padding: 2px;">
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<asp:LinkButton ID="lbtOk" runat="server" Text="Ok" OnClick="btnOk_Click" CssClass="btn btn-block btn-success" OnClientClick="return confirm('Sicuro di voler modificare la Promessa ODL?');"><i class="fa fa-plus"></i> Modifica </asp:LinkButton>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
# Pezzi Richiesti:
|
||||
<asp:TextBox runat="server" ID="txtNewQta" Width="6em" />
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
Pezzi Pallet:
|
||||
<asp:TextBox runat="server" ID="txtNewPzPallet" Width="6em" />
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<asp:LinkButton ID="lbtCancel" runat="server" Text="Annulla" OnClick="btnCancel_Click" CssClass="btn btn-block btn-warning"><i class="fa fa-ban"></i> Annulla</asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<asp:GridView ID="grView" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" OnDataBound="grView_DataBound" PageSize="25" DataKeyNames="IdxPromessa" DataSourceID="ods" CssClass="table table-striped table-sm my-0">
|
||||
@@ -193,7 +165,7 @@
|
||||
</asp:GridView>
|
||||
<asp:HiddenField runat="server" ID="hfCodGruppo" />
|
||||
<asp:HiddenField runat="server" ID="hfCodPre" />
|
||||
<asp:ObjectDataSource ID="ods" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="getByMaccArt" TypeName="MapoDb.DS_PlanTableAdapters.PromesseOUTTableAdapter" FilterExpression=" ( CodArticolo LIKE '%{0}%' OR DescArticolo LIKE '%{0}%' ) AND ( KeyRichiesta LIKE '{1}%' ) " OnInserted="ods_Updated" OnUpdated="ods_Updated" DeleteMethod="deleteQuery" OnDeleted="ods_Deleted">
|
||||
<asp:ObjectDataSource ID="ods" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="getByMaccArt" TypeName="MapoDb.DS_PlanTableAdapters.PromesseOUTTableAdapter" FilterExpression=" ( CodArticolo LIKE '%{0}%' OR DescArticolo LIKE '%{0}%' ) AND ( KeyRichiesta LIKE '{1}%' ) " DeleteMethod="deleteQuery">
|
||||
<FilterParameters>
|
||||
<asp:SessionParameter DefaultValue="*" Name="ricerca" SessionField="valoreCercato" />
|
||||
<asp:ControlParameter ControlID="hfCodPre" Name="CodPre" PropertyName="Value" Type="String" />
|
||||
|
||||
@@ -106,56 +106,6 @@ namespace MP_ADM.WebUserControls
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Nuovo num pz
|
||||
/// </summary>
|
||||
protected int numPz
|
||||
{
|
||||
get
|
||||
{
|
||||
int answ = 0;
|
||||
try
|
||||
{
|
||||
answ = Convert.ToInt32(txtNewQta.Text.Trim());
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
set
|
||||
{
|
||||
txtNewQta.Text = value.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Nuovo num pz per pallet
|
||||
/// </summary>
|
||||
protected int pzPallet
|
||||
{
|
||||
get
|
||||
{
|
||||
int answ = 1;
|
||||
try
|
||||
{
|
||||
answ = Convert.ToInt32(txtNewPzPallet.Text.Trim());
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
// controllo sia > 0...
|
||||
if (answ < 1)
|
||||
{
|
||||
answ = 1;
|
||||
}
|
||||
|
||||
return answ;
|
||||
}
|
||||
set
|
||||
{
|
||||
txtNewPzPallet.Text = value.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Public Properties
|
||||
@@ -231,13 +181,6 @@ namespace MP_ADM.WebUserControls
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private void updateCtrl()
|
||||
{
|
||||
divEditQta.Visible = false;
|
||||
grView.SelectedIndex = -1;
|
||||
grView.DataBind();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Aggiorno Gridview
|
||||
/// </summary>
|
||||
@@ -250,20 +193,6 @@ namespace MP_ADM.WebUserControls
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected void btnCancel_Click(object sender, EventArgs e)
|
||||
{
|
||||
updateCtrl();
|
||||
}
|
||||
|
||||
protected void btnOk_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (idxPOdlSel > 0)
|
||||
{
|
||||
DataLayerObj.taPODL.updateQta(numPz, pzPallet, idxPOdlSel);
|
||||
}
|
||||
updateCtrl();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// reset della selezione
|
||||
/// </summary>
|
||||
@@ -299,6 +228,7 @@ namespace MP_ADM.WebUserControls
|
||||
protected void doUpdate()
|
||||
{
|
||||
updateGrView();
|
||||
raiseSelNew();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -331,39 +261,6 @@ namespace MP_ADM.WebUserControls
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// gestione cambio selezione valore
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void grView_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
// salvo in session il valore selezionato...
|
||||
memLayer.ML.setSessionVal(string.Format("{0}_sel", _idxGridView), grView.SelectedValue, false);
|
||||
bool doClone = false;
|
||||
bool doEdit = false;
|
||||
// gestione buttons richieste
|
||||
string _comando = "";
|
||||
if (memLayer.ML.isInSessionObject("nextObjCommand"))
|
||||
{
|
||||
_comando = memLayer.ML.StringSessionObj("nextObjCommand");
|
||||
memLayer.ML.emptySessionVal("nextObjCommand");
|
||||
}
|
||||
switch (_comando)
|
||||
{
|
||||
case "Clona":
|
||||
doClone = true;
|
||||
break;
|
||||
|
||||
case "Edit":
|
||||
doEdit = true;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// salvo comando
|
||||
/// </summary>
|
||||
@@ -389,6 +286,7 @@ namespace MP_ADM.WebUserControls
|
||||
DataLayerObj.taPromOut.deleteQuery(IdxProm);
|
||||
}
|
||||
doUpdate();
|
||||
raiseNewVal();
|
||||
}
|
||||
|
||||
protected void lbtResArt_Click(object sender, EventArgs e)
|
||||
@@ -469,21 +367,6 @@ namespace MP_ADM.WebUserControls
|
||||
updateGrView();
|
||||
}
|
||||
|
||||
protected void ods_Deleted(object sender, ObjectDataSourceStatusEventArgs e)
|
||||
{
|
||||
raiseNewVal();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// svuoto da cache post update
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void ods_Updated(object sender, ObjectDataSourceStatusEventArgs e)
|
||||
{
|
||||
raiseNewVal();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// inizializzazione valori di default
|
||||
/// </summary>
|
||||
@@ -582,7 +465,6 @@ namespace MP_ADM.WebUserControls
|
||||
memLayer.ML.emptySessionVal(string.Format("{0}_sel", _idxGridView));
|
||||
grView.SelectedIndex = -1;
|
||||
grView.DataBind();
|
||||
divEditQta.Visible = false;
|
||||
lblWarning.Visible = false;
|
||||
raiseReset();
|
||||
}
|
||||
|
||||
@@ -104,51 +104,6 @@ namespace MP_ADM.WebUserControls
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblUnass;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo divEditQta.
|
||||
/// </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 divEditQta;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lbtOk.
|
||||
/// </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 lbtOk;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo txtNewQta.
|
||||
/// </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.TextBox txtNewQta;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo txtNewPzPallet.
|
||||
/// </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.TextBox txtNewPzPallet;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lbtCancel.
|
||||
/// </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 lbtCancel;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo grView.
|
||||
/// </summary>
|
||||
|
||||
@@ -212,6 +212,7 @@ namespace MP_ADM.WebUserControls
|
||||
doResetMac();
|
||||
doResetCli();
|
||||
doResetArt();
|
||||
frmView.DataBind();
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
|
||||
Reference in New Issue
Block a user