installer nuovo alla 240

gestione spsotamenti e rettifiche qtà da ricerca avanzata
jump corretto verso dettaglio magazzino da ricerca avanzata

git-svn-id: https://keyhammer.ath.cx/svn/GMW/trunk@244 365432ac-a1b5-4ffd-bb28-6d3099d32164
This commit is contained in:
samuele
2010-09-15 10:32:56 +00:00
parent 355e8127a9
commit f7a9be1a53
19 changed files with 344 additions and 6319 deletions
@@ -28,6 +28,12 @@ namespace GMW.WebUserControls
mod_listUDC1.eh_resetSelezione += new EventHandler(mod_listUDC1_eh_resetSelezione);
mod_execUDC1.eh_btnGoToMagPressed += new EventHandler(mod_execUDC1_eh_btnGoToMagPressed);
mod_execUDC1.eh_btnListaPrelievoPressed += new EventHandler(mod_execUDC1_eh_btnListaPrelievoPressed);
mod_execUDC1.eh_nuovoValore += new EventHandler(mod_execUDC1_eh_nuovoValore);
}
void mod_execUDC1_eh_nuovoValore(object sender, EventArgs e)
{
aggiornaDettaglio();
}
/// <summary>
/// evento crea lista di prelievo chiamato
@@ -68,6 +74,11 @@ namespace GMW.WebUserControls
}
void mod_listUDC1_eh_selValore(object sender, EventArgs e)
{
aggiornaDettaglio();
}
private void aggiornaDettaglio()
{
mod_detailUDC1.Visible = true;
mod_detailUDC1.doUpdate();
+8 -1
View File
@@ -4,6 +4,10 @@
<table>
<tr>
<td>
<div class="boxRicerca">
<asp:TextBox ID="txtCerca" runat="server" OnTextChanged="txtCerca_TextChanged" Width="200px"></asp:TextBox>
<asp:Button ID="btnCerca" runat="server" OnClick="btnCerca_Click" Text='<%# traduci("lblCerca") %>' />
</div>
<asp:GridView ID="grView" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False"
OnSelectedIndexChanged="grView_SelectedIndexChanged" OnDataBound="grView_DataBound"
DataKeyNames="UDC" DataSourceID="ods" OnPageIndexChanged="grView_PageIndexChanged"
@@ -54,10 +58,13 @@
</asp:GridView>
<asp:ObjectDataSource ID="ods" runat="server" OldValuesParameterFormatString="Original_{0}"
SelectMethod="getUdcDetailByIdxCella" TypeName="GMW_data.DS_magazzinoTableAdapters.v_UdcDetailTableAdapter"
OnDataBinding="ods_DataBinding">
OnDataBinding="ods_DataBinding" FilterExpression="UDC LIKE '%{0}%' OR PARTICOLARE LIKE '%{0}%'">
<SelectParameters>
<asp:SessionParameter Name="IdxCella" Type="Int32" SessionField="IdxCellaMag" DefaultValue="0" />
</SelectParameters>
<FilterParameters>
<asp:SessionParameter Name="search" Type="String" SessionField="valoreCercatoCella" DefaultValue="" />
</FilterParameters>
</asp:ObjectDataSource>
<asp:Label ID="lblNumRec" runat="server" CssClass="txtMini" />&nbsp;&nbsp;
<asp:Label ID="lblWarning" runat="server" Visible="false" CssClass="erroreMid" />
+68 -1
View File
@@ -100,6 +100,8 @@ namespace GMW.WebUserControls
#region area codice variabile
public event EventHandler eh_nuovaRicerca;
/// <summary>
/// aggiorna controlli datagrid e numero righe in pagina
/// </summary>
@@ -135,6 +137,7 @@ namespace GMW.WebUserControls
{
traduzione();
azzeraPostUpdate();
updateText();
}
_idxGridView = "UDC2edit";
}
@@ -151,6 +154,7 @@ namespace GMW.WebUserControls
btnSposta.Text = traduci("btnSposta");
cbeQta.ConfirmText = traduci("confermaRettificaQta");
cbeSposta.ConfirmText = traduci("confermaSpostamentoUDC");
btnCerca.Text = traduci("btnSearch");
}
/// <summary>
/// verifica se attivo filtro company e imposta ods di conseguenza...
@@ -256,7 +260,9 @@ namespace GMW.WebUserControls
{
azzeraPostUpdate();
}
/// <summary>
/// reset controlli post aggiornamento
/// </summary>
private void azzeraPostUpdate()
{
lblErrore.Visible = false;
@@ -293,6 +299,67 @@ namespace GMW.WebUserControls
pnlSposta.Visible = p;
}
/// <summary>
/// cambiato valore in ricerca
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void txtCerca_TextChanged(object sender, EventArgs e)
{
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;
}
}
protected void salvaCerca()
{
if (testoRicerca == "")
{
SteamWare.memLayer.ML.emptySessionVal("valoreCercatoCella");
}
else
{
SteamWare.memLayer.ML.setSessionVal("valoreCercatoCella", testoRicerca);
}
// raise dell'evento
if (eh_nuovaRicerca != null)
{
eh_nuovaRicerca(this, new EventArgs());
}
}
/// <summary>
/// aggiorna il testo cercato
/// </summary>
public void updateText()
{
if (SteamWare.memLayer.ML.StringSessionObj("valoreCercatoCella") != "" && !Page.IsPostBack)
{
testoRicerca = SteamWare.memLayer.ML.StringSessionObj("valoreCercatoCella");
}
}
#endregion
}
+18
View File
@@ -13,6 +13,24 @@ namespace GMW.WebUserControls {
public partial class mod_UdcCella {
/// <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>
/// 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>
/// grView control.
/// </summary>
+47 -5
View File
@@ -1,5 +1,6 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_execUDC.ascx.cs"
Inherits="GMW.WebUserControls.mod_execUDC" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<table>
<tr>
<td>
@@ -8,16 +9,57 @@
<td>
<asp:Button ID="btnCreaListaPrelievo" runat="server" Width="120px" OnClick="btnCreaListaPrelievo_Click" />
</td>
<%--
</tr>
<tr>
<td>
<asp:Button ID="Button3" runat="server" Width="120px" />
<table>
<tr>
<td>
<asp:Label ID="lblQta" runat="server" />
</td>
</tr>
<tr>
<td>
<asp:TextBox runat="server" ID="txtQta" />
</td>
</tr>
<tr>
<td>
[ALT-U]<br />
<asp:Button runat="server" ID="btnQta" OnClick="btnQta_Click" AccessKey="U" />
<asp:ConfirmButtonExtender ID="cbeQta" runat="server" TargetControlID="btnQta" />
</td>
</tr>
</table>
</td>
<td>
<asp:Button ID="Button4" runat="server" Width="120px" />
<table>
<tr>
<td>
<asp:Label runat="server" ID="lblNewPos" />
</td>
</tr>
<tr>
<td>
<asp:TextBox runat="server" ID="txtNewCella" />
<asp:AutoCompleteExtender ID="aceParticolare" runat="server" TargetControlID="txtNewCella"
ServicePath="~/WS/AutoCompletamento.asmx" ServiceMethod="elencoCelle" />
</td>
</tr>
<tr>
<td>
[ALT-W]<br />
<asp:Button runat="server" ID="btnSposta" OnClick="btnSposta_Click1" AccessKey="W" />
<asp:ConfirmButtonExtender ID="cbeSposta" runat="server" TargetControlID="btnSposta">
</asp:ConfirmButtonExtender>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2">
<asp:Label ID="lblErrore" runat="server" CssClass="erroreMid" />
</td>
--%>
</tr>
</table>
@@ -5,6 +5,7 @@ using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using SteamWare;
using GMW_data;
namespace GMW.WebUserControls
{
@@ -13,6 +14,10 @@ namespace GMW.WebUserControls
protected void Page_Load(object sender, EventArgs e)
{
traduciObj();
if (!Page.IsPostBack)
{
azzeraPostUpdate();
}
}
/// <summary>
/// traduzione oggetti
@@ -21,6 +26,13 @@ namespace GMW.WebUserControls
{
btnGo2Mag.Text = traduci("btnGo2Mag");
btnCreaListaPrelievo.Text = traduci("btnCreaListaPrelievo");
lblQta.Text = traduci("lblQta");
lblNewPos.Text = traduci("lblNewPos");
lblErrore.Text = traduci("ErroreCellaDestOccupata");
btnQta.Text = traduci("btnQta");
btnSposta.Text = traduci("btnSposta");
cbeQta.ConfirmText = traduci("confermaRettificaQta");
cbeSposta.ConfirmText = traduci("confermaSpostamentoUDC");
}
/// <summary>
/// evento btnGoToMag
@@ -31,6 +43,10 @@ namespace GMW.WebUserControls
/// </summary>
public event EventHandler eh_btnListaPrelievoPressed;
/// <summary>
/// evento aggiornati dati
/// </summary>
public event EventHandler eh_nuovoValore;
/// <summary>
/// wrapper traduzione
/// </summary>
/// <param name="lemma"></param>
@@ -46,6 +62,9 @@ namespace GMW.WebUserControls
/// <param name="e"></param>
protected void btnGo2Mag_Click(object sender, EventArgs e)
{
// salvo l'UDC sel come val cercato cella...
memLayer.ML.setSessionVal("valoreCercatoCella", memLayer.ML.StringSessionObj("UDC_sel"));
memLayer.ML.emptySessionVal("Particolare_sel");
// sollevo evento nuovo valore...
if (eh_btnGoToMagPressed != null)
{
@@ -65,5 +84,79 @@ namespace GMW.WebUserControls
eh_btnListaPrelievoPressed(this, new EventArgs());
}
}
/// <summary>
/// chiama procedura x spostamento tra celle di un UDC
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnSposta_Click1(object sender, EventArgs e)
{
// ricavo il valore dell'UDC cliccato...
string UDC = memLayer.ML.StringSessionObj("UDC_sel");
int IdxCellaTo = 0;
bool cellaToOk = false;
try
{
DS_magazzino.CelleRow rowCella = MagClass.magazzino.taCelle.getByCodCella(txtNewCella.Text)[0];
IdxCellaTo = rowCella.IdxCella;
// controllo che la cella di destinazione NON sia bloccata
cellaToOk = rowCella.Attiva;
}
catch
{ }
if (cellaToOk)
{
// controllo che sia valido x fare l'operazione
if (IdxCellaTo > 0)
{
MagClass.magazzino.spostaUDC(memLayer.ML.StringSessionObj("CodCS"), UDC, IdxCellaTo);
}
azzeraPostUpdate();
if (eh_nuovoValore != null)
{
eh_nuovoValore(this, new EventArgs());
}
}
else
{
// la cella è bloccata, nn devo permettere spostamento
lblErrore.Visible = true;
}
}
/// <summary>
/// aggiorna la qta pezzi dell'UDC indicato
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnQta_Click(object sender, EventArgs e)
{
string UDC = memLayer.ML.StringSessionObj("UDC_sel");
decimal qta = 0;
try
{
qta = Convert.ToDecimal(txtQta.Text);
}
catch
{ }
if (qta > 0)
{
MagClass.magazzino.rettificaQtaUDC(UDC, qta);
}
azzeraPostUpdate();
if (eh_nuovoValore != null)
{
eh_nuovoValore(this, new EventArgs());
}
}
/// <summary>
/// reset controlli post aggiornamento
/// </summary>
private void azzeraPostUpdate()
{
lblErrore.Visible = false;
txtNewCella.Text = "";
txtQta.Text = "";
}
}
}
+90
View File
@@ -30,5 +30,95 @@ namespace GMW.WebUserControls {
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Button btnCreaListaPrelievo;
/// <summary>
/// lblQta 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 lblQta;
/// <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;
/// <summary>
/// btnQta 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 btnQta;
/// <summary>
/// cbeQta control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::AjaxControlToolkit.ConfirmButtonExtender cbeQta;
/// <summary>
/// lblNewPos 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 lblNewPos;
/// <summary>
/// txtNewCella 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 txtNewCella;
/// <summary>
/// aceParticolare control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::AjaxControlToolkit.AutoCompleteExtender aceParticolare;
/// <summary>
/// btnSposta 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 btnSposta;
/// <summary>
/// cbeSposta control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::AjaxControlToolkit.ConfirmButtonExtender cbeSposta;
/// <summary>
/// lblErrore 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 lblErrore;
}
}
@@ -27,9 +27,18 @@ namespace GMW.WebUserControls
traduciObj();
}
mod_UdcCella1.eh_nuovoValore += new EventHandler(mod_UdcCella1_eh_nuovoValore);
mod_UdcCella1.eh_nuovaRicerca += new EventHandler(mod_UdcCella1_eh_nuovaRicerca);
disegnaControlli();
}
void mod_UdcCella1_eh_nuovaRicerca(object sender, EventArgs e)
{
if (eh_updated != null)
{
eh_updated(this, new EventArgs());
}
}
void mod_UdcCella1_eh_nuovoValore(object sender, EventArgs e)
{
if (eh_updated != null)
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.