protected void SyncPackageExtToAppCenter(SMC_PackageExt ext, Hashtable r, int batch_no)
        {
            SmartBox.Console.Bo.AppCenter.AppCenterBO bo = Bo.BoFactory.GetAppCenterBO;
            Service.ApplicationCenterWS.WebService ws = new Service.ApplicationCenterWS.WebService();

            string smartbox_console_path = HttpRuntime.AppDomainAppPath;
            Service.ApplicationCenterWS.SMC_PackageExt entity = CopyPackageExt(ext);
            bool flag = true;
            //Log4NetHelper.Info("wsurl:" + ws.Url);

            try
            {
                //同步安装包到外网应用中心
                ws.PackageExtSync(entity);

                Service.ApplicationCenterWS.SMC_PackageFAQ faqEntity = new Service.ApplicationCenterWS.SMC_PackageFAQ();

                //同步应用手册到外网应用中心
                IList<SMC_PackageManual> manuals = bo.GetPackageManuals(entity.pe_id);
                foreach (SMC_PackageManual _manual in manuals)
                {
                    Service.ApplicationCenterWS.SMC_PackageManual manual = CopyPackageManual(_manual);
                    bool f = ws.PackageManualSync(manual);
                    flag = flag && f;
                }

                //同步截图表到外网应用中心
                IList<SMC_PackagePicture> pics = bo.GetPackagePictures(entity.pe_id);

                if (pics.Count > 0)
                {
                    foreach (SMC_PackagePicture _pic in pics)
                    {
                        Service.ApplicationCenterWS.SMC_PackagePicture pic = CopyPackagePicture(_pic);
                        bool f = ws.PackagePictuerSync(pic);
                        flag = flag && f;
                    }
                }

                //同步附件到外网应用中心
                string entityFolder = smartbox_console_path + "\\PackageExt\\" + ext.pe_id;
                if (Directory.Exists(entityFolder))
                {
                    string[] files = System.IO.Directory.GetFiles(entityFolder);

                    List<Service.ApplicationCenterWS.FileEntity> fs = new List<Service.ApplicationCenterWS.FileEntity>();
                    foreach (string filePath in files)
                    {
                        if (System.IO.File.Exists(filePath))
                        {
                            FileStream s = new FileStream(filePath, FileMode.Open, FileAccess.Read);
                            Service.ApplicationCenterWS.FileEntity fEntity = new Service.ApplicationCenterWS.FileEntity();
                            fEntity.Content = new byte[s.Length];
                            s.Read(fEntity.Content, 0, (int)s.Length);
                            s.Close();
                            s.Dispose();
                            fEntity.FileName = Path.GetFileName(filePath);
                            fs.Add(fEntity);
                        }
                    }
                    bool f = true;
                    if (fs.Count > 0)
                    {
                        f = ws.PackageFilesSync(fs.ToArray(), ext.pe_id);
                    }
                    flag = flag && f;
                }
                r["r"] = flag;
                r["d"] = "同步" + (flag ? "成功!" : "失败!");
                //同步成功
                ext.pe_SyncStatus = flag ? 1 : 2;
                BoFactory.GetVersionTrackBo.UpdatePackageExt(ext);

                SMC_PackageExtSyncToOutside sync = new SMC_PackageExtSyncToOutside();
                sync.sync_bat_no = batch_no;
                sync.pe_id = ext.pe_id;
                sync.pe_name = ext.pe_Name;
                sync.sync_status = true;
                sync.sync_time = DateTime.Now;
                sync.description = "同步成功";
                BoFactory.GetSMC_PackageExtSyncToOutsideBO.Insert(sync);

            }
            catch (Exception xe)
            {
                Log4NetHelper.Error(xe);
                //同步失败
                BoFactory.GetVersionTrackBo.UpdatePackageExt(ext);

                SMC_PackageExtSyncToOutside sync = new SMC_PackageExtSyncToOutside();
                sync.sync_bat_no = batch_no;
                sync.pe_id = ext.pe_id;
                sync.pe_name = ext.pe_Name;
                sync.sync_status = false;
                sync.sync_time = DateTime.Now;
                sync.description = xe.Message;
                BoFactory.GetSMC_PackageExtSyncToOutsideBO.Insert(sync);
                r["r"] = false;
                r["d"] = "同步失败!";
            }
        }