コード例 #1
0
ファイル: CardManager.cs プロジェクト: OcfSiav/apflibrary904
 public void setCardVisibilityDefaultConnLess(string sConnection, string CardId, string LogId = "")
 {
     try
     {
         //logger.Debug("Aperta connessione:" + sConnection);
         CardVisibilityManager visibilityFromCard = new CardVisibilityManager(CardId, sConnection);
         //logger.Debug("Leggo la visibilità della scheda: " + CardId);
         SVAOLLib.Offices oOffices = new SVAOLLib.Offices();
         SVAOLLib.Users   oUsers   = new SVAOLLib.Users();
         //WcfGdpd.WsCard.Group dValue1 = (WcfGdpd.WsCard.Group)Convert.ChangeType(visibilityFromCard.getGroupFromVisibility(resourceFileManager.getConfigData("GroupVisibilityRiservato")), typeof(WcfGdpd.WsCard.Group));
         //var elio= Convert.ChangeType(visibilityFromCard.getGroupFromVisibility(resourceFileManager.getConfigData("GroupVisibilityRiservato")), typeof(WcfGdpd.WsCard.Group));
         var groupsWCF = visibilityFromCard.getGroupsFromSharePredefinite();
         //logger.Debug("Ricavo la visibilità predefinita dai gruppi: " + sGuidCard);
         var officesWCF = visibilityFromCard.getOfficesFromSharePredefinite();
         //logger.Debug("Ricavo la visibilità predefinita dagli uffici: " + sGuidCard);
         var usersWCF = visibilityFromCard.getUsersFromSharePredefinite();
         //logger.Debug("Ricavo la visibilità predefinita dagli utenti: " + sGuidCard);
         var groupsMailWCF = visibilityFromCard.getGroupsMailFromSharePredefinite();
         //logger.Debug("Ricavo la visibilità predefinita dai gruppi con notifica: " + sGuidCard);
         var officesMailWCF = visibilityFromCard.getOfficesMailFromSharePredefinite();
         //logger.Debug("Ricavo la visibilità predefinita dagli uffici con notifica: " + sGuidCard);
         var usersMailWCF = visibilityFromCard.getUsersMailFromSharePredefinite();
         //logger.Debug("Ricavo la visibilità predefinita dagli utenti con notifica: " + sGuidCard);
         //Mapper.Map(groupWCF, groupRiservato, Group, SVAOLLib.Group);
         CardManager.SendCardFromId(CardId, sConnection, officesWCF, groupsWCF, usersWCF, "", "", officesMailWCF, groupsMailWCF, usersMailWCF);
         //logger.Debug("Condivisione eseguita: " + sGuidCard);
     }
     catch (Exception e)
     {
         throw new Exception(String.Format("{0}>>{1}>>{2}", "ERRORE : SetSingleFieldValue", e.Source, e.Message), e);
     }
 }
コード例 #2
0
ファイル: CardManager.cs プロジェクト: OcfSiav/apflibrary904
        public Boolean RemoveAllVisibility(string GuidConnect, string sGuidCard)
        {
            bool bResult  = false;
            var  oSession = new SVAOLLib.Session();
            ConnectionManager oConnectionManager = new ConnectionManager(logger);

            logger.Debug("Entro in connection->RemoveAllVisibility");
            try
            {
                CardVisibilityManager visibilityFromCard = new CardVisibilityManager(sGuidCard, GuidConnect);
                //logger.Debug("Leggo la visibilità della scheda: " + CardId);
                //WcfGdpd.WsCard.Group dValue1 = (WcfGdpd.WsCard.Group)Convert.ChangeType(visibilityFromCard.getGroupFromVisibility(resourceFileManager.getConfigData("GroupVisibilityRiservato")), typeof(WcfGdpd.WsCard.Group));
                //var elio= Convert.ChangeType(visibilityFromCard.getGroupFromVisibility(resourceFileManager.getConfigData("GroupVisibilityRiservato")), typeof(WcfGdpd.WsCard.Group));
                var groupsWCF = visibilityFromCard.getGroupsFromSharePredefinite();
                //logger.Debug("Ricavo la visibilità predefinita dai gruppi: " + sGuidCard);
                var officesWCF = visibilityFromCard.getOfficesFromSharePredefinite();
                //logger.Debug("Ricavo la visibilità predefinita dagli uffici: " + sGuidCard);
                var usersWCF = visibilityFromCard.getUsersFromSharePredefinite();
                //logger.Debug("Ricavo la visibilità predefinita dagli utenti: " + sGuidCard);
                var groupsMailWCF = visibilityFromCard.getGroupsMailFromSharePredefinite();
                //logger.Debug("Ricavo la visibilità predefinita dai gruppi con notifica: " + sGuidCard);
                var officesMailWCF = visibilityFromCard.getOfficesMailFromSharePredefinite();
                //logger.Debug("Ricavo la visibilità predefinita dagli uffici con notifica: " + sGuidCard);
                var usersMailWCF = visibilityFromCard.getUsersMailFromSharePredefinite();

                SVAOLLib.Card card = GetCardFromId(GuidConnect, sGuidCard);
                card.RemoveVisibility(officesWCF, groupsWCF, usersWCF);
                bResult = true;
            }
            catch (Exception e)
            {
                lErr = -1;
                logger.Error("ERRORE: " + e.Source + " - " + e.StackTrace + " - " + e.Message);
                throw new Exception(String.Format("{0}>>{1}>>{2}", "ERRORE : RemoveVisibility", e.Source, e.Message), e);
            }
            return(bResult);
        }