摘要: public static SPFieldUserValue GetUserValue(string name) { SPFieldUserValue userColl = new SPFieldUserValue(); SPSecurity... 阅读全文
posted @ 2014-07-15 11:25 Toby Wang 阅读(199) 评论(0) 推荐(0) 编辑
摘要: protected void Repeater1_ItemCommand(object source, RepeaterCommandEventArgs e) { if (e.CommandName == "delete") { ... 阅读全文
posted @ 2014-07-15 11:24 Toby Wang 阅读(628) 评论(0) 推荐(0) 编辑
摘要: FileStream fileStrem = new FileStream(templatePath, FileMode.Open); long fileSize = fi... 阅读全文
posted @ 2014-07-15 11:19 Toby Wang 阅读(431) 评论(0) 推荐(0) 编辑
摘要: 等等using System;using Microsoft.SharePoint;using Microsoft.SharePoint.WebControls;using Microsoft.Office.Interop.Excel;using System.Web;using System.Da... 阅读全文
posted @ 2014-07-15 11:18 Toby Wang 阅读(421) 评论(0) 推荐(0) 编辑
摘要: /// /// Excel导入DataTable /// /// 文件名称 /// 是否包含表头 /// Sheet /// 错误信息 /// 导入的Excel的开始行 ... 阅读全文
posted @ 2014-07-15 11:14 Toby Wang 阅读(408) 评论(0) 推荐(0) 编辑
摘要: using System;using Microsoft.SharePoint;using Microsoft.SharePoint.WebControls;using Microsoft.Office.Interop.Excel;using System.Data;using System.Web... 阅读全文
posted @ 2014-07-15 11:13 Toby Wang 阅读(518) 评论(0) 推荐(0) 编辑
摘要: public static System.Data.DataTable GetDataTable( int parentId, SPList list ,System.Data.DataTable dt, int ceng) { SPQuery query = n... 阅读全文
posted @ 2014-07-15 11:12 Toby Wang 阅读(263) 评论(0) 推荐(0) 编辑
摘要: .NET导出Excel遇到的80070005错误的解决方法: 检索 COM 类工厂中 CLSID 为 {00024500-0000-0000-C000-000000000046}的组件时失败,原因是出现以下错误: 80070005基本上.net导出excel文件,都需要如此配置一下,不配置有的时候没... 阅读全文
posted @ 2014-07-15 11:10 Toby Wang 阅读(496) 评论(0) 推荐(0) 编辑
摘要: public static void DataTabletoExcel(System.Data.DataTable tmpDataTable, string strFileName) { if (tmpDataTable == null ) ... 阅读全文
posted @ 2014-07-15 11:09 Toby Wang 阅读(318) 评论(0) 推荐(0) 编辑
摘要: int n = list.GetItemById(1).Versions.Count;//获取版本的数量 for (int i = n - 1; i >= 0; i--){ if (list.GetItemById(1).Versions[i]["Title"] != null) ... 阅读全文
posted @ 2014-07-15 11:07 Toby Wang 阅读(141) 评论(0) 推荐(0) 编辑
摘要: SPSecurity.RunWithElevatedPrivileges(delegate { using (var site = new SPSite(StrUrl)) { #r... 阅读全文
posted @ 2014-07-15 11:05 Toby Wang 阅读(250) 评论(0) 推荐(0) 编辑
摘要: using System;using Microsoft.SharePoint;using Microsoft.SharePoint.WebControls;using Microsoft.Office.Interop.Excel;using System.IO;using System.Refle... 阅读全文
posted @ 2014-07-15 11:03 Toby Wang 阅读(240) 评论(0) 推荐(0) 编辑
摘要: ////// 为DropDownList帮定数据//////需要绑定的控件///列表地址,如:Lists/Type/AllItems.aspx///web网站地址,如http://demo1/,为动态获取publicvoidSelectBindData(DropDownListselect,st... 阅读全文
posted @ 2014-07-15 10:58 Toby Wang 阅读(193) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2014-07-15 10:57 Toby Wang 阅读(1015) 评论(0) 推荐(0) 编辑
摘要: protected void OkButton_Click(object sender, EventArgs e) { if (fileUpload.HasFile) { string strLoginName = HttpContext.Current.User.Identity.Name.ToS... 阅读全文
posted @ 2014-07-15 10:11 Toby Wang 阅读(150) 评论(0) 推荐(0) 编辑
摘要: SPList typeList = web.Lists["类别" ]; foreach (SPListItem type in typeList.Items) { ... 阅读全文
posted @ 2014-07-15 10:08 Toby Wang 阅读(207) 评论(0) 推荐(0) 编辑
摘要: "$" 是在jquery里面定义的。在一次项目中遇见这个错误:“$ is not defined error”.找了半天,网上都说是$没有定义,或者是js没有引入,但是我确实导入了。后来看到一片文章,才发现是js引入的时候顺序错了,给Jquery放在了后面引入,但是我前面已经用到jquery了。如果... 阅读全文
posted @ 2014-07-15 10:06 Toby Wang 阅读(173) 评论(0) 推荐(0) 编辑
摘要: 1 2 3 4 5 6 7 提醒发送到手机 8 9 10 11 每天提醒... 阅读全文
posted @ 2014-07-15 10:04 Toby Wang 阅读(190) 评论(0) 推荐(0) 编辑
摘要: SPSecurity.RunWithElevatedPrivileges(delegate()) 阅读全文
posted @ 2014-07-15 10:03 Toby Wang 阅读(174) 评论(0) 推荐(0) 编辑
摘要: 1 SPSecurity.RunWithElevatedPrivileges(delegate () 2 { 3 SPWebCollection sPWebCollection =... 阅读全文
posted @ 2014-07-15 10:01 Toby Wang 阅读(152) 评论(0) 推荐(0) 编辑