protected override void Execute(CodeActivityContext context)
        {
            var userName       = UserName.Get(context);
            var password       = Password.Get(context);
            var listName       = ListName.Get(context);
            var camlQueryXml   = CamlQueryXml.Get(context);
            var securePassword = new SecureString();

            foreach (char c in Password.Get(context))
            {
                securePassword.AppendChar(c);
            }

            using (var clientContext = new ClientContext(SharePointSiteUri.Get(context)))
            {
                clientContext.Credentials = new SharePointOnlineCredentials(userName, securePassword);
                var listItemOperations = new ListItemOperations(clientContext, listName, camlQueryXml);
                ResultListItems.Set(context, DataTableUitility.GetDataTableFromListItem(listItemOperations.GetListItems()));
            }
        }
Beispiel #2
0
        protected override void Execute(CodeActivityContext context)
        {
            var userName       = UserName.Get(context);
            var password       = Password.Get(context);
            var listName       = ListName.Get(context);
            var camlQueryXml   = CamlQueryXml.Get(context);
            var column         = ColumnName.Get(context);
            var value          = updateVaule.Get(context);
            var securePassword = new SecureString();

            foreach (char c in Password.Get(context))
            {
                securePassword.AppendChar(c);
            }

            using (var clientContext = new ClientContext(SharePointSiteUri.Get(context)))
            {
                clientContext.Credentials = new SharePointOnlineCredentials(userName, securePassword);
                var listItemOperations = new ListItemOperations(clientContext, listName, camlQueryXml);
                isUpdated.Set(context, listItemOperations.updateListItemColumn(column, value));
            }
        }