eliminata modalità di editing come salvataggio + redirect
postato in classe webshipUtils init da idxFile di oggetto datiMeta
This commit is contained in:
@@ -103,6 +103,44 @@ namespace ETS_WS
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// inizializza e restituisce un oggetto metadati da un idxFile
|
||||
/// </summary>
|
||||
/// <param name="idxFile"></param>
|
||||
/// <returns></returns>
|
||||
public docMetaDataSet docMetaFromIdxFile(int idxFile)
|
||||
{
|
||||
docMetaDataSet currMeta = new docMetaDataSet();
|
||||
try
|
||||
{
|
||||
DS_WebScip.tbDocumentiRow rigaDoc = utils.obj.taDoc.getByIdxFile(idxFile)[0];
|
||||
// assegno valori meta!
|
||||
currMeta.commessa = rigaDoc.Commessa;
|
||||
currMeta.dataDoc = rigaDoc.DataDoc;
|
||||
currMeta.dataRic = rigaDoc.DataRic;
|
||||
currMeta.fase = rigaDoc.Fase;
|
||||
currMeta.fonte = rigaDoc.Fonte;
|
||||
currMeta.InOut = rigaDoc.InOut;
|
||||
currMeta.isRed = rigaDoc.isRed;
|
||||
currMeta.oggetto = rigaDoc.Oggetto;
|
||||
currMeta.path = rigaDoc.fullPath.Replace(utils.obj.confReadString("archiveDir"), "");
|
||||
currMeta.reqProto = (rigaDoc.Numero > 0);
|
||||
// recupero tags!
|
||||
DS_WebScip.Tags2DocDataTable tabTags = utils.obj.taTags2Doc.getByIdxFile(idxFile);
|
||||
List<string> tags = new List<string>();
|
||||
foreach (DS_WebScip.Tags2DocRow tag in tabTags)
|
||||
{
|
||||
tags.Add(tag.idxTag.ToString());
|
||||
}
|
||||
currMeta.tags = tags;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
lg.Error("Errore creazione oggetot meta da idxFile: {0}", exc);
|
||||
}
|
||||
|
||||
return currMeta;
|
||||
}
|
||||
/// <summary>
|
||||
/// idxFile da editare (in sessione)
|
||||
/// </summary>
|
||||
public int idxFileEdit
|
||||
|
||||
@@ -167,9 +167,13 @@ namespace ETS_WS.WebUserControls
|
||||
/// <param name="e"></param>
|
||||
protected void grView_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
// idxFile selezionato!
|
||||
int idxFile = Convert.ToInt32(grView.SelectedDataKey["idxFile"]);
|
||||
|
||||
#if false
|
||||
// salvo metadati
|
||||
docMetaDataSet currMeta = new docMetaDataSet();
|
||||
int idxFile = Convert.ToInt32(grView.SelectedDataKey["idxFile"]);
|
||||
|
||||
DS_WebScip.tbDocumentiRow rigaDoc = utils.obj.taDoc.getByIdxFile(idxFile)[0];
|
||||
// assegno valori meta!
|
||||
currMeta.commessa = rigaDoc.Commessa;
|
||||
@@ -183,13 +187,14 @@ namespace ETS_WS.WebUserControls
|
||||
currMeta.path = rigaDoc.fullPath.Replace(utils.obj.confReadString("archiveDir"), "");
|
||||
currMeta.reqProto = (rigaDoc.Numero > 0);
|
||||
// recupero tags!
|
||||
DS_WebScip.Tags2DocDataTable tabTags=utils.obj.taTags2Doc.getByIdxFile(idxFile);
|
||||
DS_WebScip.Tags2DocDataTable tabTags = utils.obj.taTags2Doc.getByIdxFile(idxFile);
|
||||
List<string> tags = new List<string>();
|
||||
foreach (DS_WebScip.Tags2DocRow tag in tabTags)
|
||||
{
|
||||
tags.Add(tag.idxTag.ToString());
|
||||
}
|
||||
currMeta.tags = tags;
|
||||
currMeta.tags = tags;
|
||||
|
||||
WebShipUtils.mng.currMetaData = currMeta;
|
||||
// salvo in sessione richiesta editing!
|
||||
WebShipUtils.mng.idxFileEdit = idxFile;
|
||||
@@ -199,6 +204,7 @@ namespace ETS_WS.WebUserControls
|
||||
fileMover.obj.muoviFile(WebShipUtils.mng.UserTempPath, rigaDoc.fullPath,rigaDoc.Nome, rigaDoc.NomeFile, false);
|
||||
// evento segnalazione richeista editing!
|
||||
Response.Redirect("~/MyDocs.aspx");
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user