public SVAOLLib.Offices GetOffices(string GuidConnect, string CardId, string sOffices) { SVAOLLib.Offices oOfficesNotice = new SVAOLLib.Offices(); var oSession = new SVAOLLib.Session(); //setto i server appropriati oSession.Server = serverArchiflow; oSession.Database = databaseArchiflow; oSession.GUIDconnect = GuidConnect; try { CardVisibilityManager oCardVisibilityManager = new CardVisibilityManager(CardId, GuidConnect); logger.Debug("Card: " + CardId); logger.Debug("Uffici estratti: " + oCardVisibilityManager.getXMLVisibility()); foreach (string sOffice in sOffices.Split('|')) { if (!string.IsNullOrEmpty(sOffice)) { logger.Debug("Elaboro l'ufficio: " + sOffice); var oOffices = oCardVisibilityManager.getOfficesFromVisibility(sOffice); foreach (var oOff in oOffices) { oOfficesNotice.Add(oOff); } } } return(oOfficesNotice); } catch (Exception e) { lErr = -1; logger.Error("ERRORE: " + e.Source + " - " + e.StackTrace + " - " + e.Message); throw new Exception(String.Format("{0}>>{1}>>{2}", "ERRORE : GetOffices", e.Source, e.Message), e); } }
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); } }
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); }