Exemplo n.º 1
0
        public SVAOLLib.Groups getGroupsMailFromSharePredefinite()
        {
            SVAOLLib.Groups oGroups = new SVAOLLib.Groups();
            var             sData   = oUsersInArchiveTypeDoc.Where(b => b.TYPE == "2" && b.SENDINGTYPE == "2");

            foreach (var oGroupVis in sData)
            {
                SVAOLLib.Group oGroup = new SVAOLLib.Group();
                oGroup.Code = short.Parse(oGroupVis.ID);
                oGroups.Add(oGroup);
            }
            return(oGroups);
        }
Exemplo n.º 2
0
        public static SVAOLLib.Groups getGroupsFromSharePredefinite(List <SENDOBJECTSENDENTITIESSENDENTITY> oUsersInArchiveTypeDoc)
        {
            SVAOLLib.Groups oGroups = new SVAOLLib.Groups();
            var             sData   = oUsersInArchiveTypeDoc.Where(b => b.TYPE == "2" && b.SENDINGTYPE == "1");

            /* var sData = (from item in oUsersInArchiveTypeDoc
            *                                 where item.TYPE == "2" && item.SENDINGTYPE == "1"
            *                                 select oUsersInArchiveTypeDoc).SingleOrDefault();*/
            foreach (var oGroupVis in sData)
            {
                SVAOLLib.Group oGroup = new SVAOLLib.Group();
                oGroup.Code = short.Parse(oGroupVis.ID);
                oGroups.Add(oGroup);
            }
            return(oGroups);
        }
Exemplo n.º 3
0
        public SVAOLLib.Groups GetGroups(string GuidConnect, string sGroups)
        {
            SVAOLLib.Groups oGroupsNotice = new SVAOLLib.Groups();
            var             oSession      = new SVAOLLib.Session();

            //setto i server appropriati
            oSession.Server      = serverArchiflow;
            oSession.Database    = databaseArchiflow;
            oSession.GUIDconnect = GuidConnect;

            try
            {
                foreach (string sGroup in sGroups.Split('|'))
                {
                    if (!string.IsNullOrEmpty(sGroup))
                    {
                        var            oGroupsFound = oSession.GetAllGroups(1);
                        SVAOLLib.Group ogroup       = new SVAOLLib.Group();
                        foreach (var oGrp in oGroupsFound)
                        {
                            if (oGrp.Name == sGroup)
                            {
                                logger.Debug("Gruppo Trovato");
                                oGroupsNotice.Add(oGrp);
                                break;
                            }
                            logger.Debug("userid: " + oGrp.Name);
                        }
                        ;
                    }
                }
                return(oGroupsNotice);
            }
            catch (Exception e)
            {
                lErr = -1;
                logger.Error("ERRORE: " + e.Source + " - " + e.StackTrace + " - " + e.Message);
                throw new Exception(String.Format("{0}>>{1}>>{2}", "ERRORE : GetGroups", e.Source, e.Message), e);
            }
        }