コード例 #1
0
        protected void lbDownload_Click(object sender, EventArgs e)
        {
            try
            {
                WebServicePattern objWebServicePattern = new WebServicePattern();
                PatternBO         objPattern           = new PatternBO();
                objPattern.Number     = this.QueryNumber;
                objPattern.IsActiveWS = true;
                objPattern.IsActive   = true;
                objPattern            = objPattern.SearchObjects().SingleOrDefault();

                string filePath = objWebServicePattern.GeneratePDF(objPattern, false, this.hdnType.Value, this.CompressionImagePhysicalPath);
                this.DownloadPDFFile(filePath, objPattern.Number);
            }
            catch (Exception ex)
            {
                IndicoLogging.log.Error("Error occured while downloading pdf in Sizingspecs.aspx", ex);
            }
        }
コード例 #2
0
        public string Get(int id, int unit = 0) // convertType = 0 : cm / 1 : inch
        {
            try
            {
                PatternBO objPattern = new PatternBO();
                objPattern.ID = id;
                objPattern.GetObject();

                WebServicePattern objWebServicePattern = new WebServicePattern(true);
                string            filePath             = objWebServicePattern.GeneratePDF(objPattern, false, unit.ToString(), GetCompressionImagePhysicalPath(objPattern));

                filePath = filePath.Replace(IndicoConfiguration.AppConfiguration.PathToProjectFolder, IndicoConfiguration.AppConfiguration.SiteHostAddress.Replace("/", ""));
                filePath = filePath.Replace(@"\", "/");

                return(filePath);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }