Merge branch 'stable' into develop

This commit is contained in:
Samuele E. Locatelli
2020-07-15 17:56:30 +02:00
4 changed files with 397 additions and 359 deletions
Vendored
+1 -1
View File
@@ -11,7 +11,7 @@ pipeline {
steps {
/* calcolo numero versione... diverso x branch MASTER/DEVELOP */
script {
withEnv(['NEXT_BUILD_NUMBER=279']) {
withEnv(['NEXT_BUILD_NUMBER=280']) {
// env.versionNumber = VersionNumber(versionNumberString : '0.9.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true)
env.versionNumber = VersionNumber(versionNumberString : '0.9.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}')
env.versionNumberBeta = VersionNumber(versionNumberString : '0.9.${BUILD_DATE_FORMATTED, "yyMM"}-beta.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}')
+97 -94
View File
@@ -5,102 +5,105 @@
<div class="row">
<div class="col-12 border border-info table-info rounded py-2" runat="server" id="divDetail">
<uc1:cmp_batchDetail runat="server" ID="cmp_batchDetail" />
</div>
<div class="col-12">
<hr />
<div class="row">
<div class="col-4">
<h3>Call List</h3>
</div>
<div class="col-8 text-right">
Filter status
<asp:DropDownList runat="server" ID="ddlStatus" AutoPostBack="true" OnSelectedIndexChanged="ddlStatus_SelectedIndexChanged">
<asp:ListItem Selected="True" Text="-- Show All --" Value="-1"></asp:ListItem>
<asp:ListItem Text="Imported" Value="0"></asp:ListItem>
<asp:ListItem Text="Estimating Requested" Value="1"></asp:ListItem>
<asp:ListItem Text="Estimating Completed" Value="2"></asp:ListItem>
<asp:ListItem Text="Nesting Requested" Value="3"></asp:ListItem>
<asp:ListItem Text="Nesting Completed" Value="4"></asp:ListItem>
<asp:ListItem Text="Nesting Approved" Value="5"></asp:ListItem>
<asp:ListItem Text="Nesting Discarded" Value="6"></asp:ListItem>
<asp:ListItem Text="Errors Present" Value="7"></asp:ListItem>
<asp:ListItem Text="Validation UNKNOWN" Value="8"></asp:ListItem>
<asp:ListItem Text="Parts INVALID" Value="9"></asp:ListItem>
<asp:ListItem Text="Parts OK" Value="10"></asp:ListItem>
</asp:DropDownList>
&nbsp;
<uc1:cmp_numRow runat="server" ID="cmp_numRow" numRow="10" />
</div>
<div class="col-12 border border-info table-info rounded py-2" runat="server" id="divDetail">
<uc1:cmp_batchDetail runat="server" ID="cmp_batchDetail" />
</div>
<div class="col-12">
<asp:GridView ID="grView" runat="server" AllowPaging="True" AutoGenerateColumns="False" DataKeyNames="BatchID" DataSourceID="ods" CssClass="table table-sm table-striped" AllowSorting="True" OnSelectedIndexChanged="grView_SelectedIndexChanged" OnPageIndexChanged="grView_PageIndexChanged">
<HeaderStyle CssClass="default" />
<PagerStyle CssClass="active GridPager" />
<PagerSettings Mode="NumericFirstLast" />
<SelectedRowStyle CssClass="table-info" />
<EmptyDataTemplate>
No Record
</EmptyDataTemplate>
<Columns>
<asp:TemplateField ShowHeader="False">
<HeaderTemplate>
<div class="text-center">
<asp:LinkButton ID="lbtReset" runat="server" OnClick="lbtReset_Click" CssClass="btn btn-sm btn-primary" Visible="true" ToolTip="Reset"><i class="fa fa-refresh"></i></asp:LinkButton>
</div>
</HeaderTemplate>
<ItemTemplate>
<div class="text-center">
<asp:LinkButton ID="lbRedoEval" runat="server" CausesValidation="False" CommandName="Cancel" CommandArgument='<%# Eval("Takt") %>' CssClass="btn btn-sm btn-info" Visible='<%# listMode== NKC_SDK.BatchListMode.PartsEval %>' ToolTip="Re-Validate single ITEM" OnClick="lbRedoEval_Click" OnClientClick='return confirm("ITEM Re-Validation requested. Are you sure to proceed?")'><i class="fa fa-check-circle-o" aria-hidden="true"></i></asp:LinkButton>
<asp:LinkButton ID="lbSelect" runat="server" CausesValidation="False" CommandName="Select" CommandArgument="" CssClass="btn btn-sm btn-primary" Visible='<%# listMode== NKC_SDK.BatchListMode.Standard %>'><i class="fa fa-search" aria-hidden="true"></i></asp:LinkButton>
</div>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="Takt" HeaderText="#" InsertVisible="False" ReadOnly="True" SortExpression="Takt" />
<asp:TemplateField HeaderText="Status" SortExpression="Status">
<ItemTemplate>
<asp:HyperLink runat="server" ID="hlSheetPreview" Target="_blank" NavigateUrl='<%# $"../site/BatchPreview?BatchId={Eval("BatchID")}" %>' Visible='<%# isPreviewVisible(Eval("Status")) %>' ToolTip="Show Batch preview" CssClass="btn btn-info"><i class="fa fa-object-group" aria-hidden="true"></i></asp:HyperLink>
<asp:Label ID="lblStatus" runat="server" CssClass='<%# cssByStatus(Eval("Status")) %>'><%# BStatus(Eval("Status")) %></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Errors" SortExpression="Errors">
<ItemTemplate>
<asp:HyperLink runat="server" ID="hlShowErr" NavigateUrl='<%# $"../site/ErrorsLog?PUID=B.{Eval("BatchID")}" %>' CssClass="text-warning" Visible='<%# Eval("NumErrPre").ToString()!="0" %>' Target="_blank" ToolTip="Show errors"><i class="fa fa-exclamation-triangle" aria-hidden="true"></i> <%# $"{Eval("Errors")} (tot: {Eval("NumErrPre")} err)" %></asp:HyperLink>
<asp:HyperLink runat="server" ID="HyperLink1" NavigateUrl='<%# $"../site/ErrorsLog?PUID={Eval("EnvNum")}" %>' CssClass="text-danger" Visible='<%# Eval("NumErr").ToString()!="0" %>' Target="_blank" ToolTip="Show errors"><i class="fa fa-exclamation-triangle" aria-hidden="true"></i> <%# $"{Eval("Errors")} (tot: {Eval("NumErr")} err)" %></asp:HyperLink>
</ItemTemplate>
<ItemStyle CssClass="text-right" />
</asp:TemplateField>
<asp:BoundField DataField="TotalTime" HeaderText="Estimated Time" SortExpression="TotalTime" DataFormatString="{0:N2} min" ItemStyle-CssClass="text-right">
<ItemStyle CssClass="text-right"></ItemStyle>
</asp:BoundField>
<hr />
<div class="row">
<div class="col-4">
<h3>Call List</h3>
</div>
<div class="col-8 text-right">
Filter status
<asp:DropDownList runat="server" ID="ddlStatus" AutoPostBack="true" OnSelectedIndexChanged="ddlStatus_SelectedIndexChanged">
<asp:ListItem Selected="True" Text="-- Show All --" Value="-1"></asp:ListItem>
<asp:ListItem Text="Imported" Value="0"></asp:ListItem>
<asp:ListItem Text="Estimating Requested" Value="1"></asp:ListItem>
<asp:ListItem Text="Estimating Completed" Value="2"></asp:ListItem>
<asp:ListItem Text="Nesting Requested" Value="3"></asp:ListItem>
<asp:ListItem Text="Nesting Completed" Value="4"></asp:ListItem>
<asp:ListItem Text="Nesting Approved" Value="5"></asp:ListItem>
<asp:ListItem Text="Nesting Discarded" Value="6"></asp:ListItem>
<asp:ListItem Text="Errors Present" Value="7"></asp:ListItem>
<asp:ListItem Text="Validation UNKNOWN" Value="8"></asp:ListItem>
<asp:ListItem Text="Parts INVALID" Value="9"></asp:ListItem>
<asp:ListItem Text="Parts OK" Value="10"></asp:ListItem>
</asp:DropDownList>
&nbsp;
<uc1:cmp_numRow runat="server" ID="cmp_numRow" numRow="10" />
</div>
</div>
<div class="col-12">
<asp:GridView ID="grView" runat="server" AllowPaging="True" AutoGenerateColumns="False" DataKeyNames="BatchID" DataSourceID="ods" CssClass="table table-sm table-striped" AllowSorting="True" OnSelectedIndexChanged="grView_SelectedIndexChanged" OnPageIndexChanged="grView_PageIndexChanged">
<HeaderStyle CssClass="default" />
<PagerStyle CssClass="active GridPager" />
<PagerSettings Mode="NumericFirstLast" />
<SelectedRowStyle CssClass="table-info" />
<EmptyDataTemplate>
No Record
</EmptyDataTemplate>
<Columns>
<asp:TemplateField ShowHeader="False">
<HeaderTemplate>
<div class="text-center">
<asp:LinkButton ID="lbtReset" runat="server" OnClick="lbtReset_Click" CssClass="btn btn-sm btn-primary" Visible="true" ToolTip="Reset"><i class="fa fa-refresh"></i></asp:LinkButton>
</div>
</HeaderTemplate>
<ItemTemplate>
<div class="text-center">
<asp:LinkButton ID="lbRedoEval" runat="server" CausesValidation="False" CommandName="Cancel" CommandArgument='<%# Eval("Takt") %>' CssClass="btn btn-sm btn-info" Visible='<%# listMode== NKC_SDK.BatchListMode.PartsEval %>' ToolTip="Re-Validate single ITEM" OnClick="lbRedoEval_Click" OnClientClick='return confirm("ITEM Re-Validation requested. Are you sure to proceed?")'><i class="fa fa-check-circle-o" aria-hidden="true"></i></asp:LinkButton>
<asp:LinkButton ID="lbSelect" runat="server" CausesValidation="False" CommandName="Select" CommandArgument="" CssClass="btn btn-sm btn-primary" Visible='<%# listMode== NKC_SDK.BatchListMode.Standard %>'><i class="fa fa-search" aria-hidden="true"></i></asp:LinkButton>
</div>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="Takt" HeaderText="#" InsertVisible="False" ReadOnly="True" SortExpression="Takt" />
<asp:TemplateField HeaderText="Status" SortExpression="Status">
<ItemTemplate>
<asp:HyperLink runat="server" ID="hlSheetPreview" Target="_blank" NavigateUrl='<%# $"../site/BatchPreview?BatchId={Eval("BatchID")}" %>' Visible='<%# isPreviewVisible(Eval("Status")) %>' ToolTip="Show Batch preview" CssClass="btn btn-info"><i class="fa fa-object-group" aria-hidden="true"></i></asp:HyperLink>
<asp:Label ID="lblStatus" runat="server" CssClass='<%# cssByStatus(Eval("Status")) %>'><%# BStatus(Eval("Status")) %></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Errors" SortExpression="Errors">
<ItemTemplate>
<asp:HyperLink runat="server" ID="hlShowErr" NavigateUrl='<%# $"../site/ErrorsLog?PUID=B.{Eval("BatchID")}" %>' CssClass="text-warning" Visible='<%# Eval("NumErrPre").ToString()!="0" %>' Target="_blank" ToolTip="Show errors"><i class="fa fa-exclamation-triangle" aria-hidden="true"></i> <%# $"{Eval("Errors")} (tot: {Eval("NumErrPre")} err)" %></asp:HyperLink>
<asp:HyperLink runat="server" ID="HyperLink1" NavigateUrl='<%# $"../site/ErrorsLog?PUID={Eval("EnvNum")}" %>' CssClass="text-danger" Visible='<%# Eval("NumErr").ToString()!="0" %>' Target="_blank" ToolTip="Show errors"><i class="fa fa-exclamation-triangle" aria-hidden="true"></i> <%# $"{Eval("Errors")} (tot: {Eval("NumErr")} err)" %></asp:HyperLink>
</ItemTemplate>
<ItemStyle CssClass="text-right" />
</asp:TemplateField>
<asp:BoundField DataField="TotalTime" HeaderText="Estimated Time" SortExpression="TotalTime" DataFormatString="{0:N2} min" ItemStyle-CssClass="text-right">
<ItemStyle CssClass="text-right"></ItemStyle>
</asp:BoundField>
<asp:TemplateField ShowHeader="False">
<HeaderTemplate>
</HeaderTemplate>
<ItemTemplate>
<div class="text-center">
<asp:LinkButton ID="lbtDelete" runat="server" CausesValidation="False" CommandName="Delete" CommandArgument="" CssClass="btn btn-sm btn-danger" Visible='<%# listMode== NKC_SDK.BatchListMode.Standard && (Eval("Status").ToString() == "0" || Eval("Status").ToString() == "6" || Eval("Status").ToString() == "7") %>' OnClientClick='return confirm("Record deletion requested. Proceed?")'><i class="fa fa-trash" aria-hidden="true"></i></asp:LinkButton>
</div>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
<asp:ObjectDataSource ID="ods" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="getByStatus" TypeName="AppData.DS_AppTableAdapters.BatchListTableAdapter" DeleteMethod="deleteTree">
<SelectParameters>
<asp:ControlParameter ControlID="ddlStatus" DefaultValue="-1" Name="Status" PropertyName="SelectedValue" Type="Int32" />
<asp:SessionParameter Name="SearchVal" SessionField="valoreSearch" Type="String" DefaultValue="" />
<asp:ControlParameter ControlID="hfPartValid" DefaultValue="0" Name="PartValid" PropertyName="Value" Type="Int32" />
</SelectParameters>
<DeleteParameters>
<asp:Parameter Name="Original_BatchID" Type="Int32" />
<asp:Parameter Name="ForceDelete" Type="Int32" DefaultValue="1" />
</DeleteParameters>
<FilterParameters>
<asp:SessionParameter SessionField="valoreSearch" DefaultValue="" Type="String" />
</FilterParameters>
</asp:ObjectDataSource>
<asp:HiddenField runat="server" ID="hfPartValid" />
<asp:TemplateField ShowHeader="False">
<HeaderTemplate>
<asp:LinkButton ID="lbtEnableDel" runat="server" CssClass="btn btn-sm btn-danger" Visible='<%# !deleteEnabled %>' ToolTip="Enable Delete ALL" OnClick="lbtEnableDel_Click"><i class="fa fa-eraser"></i></asp:LinkButton>
<asp:LinkButton ID="lbtDisableDel" runat="server" CssClass="btn btn-sm btn-success" Visible='<%# deleteEnabled %>' ToolTip="Disable Delete ALL" OnClick="lbtDisableDel_Click"><i class="fa fa-eraser"></i></asp:LinkButton>
</HeaderTemplate>
<ItemTemplate>
<div class="text-center">
<asp:LinkButton ID="lbtDelete" runat="server" CausesValidation="False" CommandName="Delete" CommandArgument="" CssClass="btn btn-sm btn-danger" Visible='<%# (listMode== NKC_SDK.BatchListMode.Standard && (Eval("Status").ToString() == "0" || Eval("Status").ToString() == "6" || Eval("Status").ToString() == "7")) || deleteEnabled %>' OnClientClick='return confirm("Record deletion requested. Proceed?")'><i class="fa fa-trash" aria-hidden="true"></i></asp:LinkButton>
</div>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
<asp:HiddenField id="hfDeleteEnabled" runat="server" />
<asp:ObjectDataSource ID="ods" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="getByStatus" TypeName="AppData.DS_AppTableAdapters.BatchListTableAdapter" DeleteMethod="deleteTree">
<SelectParameters>
<asp:ControlParameter ControlID="ddlStatus" DefaultValue="-1" Name="Status" PropertyName="SelectedValue" Type="Int32" />
<asp:SessionParameter Name="SearchVal" SessionField="valoreSearch" Type="String" DefaultValue="" />
<asp:ControlParameter ControlID="hfPartValid" DefaultValue="0" Name="PartValid" PropertyName="Value" Type="Int32" />
</SelectParameters>
<DeleteParameters>
<asp:Parameter Name="Original_BatchID" Type="Int32" />
<asp:Parameter Name="ForceDelete" Type="Int32" DefaultValue="1" />
</DeleteParameters>
<FilterParameters>
<asp:SessionParameter SessionField="valoreSearch" DefaultValue="" Type="String" />
</FilterParameters>
</asp:ObjectDataSource>
<asp:HiddenField runat="server" ID="hfPartValid" />
</div>
</div>
</div>
</div>
+231 -205
View File
@@ -7,229 +7,255 @@ using System.Web.UI.WebControls;
namespace NKC_WF.WebUserControls
{
public partial class cmp_batchList : BaseUserControl
{
/// <summary>
/// modalità funzionamento controllo
/// </summary>
public BatchListMode listMode { get; set; } = BatchListMode.Standard;
/// <summary>
/// Caricamento pagina
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
public partial class cmp_batchList : BaseUserControl
{
if (!Page.IsPostBack)
{
cmp_numRow.numRow = 25;
grView.PageSize = cmp_numRow.numRow;
divDetail.Visible = false;
// in base al ListMode decido cosa mostrare...
checkFixOds();
checkFixMode();
}
cmp_batchDetail.eh_doRefresh += Cmp_batchDetail_eh_doRefresh;
cmp_numRow.eh_doRefresh += Cmp_numRow_eh_doRefresh;
}
private void checkFixOds()
{
string isPartVal = "";
switch (listMode)
{
case BatchListMode.PartsEval:
isPartVal = "1";
break;
case BatchListMode.Standard:
default:
isPartVal = "0";
break;
}
hfPartValid.Value = isPartVal;
}
/// <summary>
/// In base al modo richiesto imposta filtraggi...
/// </summary>
private void checkFixMode()
{
ListItem currItem = null;
int valore = -100;
if (listMode == BatchListMode.Standard)
{
foreach (var item in ddlStatus.Items)
/// <summary>
/// modalità funzionamento controllo
/// </summary>
public BatchListMode listMode { get; set; } = BatchListMode.Standard;
/// <summary>
/// Caricamento pagina
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
try
{
currItem = (ListItem)item;
int.TryParse(currItem.Value, out valore);
if (valore > 7)
if (!Page.IsPostBack)
{
currItem.Enabled = false;
deleteEnabled = false;
cmp_numRow.numRow = 25;
grView.PageSize = cmp_numRow.numRow;
divDetail.Visible = false;
// in base al ListMode decido cosa mostrare...
checkFixOds();
checkFixMode();
}
}
catch
{ }
cmp_batchDetail.eh_doRefresh += Cmp_batchDetail_eh_doRefresh;
cmp_numRow.eh_doRefresh += Cmp_numRow_eh_doRefresh;
}
}
else
{
foreach (var item in ddlStatus.Items)
private void checkFixOds()
{
try
{
currItem = (ListItem)item;
int.TryParse(currItem.Value, out valore);
if (valore < 8 && valore >= 0)
string isPartVal = "";
switch (listMode)
{
currItem.Enabled = false;
case BatchListMode.PartsEval:
isPartVal = "1";
break;
case BatchListMode.Standard:
default:
isPartVal = "0";
break;
}
hfPartValid.Value = isPartVal;
}
/// <summary>
/// In base al modo richiesto imposta filtraggi...
/// </summary>
private void checkFixMode()
{
ListItem currItem = null;
int valore = -100;
if (listMode == BatchListMode.Standard)
{
foreach (var item in ddlStatus.Items)
{
try
{
currItem = (ListItem)item;
int.TryParse(currItem.Value, out valore);
if (valore > 7)
{
currItem.Enabled = false;
}
}
catch
{ }
}
}
else
{
foreach (var item in ddlStatus.Items)
{
try
{
currItem = (ListItem)item;
int.TryParse(currItem.Value, out valore);
if (valore < 8 && valore >= 0)
{
currItem.Enabled = false;
}
}
catch
{ }
}
}
}
catch
{ }
}
}
}
private void Cmp_numRow_eh_doRefresh(object sender, EventArgs e)
{
// recupero num righe ed aggiorno...
grView.PageSize = cmp_numRow.numRow;
checkFixOds();
grView.DataBind();
}
private void Cmp_numRow_eh_doRefresh(object sender, EventArgs e)
{
// recupero num righe ed aggiorno...
grView.PageSize = cmp_numRow.numRow;
checkFixOds();
grView.DataBind();
}
private void Cmp_batchDetail_eh_doRefresh(object sender, EventArgs e)
{
resetSelezione();
}
private void Cmp_batchDetail_eh_doRefresh(object sender, EventArgs e)
{
resetSelezione();
}
/// <summary>
/// Codice CSS in base a status...
/// </summary>
/// <param name="_status"></param>
/// <returns></returns>
public string cssByStatus(object _status)
{
string answ = "text-muted";
int status = -1;
int.TryParse(_status.ToString(), out status);
switch (status)
{
case 1:
answ = "font-weight-bold text-info";
break;
case 2:
answ = "font-weight-bold text-primary";
break;
case 3:
answ = "font-weight-bold text-warning";
break;
case 4:
answ = "font-weight-bold text-danger";
break;
case 5:
answ = "font-weight-bold text-success";
break;
case 6:
answ = "font-weight-bold text-secondary";
break;
default:
break;
}
return answ;
}
/// <summary>
/// Verifica se sia visualizzabile preview dato stato
/// </summary>
/// <param name="_status"></param>
/// <returns></returns>
public bool isPreviewVisible(object _status)
{
bool answ = false;
int status = -1;
int.TryParse(_status.ToString(), out status);
if (status > 3 && status < 8)
{
answ = true;
}
return answ;
}
/// <summary>
/// Codice CSS in base a status...
/// </summary>
/// <param name="_status"></param>
/// <returns></returns>
public string cssByStatus(object _status)
{
string answ = "text-muted";
int status = -1;
int.TryParse(_status.ToString(), out status);
switch (status)
{
case 1:
answ = "font-weight-bold text-info";
break;
case 2:
answ = "font-weight-bold text-primary";
break;
case 3:
answ = "font-weight-bold text-warning";
break;
case 4:
answ = "font-weight-bold text-danger";
break;
case 5:
answ = "font-weight-bold text-success";
break;
case 6:
answ = "font-weight-bold text-secondary";
break;
default:
break;
}
return answ;
}
/// <summary>
/// Verifica se sia visualizzabile preview dato stato
/// </summary>
/// <param name="_status"></param>
/// <returns></returns>
public bool isPreviewVisible(object _status)
{
bool answ = false;
int status = -1;
int.TryParse(_status.ToString(), out status);
if (status > 3 && status < 8)
{
answ = true;
}
return answ;
}
/// <summary>
/// Converte il codice stato in effettivo campo
/// </summary>
/// <param name="_status"></param>
/// <returns></returns>
public string BStatus(object _status)
{
string answ = ComLib.BatchStatusDescr(_status);
return answ;
}
/// <summary>
/// comando reset
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void lbtReset_Click(object sender, EventArgs e)
{
resetSelezione();
}
/// <summary>
/// Converte il codice stato in effettivo campo
/// </summary>
/// <param name="_status"></param>
/// <returns></returns>
public string BStatus(object _status)
{
string answ = ComLib.BatchStatusDescr(_status);
return answ;
}
/// <summary>
/// comando reset
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void lbtReset_Click(object sender, EventArgs e)
{
resetSelezione();
}
private void resetSelezione()
{
checkFixOds();
grView.SelectedIndex = -1;
grView.DataBind();
divDetail.Visible = false;
raiseReset();
}
private void resetSelezione()
{
checkFixOds();
grView.SelectedIndex = -1;
grView.DataBind();
divDetail.Visible = false;
raiseReset();
}
/// <summary>
/// BatchId selezionato
/// </summary>
protected int BatchIdSel
{
get
{
int answ = 0;
int.TryParse(grView.SelectedValue.ToString(), out answ);
return answ;
}
}
protected void grView_SelectedIndexChanged(object sender, EventArgs e)
{
divDetail.Visible = true;
// recupero BatchId selezionato
cmp_batchDetail.BatchId = BatchIdSel;
}
/// <summary>
/// BatchId selezionato
/// </summary>
protected int BatchIdSel
{
get
{
int answ = 0;
int.TryParse(grView.SelectedValue.ToString(), out answ);
return answ;
}
}
protected void grView_SelectedIndexChanged(object sender, EventArgs e)
{
divDetail.Visible = true;
// recupero BatchId selezionato
cmp_batchDetail.BatchId = BatchIdSel;
}
public void doUpdate()
{
resetSelezione();
}
public void doUpdate()
{
resetSelezione();
}
protected void grView_PageIndexChanged(object sender, EventArgs e)
{
checkFixOds();
}
protected void grView_PageIndexChanged(object sender, EventArgs e)
{
checkFixOds();
}
protected void lbRedoEval_Click(object sender, EventArgs e)
{
LinkButton lbt = (LinkButton)sender;
if (!string.IsNullOrEmpty(lbt.CommandArgument))
{
// eseguo richiesta reset
DataLayer.man.taBL.redoPartValid(lbt.CommandArgument);
// eventualmente mando primo batch da validare...
bool newValidSent = ComLib.sendFirstValidationBatch();
// refresh!
resetSelezione();
}
}
protected void lbRedoEval_Click(object sender, EventArgs e)
{
LinkButton lbt = (LinkButton)sender;
if (!string.IsNullOrEmpty(lbt.CommandArgument))
{
// eseguo richiesta reset
DataLayer.man.taBL.redoPartValid(lbt.CommandArgument);
// eventualmente mando primo batch da validare...
bool newValidSent = ComLib.sendFirstValidationBatch();
// refresh!
resetSelezione();
}
}
protected void ddlStatus_SelectedIndexChanged(object sender, EventArgs e)
{
checkFixOds();
protected void ddlStatus_SelectedIndexChanged(object sender, EventArgs e)
{
checkFixOds();
}
protected void lbtEnableDel_Click(object sender, EventArgs e)
{
deleteEnabled = true;
resetSelezione();
}
protected void lbtDisableDel_Click(object sender, EventArgs e)
{
deleteEnabled = false;
resetSelezione();
}
public bool deleteEnabled
{
get
{
bool answ = false;
bool.TryParse(hfDeleteEnabled.Value, out answ);
return answ;
}
set
{
hfDeleteEnabled.Value = value.ToString();
}
}
}
}
}
+68 -59
View File
@@ -11,70 +11,79 @@ namespace NKC_WF.WebUserControls
{
public partial class cmp_batchList
{
public partial class cmp_batchList
{
/// <summary>
/// Controllo divDetail.
/// </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 divDetail;
/// <summary>
/// Controllo divDetail.
/// </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 divDetail;
/// <summary>
/// Controllo cmp_batchDetail.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::NKC_WF.WebUserControls.cmp_batchDetail cmp_batchDetail;
/// <summary>
/// Controllo cmp_batchDetail.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::NKC_WF.WebUserControls.cmp_batchDetail cmp_batchDetail;
/// <summary>
/// Controllo ddlStatus.
/// </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 ddlStatus;
/// <summary>
/// Controllo ddlStatus.
/// </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 ddlStatus;
/// <summary>
/// Controllo cmp_numRow.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::NKC_WF.WebUserControls.cmp_numRow cmp_numRow;
/// <summary>
/// Controllo cmp_numRow.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::NKC_WF.WebUserControls.cmp_numRow cmp_numRow;
/// <summary>
/// Controllo grView.
/// </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.GridView grView;
/// <summary>
/// Controllo grView.
/// </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.GridView grView;
/// <summary>
/// Controllo ods.
/// </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 ods;
/// <summary>
/// Controllo hfDeleteEnabled.
/// </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 hfDeleteEnabled;
/// <summary>
/// Controllo hfPartValid.
/// </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 hfPartValid;
}
/// <summary>
/// Controllo ods.
/// </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 ods;
/// <summary>
/// Controllo hfPartValid.
/// </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 hfPartValid;
}
}