Fix comportamento editing richiesta (in nuova asp.net form)

git-svn-id: https://keyhammer.ath.cx/svn/WebGIM/trunk@51 3e04ef4b-3b25-4b6c-be27-bb5389ca777b
This commit is contained in:
samuele
2009-01-29 12:49:40 +00:00
parent 2a417edb6c
commit d3f8946737
10 changed files with 54 additions and 100 deletions
+10
View File
@@ -0,0 +1,10 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/AjaxTitle.master" AutoEventWireup="true"
CodeFile="dettaglioIntervento.aspx.cs" Inherits="dettaglioIntervento" %>
<%@ Register Src="mod_dettaglioIntervento.ascx" TagName="mod_dettaglioIntervento"
TagPrefix="uc2" %>
<%@ Register Src="mod_fixCal.ascx" TagName="mod_fixCal" TagPrefix="uc3" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<uc2:mod_dettaglioIntervento ID="mod_dettaglioIntervento1" runat="server" />
<uc3:mod_fixCal ID="mod_fixCal1" runat="server" />
</asp:Content>
@@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class dettaglioIntervento : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
mod_dettaglioIntervento1.eh_chiudi += new EventHandler(mod_dettaglioIntervento1_eh_chiudi);
}
/// <summary>
/// resetto selezione, nascondo dettaglio
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
void mod_dettaglioIntervento1_eh_chiudi(object sender, EventArgs e)
{
Response.Redirect("elencoRichieste.aspx");
}
}
+2 -2
View File
@@ -7,7 +7,7 @@
<%@ Register src="mod_fixCal.ascx" tagname="mod_fixCal" tagprefix="uc3" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<uc1:mod_elencoRichieste ID="mod_elencoRichieste1" runat="server" />
<uc2:mod_dettaglioIntervento ID="mod_dettaglioIntervento1" runat="server" Visible="false" />
<uc3:mod_fixCal ID="mod_fixCal1" runat="server" />
<%--<uc2:mod_dettaglioIntervento ID="mod_dettaglioIntervento1" runat="server" Visible="false" />
<uc3:mod_fixCal ID="mod_fixCal1" runat="server" />--%>
</asp:Content>
+1 -23
View File
@@ -9,27 +9,6 @@ public partial class elencoRichieste : System.Web.UI.Page
protected void Page_Load(object sender, EventArgs e)
{
mod_elencoRichieste1.eh_selValore += new EventHandler(mod_elencoRichieste1_eh_selValore);
mod_elencoRichieste1.eh_resetSelezione += new EventHandler(mod_elencoRichieste1_eh_resetSelezione);
mod_dettaglioIntervento1.eh_chiudi += new EventHandler(mod_dettaglioIntervento1_eh_chiudi);
}
/// <summary>
/// resetto selezione, nascondo dettaglio
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
void mod_dettaglioIntervento1_eh_chiudi(object sender, EventArgs e)
{
mod_dettaglioIntervento1.Visible = false;
mod_elencoRichieste1.resetSelezione();
}
/// <summary>
/// resetto selezione, nascondo dettaglio
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
void mod_elencoRichieste1_eh_resetSelezione(object sender, EventArgs e)
{
mod_dettaglioIntervento1.Visible = false;
}
/// <summary>
/// selezione effettuata, mostro dettaglio
@@ -38,7 +17,6 @@ public partial class elencoRichieste : System.Web.UI.Page
/// <param name="e"></param>
void mod_elencoRichieste1_eh_selValore(object sender, EventArgs e)
{
mod_dettaglioIntervento1.Visible = true;
mod_dettaglioIntervento1.doUpdate();
Response.Redirect("dettaglioIntervento.aspx");
}
}
-16
View File
@@ -121,22 +121,6 @@ public partial class mod_dataOra : System.Web.UI.UserControl
{
return user_std.UtSn.Traduci(lemma.ToString());
}
#if false
/// <summary>
/// definisce se siano visibili e selezionabili i secondi
/// </summary>
public bool showSeconds
{
get
{
return _showSeconds;
}
set
{
_showSeconds = value;
}
}
#endif
/// <summary>
/// scelta del tipo di selettore per ora/min/sec
/// </summary>
+2 -1
View File
@@ -5,7 +5,8 @@
<div style="text-align: center; width: 100%; padding-bottom: 20px;">
<asp:Button ID="btnCompilaMtz" runat="server" Width="180px" OnClick="btnCompilaMtz_Click" />
<asp:Button ID="btnEditFull" runat="server" Width="180px" OnClick="btnEditFull_Click" />
<asp:Button ID="btnChiudi" runat="server" Width="180px" OnClick="btnChiudi_Click" />
<asp:Button ID="btnCancel" runat="server" Width="180px" OnClick="btnCancel_Click" />
<asp:Button ID="btnElenco" runat="server" Width="180px" OnClick="btnElenco_Click" />
</div>
<asp:FormView ID="frmView_default" runat="server" DataKeyNames="numIntMtz" DataSourceID="ods_default">
<EditItemTemplate>
@@ -37,7 +37,8 @@ public partial class mod_dettaglioIntervento : System.Web.UI.UserControl
/// </summary>
private void traduciObj()
{
btnChiudi.Text = traduci("btnChiudi");
btnElenco.Text = traduci("btnElencoRichiesteMtz");
btnCancel.Text = traduci("btnCancel");
btnCompilaMtz.Text = traduci("btnCompilaMtz");
btnEditFull.Text = traduci("btnEditFull");
}
@@ -84,10 +85,22 @@ public partial class mod_dettaglioIntervento : System.Web.UI.UserControl
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnChiudi_Click(object sender, EventArgs e)
protected void btnCancel_Click(object sender, EventArgs e)
{
frmView_default.ChangeMode(FormViewMode.ReadOnly);
frmView_default.Visible = true;
frmView_full.Visible = false;
}
/// <summary>
/// chiude la parte di editing
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnElenco_Click(object sender, EventArgs e)
{
if (eh_chiudi != null)
{
eh_chiudi(this, new EventArgs());
}
}
}
+1 -2
View File
@@ -7,8 +7,7 @@
<div style="font-size: 8pt;">
<asp:GridView ID="grView" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False"
Width="100%" OnSelectedIndexChanged="grView_SelectedIndexChanged" OnDataBound="grView_DataBound"
DataKeyNames="numIntMtz" DataSourceID="ods" OnRowDataBound="grView_RowDataBound"
OnRowUpdating="grView_RowUpdating">
DataKeyNames="numIntMtz" DataSourceID="ods" OnRowDataBound="grView_RowDataBound" >
<RowStyle CssClass="ctrRowStyle" />
<AlternatingRowStyle CssClass="ctrAltRowStyle" />
<EditRowStyle CssClass="ctrEditRowStyle" />
+1 -33
View File
@@ -91,7 +91,7 @@ public partial class mod_elencoRichieste : ApplicationUserControl
protected void grView_SelectedIndexChanged(object sender, EventArgs e)
{
// salvo in session il valore selezionato...
SteamWare.memLayer.ML.setSessionVal(string.Format("{0}_sel", _idxGridView), grView.SelectedValue);
SteamWare.memLayer.ML.setSessionVal(string.Format("{0}_sel", _idxGridView), grView.SelectedValue,true);
// sollevo evento nuovo valore...
if (eh_selValore != null)
{
@@ -200,38 +200,6 @@ public partial class mod_elencoRichieste : ApplicationUserControl
}
}
/// <summary>
/// in caso di aggiornamento verifico se sia salvato un comando clona...
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void grView_RowUpdating(object sender, GridViewUpdateEventArgs e)
{
// carico l'idx dell'oggetto
int _idx = Convert.ToInt32(e.Keys["numIntMtz"]);
string _comando = "";
if (SteamWare.memLayer.ML.isInSessionObject("nextObjCommand"))
{
_comando = SteamWare.memLayer.ML.StringSessionObj("nextObjCommand");
SteamWare.memLayer.ML.emptySessionVal("nextObjCommand");
}
// verifico il tipo di richiesta (up/down level, clona o update normale
switch (_comando)
{
case "clonaObj":
#if false
TA_app.obj.taImpianti.sp_clonaImpianto(_idx);
grView.EditIndex = -1;
grView.DataBind();
#endif
// blocco update!
e.Cancel = true;
break;
default:
// faccio update!
break;
}
}
/// <summary>
/// formatta il tooltip del ferma dalle...
/// </summary>
/// <param name="dataOraFermo"></param>
-21
View File
@@ -223,27 +223,6 @@ public partial class mod_selettore : ApplicationUserControl
grView.PageIndex = 0;
grView.DataBind();
}
#if false
else if (_tipoSelettore == tipoSelettore.utentiAD_All || _tipoSelettore == tipoSelettore.utentiAD_cdc)
{
// verifico se sia o meno checked "solo cdc utente"...
if (chkOpzione.Checked)
{
//imposto nuovo tipo selettore
_tipoSelettore = tipoSelettore.utentiAD_cdc;
fixOds();
}
else
{
//imposto nuovo tipo selettore
_tipoSelettore = tipoSelettore.utentiAD_All;
fixOds();
}
// faccio databind...
grView.PageIndex = 0;
grView.DataBind();
}
#endif
}
/// <summary>
/// sistemazione fonte ods...