Completato editing elencoSchede

This commit is contained in:
Samuele E. Locatelli
2015-09-10 16:06:14 +02:00
parent 555cfd7182
commit 4ac9f24f8c
21 changed files with 226 additions and 111 deletions
+10 -3
View File
@@ -12119,6 +12119,7 @@ SELECT CodScheda, Vers, CodMisura, MinPar, MaxPar, LIVal, LSVal FROM ValidVal WH
this._commandCollection[4].CommandType = global::System.Data.CommandType.StoredProcedure;
this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_IdxDossier", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Stato", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Note", global::System.Data.SqlDbType.NVarChar, 2147483647, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
}
@@ -12228,7 +12229,7 @@ SELECT CodScheda, Vers, CodMisura, MinPar, MaxPar, LIVal, LSVal FROM ValidVal WH
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
public virtual int updateNote(global::System.Nullable<int> Original_IdxDossier, string Note) {
public virtual int updateNote(global::System.Nullable<int> Original_IdxDossier, string Stato, string Note) {
global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[4];
if ((Original_IdxDossier.HasValue == true)) {
command.Parameters[1].Value = ((int)(Original_IdxDossier.Value));
@@ -12236,11 +12237,17 @@ SELECT CodScheda, Vers, CodMisura, MinPar, MaxPar, LIVal, LSVal FROM ValidVal WH
else {
command.Parameters[1].Value = global::System.DBNull.Value;
}
if ((Note == null)) {
if ((Stato == null)) {
command.Parameters[2].Value = global::System.DBNull.Value;
}
else {
command.Parameters[2].Value = ((string)(Note));
command.Parameters[2].Value = ((string)(Stato));
}
if ((Note == null)) {
command.Parameters[3].Value = global::System.DBNull.Value;
}
else {
command.Parameters[3].Value = ((string)(Note));
}
global::System.Data.ConnectionState previousConnectionState = command.Connection.State;
if (((command.Connection.State & global::System.Data.ConnectionState.Open)
+1
View File
@@ -863,6 +863,7 @@ FROM v_ElencoDossier</CommandText>
<Parameters>
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@Original_IdxDossier" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="nvarchar" DbType="String" Direction="Input" ParameterName="@Stato" Precision="0" ProviderType="NVarChar" Scale="0" Size="50" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="nvarchar" DbType="String" Direction="Input" ParameterName="@Note" Precision="0" ProviderType="NVarChar" Scale="0" Size="2147483647" SourceColumnNullMapping="false" SourceVersion="Current" />
</Parameters>
</DbCommand>
Binary file not shown.
Binary file not shown.
Binary file not shown.
+8
View File
@@ -355,6 +355,7 @@
<Content Include="WebUserControls\mod_autocompleteShort.ascx" />
<Content Include="WebUserControls\mod_collaudi.ascx" />
<Content Include="WebUserControls\mod_DettScheda.ascx" />
<Content Include="WebUserControls\mod_dossier.ascx" />
<Content Include="WebUserControls\mod_elencoDossiers.ascx" />
<Content Include="WebUserControls\mod_elencoRichResetUtenti.ascx" />
<Content Include="WebUserControls\mod_elencoSchedeDossier.ascx" />
@@ -665,6 +666,13 @@
<Compile Include="WebUserControls\mod_DettScheda.ascx.designer.cs">
<DependentUpon>mod_DettScheda.ascx</DependentUpon>
</Compile>
<Compile Include="WebUserControls\mod_dossier.ascx.cs">
<DependentUpon>mod_dossier.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="WebUserControls\mod_dossier.ascx.designer.cs">
<DependentUpon>mod_dossier.ascx</DependentUpon>
</Compile>
<Compile Include="WebUserControls\mod_elencoDossiers.ascx.cs">
<DependentUpon>mod_elencoDossiers.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
+1 -1
View File
File diff suppressed because one or more lines are too long
+7 -23
View File
@@ -3,6 +3,8 @@
<%@ Register Src="~/WebUserControls/mod_righePag.ascx" TagName="mod_righePag" TagPrefix="uc1" %>
<%@ Register Src="~/WebUserControls/mod_elencoDossiers.ascx" TagPrefix="uc1" TagName="mod_elencoDossiers" %>
<%@ Register Src="~/WebUserControls/mod_elencoSchedeDossier.ascx" TagPrefix="uc1" TagName="mod_elencoSchedeDossier" %>
<%@ Register Src="~/WebUserControls/mod_dossier.ascx" TagPrefix="uc1" TagName="mod_dossier" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
@@ -41,36 +43,18 @@
</div>
</div>
<div class="panel-body">
<div class="row text-center" style="font-size: 0.8em;">
<div class="col-xs-2">
<div class="shortcuts">
<asp:LinkButton runat="server" ID="lbtSalvaNote" class="shortcut-sm" Visible="false" OnClick="lbtSalvaNote_Click">
<i class="fa fa-3x fa-floppy-o shortcut-icon"></i>
<span class="shortcut-label">Salva</span>
</asp:LinkButton>
</div>
</div>
<div class="col-xs-8">
<asp:TextBox runat="server" ID="txtNote" TextMode="MultiLine" Width="100%" Height="6em" AutoPostBack="True" OnTextChanged="txtNote_TextChanged" />
</div>
<div class="col-xs-2">
<div class="shortcuts">
<asp:LinkButton runat="server" ID="lbtResetNote" class="shortcut-sm" Visible="false" OnClick="lbtResetNote_Click">
<i class="fa fa-3x fa-ban shortcut-icon"></i>
<span class="shortcut-label">Annulla</span>
</asp:LinkButton>
</div>
</div>
</div>
<div class="row" style="font-size: 0.8em;">
<uc1:mod_dossier runat="server" ID="mod_dossier" />
<div class="row" style="font-size: 0.8em; background-color: #F5F5F5;">
<div class="col-xs-3">
<asp:DropDownList runat="server" ID="ddlSelFamMacc" DataSourceID="odsFamMacc" DataTextField="label" DataValueField="value"></asp:DropDownList>
<asp:ObjectDataSource ID="odsFamMacc" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" TypeName="CMS_SC_Data.DS_UtilityTableAdapters.v_selFamMaccTableAdapter"></asp:ObjectDataSource>
<br />
<asp:Button runat="server" ID="btnAddFromFam" CssClass="btn btn-success" Text='<%# traduci("btnAddFromFam") %>' OnClick="btnAddFromFam_Click" />
</div>
<div class="col-xs-9">
<div class="col-xs-9 text-right">
<asp:DropDownList runat="server" ID="ddlSelScheda" DataSourceID="odsScheda" DataTextField="label" DataValueField="value"></asp:DropDownList>
<asp:ObjectDataSource ID="odsScheda" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" TypeName="CMS_SC_Data.DS_UtilityTableAdapters.v_selSchedaTableAdapter"></asp:ObjectDataSource>
<br />
<asp:Button runat="server" ID="btnAddFromScheda" CssClass="btn btn-success" Text='<%# traduci("btnAddFromScheda") %>' OnClick="btnAddFromScheda_Click" />
</div>
</div>
+11 -59
View File
@@ -24,7 +24,14 @@ namespace CMS_SC
}
mod_righePag.eh_newNum += mod_righePag_eh_newNum;
mod_elencoDossiers.eh_selezioneValore += mod_elencoDossiers_eh_selezioneValore;
mod_dossier.eh_valUpdated += Mod_dossier_eh_valUpdated;
}
private void Mod_dossier_eh_valUpdated(object sender, EventArgs e)
{
mod_elencoDossiers.DataBind();
}
/// <summary>
/// mostra i buttons SE c'è un dossier selezionato
/// </summary>
@@ -34,25 +41,9 @@ namespace CMS_SC
divDetail.Visible = addVisib;
if (addVisib)
{
fixNote();
showNoteBtn(false);
}
}
/// <summary>
/// carica campo note e mostra editing...
/// </summary>
private void fixNote()
{
int idxDossier = 0;
try
{
idxDossier = mod_elencoDossiers.idxDossier;
}
catch
{ }
if (idxDossier > 0)
{
txtNote.Text = DtProxy.man.taED.getByDossier(idxDossier)[0].Note;
mod_dossier.idxDossier= mod_elencoDossiers.idxDossier;
mod_dossier.fixNote();
mod_dossier.showNoteBtn(false);
}
}
@@ -112,45 +103,6 @@ namespace CMS_SC
DtProxy.man.taSCM.insByCodSchedaVers(mod_elencoDossiers.idxDossier, ddlSelScheda.SelectedValue);
mod_elencoSchedeDossier.doUpdate();
}
/// <summary>
/// mostra btn salvataggio / annullamento
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void txtNote_TextChanged(object sender, EventArgs e)
{
// mostra button salvataggio/annulla
showNoteBtn(true);
}
private void showNoteBtn(bool showSaveCancel)
{
lbtResetNote.Visible = showSaveCancel;
lbtSalvaNote.Visible = showSaveCancel;
}
protected void lbtResetNote_Click(object sender, EventArgs e)
{
fixNote();
showNoteBtn(false);
}
protected void lbtSalvaNote_Click(object sender, EventArgs e)
{
// salvo
int idxDossier = 0;
try
{
idxDossier = mod_elencoDossiers.idxDossier;
}
catch
{ }
if (idxDossier > 0)
{
DtProxy.man.taED.updateNote(idxDossier, txtNote.Text.Trim());
}
// ricarivo
fixNote();
showNoteBtn(false);
}
}
}
+2 -20
View File
@@ -58,31 +58,13 @@ namespace CMS_SC {
protected global::System.Web.UI.WebControls.HyperLink hlShowReportCli;
/// <summary>
/// lbtSalvaNote control.
/// mod_dossier 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 lbtSalvaNote;
/// <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>
/// lbtResetNote 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 lbtResetNote;
protected global::CMS_SC.WebUserControls.mod_dossier mod_dossier;
/// <summary>
/// ddlSelFamMacc control.
+1 -1
View File
@@ -15,7 +15,6 @@
- In Dossier la singola SC deve avere descrizione MODIFICABILE
- NON SERVE GESTIONE STATO --> bastano FASI
- gestione template fasi da tabellone?
@@ -57,5 +56,6 @@ CANCELLAZIONE DOSSIER
- Possibilità di cancellare una scheda già compilata e approvata ( solo da parte superuser )
- pulsanti delete dossier: condizionare a presenza items child
- NON SERVE GESTIONE STATO --> bastano FASI
................................................................................................................
+28
View File
@@ -0,0 +1,28 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_dossier.ascx.cs" Inherits="CMS_SC.WebUserControls.mod_dossier" %>
<div class="row text-center" style="font-size: 0.8em;">
<div class="col-xs-12">
<h4>Edit Dossier</h4>
</div>
<div class="col-xs-3">
<asp:DropDownList runat="server" ID="ddlFase" DataSourceID="odsFase" DataTextField="label" DataValueField="value" AutoPostBack="True" OnSelectedIndexChanged="ddlFase_SelectedIndexChanged">
</asp:DropDownList>
<asp:ObjectDataSource ID="odsFase" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" TypeName="CMS_SC_Data.DS_UtilityTableAdapters.v_selFasiTableAdapter"></asp:ObjectDataSource>
</div>
<div class="col-xs-9">
<asp:TextBox runat="server" ID="txtNote" TextMode="MultiLine" Width="100%" Height="6em" AutoPostBack="True" OnTextChanged="txtNote_TextChanged" />
</div>
<div class="col-xs-12" style="font-size: 1.5em;">
<div class="col-xs-4 col-xs-offset-2">
<asp:LinkButton runat="server" ID="lbtSalvaNote" class="btn btn-success" Visible="true" OnClick="lbtSalvaNote_Click" Width="200px" ForeColor="White">
<i class="fa fa-1x fa-floppy-o shortcut-icon"></i>
Salva
</asp:LinkButton>
</div>
<div class="col-xs-4">
<asp:LinkButton runat="server" ID="lbtResetNote" class="btn btn-danger" Visible="false" OnClick="lbtResetNote_Click" Width="200px" ForeColor="White">
<i class="fa fa-1x fa-ban shortcut-icon"></i>
Annulla
</asp:LinkButton>
</div>
</div>
</div>
@@ -0,0 +1,93 @@
using CMS_SC_Data;
using SteamWare;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace CMS_SC.WebUserControls
{
public partial class mod_dossier : System.Web.UI.UserControl
{
/// <summary>
/// evento valore selezionato
/// </summary>
public event EventHandler eh_valUpdated;
protected void raiseEvent()
{
// sollevo evento nuovo valore...
if (eh_valUpdated != null)
{
eh_valUpdated(this, new EventArgs());
}
}
protected void Page_Load(object sender, EventArgs e)
{
}
public int idxDossier
{
get
{
return memLayer.ML.IntSessionObj("idxDossierEdit");
}
set
{
memLayer.ML.setSessionVal("idxDossierEdit", value);
}
}
/// <summary>
/// carica campo note e mostra editing...
/// </summary>
public void fixNote()
{
if (idxDossier > 0)
{
DS_Applicazione.ElencoDossierRow riga = DtProxy.man.taED.getByDossier(idxDossier)[0];
txtNote.Text = riga.Note;
ddlFase.SelectedValue = riga.Stato;
}
}
/// <summary>
/// mostra btn salvataggio / annullamento
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void txtNote_TextChanged(object sender, EventArgs e)
{
// mostra button salvataggio/annulla
showNoteBtn(true);
}
public void showNoteBtn(bool showSaveCancel)
{
lbtResetNote.Visible = showSaveCancel;
lbtSalvaNote.Visible = showSaveCancel;
}
protected void lbtResetNote_Click(object sender, EventArgs e)
{
fixNote();
showNoteBtn(false);
}
protected void lbtSalvaNote_Click(object sender, EventArgs e)
{
// salvo
if (idxDossier > 0)
{
DtProxy.man.taED.updateNote(idxDossier, ddlFase.SelectedValue, txtNote.Text.Trim());
}
// ricarico
fixNote();
showNoteBtn(false);
raiseEvent();
}
protected void ddlFase_SelectedIndexChanged(object sender, EventArgs e)
{
// mostra button salvataggio/annulla
showNoteBtn(true);
}
}
}
+60
View File
@@ -0,0 +1,60 @@
//------------------------------------------------------------------------------
// <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 CMS_SC.WebUserControls {
public partial class mod_dossier {
/// <summary>
/// ddlFase 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.DropDownList ddlFase;
/// <summary>
/// odsFase 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 odsFase;
/// <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>
/// lbtSalvaNote 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 lbtSalvaNote;
/// <summary>
/// lbtResetNote 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 lbtResetNote;
}
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
+2 -2
View File
@@ -5,7 +5,7 @@
using System.Reflection;
[assembly: AssemblyVersion("1.8.061.349")]
[assembly: AssemblyFileVersion("1.8.061.349")]
[assembly: AssemblyVersion("1.8.063.349")]
[assembly: AssemblyFileVersion("1.8.063.349")]
[assembly: AssemblyCopyright("Steamware © 2009-2015")]
[assembly: AssemblyCompany("Steamware")]
+2 -2
View File
@@ -6,8 +6,8 @@
using System.Reflection;
[assembly: AssemblyVersion("1.8.061.<#= this.RevisionNumber #>")]
[assembly: AssemblyFileVersion("1.8.061.<#= this.RevisionNumber #>")]
[assembly: AssemblyVersion("1.8.063.<#= this.RevisionNumber #>")]
[assembly: AssemblyFileVersion("1.8.063.<#= this.RevisionNumber #>")]
[assembly: AssemblyCopyright("Steamware © 2009-<#= DateTime.Now.Year #>")]
[assembly: AssemblyCompany("Steamware")]
<#+
Binary file not shown.