SharePoint 创建列表并使用Windows Presentation Foundation应用程序管理列表
SharePoint创建列表并使用程序管理列表
选中在高速启动导航显示,点击创建。
添加四个选项:East/West/North/South。其余默认。点击确定。
你须要更改为自己的服务器名。
提供一个名称。点击加入引用。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Xml;
using System.Xml.Linq;
namespace WPFSPListAPP
{
///
/// MainWindow.xaml 的交互逻辑
///
public partial class MainWindow : Window
{
string strCompanyName = "";
string strRegion = "";
string strSize = "";
string strSales = "";
string strListID = "";
string strViewID = "";
public MainWindow()
{
InitializeComponent();
}
private void btnUpdate_Click(object sender, RoutedEventArgs e)
{
strCompanyName = txtbxCompanyName.Text;
strRegion = txtbxRegion.Text;
strSize = txtbxSize.Text;
strSales = "$" + txtbxSales.Text;
WPFSPListAPP.MySPWebService.Lists myListService =
new MySPWebService.Lists();
myListService.Credentials = System.Net.CredentialCache.DefaultCredentials;
myListService.Url = "http://smallville-pc/_vti_bin/Lists.asmx";
XmlNode myListView = myListService.GetListAndView("Customers", "");
strListID = myListView.ChildNodes[0].Attributes["Name"].Value;
strViewID = myListView.ChildNodes[1].Attributes["Name"].Value;
XmlDocument myListDoc = new XmlDocument();
XmlElement batchXML = myListDoc.CreateElement("Batch");
batchXML.InnerXml="" +
strCompanyName + "" + strRegion +
"" + strSize +
"" + strSales +
"" + "";
XmlNode myListReturn = myListService.UpdateListItems(strListID, batchXML);
MessageBox.Show("SharePoint List was updated!");
}
private void btnClear_Click(object sender, RoutedEventArgs e)
{
txtbxCompanyName.Text = "";
txtbxRegion.Text = "";
txtbxSales.Text = "";
txtbxSize.Text = "";
}
private void btnExit_Click(object sender, RoutedEventArgs e)
{
Application.Current.Shutdown();
}
}
}
10. F5调试。
点击更新。
原理
SharePoint 创建列表并使用Windows Presentation Foundation应用程序管理列表的更多相关文章
- Windows Presentation Foundation (WPF)中的命令(Commands)简述
原文:Windows Presentation Foundation (WPF)中的命令(Commands)简述 ------------------------------------------- ...
- Windows Presentation Foundation(WPF)中的数据绑定(使用XmlDataProvider作控件绑定)
原文:Windows Presentation Foundation(WPF)中的数据绑定(使用XmlDataProvider作控件绑定) ------------------------------ ...
- Windows Presentation Foundation (WPF) 项目中不支持xxx的解决
一般Windows Presentation Foundation (WPF) 项目中不支持xxx都是由于没引用相应的程序集导致,比如Windows Presentation Foundation ( ...
- 【翻译习作】 Windows Workflow Foundation程序开发-第一章02
1.2 Windows Workflow概览 微软的Windows Workflow Foundation(简称WF)是.NET框架3.0版的一部分..NET3.0其它主要部分是Window ...
- 【翻译习作】 Windows Workflow Foundation程序开发-第一章03
1.2.2.Visual Studio 2005扩展包 微软也为Windows Workflow开发者提供了Visual Studio 2005扩展包.扩展包将许多功能集成到Visual Studio ...
- Windows Phone 8初学者开发—第3部分:编写第一个Windows Phone 8应用程序
原文 Windows Phone 8初学者开发—第3部分:编写第一个Windows Phone 8应用程序 原文地址: http://channel9.msdn.com/Series/Windows- ...
- 【翻译习作】 Windows Workflow Foundation程序开发-第一章05
1.3 开发我们的第一个工作流 也许你曾经在这样的产品经理手下搞过开发:他总是在你身边转悠,并不时的问一句“你还没做完吗?”.在这一部分,我们将用一个简单的Windows Workflow程 ...
- 使用WIF实现单点登录Part I——Windows Identity Foundation介绍及环境搭建
首先先说一下什么是WIF(Windows Identity Foundation).由于各种历史原因,身份验证和标识的管理一般都比较无规律可循.在软件里加入“身份验证”功能意味着要在你的代码里混进处理 ...
- 使用WIF实现单点登录Part I——Windows Identity Foundation介绍及环境搭建 -摘自网络
上个月有一个星期的时间都在研究asp.net mvc统一身份验证及单点登录的实现.经过了一番的探索,最终决定使用微软的Windows Identity Foundation.但是这东西用的人貌似不多, ...
随机推荐
- 20145201 《Java程序设计》第四周学习总结
20145201 <Java程序设计>第四周学习总结 教材学习内容总结 本周学习了课本第六.七章内容,即继承与多态.接口与多态. 第六章 继承与多态 6.1 何谓继承 6.1.1 继承共同 ...
- 并发-ConcurrentHashMap源码分析
ConcurrentHashMap 参考: http://www.cnblogs.com/chengxiao/p/6842045.html https://my.oschina.net/hosee/b ...
- Pyspider爬虫教程
Pyspider爬虫教程 一.安装 1. 安装pip (1)准备工作 yum install –y make gcc-c++ python-devel libxml2-devel libxslt-de ...
- C#抽象类和接口
抽象类和接口有什么区别?有了抽象类为什么还要接口? 接口和抽象类的相同点是都不能实例化,不同点是接口中的方法都没有方法体,而抽象类则不然,除了抽象方法没有方法体外,其他方法都有方法体. 原因是:在C# ...
- Codeforces Round #365 (Div. 2) D.Mishka and Interesting sum 树状数组+离线
D. Mishka and Interesting sum time limit per test 3.5 seconds memory limit per test 256 megabytes in ...
- 摘录:MINA 框架简介
Apache Mina Server 是一个网络通信应用框架,也就是说,它主要是对基于TCP/IP.UDP/IP协议栈的通信框架(然,也可以提供JAVA 对象的序列化服务.虚拟机管道通信服务等),Mi ...
- scjp考试准备 - 10 - 类型转换
题目为如下代码的执行结果: class Building{} public class Barn extends Building{ public static void main(String[] ...
- 解决socket负载均衡集群方案和代码实现
有一段时间,在考虑下socket 之间集群 可以在Nginx 下可以 但是不同服务器之间怎么通讯呢 后来自己也想可不可以用什么东西或者中间件来通讯 ,后来在百度之下 发现果然就是按照我所想的 ,在网上 ...
- php:Mcrypt响应慢的原因解决备注
作者: Laruence 本文地址: http://www.laruence.com/2012/09/24/2810.html 转载请注明出处 上午的时候, 有同事来找我说上周新上线的一个使用mcry ...
- php将科学计算法得出的结果转换成原始数据
由于php最大只支持显示 15位因的数据运算,大于15位的2数加减乘除的数据的结果,会直接用科学计数法显示, 但在现实生活中,科学计数法不利于普通人识别,所以,本函数将:科学计数法的出的结果转换成原始 ...