Fix vers 631: sistemata gestione delibere PM con checkbox

This commit is contained in:
Samuele Locatelli
2014-03-21 11:06:22 +01:00
parent fe5b3b7cd4
commit 513c9cbb93
7 changed files with 27 additions and 30 deletions
+3 -4
View File
@@ -78,15 +78,14 @@
</div>
<div class="panel-body">
<div class="btn-group" style="width: 100%;">
<label id="lblDurezza" runat="server" class="btn btn-danger" style="width: 100%;">
<asp:CheckBox Enabled="false" runat="server" ID="chkDurezza" AutoPostBack="true" OnCheckedChanged="chkDurezza_CheckedChanged" Text="KO" Width="100%" />
<label id="lblChec" runat="server" class="btn btn-danger" style="width: 100%;">
<asp:CheckBox runat="server" ID="chkPrMecc" AutoPostBack="true" OnCheckedChanged="chkPrMecc_CheckedChanged" Text="KO" Width="100%" />
</label>
</div>
<%--<asp:TextBox runat="server" ID="txtEsitoPM" Width="100%" Font-Size="28pt" Style="text-align: center" AutoPostBack="True" OnTextChanged="txtEsitoPM_TextChanged" />--%>
</div>
</div>
<div id="divDelibera" runat="server">
<asp:LinkButton runat="server" ID="lbtDeliberaTT" Width="100%" CssClass="btn btn-warning btn-lg" OnClick="lbtDeliberaTT_Click"><i aria-hidden='true' class='fa fa-check fa-2x'></i> <%: traduci("lbtDeliberaTT") %></asp:LinkButton>
<asp:LinkButton runat="server" ID="lbtDeliberaPM" Width="100%" CssClass="btn btn-warning btn-lg" OnClick="lbtDeliberaPM_Click"><i aria-hidden='true' class='fa fa-check fa-2x'></i> <%: traduci("lbtDeliberaPM") %></asp:LinkButton>
</div>
</div>
<div class="col-sm-4">
+18 -20
View File
@@ -54,11 +54,11 @@ namespace GMW.WebUserControls
{
get
{
return chkDurezza.Checked;
return chkPrMecc.Checked;
}
set
{
chkDurezza.Checked = value;
chkPrMecc.Checked = value;
}
}
/// <summary>
@@ -221,13 +221,13 @@ namespace GMW.WebUserControls
// determino focus a seconda di cosa ho già in selezione..
if (EsitoPM)
{
lbtDeliberaTT.Focus();
lbtDeliberaPM.Focus();
}
else
{
if (NumTT_Delib != "" || NumTT_NoDelib != "")
{
chkDurezza.Focus();
chkPrMecc.Focus();
}
else
{
@@ -240,13 +240,23 @@ namespace GMW.WebUserControls
/// </summary>
private void updateBtns()
{
if (EsitoPM)
{
chkPrMecc.Text = "OK";
lblChec.Attributes.Remove("class");
lblChec.Attributes.Add("class", "btn btn-success");
}
else
{
chkPrMecc.Text = "KO";
lblChec.Attributes.Remove("class");
lblChec.Attributes.Add("class", "btn btn-danger");
}
// posso vedere esito PM se ho un numero tratt
bool btnVis = (NumTT_Delib != "" || NumTT_NoDelib != "");
divEsitoPM.Visible = btnVis;
lbtnResetNoPM.Visible = btnVis;
lbtnResetPM.Visible = btnVis;
// posso stampare se ho numero tratt ed EsitoPM..
btnVis = ((NumTT_Delib != "" || NumTT_NoDelib != "") && EsitoPM);
divDelibera.Visible = btnVis;
}
/// <summary>
@@ -254,7 +264,7 @@ namespace GMW.WebUserControls
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void lbtDeliberaTT_Click(object sender, EventArgs e)
protected void lbtDeliberaPM_Click(object sender, EventArgs e)
{
// salva delibera PM con update
string numTratt = "";
@@ -288,20 +298,8 @@ namespace GMW.WebUserControls
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void chkDurezza_CheckedChanged(object sender, EventArgs e)
protected void chkPrMecc_CheckedChanged(object sender, EventArgs e)
{
if (EsitoPM)
{
chkDurezza.Text = "OK";
lblDurezza.Attributes.Remove("class");
lblDurezza.Attributes.Add("class", "btn btn-success");
}
else
{
chkDurezza.Text = "KO";
lblDurezza.Attributes.Remove("class");
lblDurezza.Attributes.Add("class", "btn btn-danger");
}
doUpdate();
}
/// <summary>
+6 -6
View File
@@ -85,22 +85,22 @@ namespace GMW.WebUserControls {
protected global::System.Web.UI.HtmlControls.HtmlGenericControl divEsitoPM;
/// <summary>
/// lblDurezza control.
/// lblChec control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl lblDurezza;
protected global::System.Web.UI.HtmlControls.HtmlGenericControl lblChec;
/// <summary>
/// chkDurezza control.
/// chkPrMecc control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.CheckBox chkDurezza;
protected global::System.Web.UI.WebControls.CheckBox chkPrMecc;
/// <summary>
/// divDelibera control.
@@ -112,13 +112,13 @@ namespace GMW.WebUserControls {
protected global::System.Web.UI.HtmlControls.HtmlGenericControl divDelibera;
/// <summary>
/// lbtDeliberaTT control.
/// lbtDeliberaPM control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.LinkButton lbtDeliberaTT;
protected global::System.Web.UI.WebControls.LinkButton lbtDeliberaPM;
/// <summary>
/// lblNtNoDelib control.
BIN
View File
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.