completata predispozione pagina selezione ODL da riassegnare
This commit is contained in:
+50
-24
@@ -6,38 +6,64 @@
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
|
||||
<uc1:mod_dettMacchina ID="mod_dettMacchina1" runat="server" />
|
||||
<h2>Riassegnazione ODL</h2>
|
||||
<div class="ui-grid-a">
|
||||
<div class="ui-block-a">
|
||||
Inizio ODL | stp_ODL_getByMacchina 2002
|
||||
<asp:Label runat="server" ID="lblInizioODL" Text="---"></asp:Label>
|
||||
<hr />
|
||||
<asp:CheckBox runat="server" ID="chkLeaveOpen" Checked="true" Text="Aperto" AutoPostBack="True" OnCheckedChanged="chkLeaveOpen_CheckedChanged" />
|
||||
<div class="ui-grid-a" data-role="content" runat="server" id="divFineODL">
|
||||
<div class="ui-block-a">
|
||||
<asp:Label runat="server" ID="lblDateTo" AssociatedControlID="txtDateTo" Text="Data" />
|
||||
<asp:TextBox runat="server" ID="txtDateTo" type="date" AutoPostBack="True" OnTextChanged="txtDateTo_TextChanged" />
|
||||
</div>
|
||||
<div class="ui-block-b">
|
||||
<asp:Label runat="server" ID="lblTimeTo" AssociatedControlID="txtTimeTo" Text="Ora" />
|
||||
<asp:TextBox runat="server" ID="txtTimeTo" type="time" AutoPostBack="True" OnTextChanged="txtTimeTo_TextChanged" />
|
||||
</div>
|
||||
</div>
|
||||
<h2>Riassegnazione ODL</h2>
|
||||
Ultimi ODL lavorati:
|
||||
</div>
|
||||
<div class="ui-block-b">
|
||||
<asp:LinkButton runat="server" ID="lbtSetODL" data-role="button" data-iconpos="bottom" data-icon="plus" data-theme="e">Imposta ODL</asp:LinkButton>
|
||||
<asp:LinkButton runat="server" ID="lbtSetODL" data-role="button" data-iconpos="bottom" data-icon="plus" data-theme="e" OnClick="lbtSetODL_Click">Imposta ODL</asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui-grid-solo">
|
||||
<div class="ui-block-a">
|
||||
<asp:GridView ID="grViewLastODL" runat="server" AutoGenerateColumns="False" BackColor="LightGoldenrodYellow" BorderColor="Tan" BorderWidth="1px" CellPadding="2" DataKeyNames="IdxODL" DataSourceID="odsLastODL" ForeColor="Black" GridLines="None" AllowPaging="True" PageSize="5">
|
||||
<AlternatingRowStyle BackColor="PaleGoldenrod" />
|
||||
<Columns>
|
||||
<asp:BoundField DataField="IdxODL" HeaderText="ODL" InsertVisible="False" ReadOnly="True" SortExpression="IdxODL" />
|
||||
<asp:BoundField DataField="CodArticolo" HeaderText="Articolo" SortExpression="CodArticolo" />
|
||||
<asp:BoundField DataField="NumPezzi" HeaderText="# Pezzi" SortExpression="NumPezzi" />
|
||||
<asp:BoundField DataField="TCAssegnato" HeaderText="TC" SortExpression="TCAssegnato" DataFormatString="{0:N2}" />
|
||||
<%--<asp:BoundField DataField="DescArticolo" HeaderText="DescArticolo" SortExpression="DescArticolo" />--%>
|
||||
<asp:TemplateField HeaderText="Periodo" SortExpression="DataInizio">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label2" runat="server" Text='<%# Eval("DataFine") %>' ForeColor="DarkBlue" /><br />
|
||||
<asp:Label ID="Label1" runat="server" Text='<%# Eval("DataInizio") %>' ForeColor="DarkGreen" /><br />
|
||||
</ItemTemplate>
|
||||
<ItemStyle Font-Size="0.8em" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="Note" HeaderText="Note" SortExpression="Note" ItemStyle-Font-Size="0.7em">
|
||||
<ItemStyle Font-Size="0.7em"></ItemStyle>
|
||||
</asp:BoundField>
|
||||
<asp:BoundField DataField="PzPallet" HeaderText="PzPallet" SortExpression="PzPallet" />
|
||||
</Columns>
|
||||
<FooterStyle BackColor="Tan" />
|
||||
<HeaderStyle BackColor="Tan" Font-Bold="True" />
|
||||
<PagerStyle BackColor="PaleGoldenrod" ForeColor="DarkSlateBlue" HorizontalAlign="Center" />
|
||||
<SelectedRowStyle BackColor="DarkSlateBlue" ForeColor="GhostWhite" />
|
||||
<SortedAscendingCellStyle BackColor="#FAFAE7" />
|
||||
<SortedAscendingHeaderStyle BackColor="#DAC09E" />
|
||||
<SortedDescendingCellStyle BackColor="#E1DB9C" />
|
||||
<SortedDescendingHeaderStyle BackColor="#C2A47B" />
|
||||
</asp:GridView>
|
||||
<asp:ObjectDataSource ID="odsLastODL" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="getByMacchinaPeriodo" TypeName="MapoDb.DS_ProdTempiTableAdapters.ODLTableAdapter">
|
||||
<SelectParameters>
|
||||
<asp:SessionParameter DefaultValue="0" Name="IdxMacchina" SessionField="IdxMacchina" Type="String" />
|
||||
<asp:ControlParameter ControlID="hfDataFrom" Name="dataFrom" PropertyName="Value" Type="DateTime" />
|
||||
<asp:ControlParameter ControlID="hfDataTo" Name="dataTo" PropertyName="Value" Type="DateTime" />
|
||||
</SelectParameters>
|
||||
</asp:ObjectDataSource>
|
||||
<asp:HiddenField runat="server" ID="hfDataFrom" />
|
||||
<asp:HiddenField runat="server" ID="hfDataTo" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearDiv" data-role="content" data-theme="a">
|
||||
<div class="ui-grid-a">
|
||||
<div class="ui-grid-solo">
|
||||
<div class="ui-block-a">
|
||||
--ricerca text--<br />
|
||||
Elenco ODL "liberi" cliccabili (se selezionato ENABLED button x impostare...)<br />
|
||||
stp_vsODL_getUnused
|
||||
</div>
|
||||
<div class="ui-block-b">
|
||||
Ultimi ODL della macchina (desc) <br />
|
||||
stp_ODL_getByMacchinaPeriodo 2002, '2017-07-01', '2017-07-28'
|
||||
|
||||
<asp:DropDownList runat="server" ID="ddlODL" DataSourceID="odsOdlAvail" DataTextField="label" DataValueField="value" OnSelectedIndexChanged="ddlODL_SelectedIndexChanged" AutoPostBack="True">
|
||||
</asp:DropDownList>
|
||||
<asp:ObjectDataSource ID="odsOdlAvail" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="getUnused" TypeName="MapoDb.DS_UtilityTableAdapters.v_selODLTableAdapter"></asp:ObjectDataSource>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
+11
-84
@@ -14,21 +14,17 @@ namespace MoonProTablet
|
||||
{
|
||||
if(!Page.IsPostBack)
|
||||
{
|
||||
// calcolare ora FROM da ULTIMO ODL
|
||||
dataOraOdlFrom = DateTime.Today;
|
||||
dataOraOdlTo = DateTime.Now;
|
||||
lblInizioODL.Text = dataOraOdlFrom.ToString();
|
||||
txtDateTo.Text = dataOraOdlTo.ToString("yyyy-MM-dd");
|
||||
txtTimeTo.Text = dataOraOdlTo.ToString("HH:mm");
|
||||
fixChiudiOdl();
|
||||
fixBtnImpostaODL();
|
||||
DateTime adesso = DateTime.Now;
|
||||
hfDataTo.Value = adesso.ToString();
|
||||
hfDataFrom.Value = adesso.AddMonths(-1).ToString();
|
||||
}
|
||||
}
|
||||
|
||||
private void fixBtnImpostaODL()
|
||||
{
|
||||
// verifico se selezionato un ODL sorgente...
|
||||
lbtSetODL.Visible = false;
|
||||
lbtSetODL.Visible = ddlODL.SelectedIndex > 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -45,88 +41,19 @@ namespace MoonProTablet
|
||||
memLayer.ML.setSessionVal("IdxMacchina", value);
|
||||
}
|
||||
}
|
||||
|
||||
protected void txtDateTo_TextChanged(object sender, EventArgs e)
|
||||
|
||||
protected void ddlODL_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
salvaDataOraTo();
|
||||
}
|
||||
protected void txtTimeTo_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
salvaDataOraTo();
|
||||
}
|
||||
|
||||
private void salvaDataOraTo()
|
||||
{
|
||||
DateTime inizioStato = DateTime.Now;
|
||||
try
|
||||
{
|
||||
DateTime ora = Convert.ToDateTime(txtTimeTo.Text);
|
||||
inizioStato = Convert.ToDateTime(txtDateTo.Text).AddHours(ora.Hour).AddMinutes(ora.Minute);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
dataOraOdlTo = inizioStato;
|
||||
fixBtnImpostaODL();
|
||||
}
|
||||
/// <summary>
|
||||
/// data-ora selezionata INIZIO
|
||||
/// Registra attivazione ODL per macchina corrente...
|
||||
/// </summary>
|
||||
protected DateTime dataOraOdlFrom
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void lbtSetODL_Click(object sender, EventArgs e)
|
||||
{
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("dataOraOdlFrom", value);
|
||||
}
|
||||
get
|
||||
{
|
||||
DateTime answ = DateTime.Now;
|
||||
try
|
||||
{
|
||||
answ = Convert.ToDateTime(memLayer.ML.objSessionObj("dataOraOdlFrom"));
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// data-ora selezionata FINE
|
||||
/// </summary>
|
||||
protected DateTime dataOraOdlTo
|
||||
{
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("dataOraOdlTo", value);
|
||||
}
|
||||
get
|
||||
{
|
||||
DateTime answ = DateTime.Now;
|
||||
try
|
||||
{
|
||||
answ = Convert.ToDateTime(memLayer.ML.objSessionObj("dataOraOdlTo"));
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
|
||||
protected void chkLeaveOpen_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
fixChiudiOdl();
|
||||
}
|
||||
|
||||
private void fixChiudiOdl()
|
||||
{
|
||||
//determino visibilità fine ODL in base se sia aperto o meno...
|
||||
if (chkLeaveOpen.Checked)
|
||||
{
|
||||
chkLeaveOpen.Text = "Lascia ODL Aperto";
|
||||
}
|
||||
else
|
||||
{
|
||||
chkLeaveOpen.Text = "Chiudi ODL alla data-ora seguente";
|
||||
}
|
||||
divFineODL.Visible = !chkLeaveOpen.Checked;
|
||||
}
|
||||
}
|
||||
}
|
||||
Generated
+54
-63
@@ -21,69 +21,6 @@ namespace MoonProTablet {
|
||||
/// </remarks>
|
||||
protected global::MoonProTablet.WebUserControls.mod_dettMacchina mod_dettMacchina1;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblInizioODL.
|
||||
/// </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.Label lblInizioODL;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo chkLeaveOpen.
|
||||
/// </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 chkLeaveOpen;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo divFineODL.
|
||||
/// </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 divFineODL;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblDateTo.
|
||||
/// </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.Label lblDateTo;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo txtDateTo.
|
||||
/// </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 txtDateTo;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblTimeTo.
|
||||
/// </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.Label lblTimeTo;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo txtTimeTo.
|
||||
/// </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 txtTimeTo;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lbtSetODL.
|
||||
/// </summary>
|
||||
@@ -92,5 +29,59 @@ namespace MoonProTablet {
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.LinkButton lbtSetODL;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo grViewLastODL.
|
||||
/// </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 grViewLastODL;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo odsLastODL.
|
||||
/// </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 odsLastODL;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo hfDataFrom.
|
||||
/// </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 hfDataFrom;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo hfDataTo.
|
||||
/// </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 hfDataTo;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo ddlODL.
|
||||
/// </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 ddlODL;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo odsOdlAvail.
|
||||
/// </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 odsOdlAvail;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user