inizio riorganizzaizone ultimo modulo

This commit is contained in:
Samuele E. Locatelli
2021-01-27 08:15:59 +01:00
parent 249a4e76ac
commit 3d1c083a63
5 changed files with 44 additions and 18 deletions
+1
View File
@@ -0,0 +1 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_PODL_OUT.ascx.cs" Inherits="MP_ADM.WebUserControls.cmp_PODL_OUT" %>
@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace MP_ADM.WebUserControls
{
public partial class cmp_PODL_OUT : System.Web.UI.UserControl
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
}
+16
View File
@@ -0,0 +1,16 @@
//------------------------------------------------------------------------------
// <auto-generated>
// Codice generato da uno strumento.
//
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
// il codice viene rigenerato.
// </auto-generated>
//------------------------------------------------------------------------------
namespace MP_ADM.WebUserControls
{
public partial class cmp_PODL_OUT
{
}
}
+4 -7
View File
@@ -99,14 +99,11 @@
<%--<asp:CheckBoxField DataField="Attivabile" HeaderText="Attivabile" SortExpression="Attivabile" />--%>
<asp:TemplateField HeaderText="# Pezzi" SortExpression="NumPezzi">
<ItemTemplate>
<div class="input-group input-group-sm">
<asp:TextBox runat="server" ID="txtNumPezzi" Text='<%# Eval("QtaRem") %>' CssClass="form-control text-right" TextMode="Number" AutoPostBack="true" Width="4em" OnTextChanged="txtNumPezzi_TextChanged" />
<div class="input-group-append">
<asp:Label ID="lblNumPezzi" runat="server" CssClass="input-group-text text-right" Width="4em" Text='<%# Eval("NumPezzi", "{0:N0}") %>' />
</div>
<b>
<asp:Label runat="server" ID="lblQtaRem" Text='<%# Eval("QtaRem") %>' /></b>&nbsp;
<div class="small">
<asp:Label ID="lblNumPezzi" runat="server" Text='<%# Eval("NumPezzi", "({0:N0})") %>' />
</div>
<%--<asp:TextBox runat="server" ID="txtNumPezzi" Text='<%# Eval("NumPezzi") %>' CssClass="text-right" TextMode="Number" Width="4em" AutoPostBack="true" OnTextChanged="txtNumPezzi_TextChanged" />
<asp:Label ID="lblNumPezzi" runat="server" Text='<%# Eval("NumPezzi", "{0:N0}") %>' />--%>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Right" />
<ItemStyle HorizontalAlign="Right" />
+6 -11
View File
@@ -98,7 +98,7 @@ namespace MP_ADM.WebUserControls
{
// update valori calcolati in base a selezione...
int numOrd = 0;
int numPzOrd = 0;
int QtaRem = 0;
decimal tempoMinOrd = 0;
decimal tc50p = 0;
int numPzTot = 0;
@@ -107,18 +107,18 @@ namespace MP_ADM.WebUserControls
string CodArt = "";
foreach (GridViewRow riga in grView.Rows)
{
numPzOrd = 0;
QtaRem = 0;
tempoMinOrd = 0;
DateTime DataRif = DateTime.Now.Date;
if (((CheckBox)riga.FindControl("chkSelect")).Checked && ((CheckBox)riga.FindControl("chkSelect")).Visible)
{
try
{
int.TryParse(((TextBox)riga.FindControl("txtNumPezzi")).Text, out numPzOrd);
int.TryParse(((Label)riga.FindControl("lblQtaRem")).Text, out QtaRem);
decimal.TryParse(((Label)riga.FindControl("lblTC50p")).Text, out tc50p);
tempoMinOrd = tc50p * numPzOrd;
tempoMinOrd = tc50p * QtaRem;
CodArt = ((Label)riga.FindControl("lblCodArticolo")).Text;
if (numPzOrd > 0) numOrd++;
if (QtaRem > 0) numOrd++;
// salvo dictionary articoli...
if (ElArticoli.ContainsKey(CodArt))
{
@@ -131,7 +131,7 @@ namespace MP_ADM.WebUserControls
}
catch
{ }
numPzTot += numPzOrd;
numPzTot += QtaRem;
tempoMinTot += tempoMinOrd;
}
}
@@ -339,11 +339,6 @@ namespace MP_ADM.WebUserControls
cmp_numRow.eh_newNum += Cmp_numRow_eh_newNum;
}
protected void txtNumPezzi_TextChanged(object sender, EventArgs e)
{
calcTotali();
}
#endregion Protected Methods
#region Public Methods