inizio gestioen dettaglio dati commessa

This commit is contained in:
Samuele Locatelli
2013-05-22 13:17:08 +02:00
parent 8062e5037d
commit fab52cddc2
15 changed files with 126 additions and 13 deletions
Binary file not shown.
+3 -1
View File
@@ -1,4 +1,6 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/WebMasterPages/Progetti.master" AutoEventWireup="true" CodeBehind="DatiCommessa.aspx.cs" Inherits="PROJ_ETS.DatiCommessa" %>
<%@ Register Src="WebUserControls/mod_datiComm.ascx" TagName="mod_datiComm" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Contenuto" runat="server">
gestione dettaglio commessa
<uc1:mod_datiComm ID="mod_datiComm1" runat="server" />
</asp:Content>
+14 -7
View File
@@ -3,15 +3,22 @@
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace PROJ_ETS
{
public partial class DatiCommessa
{
namespace PROJ_ETS {
public partial class DatiCommessa {
/// <summary>
/// mod_datiComm1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::PROJ_ETS.WebUserControls.mod_datiComm mod_datiComm1;
}
}
+8
View File
@@ -284,6 +284,7 @@
<Content Include="WebUserControls\mod_autocomplete.ascx" />
<Content Include="WebUserControls\mod_commessa.ascx" />
<Content Include="WebUserControls\mod_commesse.ascx" />
<Content Include="WebUserControls\mod_datiComm.ascx" />
<Content Include="WebUserControls\mod_fasi.ascx" />
<Content Include="WebUserControls\mod_fornitori.ascx" />
<Content Include="WebUserControls\mod_menu.ascx" />
@@ -474,6 +475,13 @@
<Compile Include="WebUserControls\mod_commesse.ascx.designer.cs">
<DependentUpon>mod_commesse.ascx</DependentUpon>
</Compile>
<Compile Include="WebUserControls\mod_datiComm.ascx.cs">
<DependentUpon>mod_datiComm.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="WebUserControls\mod_datiComm.ascx.designer.cs">
<DependentUpon>mod_datiComm.ascx</DependentUpon>
</Compile>
<Compile Include="WebUserControls\mod_fasi.ascx.cs">
<DependentUpon>mod_fasi.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
@@ -2,7 +2,7 @@
<div class="fontPiccolo">
<asp:GridView ID="grView" runat="server" AllowSorting="True" AllowPaging="True" AutoGenerateColumns="False" CellPadding="4"
DataKeyNames="idxFase" DataSourceID="ods" ForeColor="#333333" GridLines="None" OnDataBound="grView_DataBound"
OnSelectedIndexChanged="grView_SelectedIndexChanged" PageSize="20">
OnSelectedIndexChanged="grView_SelectedIndexChanged" PageSize="20" OnRowUpdating="grView_RowUpdating">
<AlternatingRowStyle CssClass="alternatingRowStyle" />
<EditRowStyle CssClass="editRowStyle" />
<FooterStyle CssClass="footerStyle" ForeColor="White" />
@@ -16,13 +16,15 @@
<SortedDescendingHeaderStyle CssClass="sortDescHead" />
<EmptyDataTemplate>
<asp:Button ID="btnNewEmpty" runat="server" OnClick="btnNewEmpty_Click" Text="Nuova Commessa" CssClass="btnNew"
ToolTip="Aggiungi una nuova commessa al progetto" Visible='<%# isWritable() && enableNewFromEmpty %>' Width ="200px"/>
ToolTip="Aggiungi una nuova commessa al progetto" Visible='<%# isWritable() && enableNewFromEmpty %>' Width="200px" />
</EmptyDataTemplate>
<Columns>
<asp:TemplateField ShowHeader="False" ItemStyle-HorizontalAlign="Center" ItemStyle-Wrap="false">
<ItemTemplate>
<asp:ImageButton ID="imgSelect" runat="server" CausesValidation="False" CommandName="Select" ToolTip="Seleziona" ImageUrl="../images/view_m.png" />
<asp:ImageButton ID="imgEdit" runat="server" CausesValidation="False" CommandName="Edit" ToolTip="Modifica" ImageUrl="../images/edit_m.png" Visible='<%# isWritable() %>' />
<asp:ImageButton ID="imgDettComm" runat="server" CausesValidation="False" CommandArgument="dettComm" CommandName="Update"
ToolTip="Dati Commessa" ImageUrl="../images/naviga_m.png" OnClick="imgDettComm_Click" Visible='<%# isAncestor(Eval("idxFaseAncest")) %>' />
</ItemTemplate>
<EditItemTemplate>
<asp:ImageButton ID="imgUpdate" runat="server" CausesValidation="False" CommandName="Update" ToolTip="Update" ImageUrl="../images/apply_m.png" />
@@ -37,7 +39,7 @@
</HeaderTemplate>
<ItemStyle HorizontalAlign="Center"></ItemStyle>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderText="Commessa / Fasi" >
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderText="Commessa / Fasi">
<ItemTemplate>
<div class="divSx">
<asp:Image runat="server" ID="imgSpaz" Width='<%# widthByCod(Eval("codFase")) %>' ImageUrl="~/images/EmptyImg.png" />
@@ -149,7 +151,7 @@
CommandArgument='<%# Eval("idxFase") %>' OnClick="btnNew_Click" ToolTip="Aggiungi Fase a commessa" Visible='<%# isAncestor(Eval("idxFaseAncest")) %>' />
&nbsp;
<asp:ImageButton ID="imgDelete" runat="server" CausesValidation="False" CommandArgument='<%# Eval("idxFase") %>' CommandName="Delete"
ImageUrl="../images/elimina_m.png" ToolTip="Delete" Visible='<%# delEnabled(Eval("idxFase")) %>' OnClientClick="return confirm('Confermi eliminazione record?')"/>
ImageUrl="../images/elimina_m.png" ToolTip="Delete" Visible='<%# delEnabled(Eval("idxFase")) %>' OnClientClick="return confirm('Confermi eliminazione record?')" />
</div>
</ItemTemplate>
<EditItemTemplate>
@@ -522,7 +522,64 @@ namespace PROJ_ETS.WebUserControls
{
}
/// <summary>
/// salvo in session che il prox comando è ettaglio commesse...
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void imgDettComm_Click(object sender, ImageClickEventArgs e)
{
utils.obj.setSessionVal("nextObjCommand", "dettComm");
}
/// <summary>
/// intercetto eventuale update fittizio x rimandare a pagina dett fasi
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void grView_RowUpdating(object sender, GridViewUpdateEventArgs e)
{
// salvo progetto sel
utils.obj.setSessionVal("idxFase_sel", e.Keys["idxFase"]);
// quale comando?
string _comando = "";
if (utils.obj.isInSessionObject("nextObjCommand"))
{
_comando = utils.obj.StringSessionObj("nextObjCommand");
utils.obj.emptySessionVal("nextObjCommand");
}
// verifico il tipo di richiesta (clona o update normale)
switch (_comando)
{
case "dettComm":
// salvo idxCli...
int idxCli = 0;
string nomeCli = "";
try
{
idxCli = DataProxy_ProjEts.DP.taAP.getByIdxPrj(utils.obj.IntSessionObj("idxProgetto_sel"))[0].idxCliente;
}
catch
{ }
// cerco di recuperare nome cliente...
try
{
nomeCli = DataProxy_ProjEts.DP.taSelCli.getByValue(idxCli)[0].label;
}
catch
{ }
utils.obj.setSessionVal("idxCli_sel", idxCli);
utils.obj.setSessionVal("nomeCli_sel", nomeCli);
Response.Redirect("DatiCommessa");
// blocco update!
e.Cancel = true;
break;
default:
// faccio update!
break;
}
}
#endregion
}
}
@@ -0,0 +1,3 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_datiComm.ascx.cs" Inherits="PROJ_ETS.WebUserControls.mod_datiComm" %>
dati dettaglio commessa
anno, num...
@@ -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 PROJ_ETS.WebUserControls
{
public partial class mod_datiComm : System.Web.UI.UserControl
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
}
@@ -0,0 +1,17 @@
//------------------------------------------------------------------------------
// <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 PROJ_ETS.WebUserControls
{
public partial class mod_datiComm
{
}
}
@@ -279,7 +279,7 @@ namespace PROJ_ETS.WebUserControls
grView.DataBind();
}
/// <summary>
/// salvo in session che il prox comando è clonare...
/// salvo in session che il prox comando è dettaglio fasi...
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
Binary file not shown.
Binary file not shown.
Binary file not shown.