vers 2.8.743 iniziale
release iniziale nuova pagina sterr taglio
This commit is contained in:
@@ -462,6 +462,7 @@
|
||||
<Content Include="fonts\fontawesome-webfont.eot" />
|
||||
<Content Include="fonts\FontAwesome.otf" />
|
||||
<None Include="Scripts\jquery-2.1.1.intellisense.js" />
|
||||
<Content Include="Post_SterrTaglio.aspx" />
|
||||
<Content Include="Scripts\bootstrap-switch.js" />
|
||||
<Content Include="Scripts\bootstrap-switch.min.js" />
|
||||
<Content Include="Scripts\jquery-2.1.1.js" />
|
||||
@@ -489,6 +490,7 @@
|
||||
<Content Include="WebUserControls\mod_SearchProvDtx.ascx" />
|
||||
<Content Include="WebUserControls\mod_selLineaNtDt.ascx" />
|
||||
<Content Include="WebUserControls\mod_selPeriodo.ascx" />
|
||||
<Content Include="WebUserControls\mod_sterrTaglio.ascx" />
|
||||
<Content Include="WS\DataFeed.asmx" />
|
||||
<Content Include="Reports\CartellinoFinitiSP.rdlc" />
|
||||
<None Include="Properties\PublishProfiles\IIS02_TK.pubxml" />
|
||||
@@ -872,6 +874,13 @@
|
||||
<Compile Include="POST_PRE_TT_DT.aspx.designer.cs">
|
||||
<DependentUpon>POST_PRE_TT_DT.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Post_SterrTaglio.aspx.cs">
|
||||
<DependentUpon>Post_SterrTaglio.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Post_SterrTaglio.aspx.designer.cs">
|
||||
<DependentUpon>Post_SterrTaglio.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="sanpos_associaz_F10_F18.aspx.cs">
|
||||
<DependentUpon>sanpos_associaz_F10_F18.aspx</DependentUpon>
|
||||
@@ -1734,6 +1743,13 @@
|
||||
<Compile Include="WebUserControls\mod_SterrTagIN.ascx.designer.cs">
|
||||
<DependentUpon>mod_SterrTagIN.ascx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControls\mod_sterrTaglio.ascx.cs">
|
||||
<DependentUpon>mod_sterrTaglio.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControls\mod_sterrTaglio.ascx.designer.cs">
|
||||
<DependentUpon>mod_sterrTaglio.ascx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControls\mod_SterrTagOUT.ascx.cs">
|
||||
<DependentUpon>mod_SterrTagOUT.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/FullPage.master" AutoEventWireup="true" CodeBehind="Post_SterrTaglio.aspx.cs" Inherits="GMW.Post_SterrTaglio" %>
|
||||
|
||||
<%@ Register Src="WebUserControls/mod_selLineaNtDt.ascx" TagName="mod_selLineaNtDt" TagPrefix="uc1" %>
|
||||
<%@ Register Src="WebUserControls/mod_storicoAzioniOperatore.ascx" TagName="mod_storicoAzioniOperatore" TagPrefix="uc2" %>
|
||||
<%@ Register Src="WebUserControls/mod_sterrTaglio.ascx" TagPrefix="uc3" TagName="mod_sterrTaglio" %>
|
||||
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="FeaturedContent" runat="server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="MCon" runat="server">
|
||||
<uc1:mod_selLineaNtDt ID="mod_selLineaNtDt1" runat="server" urlNT="Post_SterrTaglio" preCodLineNT="W10" cssNormal="btn btn-inverse btn-lg" cssSelected="btn btn-primary btn-lg active" showSelNtDt="false" />
|
||||
<asp:Panel runat="server" ID="pnlAll" CssClass="stileAttesa">
|
||||
<div class="container-fluid">
|
||||
<asp:Panel ID="pnlSAO" runat="server" ScrollBars="None" CssClass="nav sidebar ombra" BackColor="#696969">
|
||||
<div style="float: left; height: 100%; min-height: 300px; min-width: 240px; margin: -15px;">
|
||||
<div style="background-color: #696969; margin: 4px;">
|
||||
<uc2:mod_storicoAzioniOperatore ID="mod_storicoAzioniOperatore1" runat="server" showDelete="false" />
|
||||
</div>
|
||||
</div>
|
||||
</asp:Panel>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="msgBoxBarcode">
|
||||
<div>
|
||||
<asp:Label runat="server" ID="lblMessaggi" Text=".." Font-Size="18pt" />
|
||||
</div>
|
||||
<div>
|
||||
<asp:Label runat="server" ID="lblWarning" Text="" Font-Size="XX-Large" ForeColor="Red" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<uc3:mod_sterrTaglio runat="server" id="mod_sterrTaglio" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</asp:Panel>
|
||||
</asp:Content>
|
||||
@@ -0,0 +1,138 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using SteamWare;
|
||||
using GMW_data;
|
||||
|
||||
namespace GMW
|
||||
{
|
||||
public partial class Post_SterrTaglio : System.Web.UI.Page
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
updatePrinterPostazione();
|
||||
// fix css...
|
||||
Postazione.CssClass = "stileAttesa";
|
||||
// imposto pos abilitata x cancellazione
|
||||
mod_storicoAzioniOperatore1.IdxPosizione2del = memLayer.ML.confReadInt("IdxPosizioneSterrati");
|
||||
// pulisco dir temp dai file dei cartellini stampati
|
||||
reportPrinter.obj.pulisciDir();
|
||||
}
|
||||
// update vari...
|
||||
doUpdate();
|
||||
mod_storicoAzioniOperatore1.eh_stampa += new EventHandler(mod_storicoAzioniOperatore1_eh_stampa);
|
||||
#if false
|
||||
mod_SterrTagOUT1.eh_reqUpdate += mod_PostRX_NT1_eh_reqUpdate;
|
||||
#endif
|
||||
mod_selLineaNtDt1.eh_lineSelected += mod_selLineaNtDt1_eh_doRefresh;
|
||||
mod_selLineaNtDt1.eh_showHideStorico += mod_selLineaNtDt1_eh_showHideStorico;
|
||||
}
|
||||
/// <summary>
|
||||
/// Handles the showHideStorico event of the mod_selLineaNtDt1_eh control.
|
||||
/// </summary>
|
||||
/// <param name="sender">The source of the event.</param>
|
||||
/// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
|
||||
private void mod_selLineaNtDt1_eh_showHideStorico(object sender, EventArgs e)
|
||||
{
|
||||
fixStorico();
|
||||
}
|
||||
/// <summary>
|
||||
/// Handles the doRefresh event of the mod_selLineaNtDt1_eh control.
|
||||
/// </summary>
|
||||
/// <param name="sender">The source of the event.</param>
|
||||
/// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
|
||||
private void mod_selLineaNtDt1_eh_doRefresh(object sender, EventArgs e)
|
||||
{
|
||||
doUpdate();
|
||||
#if false
|
||||
mod_SterrTagOUT1.doResetData();
|
||||
mod_SterrTagOUT1.doUpdate();
|
||||
#endif
|
||||
}
|
||||
/// <summary>
|
||||
/// richiesta update del controllo SAO
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
void mod_PostRX_NT1_eh_reqUpdate(object sender, EventArgs e)
|
||||
{
|
||||
doUpdate();
|
||||
}
|
||||
/// <summary>
|
||||
/// aggiorna messaggi e css
|
||||
/// </summary>
|
||||
private void updateMessCss()
|
||||
{
|
||||
lblWarning.Text = Postazione.warningText;
|
||||
lblMessaggi.Text = Postazione.messaggiText;
|
||||
pnlAll.CssClass = Postazione.CssClass;
|
||||
}
|
||||
/// <summary>
|
||||
/// richiesta (ri)stampa UDC
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
void mod_storicoAzioniOperatore1_eh_stampa(object sender, EventArgs e)
|
||||
{
|
||||
#if false
|
||||
mod_SterrTagOUT1.ristampa();
|
||||
#endif
|
||||
}
|
||||
/// <summary>
|
||||
/// sistemo visualizzazione pannelli
|
||||
/// </summary>
|
||||
private void fixPanels()
|
||||
{
|
||||
// default: moduli NON visibili SE non ho linea indicata..
|
||||
bool enableBtn = false;
|
||||
if (Postazione.currCodCella != "") enableBtn = true;
|
||||
#if false
|
||||
mod_SterrTagOUT1.Visible = enableBtn;
|
||||
#endif
|
||||
fixStorico();
|
||||
}
|
||||
/// <summary>
|
||||
/// wrapper traduzione
|
||||
/// </summary>
|
||||
/// <param name="lemma"></param>
|
||||
/// <returns></returns>
|
||||
public string traduci(object lemma)
|
||||
{
|
||||
return user_std.UtSn.Traduci(lemma.ToString());
|
||||
}
|
||||
/// <summary>
|
||||
/// toggle controllo storico
|
||||
/// </summary>
|
||||
private void fixStorico()
|
||||
{
|
||||
pnlSAO.Visible = Postazione.showStorico;
|
||||
}
|
||||
/// <summary>
|
||||
/// update generale controlli
|
||||
/// </summary>
|
||||
private void doUpdate()
|
||||
{
|
||||
updateMessCss();
|
||||
fixPanels();
|
||||
mod_storicoAzioniOperatore1.doUpdate();
|
||||
}
|
||||
/// <summary>
|
||||
/// calcola postazione corrente (ip, name, printer)
|
||||
/// </summary>
|
||||
private void updatePrinterPostazione()
|
||||
{
|
||||
Postazione.IP = Request.UserHostName;
|
||||
Postazione.setupPrinter();
|
||||
// mostro warning se postazione non configurata...
|
||||
if (Postazione.printer == "n.d.")
|
||||
{
|
||||
lblWarning.Text = traduci("lblWarnPostNonConf");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Generated
+78
@@ -0,0 +1,78 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace GMW {
|
||||
|
||||
|
||||
public partial class Post_SterrTaglio {
|
||||
|
||||
/// <summary>
|
||||
/// mod_selLineaNtDt1 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::GMW.WebUserControls.mod_selLineaNtDt mod_selLineaNtDt1;
|
||||
|
||||
/// <summary>
|
||||
/// pnlAll 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.Panel pnlAll;
|
||||
|
||||
/// <summary>
|
||||
/// pnlSAO 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.Panel pnlSAO;
|
||||
|
||||
/// <summary>
|
||||
/// mod_storicoAzioniOperatore1 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::GMW.WebUserControls.mod_storicoAzioniOperatore mod_storicoAzioniOperatore1;
|
||||
|
||||
/// <summary>
|
||||
/// lblMessaggi 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.Label lblMessaggi;
|
||||
|
||||
/// <summary>
|
||||
/// lblWarning 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.Label lblWarning;
|
||||
|
||||
/// <summary>
|
||||
/// mod_sterrTaglio control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::GMW.WebUserControls.mod_sterrTaglio mod_sterrTaglio;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,152 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_sterrTaglio.ascx.cs" Inherits="GMW.WebUserControls.mod_sterrTaglio" %>
|
||||
|
||||
<% if (false)
|
||||
{ %>
|
||||
<webopt:BundleReference ID="BundleReference1" runat="server" Path="~/Content/css" />
|
||||
<webopt:BundleReference ID="BundleReference2" runat="server" Path="~/Content/themes/base/css" />
|
||||
<% } %>
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-4 col-lg-3">
|
||||
<div class="panel panel-primary panel-sm">
|
||||
<div class="panel-heading">
|
||||
<b><%: traduci("UDC") %></b>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="row boxRicerca">
|
||||
<div class="col-xs-12">
|
||||
<div class="input-group input-group-sm">
|
||||
<span class="input-group-btn text-left" style="text-align: left;">
|
||||
<asp:Button ID="btnCerca" runat="server" CssClass="btn btn-default" type="button" OnClick="btnCerca_Click" Text='<%# traduci("lblCerca") %>' />
|
||||
</span>
|
||||
<asp:TextBox ID="txtCerca" runat="server" CssClass="form-control" OnTextChanged="txtCerca_TextChanged" AutoPostBack="True" />
|
||||
<span class="input-group-addon">
|
||||
<asp:LinkButton runat="server" ID="lnkReset" Text="X" type="button" OnClick="lnkReset_Click" Font-Size="0.8em" />
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12" style="font-size: 0.8em;">
|
||||
<asp:GridView ID="grView" runat="server" AllowPaging="false" AllowSorting="True" AutoGenerateColumns="False"
|
||||
OnDataBound="grView_DataBound"
|
||||
DataKeyNames="UDC" DataSourceID="ods" OnPageIndexChanged="grView_PageIndexChanged"
|
||||
OnSorted="grView_Sorted" Width="100%">
|
||||
<RowStyle CssClass="ctrRowStyle" />
|
||||
<AlternatingRowStyle CssClass="ctrAltRowStyle" />
|
||||
<EditRowStyle CssClass="ctrEditRowStyle" />
|
||||
<SelectedRowStyle CssClass="ctrSelRowStyle" />
|
||||
<FooterStyle CssClass="ctrFooter" />
|
||||
<PagerStyle CssClass="ctrHeaderPager" ForeColor="White" HorizontalAlign="Center" />
|
||||
<HeaderStyle CssClass="ctrHeaderPager" ForeColor="White" Font-Bold="True" />
|
||||
<EmptyDataRowStyle CssClass="ctrRowStyle" />
|
||||
<EmptyDataTemplate>
|
||||
<asp:Label runat="server" ID="lblNoRecord" Text='<%# traduci("noRecord") %>' />
|
||||
</EmptyDataTemplate>
|
||||
<Columns>
|
||||
<%--<asp:TemplateField ShowHeader="False" ItemStyle-HorizontalAlign="Center">
|
||||
<HeaderTemplate>
|
||||
<asp:Button ID="btnReset" runat="server" Text='<%# traduci("Reset") %>' OnClick="btnReset_Click"
|
||||
Visible="true" />
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:ImageButton ID="imgSelect" runat="server" CausesValidation="False" CommandName="Select"
|
||||
ToolTip='<%# traduci("Select") %>' ImageUrl='<%# imgPath(SteamWare.tipoImg.seleziona, SteamWare.dimImg.small) %>' />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>--%>
|
||||
<asp:TemplateField HeaderText="lastMov" SortExpression="lastMov" ItemStyle-Wrap="false">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lbllastMov" runat="server" Text='<%# Eval("lastMov", "{0:dd/MM HH:mm}") %>' />
|
||||
</ItemTemplate>
|
||||
<ItemStyle Wrap="False" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="UDC" SortExpression="UDC">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblUDC" runat="server" Text='<%# Eval("UDC") %>' />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Particolare" SortExpression="Particolare">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblParticolare" runat="server" Text='<%# Eval("Particolare") %>' />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Qta" SortExpression="Qta" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblQta" runat="server" Text='<%# Eval("Qta","{0:#}") %>' />
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="">
|
||||
<ItemTemplate>
|
||||
<asp:RadioButtonList ID="rbl" runat="server" RepeatDirection="Horizontal" ToolTip='<%# Eval("UDC") %>' OnDataBinding="rbl_DataBinding" OnDataBound="rbl_DataBound" OnSelectedIndexChanged="rbl_SelectedIndexChanged" AutoPostBack="true">
|
||||
<asp:ListItem Value="P" Text="" Enabled="false" />
|
||||
<asp:ListItem Value="C" Text="" />
|
||||
</asp:RadioButtonList>
|
||||
</ItemTemplate>
|
||||
<HeaderTemplate>
|
||||
<asp:Label runat="server" ID="lblPC" Text="P | C" ToolTip="Consumo Parziale / Completo" />
|
||||
<%--<asp:CheckBox ID="btnSelAll" runat="server" Checked="false" ToolTip='<%# traduci("btnSelAll") %>'
|
||||
OnCheckedChanged="btnSelAll_Click" CssClass="ctrHeaderPager" AutoPostBack="true"></asp:CheckBox>--%>
|
||||
</HeaderTemplate>
|
||||
<ItemStyle HorizontalAlign="Center"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
<asp:ObjectDataSource ID="ods" runat="server" OldValuesParameterFormatString="Original_{0}"
|
||||
SelectMethod="getUdcDetailByIdxCella" TypeName="GMW_data.DS_magazzinoTableAdapters.v_UdcDetailTableAdapter"
|
||||
OnDataBinding="ods_DataBinding" FilterExpression="UDC LIKE '%{0}%' OR PARTICOLARE LIKE '%{0}%'">
|
||||
<SelectParameters>
|
||||
<asp:SessionParameter Name="IdxCella" Type="Int32" SessionField="IdxCellaLineaST_OUT" DefaultValue="0" />
|
||||
</SelectParameters>
|
||||
<FilterParameters>
|
||||
<asp:SessionParameter Name="search" Type="String" SessionField="valoreCercatoSTO"
|
||||
DefaultValue="0" />
|
||||
</FilterParameters>
|
||||
</asp:ObjectDataSource>
|
||||
<asp:Label ID="lblNumRec" runat="server" CssClass="didascalia" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4 col-lg-6">
|
||||
<div>
|
||||
<asp:Label runat="server" ID="lblParticolareAttivo" Font-Size="36pt" Text="" />
|
||||
</div>
|
||||
<div>
|
||||
<asp:Label runat="server" ID="lblDescrAttivo" Font-Size="28pt" Text="" ToolTip="particolare" />
|
||||
 
|
||||
<asp:Label runat="server" ID="lblDisegno" Font-Size="28pt" Text="" ForeColor="#FFFFFF" Font-Bold="true" ToolTip="disegno" />
|
||||
</div>
|
||||
<div>
|
||||
<asp:Label runat="server" ID="lblBarcode" Text="Barcode" />
|
||||
<br />
|
||||
<asp:TextBox runat="server" ID="txtBarcode" Height="56px" Width="100%" Font-Size="32pt" AutoPostBack="True" Style="text-align: center" TabIndex="1" />
|
||||
<%--<asp:AutoCompleteExtender ID="aceParticolare" runat="server" TargetControlID="txtBarcode" MinimumPrefixLength="2" CompletionInterval="20" ServicePath="~/WS/AutoCompletamento.asmx" ServiceMethod="elencoAnime" />--%>
|
||||
</div>
|
||||
<div id="divNote" runat="server">
|
||||
<div>
|
||||
<%: traduci("Note") %>
|
||||
</div>
|
||||
<div>
|
||||
<asp:TextBox runat="server" ID="txtNote" Height="120px" Width="100%" Font-Size="24pt" TextMode="MultiLine" TabIndex="2" />
|
||||
<asp:Button runat="server" ID="btnEmptyNote" Height="30px" Width="100%" OnClick="btnEmptyNote_Click" TabIndex="3" CssClass="btn btn-default" />
|
||||
</div>
|
||||
<div style="padding: 4px 0px;">
|
||||
<asp:LinkButton runat="server" ID="lbtStampaUDC" Width="100%" CssClass="btn btn-warning btn-lg" TabIndex="4" OnClick="btnStampa_Click"><i aria-hidden='true' class='fa fa-print fa-2x'></i> <%: traduci("btnStampaUdc") %></asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4 col-lg-3">
|
||||
<div class="panel panel-primary panel-sm">
|
||||
<div class="panel-heading">
|
||||
<b><%: traduci("Qta") %></b>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<asp:TextBox runat="server" ID="txtQta" Height="56px" Width="100%" Font-Size="32pt" Style="text-align: center" TabIndex="6" AutoPostBack="True" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,945 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using SteamWare;
|
||||
using GMW_data;
|
||||
|
||||
namespace GMW.WebUserControls
|
||||
{
|
||||
public partial class mod_sterrTaglio : System.Web.UI.UserControl
|
||||
{
|
||||
/// <summary>
|
||||
/// flusso associato (hard coded) a FUSI
|
||||
/// </summary>
|
||||
protected string flusso = "ST";
|
||||
/// <summary>
|
||||
/// stato associato (hard coded) a FUSI
|
||||
/// </summary>
|
||||
protected string statoUDC = "Sterr";
|
||||
/// <summary>
|
||||
/// tipo di evento associato alla creazione dell'UDC
|
||||
/// </summary>
|
||||
protected string eventoUDC = "UDC_STTA";
|
||||
/// <summary>
|
||||
/// stringa degli UDC selezionati per consumo COMPLETO (nel formato #UDC1##UDC2#)
|
||||
/// </summary>
|
||||
protected string udcSelC
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj(string.Format("UdcSelC_{0}", uid));
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal(string.Format("UdcSelC_{0}", uid), value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// stringa degli UDC selezionati per consumo PARZIALE (nel formato #UDC1##UDC2#)
|
||||
/// </summary>
|
||||
protected string udcSelP
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj(string.Format("UdcSelP_{0}", uid));
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal(string.Format("UdcSelP_{0}", uid), value);
|
||||
}
|
||||
}
|
||||
public event EventHandler eh_nuovaRicerca;
|
||||
public event EventHandler eh_reqUpdate;
|
||||
/// <summary>
|
||||
/// stringa UID univoca
|
||||
/// </summary>
|
||||
public string uid
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.UniqueID.Replace("$", "_").Replace("-", "_");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// caricamento pagina
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
fixRicercaUdc();
|
||||
traduciObj();
|
||||
idxCella = Postazione.currIdxCella;
|
||||
}
|
||||
doChecks();
|
||||
}
|
||||
/// <summary>
|
||||
/// IDX cella associata alla linea corrente
|
||||
/// </summary>
|
||||
protected int idxCella
|
||||
{
|
||||
get
|
||||
{
|
||||
int answ = 0;
|
||||
if (memLayer.ML.isInSessionObject("IdxCellaLineaST_OUT"))
|
||||
{
|
||||
answ = memLayer.ML.IntSessionObj("IdxCellaLineaST_OUT");
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("IdxCellaLineaST_OUT", value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// verifica se si debba mostrare un campo ricerca attivo...
|
||||
/// </summary>
|
||||
private void fixRicercaUdc()
|
||||
{
|
||||
if (memLayer.ML.isInSessionObject("valoreCercatoSTO"))
|
||||
{
|
||||
testoRicerca = memLayer.ML.StringSessionObj("valoreCercatoSTO");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// richiesta (ri)stampa UDC
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
public void ristampa()
|
||||
{
|
||||
MagClass.magazzino.stampaUdc(udcReq, Postazione.printer, tipoCartellino.cartSterr, Request.UserHostName);
|
||||
// registro ri-stampa UDC
|
||||
DateTime adesso = DateTime.Now;
|
||||
// calcolo particolare...
|
||||
DS_magazzino.ElencoCartelliniRow rigaUDC;
|
||||
string particolare = "";
|
||||
try
|
||||
{
|
||||
rigaUDC = MagClass.magazzino.taCartellini.getByUdc(udcReq)[0];
|
||||
particolare = rigaUDC.Particolare;
|
||||
}
|
||||
catch
|
||||
{
|
||||
logger.lg.scriviLog(string.Format("Errore recupero particolare UDC Sterratura OUT {0}", udcReq), tipoLog.EXCEPTION);
|
||||
}
|
||||
MagClass.magazzino.taSAO.insertQuery(adesso, MagClass.magazzino.CodSoggCurrUser, Postazione.name, Postazione.IP, udcReq, particolare, "stampaUDC", "Ri-Stampato UDC Sterratura OUT");
|
||||
// raise dell'evento
|
||||
if (eh_reqUpdate != null)
|
||||
{
|
||||
eh_reqUpdate(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// udc da stampare
|
||||
/// </summary>
|
||||
protected string udcReq
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj("udcSelSAO");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// controlla particolare selezionato
|
||||
/// </summary>
|
||||
private void checkParticolare()
|
||||
{
|
||||
if (currParticolare != "")
|
||||
{
|
||||
lblParticolareAttivo.Text = string.Format("Particolare selezionato <b>{0}</b>", currParticolare);
|
||||
// aggiungo descrizione del particolare
|
||||
string descr = "";
|
||||
string disegno = "";
|
||||
try
|
||||
{
|
||||
DS_magazzino.AnagParticolariRow riga = MagClass.magazzino.taAnagPart.likeSearch(currParticolare, memLayer.ML.StringSessionObj("CodCS"))[0];
|
||||
descr = riga.DescParticolare;
|
||||
disegno = string.Format("( {0} )", riga.DisegnoGrezzo);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
lblDescrAttivo.Text = descr;
|
||||
lblDisegno.Text = disegno;
|
||||
}
|
||||
else
|
||||
{
|
||||
lblParticolareAttivo.Text = "...";
|
||||
lblDescrAttivo.Text = "";
|
||||
lblDisegno.Text = "";
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// effettua controlli visibilità
|
||||
/// </summary>
|
||||
private void doChecks()
|
||||
{
|
||||
checkBarcode();
|
||||
checkStampa();
|
||||
checkParticolare();
|
||||
}
|
||||
/// <summary>
|
||||
/// sistemo labels oggetti
|
||||
/// </summary>
|
||||
private void traduciObj()
|
||||
{
|
||||
// labels
|
||||
btnCerca.Text = traduci("btnSearch");
|
||||
//txtBox
|
||||
txtQta.Text = memLayer.ML.confReadString("QtaImballoSterr");
|
||||
// buttons
|
||||
btnEmptyNote.Text = traduci("btnEmptyNote");
|
||||
}
|
||||
/// <summary>
|
||||
/// restituisce il nome della pagina corrente
|
||||
/// </summary>
|
||||
protected string PagCorrente
|
||||
{
|
||||
get
|
||||
{
|
||||
string answ = "";
|
||||
Uri MyUrl = Request.Url;
|
||||
string delimStr = "/";
|
||||
char[] delimiter = delimStr.ToCharArray();
|
||||
string[] finalUrl = MyUrl.LocalPath.ToString().Split(delimiter);
|
||||
int n = finalUrl.Length;
|
||||
answ = finalUrl[n - 1].ToString();
|
||||
DataLayer_AnagGen.PermessiRow riga = (DataLayer_AnagGen.PermessiRow)user_std.UtSn.permessi.Select(string.Format("URL = '{0}'", answ))[0];
|
||||
answ = riga.NOME;
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// wrapper traduzione
|
||||
/// </summary>
|
||||
/// <param name="lemma"></param>
|
||||
/// <returns></returns>
|
||||
public string traduci(object lemma)
|
||||
{
|
||||
return user_std.UtSn.Traduci(lemma.ToString());
|
||||
}
|
||||
/// <summary>
|
||||
/// indica il codice articolo correntemente selezionato
|
||||
/// </summary>
|
||||
protected string currParticolare
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj(string.Format("currParticolare_{0}", uid));
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal(string.Format("currParticolare_{0}", uid), value, memLayer.ML.confReadBool("keepParticolareSel"));
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// indica se i caratteri vadano forzati a maiuscoli
|
||||
/// </summary>
|
||||
public bool forceUppercase
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.confReadBool("forceUppercase");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// num pezzi dell'ultimo UDC del particolare generato
|
||||
/// </summary>
|
||||
public int pezziUdc
|
||||
{
|
||||
get
|
||||
{
|
||||
int answ = 0;
|
||||
try
|
||||
{
|
||||
answ = (int)MagClass.magazzino.taCartellini.getLastByParticolareStato(memLayer.ML.StringSessionObj("CodCS"), currParticolare, statoUDC)[0].Qta;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// decodifica il tipo barcode acquisito
|
||||
/// </summary>
|
||||
public tipoCodiceBarcode tipoBCode
|
||||
{
|
||||
get
|
||||
{
|
||||
tipoCodiceBarcode answ = tipoCodiceBarcode.ND;
|
||||
int trovati = 0;
|
||||
// controllo non si tratti di un comando...
|
||||
string preCmd = memLayer.ML.confReadString("prefComandi");
|
||||
if (barcodeIn.StartsWith(preCmd))
|
||||
{
|
||||
answ = tipoCodiceBarcode.Comando;
|
||||
}
|
||||
else if ((TermClass.Ter.riconosciBarcode(barcodeIn) == tipoCodiceBarcode.Particolare)) // è un particolare...
|
||||
{
|
||||
answ = tipoCodiceBarcode.Particolare;
|
||||
}
|
||||
else
|
||||
{
|
||||
try
|
||||
{
|
||||
// cerco tra gitterbox (UDC)...
|
||||
trovati = MagClass.magazzino.taCartellini.getByUdc(barcodeIn).Rows.Count;
|
||||
if (trovati > 0)
|
||||
{
|
||||
answ = tipoCodiceBarcode.UDC;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// valore barcode
|
||||
/// </summary>
|
||||
public string barcodeIn
|
||||
{
|
||||
get
|
||||
{
|
||||
return txtBarcode.Text.Trim();
|
||||
}
|
||||
set
|
||||
{
|
||||
txtBarcode.Text = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// qta pezzi TOTALE
|
||||
/// </summary>
|
||||
public int qta
|
||||
{
|
||||
get
|
||||
{
|
||||
int qta = 0;
|
||||
try
|
||||
{
|
||||
qta = Convert.ToInt32(txtQta.Text.Trim());
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return qta;
|
||||
}
|
||||
set
|
||||
{
|
||||
txtQta.Text = value.ToString();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// controlla se ci sia un barcode
|
||||
/// </summary>
|
||||
private void checkBarcode()
|
||||
{
|
||||
if (barcodeIn != "")
|
||||
{
|
||||
Postazione.messaggiText = string.Format("Barcode digitato: {0}", barcodeIn);
|
||||
switch (tipoBCode)
|
||||
{
|
||||
#if false
|
||||
case tipoCodiceBarcode.Comando:
|
||||
// verifico se il comando sia di tipo "seleziona linea"
|
||||
string cmdSelLine = memLayer.ML.confReadString("cmdSelLine");
|
||||
Postazione.CssClass = "stileComandoOk";
|
||||
if (barcodeIn.StartsWith(cmdSelLine))
|
||||
{
|
||||
// allora provo ad impostare la linea!
|
||||
checkSelDDL(barcodeIn.Replace(cmdSelLine, ""), true);
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
case tipoCodiceBarcode.Particolare:
|
||||
// 2014.02.13: tolto perché NON si vuole particolare OUT diverso da IN
|
||||
#if false
|
||||
// imposto il particolare corrente
|
||||
currParticolare = barcodeIn;
|
||||
impostaParticolare();
|
||||
#endif
|
||||
break;
|
||||
case tipoCodiceBarcode.UDC:
|
||||
// procedo solo se UDC esistente
|
||||
if (MagClass.magazzino.checkUDC(barcodeIn))
|
||||
{
|
||||
// calcolo nuovo particolare
|
||||
string newPart = DataProxy.obj.taCartellini.stp_getByUdc(barcodeIn)[0].Particolare;
|
||||
if (testoRicerca != newPart)
|
||||
{
|
||||
// resetto precedente ricerca e deseleziono TUTTI gli UDC elencati SE è cambiato il particolare
|
||||
udcSelC = string.Format("#{0}#", barcodeIn);
|
||||
}
|
||||
else
|
||||
{
|
||||
udcSelC = string.Format("{0}#{1}#", udcSelC, barcodeIn);
|
||||
// se era presente in elenco "P" lo elimino
|
||||
udcSelP = udcSelP.Replace(string.Format("#{0}#", barcodeIn), "");
|
||||
}
|
||||
updFiltroPart(newPart);
|
||||
// imposto particolare!
|
||||
currParticolare = newPart;
|
||||
impostaParticolare();
|
||||
}
|
||||
|
||||
break;
|
||||
default:
|
||||
Postazione.messaggiText += " - codice <b>non riconosciuto</b>!";
|
||||
Postazione.CssClass = "stileComandoND";
|
||||
break;
|
||||
}
|
||||
barcodeIn = "";
|
||||
}
|
||||
else
|
||||
{
|
||||
Postazione.messaggiText = traduci("AttesaBCode");
|
||||
Postazione.CssClass = "stileAttesa";
|
||||
}
|
||||
//grView.DataBind();
|
||||
txtBarcode.Focus();
|
||||
}
|
||||
/// <summary>
|
||||
/// imposto i dati dal aprticolare corrente
|
||||
/// </summary>
|
||||
private void impostaParticolare()
|
||||
{
|
||||
// controllo esista il particolare scansionato
|
||||
if (DataProxy.obj.taAnagParticolari.getByParticolare(currParticolare).Rows.Count == 0)
|
||||
{
|
||||
currParticolare = "";
|
||||
Postazione.messaggiText += " - codice particolare non valido / non trovato in RILPRO.";
|
||||
Postazione.CssClass = "stileComandoKo";
|
||||
}
|
||||
else
|
||||
{
|
||||
Postazione.messaggiText += " - impostato particolare!";
|
||||
Postazione.CssClass = "stileComandoOk";
|
||||
}
|
||||
// leggo la qta dell'ultimo UDC del particolare, SE C'E', e la imposto...
|
||||
if (pezziUdc > 0)
|
||||
{
|
||||
txtQta.Text = pezziUdc.ToString();
|
||||
}
|
||||
else // rimette default
|
||||
{
|
||||
txtQta.Text = memLayer.ML.confReadString("QtaImballoSterr");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// update del filtro su particolare x grview UDC caricati in linea
|
||||
/// </summary>
|
||||
/// <param name="newPart"></param>
|
||||
private void updFiltroPart(string newPart)
|
||||
{
|
||||
if (testoRicerca != newPart)
|
||||
{
|
||||
// imposto filtraggio x particoalre nell'elenco degli UDC della linea...
|
||||
testoRicerca = newPart;
|
||||
// salvo UDC da selezionare come consumo COMPLETO
|
||||
salvaCerca();
|
||||
}
|
||||
else
|
||||
{
|
||||
doUpdate();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// aggiorna tabella + focus a barcode
|
||||
/// </summary>
|
||||
public void doUpdate()
|
||||
{
|
||||
idxCella = Postazione.currIdxCella;
|
||||
checkStampa();
|
||||
grView.DataBind();
|
||||
txtBarcode.Focus();
|
||||
// raise dell'evento
|
||||
if (eh_reqUpdate != null)
|
||||
{
|
||||
eh_reqUpdate(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// controllo l'abilitazioen alla stampa UDC:
|
||||
/// - particolare ok
|
||||
/// - qta > 0
|
||||
/// - udc da consumo totale/parziale
|
||||
/// altrimenti disabilito btn stampa
|
||||
/// </summary>
|
||||
private void checkStampa()
|
||||
{
|
||||
bool stampaOk = false;
|
||||
//controllo siano inseriti valori qta
|
||||
if (qta > 0)
|
||||
{
|
||||
// controllo ci siano particolare e ci sia selezionato almeno un UDC
|
||||
if (currParticolare != "" && ((udcSelC.Replace("#", "").Length > 1) || (udcSelP.Replace("#", "").Length > 1)))
|
||||
{
|
||||
stampaOk = true;
|
||||
}
|
||||
}
|
||||
divNote.Visible = stampaOk;
|
||||
}
|
||||
/// <summary>
|
||||
/// genera i barcode di
|
||||
/// - trattamenti
|
||||
/// - nuovo x pezzi liquidi
|
||||
/// e lancia la relativa stampa
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnStampa_Click(object sender, EventArgs e)
|
||||
{
|
||||
string[] stringSeparators = new string[] { "#" };
|
||||
// verifico postazione x procedere...
|
||||
if (Postazione.printer != "n.d.")
|
||||
{
|
||||
// controllo UDC in ingresso, che siano tutti con uguale particolare e DIVERSO da ""
|
||||
string partUdcIn = "";
|
||||
try
|
||||
{
|
||||
string fullUdc = string.Format("{0}#{1}", udcSelC, udcSelP);
|
||||
// ciclo tutti gli UDC consumati P e C e verifico loro particolare
|
||||
if (fullUdc.Replace("#", "").Length > 1)
|
||||
{
|
||||
string[] elencoUDC;
|
||||
elencoUDC = fullUdc.Split(stringSeparators, StringSplitOptions.RemoveEmptyEntries);
|
||||
partUdcIn = checkPartUDC(elencoUDC);
|
||||
}
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
if (partUdcIn != "")
|
||||
{
|
||||
// controllo da distinta base coerenza particolare IN/OUT
|
||||
bool partDistintaOk = false;
|
||||
try
|
||||
{
|
||||
if (MagClass.magazzino.taPartIO.GetData(currParticolare, partUdcIn, true)[0].Trovati > 0) partDistintaOk = true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
if (partDistintaOk)
|
||||
{
|
||||
string newUdcChild = "";
|
||||
int qta = memLayer.ML.confReadInt("QtaImballoSterr");
|
||||
string noteTrim = txtNote.Text.Trim();
|
||||
noteTrim = string.Format("{0}{1}{2}", Postazione.currNomeLinea, Environment.NewLine, noteTrim);
|
||||
try
|
||||
{
|
||||
qta = Convert.ToInt32(txtQta.Text);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
// effettuo controlli che cod_soggetto e cod particolare siano disponibili...
|
||||
string codSogg = "";
|
||||
string particolare = "";
|
||||
try
|
||||
{
|
||||
codSogg = MagClass.magazzino.CodSoggCurrUser;
|
||||
particolare = currParticolare;
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
if (codSogg != "" && particolare != "")
|
||||
{
|
||||
// genero cartellino
|
||||
DateTime adesso = DateTime.Now;
|
||||
try
|
||||
{
|
||||
// creo nuovo UDC sterrato OUT multiple
|
||||
newUdcChild = MagClass.magazzino.creaUdc(flusso, "", currParticolare, "", "", "", "", "", 0, memLayer.ML.confReadString("CodImballoSterr"), "U", MagClass.magazzino.CodSoggCurrUser, qta, 0, 0, adesso, 0, statoUDC, memLayer.ML.confReadInt("IdxPosizioneSterrati"), "IdxPosizioneSterrati", eventoUDC, noteTrim, "", adesso.Year, Request.UserHostName);
|
||||
// registro creazione nuovo UDC
|
||||
MagClass.magazzino.taSAO.insertQuery(adesso, codSogg, Postazione.name, Postazione.IP, newUdcChild, particolare, "creaUDC", string.Format("Creato nuovo UDC Sterrato, qta: {0} {1}", qta, noteTrim));
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
httpLog(string.Format("Errore creazione UDC Sterrato: {0}", exc), tipoLog.EXCEPTION);
|
||||
}
|
||||
// devo gestire associazione e consumo cartellini FUSI
|
||||
if (newUdcChild != "")
|
||||
{
|
||||
string[] UDC_P;
|
||||
// ASSOCIO tutti gli UDC consumati sia Parziali che Completi al nuovo UDC
|
||||
if (udcSelP.Replace("#", "").Length > 1)
|
||||
{
|
||||
// associo
|
||||
UDC_P = udcSelP.Split(stringSeparators, StringSplitOptions.RemoveEmptyEntries);
|
||||
//UDC_P = SteamWare.StringSplitter.CSplitter.Split(udcSelP, "#", false, 0, SteamWare.StringSplitter.ComparisonMethod.Text);
|
||||
associaUdc(newUdcChild, UDC_P);
|
||||
}
|
||||
if (udcSelC.Replace("#", "").Length > 1)
|
||||
{
|
||||
// associo
|
||||
UDC_P = udcSelC.Split(stringSeparators, StringSplitOptions.RemoveEmptyEntries);
|
||||
//UDC_P = SteamWare.StringSplitter.CSplitter.Split(udcSelC, "#", false, 0, SteamWare.StringSplitter.ComparisonMethod.Text);
|
||||
associaUdc(newUdcChild, UDC_P);
|
||||
// consumo gli UDC indicati come "C"
|
||||
consumaUdc(UDC_P);
|
||||
}
|
||||
|
||||
// ora stampo il nuovo cartellino!!!
|
||||
MagClass.magazzino.stampaUdc(newUdcChild, Postazione.printer, tipoCartellino.cartSterr, Request.UserHostName);
|
||||
// incremento timing...
|
||||
adesso = DateTime.Now;
|
||||
adesso = adesso.AddSeconds(2);
|
||||
// registro stampa nuovo UDC
|
||||
MagClass.magazzino.taSAO.insertQuery(adesso, codSogg, Postazione.name, Postazione.IP, newUdcChild, particolare, "stampaUDC", "Stampato UDC Sterrato");
|
||||
}
|
||||
// resetto
|
||||
doResetData();
|
||||
}
|
||||
else
|
||||
{
|
||||
httpLog(string.Format("STERRATI OUT, Errore persi utente/particolare, ricarico!"), tipoLog.ERROR);
|
||||
Response.Redirect("~/login.aspx");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
httpLog(string.Format("STERRATI OUT, Errore controllo coerenza particolari da distinta base!"), tipoLog.ERROR);
|
||||
Postazione.messaggiText += "Errore particolari UDC da controllo distinta base";
|
||||
Postazione.CssClass = "stileComandoND";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
httpLog(string.Format("STERRATI OUT, Errore controllo coerenza elenco aprticolari IN!"), tipoLog.ERROR);
|
||||
Postazione.messaggiText += "Errore particolari UDC da consumare non coerenti";
|
||||
Postazione.CssClass = "stileComandoND";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Response.Redirect("~/menu.aspx");
|
||||
}
|
||||
doUpdate();
|
||||
// raise dell'evento
|
||||
if (eh_reqUpdate != null)
|
||||
{
|
||||
eh_reqUpdate(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// effettua il consumo di tutti gli UDC inviati come array di stringhe
|
||||
/// </summary>
|
||||
/// <param name="UDC_P"></param>
|
||||
private void consumaUdc(string[] UDC_P)
|
||||
{
|
||||
if (UDC_P.Length > 0)
|
||||
{
|
||||
// ciclo
|
||||
foreach (string udc_p in UDC_P)
|
||||
{
|
||||
// se UDC è NON vuoto ed esiste
|
||||
if (udc_p != "" && MagClass.magazzino.checkUDC(udc_p))
|
||||
{
|
||||
// se è consumabile (IdxPosizione > 0)...
|
||||
if (MagClass.magazzino.udcMpIsConsumabile(udc_p))
|
||||
{
|
||||
// consumo UDC
|
||||
MagClass.magazzino.scaricaUdcMpWip(udc_p, Request.UserHostName);
|
||||
// sposta UDC da posizione corrente a nessuna...
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
///associa nuovo UDC ad elenco UDC
|
||||
/// </summary>
|
||||
/// <param name="newUdcChild">UDC da associare come child</param>
|
||||
/// <param name="UDC_P">vettore di UDC da associare come parent</param>
|
||||
private void associaUdc(string newUdcChild, string[] UDC_P)
|
||||
{
|
||||
if (UDC_P.Length > 0)
|
||||
{
|
||||
// ciclo
|
||||
foreach (string udc_p in UDC_P)
|
||||
{
|
||||
// se UDC è NON vuoto ed esiste
|
||||
if (udc_p != "" && MagClass.magazzino.checkUDC(udc_p))
|
||||
{
|
||||
MagClass.magazzino.associaUdcParent(newUdcChild, udc_p);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// verifica che il vettore di UDC abbia tutto lo stesso particolare e lo restituisce, altrimenti restituisce ""
|
||||
/// </summary>
|
||||
/// <param name="UDC_P">vettore di UDC da verificare</param>
|
||||
private string checkPartUDC(string[] UDC_P)
|
||||
{
|
||||
string answ = "";
|
||||
if (UDC_P.Length > 0)
|
||||
{
|
||||
// imposto il primo particolare...
|
||||
answ = MagClass.magazzino.getParticolareByUDC(UDC_P[0]);
|
||||
// ciclo
|
||||
foreach (string udc_p in UDC_P)
|
||||
{
|
||||
if (MagClass.magazzino.getParticolareByUDC(udc_p) != answ) answ = ""; // se uno è diverso "azzero"
|
||||
}
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// wrapper per log con salvataggio dell'IP del chiamante
|
||||
/// </summary>
|
||||
/// <param name="_testoPre"></param>
|
||||
/// <returns></returns>
|
||||
public bool httpLog(string _testoPre)
|
||||
{
|
||||
bool answ = false;
|
||||
logger.lg.scriviLog(Postazione.IP + _testoPre);
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// wrapper per log con salvataggio dell'IP del chiamante
|
||||
/// </summary>
|
||||
/// <param name="_testoPre"></param>
|
||||
/// <returns></returns>
|
||||
public bool httpLog(string testoLog, tipoLog tipo)
|
||||
{
|
||||
bool answ = false;
|
||||
logger.lg.scriviLog(Postazione.IP + testoLog, tipo);
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// effettua reset dati
|
||||
/// </summary>
|
||||
public void doResetData()
|
||||
{
|
||||
// resetto i dati QtaTot e particolare...
|
||||
qta = 0;
|
||||
currParticolare = "";
|
||||
txtQta.Text = "";
|
||||
testoRicerca = "";
|
||||
salvaCerca();
|
||||
doChecks();
|
||||
}
|
||||
/// <summary>
|
||||
/// svuoto le note
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnEmptyNote_Click(object sender, EventArgs e)
|
||||
{
|
||||
txtNote.Text = "";
|
||||
}
|
||||
/// <summary>
|
||||
/// passo alla modalità IN
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnIn_Click(object sender, EventArgs e)
|
||||
{
|
||||
Response.Redirect("SterrTaglioIN.aspx");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// effettua refresh (su db) del blocco postazione
|
||||
/// </summary>
|
||||
/// <param name="codLinea"></param>
|
||||
private void refreshBloccoPost(string codLinea)
|
||||
{
|
||||
// resetto usi linee precedenti..
|
||||
MagClass.magazzino.taAL.resetPost(Postazione.name);
|
||||
// se la linea non è "base" = "Sel linea", finisce x "0"
|
||||
if (codLinea.Substring(codLinea.Length - 1) != "0")
|
||||
{
|
||||
// salvo su DB che sto occupando linea...
|
||||
MagClass.magazzino.taAL.updatePost(codLinea, Postazione.name);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// cambiato valore in ricerca
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void txtCerca_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
// se è nuovo il testo resetto
|
||||
if (testoRicerca != SteamWare.memLayer.ML.StringSessionObj("valoreCercatoSTO"))
|
||||
{
|
||||
udcSelC = "";
|
||||
udcSelP = "";
|
||||
}
|
||||
salvaCerca();
|
||||
}
|
||||
/// <summary>
|
||||
/// effettuato reset
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void lnkReset_Click(object sender, EventArgs e)
|
||||
{
|
||||
testoRicerca = "";
|
||||
salvaCerca();
|
||||
}
|
||||
/// <summary>
|
||||
/// pressione del button di ricerca
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnCerca_Click(object sender, EventArgs e)
|
||||
{
|
||||
salvaCerca();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// testo ricerca trimmato da spazi
|
||||
/// </summary>
|
||||
protected string testoRicerca
|
||||
{
|
||||
get
|
||||
{
|
||||
return txtCerca.Text.Trim();
|
||||
}
|
||||
set
|
||||
{
|
||||
txtCerca.Text = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// salvo ricerca particolare
|
||||
/// </summary>
|
||||
protected void salvaCerca()
|
||||
{
|
||||
if (testoRicerca == "")
|
||||
{
|
||||
SteamWare.memLayer.ML.emptySessionVal("valoreCercatoSTO");
|
||||
udcSelC = "";
|
||||
udcSelP = "";
|
||||
}
|
||||
else
|
||||
{
|
||||
SteamWare.memLayer.ML.setSessionVal("valoreCercatoSTO", testoRicerca);
|
||||
}
|
||||
// raise dell'evento
|
||||
if (eh_nuovaRicerca != null)
|
||||
{
|
||||
eh_nuovaRicerca(this, new EventArgs());
|
||||
}
|
||||
doUpdate();
|
||||
}
|
||||
protected void grView_PageIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
// fix dell'ODS
|
||||
checkFixOds();
|
||||
}
|
||||
protected void grView_Sorted(object sender, EventArgs e)
|
||||
{
|
||||
// fix dell'ODS
|
||||
checkFixOds();
|
||||
}
|
||||
/// <summary>
|
||||
/// aggiorno ods al binding..
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void ods_DataBinding(object sender, EventArgs e)
|
||||
{
|
||||
// fix dell'ODS
|
||||
checkFixOds();
|
||||
}
|
||||
/// <summary>
|
||||
/// verifica se attivo filtro company e imposta ods di conseguenza...
|
||||
/// </summary>
|
||||
private void checkFixOds()
|
||||
{
|
||||
}
|
||||
/// <summary>
|
||||
/// traduce gli header delle colonne
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void grView_DataBound(object sender, EventArgs e)
|
||||
{
|
||||
if (grView.Rows.Count > 0)
|
||||
{
|
||||
LinkButton lb;
|
||||
// aggiorno gli headers
|
||||
foreach (TableCell cella in grView.HeaderRow.Cells)
|
||||
{
|
||||
try
|
||||
{
|
||||
lb = (LinkButton)cella.Controls[0];
|
||||
lb.Text = traduci(lb.Text);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
int totRecord = grView.Rows.Count + grView.PageSize * (grView.PageCount - 1);
|
||||
lblNumRec.Text = string.Format("{0} records of ~ {1}", grView.Rows.Count, totRecord);
|
||||
}
|
||||
else
|
||||
{
|
||||
lblNumRec.Text = "";
|
||||
}
|
||||
}
|
||||
|
||||
protected void rbl_DataBinding(object sender, EventArgs e)
|
||||
{
|
||||
RadioButtonList rbl = (RadioButtonList)sender;
|
||||
if (udcSelC.IndexOf(rbl.ToolTip) >= 0)
|
||||
{
|
||||
rbl.SelectedValue = "C";
|
||||
}
|
||||
else if (udcSelP.IndexOf(rbl.ToolTip) >= 0)
|
||||
{
|
||||
rbl.SelectedValue = "P";
|
||||
}
|
||||
}
|
||||
|
||||
protected void rbl_DataBound(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// selezione UDC da elenco
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void rbl_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
RadioButtonList rbl = (RadioButtonList)sender;
|
||||
if (rbl.SelectedValue == "C")
|
||||
{
|
||||
udcSelC = string.Format("{0}#{1}#", udcSelC, rbl.ToolTip);
|
||||
// se era presente in elenco "P" lo elimino
|
||||
udcSelP = udcSelP.Replace(string.Format("#{0}#", rbl.ToolTip), "");
|
||||
}
|
||||
else
|
||||
{
|
||||
udcSelP = string.Format("{0}#{1}#", udcSelP, rbl.ToolTip);
|
||||
// se era presente in elenco "C" lo elimino
|
||||
udcSelC = udcSelC.Replace(string.Format("#{0}#", rbl.ToolTip), "");
|
||||
}
|
||||
// calcolo il particolare da selezionare...
|
||||
string newPart = DataProxy.obj.taCartellini.stp_getByUdc(rbl.ToolTip)[0].Particolare;
|
||||
updFiltroPart(newPart);
|
||||
// imposto particolare!
|
||||
currParticolare = newPart;
|
||||
checkParticolare();
|
||||
impostaParticolare();
|
||||
checkStampa();
|
||||
// raise dell'evento
|
||||
if (eh_reqUpdate != null)
|
||||
{
|
||||
eh_reqUpdate(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
+177
@@ -0,0 +1,177 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace GMW.WebUserControls {
|
||||
|
||||
|
||||
public partial class mod_sterrTaglio {
|
||||
|
||||
/// <summary>
|
||||
/// BundleReference1 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::Microsoft.AspNet.Web.Optimization.WebForms.BundleReference BundleReference1;
|
||||
|
||||
/// <summary>
|
||||
/// BundleReference2 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::Microsoft.AspNet.Web.Optimization.WebForms.BundleReference BundleReference2;
|
||||
|
||||
/// <summary>
|
||||
/// btnCerca 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.Button btnCerca;
|
||||
|
||||
/// <summary>
|
||||
/// txtCerca 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.TextBox txtCerca;
|
||||
|
||||
/// <summary>
|
||||
/// lnkReset 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 lnkReset;
|
||||
|
||||
/// <summary>
|
||||
/// grView 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.GridView grView;
|
||||
|
||||
/// <summary>
|
||||
/// ods 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.ObjectDataSource ods;
|
||||
|
||||
/// <summary>
|
||||
/// lblNumRec 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.Label lblNumRec;
|
||||
|
||||
/// <summary>
|
||||
/// lblParticolareAttivo 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.Label lblParticolareAttivo;
|
||||
|
||||
/// <summary>
|
||||
/// lblDescrAttivo 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.Label lblDescrAttivo;
|
||||
|
||||
/// <summary>
|
||||
/// lblDisegno 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.Label lblDisegno;
|
||||
|
||||
/// <summary>
|
||||
/// lblBarcode 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.Label lblBarcode;
|
||||
|
||||
/// <summary>
|
||||
/// txtBarcode 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.TextBox txtBarcode;
|
||||
|
||||
/// <summary>
|
||||
/// divNote 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 divNote;
|
||||
|
||||
/// <summary>
|
||||
/// txtNote 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.TextBox txtNote;
|
||||
|
||||
/// <summary>
|
||||
/// btnEmptyNote 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.Button btnEmptyNote;
|
||||
|
||||
/// <summary>
|
||||
/// lbtStampaUDC 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 lbtStampaUDC;
|
||||
|
||||
/// <summary>
|
||||
/// txtQta 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.TextBox txtQta;
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -5,7 +5,7 @@
|
||||
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: AssemblyVersion("2.8.741.1757")]
|
||||
[assembly: AssemblyFileVersion("2.8.741.1757")]
|
||||
[assembly: AssemblyVersion("2.8.743.1760")]
|
||||
[assembly: AssemblyFileVersion("2.8.743.1760")]
|
||||
[assembly: AssemblyCopyright("Steamware © 2007-2014")]
|
||||
[assembly: AssemblyCompany("Steamware")]
|
||||
|
||||
+2
-2
@@ -6,8 +6,8 @@
|
||||
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: AssemblyVersion("2.8.741.<#= this.RevisionNumber #>")]
|
||||
[assembly: AssemblyFileVersion("2.8.741.<#= this.RevisionNumber #>")]
|
||||
[assembly: AssemblyVersion("2.8.743.<#= this.RevisionNumber #>")]
|
||||
[assembly: AssemblyFileVersion("2.8.743.<#= this.RevisionNumber #>")]
|
||||
[assembly: AssemblyCopyright("Steamware © 2007-<#= DateTime.Now.Year #>")]
|
||||
[assembly: AssemblyCompany("Steamware")]
|
||||
<#+
|
||||
|
||||
Reference in New Issue
Block a user