Exemplo n.º 1
0
 private void btnRemoveCollectionData_Click(object sender, EventArgs e)
 {
     using (SpLite s = new SpLite())
     {
         s.RemoveDataFromPortal("CLS", "00000345", "speedyservices.com");
     }
 }
Exemplo n.º 2
0
        private void btnReceiveData_Click(object sender, EventArgs e)
        {
            // This sample assumes that you have AdvancedDemo installed with a collection named '00000002'

            using (SpLite s = new SpLite())
            {
                s.GetDataFromPortal("AdvancedDemo", "OfficeForms", "00000002", "topimagesystems.com");
                //s.GetDataFromPortal("CLS", "FreeProcess", "00000323", "topimagesystems.com");
            }
        }
Exemplo n.º 3
0
        private void btnSendCollectionData_Click(object sender, EventArgs e)
        {
            // This sample assumes that you have AdvancedDemo installed with a collection named '00000002'
            // you can use another of the AdvancedDemo sample images and import them through FilePortal
            // and use that collection.

            using (SpLite s = new SpLite())
            {
                s.SendDataToPortal("AdvancedDemo", "OfficeForms", "00000002", false, 3);
            }
        }
Exemplo n.º 4
0
 public override void OnPostGetCollections(ITisClientServicesModule oCSM)
 {
     foreach (ITisCollectionData cd in oCSM.Dynamic.AvailableCollections)
     {
         using (SpLite p = new SpLite())
         {
             ITisCollectionData collec = cd;
             p.SendDataToPortal(ref collec, oCSM.Application.AppName,
                                p._getSetting(CommonConst.supplierPortalStationName), cd.Name, true);
         }
     }
 }
Exemplo n.º 5
0
        public override void OnTimer(ITisClientServicesModule oCSM)
        {
            if (!iterating)
            {
                try
                {
                    iterating = true;
                    using (SpLite p = new SpLite())
                    {
                        string[] collections = p.GetCollectionsFromStation(oCSM.Application.AppName, oCSM.Session.StationName);

                        for (int i = 0; i <= collections.Length - 1; i++)
                        {
                            p.ForceUnlock(oCSM.Application.AppName, oCSM.Session.StationName, collections[i]);

                            using (Batch b = new Batch(oCSM.Application.AppName, oCSM.Session.StationName))
                            {
                                ITisCollectionData cd = b.Get(collections[i]);

                                bool changed = false;

                                changed = p.GetDataFromPortal(ref cd, oCSM.Application.AppName, oCSM.Session.StationName, cd.Name, String.Empty);

                                if (changed)
                                {
                                    cd.NextStation = "Validate";

                                    p.SendDataToPortal(cd, oCSM.Application.AppName, cd.NextStation, cd.Name, false, 1);
                                    b.Put(cd);
                                }
                                else
                                {
                                    p.SendDataToPortal(cd, oCSM.Application.AppName, oCSM.Session.StationName, cd.Name, false, 1);
                                    b.Free(cd);
                                }
                            }
                        }
                    }
                }
                catch (Exception ex)
                {
                }
                finally
                {
                    iterating = false;
                }
            }
        }
Exemplo n.º 6
0
 public override void OnTimer(TiS.Core.eFlowAPI.ITisClientServicesModule oCSM)
 {
     if (!iterating)
     {
         try
         {
             iterating = true;
             using (SpLite p = new SpLite())
             {
                 p.CreateCollectionFromImportFolder(oCSM.Application.AppName, oCSM, "PageOCR");
             }
         }
         finally
         {
             iterating = false;
         }
     }
 }
Exemplo n.º 7
0
        public override void OnPrePutCollections(ITisClientServicesModule oCSM, ref bool bCanPut)
        {
            for (int i = 0; i <= oCSM.Dynamic.AvailableCollections.Count - 1; i++)
            {
                ITisCollectionData cd = oCSM.Dynamic.AvailableCollections.GetByIndex(0);

                using (SpLite p = new SpLite())
                {
                    bool changed = false;

                    do
                    {
                        changed = p.GetDataFromPortal(ref cd, oCSM.Application.AppName,
                                                      p._getSetting(CommonConst.supplierPortalStationName), cd.Name, "topimagesystems.com");
                    } while (!changed);

                    if (changed)
                    {
                        bCanPut = true;
                    }
                }
            }
        }
Exemplo n.º 8
0
        public override void OnPrePutCollections(ITisClientServicesModule oCSM, ref bool bCanPut)
        {
            base.OnPrePutCollections(oCSM, ref bCanPut);

            try
            {
                foreach (ITisCollectionData cd in oCSM.Dynamic.AvailableCollections)
                {
                    string sp = cd.get_NamedUserTags(Tags.SupplierPortalDomainTag);

                    if (sp != String.Empty)
                    {
                        cd.NextStation = Tags.SupplierPortalCompletion;

                        using (SpLite p = new SpLite())
                        {
                            p.SendDataToPortal(cd, oCSM.Application.AppName, oCSM.Session.StationName, cd.Name, true, 1);
                        }
                    }
                }
            }
            catch
            {}
        }