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.但是这东西用的人貌似不多, ...
随机推荐
- Shell 实现找出两个目录下的同名文件方法
# 首先我们来创建一些 2 个目录,里面的目录结构及相关文件如下所示: # 从上面的测试目录可以看到, lol.txt lol2.txt 两个文件是两个目录下的同名文件 # 有实际例子,思路就容易出来 ...
- SpringBoot 通用返回类设计
在项目中通常需要为前端设计通过的返回类,返回的格式为: { "status": "success", "data": {...} } 定义通 ...
- orecle 函数
--创建函数语法 create [or replace] function [schema.]function_name (函数参数列表) --参数有IN.OUT.IN OUT三种类型:IN代表需要输 ...
- Listview_简单使用_(Virtual)
1.代码来自于“C:\Program Files (x86)\Borland\Delphi7\Demos\Virtual Listview” 1.1.是使用 ListView来显示数据 1.2.自己管 ...
- JNIjw04
1.VC6(CPP)的DLL代码: #include<stdio.h> #include "jniZ_JNIjw04.h" #include <string> ...
- java-登陆界面
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding= ...
- mongodb之一些简单的增删改查语句
数据库操作:show dbs;#查看数据库use test;#如果没有就创建一个db;#查看当前数据库db.dropDatabase();#删除数据库 数据操作:show collections:#查 ...
- JS前端重点 -- Generator 函数的含义与用法
Generator 函数的含义与用法 1.generator http://www.ruanyifeng.com/blog/2015/04/generator.html http://it.taocm ...
- html5新增语义化标签
注意:body.section.nav 需要h1-h6. div.header则不需要. 1):<article> 显示一个独立的文章内容. 例如一篇完整的论坛帖子,一则网站新闻,一篇博客 ...
- 【2018年全国多校算法寒假训练营练习比赛(第五场)-E】情人节的电灯泡(二维树状数组单点更新+区间查询)
试题链接:https://www.nowcoder.com/acm/contest/77/E 题目描述 情人节到了,小芳和小明手牵手,打算过一个完美的情人节,但是小刚偏偏也来了,当了一个明晃晃的电灯泡 ...