Compeltato editing file!!! non aggiorna subito ma... poco male!
This commit is contained in:
@@ -204,9 +204,6 @@ namespace ETS_WS.WebUserControls
|
||||
/// <param name="e"></param>
|
||||
protected void grView_RowEditing(object sender, GridViewEditEventArgs e)
|
||||
{
|
||||
// setto selezione=edit
|
||||
//grView.SelectedIndex = grView.EditIndex;
|
||||
//WebShipUtils.mng.idxFileEdit = Convert.ToInt32(grView.SelectedDataKey["idxFile"]);
|
||||
// fix btn cambio file
|
||||
showHideSubstFile(true);
|
||||
}
|
||||
@@ -243,22 +240,27 @@ namespace ETS_WS.WebUserControls
|
||||
/// <param name="e"></param>
|
||||
void mod_singleFileUpload1_eh_fileUploaded(object sender, EventArgs e)
|
||||
{
|
||||
lg.Info("Caricato file {0} per sostituzione", mod_singleFileUpload1.newFileName);
|
||||
// setto selezione=edit
|
||||
grView.SelectedIndex = grView.EditIndex;
|
||||
WebShipUtils.mng.idxFileEdit = Convert.ToInt32(grView.SelectedDataKey["idxFile"]);
|
||||
string nomeFile = mod_singleFileUpload1.newFileName;
|
||||
lg.Info("Caricato file {0} per sostituzione", nomeFile);
|
||||
int idxFile = WebShipUtils.mng.idxFileEdit;
|
||||
// effettuo operazioni sostituzione file!
|
||||
docMetaDataSet docsData = WebShipUtils.mng.docMetaFromIdxFile(idxFile);
|
||||
string path = docsData.path;
|
||||
if (path != "")
|
||||
{
|
||||
string nomeFile = mod_singleFileUpload1.newFileName;
|
||||
// calcolo path
|
||||
path = string.Format("{0}{1}", utils.obj.confReadString("archiveDir"), docsData.path);
|
||||
// elimino file vecchio
|
||||
fileMover.obj.eliminaFile(path, WebShipUtils.mng.nomeFileFromIdxFile(idxFile));
|
||||
// sposto file
|
||||
fileMover.obj.muoviFile(WebShipUtils.mng.UserTempPath, path, nomeFile);
|
||||
lg.Info("Spostato file {0} per sostituzione", nomeFile);
|
||||
// aggiorno su DB
|
||||
utils.obj.taDoc.updateFile(WebShipUtils.mng.idxFileEdit, utils.obj.currUserAD, nomeFile, path);
|
||||
lg.Info("Aggiornato in db nome file {0} per sostituzione", nomeFile);
|
||||
// update gridview!
|
||||
grView.DataBind();
|
||||
}
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user