コード例 #1
0
        public static string ValidFileImport()
        {
            string retVal = string.Empty;

            System.Web.SessionState.HttpSessionState currentSession = HttpContext.Current.Session;

            if (currentSession[vs_pfImportedInvoice] != null)
            {
                #region Import File

                Entities.PalletForceImportedInvoice pfii = (Entities.PalletForceImportedInvoice)currentSession[vs_pfImportedInvoice];

                try
                {
                    Facade.IPalletForceImportPreInvoice facPFImport = new Facade.PreInvoice();
                    currentSession[vs_pfImportedInvoice] = facPFImport.ValidatePFImportedItems(pfii, currentSession[vs_userID].ToString());
                    retVal = bool.TrueString;
                }
                catch (Exception ex)
                {
                    #region File Removal on Error
                    retVal = FileRemovalOnError(currentSession[vs_uploadedFilePath].ToString(), ex);
                    #endregion
                }
                #endregion
            }

            return(retVal);
        }