FIx visualizzaizone documenti: mostra nr protocollo e non "vecchio" NrProtocollo

Aggiornato web.config
Sistemato caricamento multiplo files con protocollo ed In/Out
This commit is contained in:
samuele
2012-10-04 12:30:33 +02:00
parent 504e2dac10
commit 7d74af648f
8 changed files with 70 additions and 15 deletions
+1 -1
View File
@@ -28,7 +28,7 @@
<add key="appName" value="ETS-WS" />
<add key="SiteName" value="ETS" />
<add key="mainRev" value="0.8" />
<add key="minRev" value="73" />
<add key="minRev" value="74" />
<add key="copyRight" value="SteamWare, ETS © 2012" />
<add key="tempUplDir" value="~/TempUploads" />
<add key="archiveDir" value="~/ArchivioDocs" />
@@ -23,6 +23,9 @@
<Columns>
<%--<asp:BoundField DataField="idxFile" HeaderText="idxFile" ReadOnly="True" SortExpression="idxFile"
InsertVisible="False" />--%>
<%--<asp:BoundField DataField="userId" HeaderText="userId" SortExpression="userId" />
<asp:BoundField DataField="Anno" HeaderText="Anno" SortExpression="Anno" />
<asp:BoundField DataField="Numero" HeaderText="Numero" SortExpression="Numero" />--%>
<asp:BoundField DataField="Commessa" HeaderText="Commessa" SortExpression="Commessa" />
<asp:TemplateField>
<ItemTemplate>
@@ -36,6 +39,8 @@
Target="_blank" NavigateUrl='<%# accoda("{0}/{1}",new object[]{Eval("fullPath"),Eval("Nome")})%>' />
</ItemTemplate>
<ItemStyle Wrap="False"></ItemStyle>
</asp:TemplateField>
<asp:TemplateField HeaderText="">
<ItemTemplate>
@@ -43,10 +48,11 @@
Target="_blank" NavigateUrl='<%# filePath(Eval("fullPath"), true) %>' />
</ItemTemplate>
</asp:TemplateField>
<%--<asp:BoundField DataField="userId" HeaderText="userId" SortExpression="userId" />
<asp:BoundField DataField="Anno" HeaderText="Anno" SortExpression="Anno" />
<asp:BoundField DataField="Numero" HeaderText="Numero" SortExpression="Numero" />--%>
<asp:BoundField DataField="NrProtocollo" HeaderText="NrProt." SortExpression="NrProtocollo" />
<asp:TemplateField HeaderText="NrProt." SortExpression="Numero">
<ItemTemplate>
<asp:Label ID="lblProto" runat="server" Text='<%# Bind("Numero") %>' ToolTip='<%# Eval("NrProtocollo") %>' />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="DataRic" SortExpression="DataRic">
<ItemTemplate>
<asp:Label ID="lblDataDoc" runat="server" Text='<%# Eval("DataRic","{0:dd/MM/yy}") %>'
@@ -174,12 +174,34 @@ namespace ETS_WS.WebUserControls
string fase = utils.cleanPathName(tacFasi.valore);
string fonte = utils.cleanPathName(tacFonti.label);
string oggetto = utils.cleanPathName(txtOggetto.Text);
string autore = tacAutore.label;
string redattore = tacRedattore.label;
string dataDoc = txtDataDoc.Text;
string dataRic = txtDataRic.Text;
// salvo in sessione i valori selezionati, compreso path complessivo
utils.obj.setSessionVal("metaCommessa", commessa);
utils.obj.setSessionVal("metaFase", fase);
utils.obj.setSessionVal("metaFonte", fonte);
utils.obj.setSessionVal("metaOggetto", oggetto);
utils.obj.setSessionVal("metaAutore", autore);
utils.obj.setSessionVal("metaRedattore", redattore);
utils.obj.setSessionVal("metaDataDoc", dataDoc);
utils.obj.setSessionVal("metaDataRic", dataRic);
utils.obj.setSessionVal("pathFiles2Arch", pathSel);
// salvo richiesta protocollo 0/1
bool reqProto = false;
try
{
if (rblProto.SelectedValue == "1")
{
reqProto = true;
}
}
catch
{ }
utils.obj.setSessionVal("metaReqProto", reqProto);
// salvo IN/OUT
utils.obj.setSessionVal("metaInOut", rblInOut.SelectedValue);
}
}
}
@@ -209,8 +209,14 @@ namespace ETS_WS.WebUserControls
string fase = "";
string fonte = "";
string oggetto = "";
string autore = "";
string redattore = "";
string numComm = "";
string annoComm = "";
bool reqProto = false;
string InOut = "";
DateTime DataDoc;
DateTime DataRic;
foreach (GridViewRow riga in grView.Rows)
{
if (((CheckBox)riga.FindControl("chkSelect")).Checked)
@@ -221,6 +227,12 @@ namespace ETS_WS.WebUserControls
fase = utils.obj.StringSessionObj("metaFase");
fonte = utils.obj.StringSessionObj("metaFonte");
oggetto = utils.obj.StringSessionObj("metaOggetto");
autore = utils.obj.StringSessionObj("metaAutore");
redattore = utils.obj.StringSessionObj("metaRedattore");
reqProto = utils.obj.BoolSessionObj("metaReqProto");
InOut = utils.obj.StringSessionObj("metaInOut");
DataDoc = Convert.ToDateTime(utils.obj.StringSessionObj("metaDataDoc"));
DataRic = Convert.ToDateTime(utils.obj.StringSessionObj("metaDataRic"));
// ricavo num ed anno commessa...
try
{
@@ -230,8 +242,7 @@ namespace ETS_WS.WebUserControls
catch
{ }
// salvo su db le info del file...
utils.obj.taDoc.insertQuery(nomeFile, path, utils.obj.currUserAD, false, DateTime.Now, DateTime.Now, numComm, annoComm, fase, fonte, oggetto, "IN"); // !!!fare!!! hard coded in/out e data/ora, rivedere...
// sposto il file!
utils.obj.taDoc.insertQuery(nomeFile, path, utils.obj.currUserAD, reqProto, DataRic, DataDoc, numComm, annoComm, fase, fonte, oggetto, InOut, autore, redattore); // sposto il file!
fileMover.obj.muoviFile(UserTempPath, path, nomeFile);
}
}
Binary file not shown.
Binary file not shown.
+16 -2
View File
@@ -4531,7 +4531,7 @@ SELECT idxFile, Nome, fullPath, userId, NrProtocollo, Numero, Anno, DataRic, Dat
this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@SortExpression", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[5] = new global::System.Data.SqlClient.SqlCommand();
this._commandCollection[5].Connection = this.Connection;
this._commandCollection[5].CommandText = "dbo.stp_taDocs_insert";
this._commandCollection[5].CommandText = "dbo.stp_tbDocs_insert";
this._commandCollection[5].CommandType = global::System.Data.CommandType.StoredProcedure;
this._commandCollection[5].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[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@nome", global::System.Data.SqlDbType.NVarChar, 250, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
@@ -4546,6 +4546,8 @@ SELECT idxFile, Nome, fullPath, userId, NrProtocollo, Numero, Anno, DataRic, Dat
this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Fonte", global::System.Data.SqlDbType.NVarChar, 100, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Oggetto", global::System.Data.SqlDbType.NVarChar, 250, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@InOut", global::System.Data.SqlDbType.NVarChar, 3, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Autore", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Redattore", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
@@ -5817,7 +5819,7 @@ SELECT idxFile, Nome, fullPath, userId, NrProtocollo, Numero, Anno, DataRic, Dat
[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 insertQuery(string nome, string fullPath, string userId, global::System.Nullable<bool> isProtocollo, global::System.Nullable<global::System.DateTime> DataRic, global::System.Nullable<global::System.DateTime> DataDoc, string NumeroCommessa, string AnnoCommessa, string Fase, string Fonte, string Oggetto, string InOut) {
public virtual int insertQuery(string nome, string fullPath, string userId, global::System.Nullable<bool> isProtocollo, global::System.Nullable<global::System.DateTime> DataRic, global::System.Nullable<global::System.DateTime> DataDoc, string NumeroCommessa, string AnnoCommessa, string Fase, string Fonte, string Oggetto, string InOut, string Autore, string Redattore) {
global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[5];
if ((nome == null)) {
command.Parameters[1].Value = global::System.DBNull.Value;
@@ -5891,6 +5893,18 @@ SELECT idxFile, Nome, fullPath, userId, NrProtocollo, Numero, Anno, DataRic, Dat
else {
command.Parameters[12].Value = ((string)(InOut));
}
if ((Autore == null)) {
command.Parameters[13].Value = global::System.DBNull.Value;
}
else {
command.Parameters[13].Value = ((string)(Autore));
}
if ((Redattore == null)) {
command.Parameters[14].Value = global::System.DBNull.Value;
}
else {
command.Parameters[14].Value = ((string)(Redattore));
}
global::System.Data.ConnectionState previousConnectionState = command.Connection.State;
if (((command.Connection.State & global::System.Data.ConnectionState.Open)
!= global::System.Data.ConnectionState.Open)) {
+8 -6
View File
@@ -409,10 +409,10 @@ SELECT idxFile, Nome, fullPath, userId, NrProtocollo, Numero, Anno, DataRic, Dat
</DbCommand>
</SelectCommand>
</DbSource>
<DbSource ConnectionRef="ETS_WSConnectionString (Settings)" DbObjectName="ETS_WS.dbo.stp_taDocs_insert" DbObjectType="StoredProcedure" GenerateShortCommands="true" GeneratorSourceName="insertQuery" Modifier="Public" Name="insertQuery" QueryType="NoData" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDataBy2" UserSourceName="insertQuery">
<DbSource ConnectionRef="ETS_WSConnectionString (Settings)" DbObjectName="ETS_WS.dbo.stp_tbDocs_insert" DbObjectType="StoredProcedure" GenerateShortCommands="true" GeneratorSourceName="insertQuery" Modifier="Public" Name="insertQuery" QueryType="NoData" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDataBy2" UserSourceName="insertQuery">
<SelectCommand>
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
<CommandText>dbo.stp_taDocs_insert</CommandText>
<CommandText>dbo.stp_tbDocs_insert</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="nvarchar" DbType="String" Direction="Input" ParameterName="@nome" Precision="0" ProviderType="NVarChar" Scale="0" Size="250" SourceColumnNullMapping="false" SourceVersion="Current" />
@@ -427,6 +427,8 @@ SELECT idxFile, Nome, fullPath, userId, NrProtocollo, Numero, Anno, DataRic, Dat
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="nvarchar" DbType="String" Direction="Input" ParameterName="@Fonte" Precision="0" ProviderType="NVarChar" Scale="0" Size="100" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="nvarchar" DbType="String" Direction="Input" ParameterName="@Oggetto" Precision="0" ProviderType="NVarChar" Scale="0" Size="250" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="nvarchar" DbType="String" Direction="Input" ParameterName="@InOut" Precision="0" ProviderType="NVarChar" Scale="0" Size="3" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="nvarchar" DbType="String" Direction="Input" ParameterName="@Autore" Precision="0" ProviderType="NVarChar" Scale="0" Size="50" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="nvarchar" DbType="String" Direction="Input" ParameterName="@Redattore" Precision="0" ProviderType="NVarChar" Scale="0" Size="50" SourceColumnNullMapping="false" SourceVersion="Current" />
</Parameters>
</DbCommand>
</SelectCommand>
@@ -601,7 +603,7 @@ SELECT idxTag, tag FROM AnagTags WHERE (idxTag = @idxTag)</CommandText>
<xs:element name="DS_WebScip" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msprop:EnableTableAdapterManager="true" msprop:Generator_DataSetName="DS_WebScip" msprop:Generator_UserDSName="DS_WebScip">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="tmpFileUt" msprop:Generator_TableClassName="tmpFileUtDataTable" msprop:Generator_TableVarName="tabletmpFileUt" msprop:Generator_TablePropName="tmpFileUt" msprop:Generator_RowDeletingName="tmpFileUtRowDeleting" msprop:Generator_RowChangingName="tmpFileUtRowChanging" msprop:Generator_RowEvHandlerName="tmpFileUtRowChangeEventHandler" msprop:Generator_RowDeletedName="tmpFileUtRowDeleted" msprop:Generator_UserTableName="tmpFileUt" msprop:Generator_RowChangedName="tmpFileUtRowChanged" msprop:Generator_RowEvArgName="tmpFileUtRowChangeEvent" msprop:Generator_RowClassName="tmpFileUtRow">
<xs:element name="tmpFileUt" msprop:Generator_TableClassName="tmpFileUtDataTable" msprop:Generator_TableVarName="tabletmpFileUt" msprop:Generator_RowChangedName="tmpFileUtRowChanged" msprop:Generator_TablePropName="tmpFileUt" msprop:Generator_RowDeletingName="tmpFileUtRowDeleting" msprop:Generator_RowChangingName="tmpFileUtRowChanging" msprop:Generator_RowEvHandlerName="tmpFileUtRowChangeEventHandler" msprop:Generator_RowDeletedName="tmpFileUtRowDeleted" msprop:Generator_RowClassName="tmpFileUtRow" msprop:Generator_UserTableName="tmpFileUt" msprop:Generator_RowEvArgName="tmpFileUtRowChangeEvent">
<xs:complexType>
<xs:sequence>
<xs:element name="idxFile" msprop:Generator_ColumnVarNameInTable="columnidxFile" msprop:Generator_ColumnPropNameInRow="idxFile" msprop:Generator_ColumnPropNameInTable="idxFileColumn" msprop:Generator_UserColumnName="idxFile" type="xs:int" />
@@ -673,7 +675,7 @@ SELECT idxTag, tag FROM AnagTags WHERE (idxTag = @idxTag)</CommandText>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="tbDocumenti" msprop:Generator_TableClassName="tbDocumentiDataTable" msprop:Generator_TableVarName="tabletbDocumenti" msprop:Generator_RowChangedName="tbDocumentiRowChanged" msprop:Generator_TablePropName="tbDocumenti" msprop:Generator_RowDeletingName="tbDocumentiRowDeleting" msprop:Generator_RowChangingName="tbDocumentiRowChanging" msprop:Generator_RowEvHandlerName="tbDocumentiRowChangeEventHandler" msprop:Generator_RowDeletedName="tbDocumentiRowDeleted" msprop:Generator_RowClassName="tbDocumentiRow" msprop:Generator_UserTableName="tbDocumenti" msprop:Generator_RowEvArgName="tbDocumentiRowChangeEvent">
<xs:element name="tbDocumenti" msprop:Generator_TableClassName="tbDocumentiDataTable" msprop:Generator_TableVarName="tabletbDocumenti" msprop:Generator_TablePropName="tbDocumenti" msprop:Generator_RowDeletingName="tbDocumentiRowDeleting" msprop:Generator_RowChangingName="tbDocumentiRowChanging" msprop:Generator_RowEvHandlerName="tbDocumentiRowChangeEventHandler" msprop:Generator_RowDeletedName="tbDocumentiRowDeleted" msprop:Generator_UserTableName="tbDocumenti" msprop:Generator_RowChangedName="tbDocumentiRowChanged" msprop:Generator_RowEvArgName="tbDocumentiRowChangeEvent" msprop:Generator_RowClassName="tbDocumentiRow">
<xs:complexType>
<xs:sequence>
<xs:element name="idxFile" msdata:ReadOnly="true" msdata:AutoIncrement="true" msdata:AutoIncrementSeed="-1" msdata:AutoIncrementStep="-1" msprop:Generator_ColumnVarNameInTable="columnidxFile" msprop:Generator_ColumnPropNameInRow="idxFile" msprop:Generator_ColumnPropNameInTable="idxFileColumn" msprop:Generator_UserColumnName="idxFile" type="xs:int" />
@@ -833,7 +835,7 @@ SELECT idxTag, tag FROM AnagTags WHERE (idxTag = @idxTag)</CommandText>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="AnagFasi" msprop:Generator_TableClassName="AnagFasiDataTable" msprop:Generator_TableVarName="tableAnagFasi" msprop:Generator_TablePropName="AnagFasi" msprop:Generator_RowDeletingName="AnagFasiRowDeleting" msprop:Generator_RowChangingName="AnagFasiRowChanging" msprop:Generator_RowEvHandlerName="AnagFasiRowChangeEventHandler" msprop:Generator_RowDeletedName="AnagFasiRowDeleted" msprop:Generator_UserTableName="AnagFasi" msprop:Generator_RowChangedName="AnagFasiRowChanged" msprop:Generator_RowEvArgName="AnagFasiRowChangeEvent" msprop:Generator_RowClassName="AnagFasiRow">
<xs:element name="AnagFasi" msprop:Generator_TableClassName="AnagFasiDataTable" msprop:Generator_TableVarName="tableAnagFasi" msprop:Generator_RowChangedName="AnagFasiRowChanged" msprop:Generator_TablePropName="AnagFasi" msprop:Generator_RowDeletingName="AnagFasiRowDeleting" msprop:Generator_RowChangingName="AnagFasiRowChanging" msprop:Generator_RowEvHandlerName="AnagFasiRowChangeEventHandler" msprop:Generator_RowDeletedName="AnagFasiRowDeleted" msprop:Generator_RowClassName="AnagFasiRow" msprop:Generator_UserTableName="AnagFasi" msprop:Generator_RowEvArgName="AnagFasiRowChangeEvent">
<xs:complexType>
<xs:sequence>
<xs:element name="idxFase" msdata:ReadOnly="true" msdata:AutoIncrement="true" msdata:AutoIncrementSeed="-1" msdata:AutoIncrementStep="-1" msprop:Generator_ColumnVarNameInTable="columnidxFase" msprop:Generator_ColumnPropNameInRow="idxFase" msprop:Generator_ColumnPropNameInTable="idxFaseColumn" msprop:Generator_UserColumnName="idxFase" type="xs:int" />
@@ -861,7 +863,7 @@ SELECT idxTag, tag FROM AnagTags WHERE (idxTag = @idxTag)</CommandText>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="AnagTags" msprop:Generator_TableClassName="AnagTagsDataTable" msprop:Generator_TableVarName="tableAnagTags" msprop:Generator_TablePropName="AnagTags" msprop:Generator_RowDeletingName="AnagTagsRowDeleting" msprop:Generator_RowChangingName="AnagTagsRowChanging" msprop:Generator_RowEvHandlerName="AnagTagsRowChangeEventHandler" msprop:Generator_RowDeletedName="AnagTagsRowDeleted" msprop:Generator_UserTableName="AnagTags" msprop:Generator_RowChangedName="AnagTagsRowChanged" msprop:Generator_RowEvArgName="AnagTagsRowChangeEvent" msprop:Generator_RowClassName="AnagTagsRow">
<xs:element name="AnagTags" msprop:Generator_TableClassName="AnagTagsDataTable" msprop:Generator_TableVarName="tableAnagTags" msprop:Generator_RowChangedName="AnagTagsRowChanged" msprop:Generator_TablePropName="AnagTags" msprop:Generator_RowDeletingName="AnagTagsRowDeleting" msprop:Generator_RowChangingName="AnagTagsRowChanging" msprop:Generator_RowEvHandlerName="AnagTagsRowChangeEventHandler" msprop:Generator_RowDeletedName="AnagTagsRowDeleted" msprop:Generator_RowClassName="AnagTagsRow" msprop:Generator_UserTableName="AnagTags" msprop:Generator_RowEvArgName="AnagTagsRowChangeEvent">
<xs:complexType>
<xs:sequence>
<xs:element name="idxTag" msdata:ReadOnly="true" msdata:AutoIncrement="true" msdata:AutoIncrementSeed="-1" msdata:AutoIncrementStep="-1" msprop:Generator_ColumnVarNameInTable="columnidxTag" msprop:Generator_ColumnPropNameInRow="idxTag" msprop:Generator_ColumnPropNameInTable="idxTagColumn" msprop:Generator_UserColumnName="idxTag" type="xs:int" />