protected void Page_Load(object sender, EventArgs e) { Response.Expires = -1; if (!this.IsPostBack) { Session["Old_SelectedNodeIndex"] = Session["SelectedNodeIndex"]; //if (Request.QueryString["codFasc"] != null && Request.QueryString["codFasc"] != "") //{ string idFolder = ""; string idFascicolo = ""; if (UIManager.ProjectManager.getProjectInSession().folderSelezionato != null) { DocsPaWR.Folder folder = UIManager.ProjectManager.getProjectInSession().folderSelezionato; idFolder = folder.systemID; NttDataWA.DocsPaWR.Fascicolo Fasc = NttDataWA.UIManager.ProjectManager.getProjectInSession(); if (Fasc != null) { codFasc.Value = Fasc.codice; } } //} } if (!string.IsNullOrEmpty(this.hdMetaFileContent.Value)) { this.massiveImportDocumenti.SetMetaFileContent(this.hdMetaFileContent.Value); this.hdMetaFileContent.Value = string.Empty; } }
protected void Page_Load(object sender, EventArgs e) { NttDataWA.DocsPaWR.Fascicolo prj = NttDataWA.UIManager.ProjectManager.getProjectInSession(); if (prj != null) { idProject = prj.systemID; projectCode = prj.codice; DocsPaWR.Folder folder = prj.folderSelezionato; if (folder != null) { idFolder = folder.systemID; } else { idFolder = idProject; } } if (!IsPostBack) { this.initForm(); ScriptManager.RegisterStartupScript(this, this.GetType(), "InitializeCtrlScript", "setTempFolder();", true); } }
protected void Page_Load(object sender, EventArgs e) { int statusCode = 0; NttDataWA.Utils.FileJSON file = null; string componentType = UIManager.UserManager.getComponentType(Request.UserAgent); if ((Request.QueryString["Absolutepath"] != null) && (Request.QueryString["Absolutepath"] != "")) { //1. controllo se arriva la path assoluta absolutePath = decodeQueryString(Request.QueryString["Absolutepath"].ToString()); //1.0.1 Controllo della dimensione del file if (!string.IsNullOrEmpty(System.Configuration.ConfigurationManager.AppSettings[NttDataWA.Utils.WebConfigKeys.FILE_ACQ_SIZE_MAX.ToString()]) && (Int32.Parse(System.Configuration.ConfigurationManager.AppSettings[NttDataWA.Utils.WebConfigKeys.FILE_ACQ_SIZE_MAX.ToString()].ToString()) * 1024) < Request.ContentLength ) { parseStatusCode(5); if (!String.IsNullOrEmpty(componentType) && componentType.Equals(Constans.TYPE_SOCKET)) { ImportDocManager.setSessionMapImportStatus(absolutePath, this.Response.StatusDescription); } else { HttpContext.Current.Session["ImportStatus"] = this.Response.StatusDescription; } } else { fd = new NttDataWA.DocsPaWR.FileDocumento(); //1.1 Leggo il content del file if (!IsSocket) { byte[] ba = Request.BinaryRead(Request.ContentLength); fd.content = ba; } else { //Stream stream=Request.InputStream; string contentFile = Request["contentFile"]; if (!String.IsNullOrEmpty(contentFile)) { contentFile = contentFile.Replace(' ', '+'); contentFile = contentFile.Trim(); file = JsonConvert.DeserializeObject <NttDataWA.Utils.FileJSON>(contentFile); } if (file != null && !String.IsNullOrEmpty(file.content)) { fd.content = Convert.FromBase64String(file.content); } } //1.2 leggo il codice fascicolo if (Request.QueryString["codFasc"] != null && Request.QueryString["codFasc"] != "") { codFasc = decodeQueryString(Request.QueryString["codFasc"].ToString()); //fasc = FascicoliManager.getFascicoloDaCodice(this.Page, codFasc); fasc = NttDataWA.UIManager.ProjectManager.getFascicoloDaCodice(this.Page, codFasc, Request.QueryString["idTitolario"]); } //1.4. tipo passato if (Request.QueryString["type"] != null && Request.QueryString["type"] != "") { type = Request.QueryString["type"].ToString(); } if (Request.QueryString["foldName"] != null && Request.QueryString["foldName"] != "") { foldName = decodeQueryString(Request.QueryString["foldName"].ToString()); } //1.5. se tutte le condizioni sono ok... procedo if ((codFasc != "") && (absolutePath != "")) { /* prendo la cartella selezionata per l'acquisizione massiva */ DocsPaWR.Folder folder = null; if (UIManager.ProjectManager.getProjectInSession().folderSelezionato != null) { folder = UIManager.ProjectManager.getProjectInSession().folderSelezionato; } statusCode = ImportDocManager.checkORCreateDocFolderFasc(this.Page, fasc, absolutePath, fd, foldName, type, folder, componentType); // parsing degli stati parseStatusCode(statusCode); if (!String.IsNullOrEmpty(componentType) && componentType.Equals(Constans.TYPE_SOCKET)) { ImportDocManager.setSessionMapImportStatus(absolutePath, this.Response.StatusDescription); } else { HttpContext.Current.Session["ImportStatus"] = this.Response.StatusDescription; } } } } }