DataTable myDt =dt;
//删除列
myDt.Columns.Remove('minArea');
myDt.Columns.Remove('maxArea');
//调整列顺序 ,列排序从0开始
myDt.Columns['num'].SetOrdinal(1);
//修改列标题名称
dt.Columns['num'].ColumnName = '搜索量';
dt.Columns['rate'].ColumnName = '百分比';
加载中…
加载中…
加载中…
标签:
dabletable字段顺序it |
分类: c# |
DataTable myDt =dt;
//删除列
myDt.Columns.Remove('minArea');
myDt.Columns.Remove('maxArea');
//调整列顺序 ,列排序从0开始
myDt.Columns['num'].SetOrdinal(1);
//修改列标题名称
dt.Columns['num'].ColumnName = '搜索量';
dt.Columns['rate'].ColumnName = '百分比';
if not exists(select * from syscolumns where
id=object_id('TManagerReg') and name='SectionName')
print('you')
else print('meiyou')
create procedure [dbo].[POS_GetSalesInfo]
@parentID varchar(36)
as
begin
select
TUserBaseInfo.UserID,
TUserBaseInfo.UserType,
TUserBaseInfo.LoginID,
TUserBaseInfo.LPassword,
TUserBaseInfo.LastLoginDate,
TUserReg.CompanyName,
TUserReg.ContactPersonName,
TUserReg.Tel,
TUserReg.Mobile,
TUserReg.Fax,
TUserReg.Email,
TUserReg.CompanyAddress,
TUserReg.CompanyNameEN,
TUserMapping.ID,
TUserMapping.ParentID,
TUserMapping.ParentType
from TUserBaseInfo
end
标签:
webservice大数据传输杂谈 |
分类: c# |
控制台程序,没有注释,在我本机10G数据量没有问题
using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
namespace controtest
{
好吧,我想我的写写了。我用的方法很简单,首先先把大文件转换成byte数组,然后调用webservice将byte数组转换成文件。但是如果文件大小超过25M的时候会超时,所以我将这个数组分批传输,每一批都是一个20M的byte数组,然后把这些数组追加,最后形成一个完整的文件。注意在形成文件的时候要判断要生成的文件是否存在,否则如果文件已经存在的话,该文件不会被覆盖,而是被追加。
using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
namespace controtest
{
首先启用导入导出功能,执行以下脚本
sp_configure 'show advanced options', 1;
go
reconfigure;
go
sp_configure 'xp_cmdshell', 1;
go
reconfigure;
go
然后执行这个,以下是POSWebsales2数据库的TSAPOrder
sa是用户名password是密码
exec
if OBJECT_ID('gTBulletin') is not null--貌似这个更准确一点
if exists
(select count(*) from sysobjects where id =
object_id('数据库名.Owner.表名'))
print '存在'
else
print '不存在'
Excel表格的第二种读取方法,类似于数组操作。
我们知道Excel是由许多单元格组成,我们可以把这些单元格看作是数组中的元素。而Excel就是数组的集合。
例如表示某个单元格,语句如下:
wSheet.Cells[x, y]
//x,y从1开始,例如wSheet.Cells[2, 3]表示第一行第三列的单元格
举个例子:
using Microsoft.Office.Interop.Excel;
using Aspose.Excel;
using System.Reflection;
标签:
sharepoint对象模型杂谈 |
分类: moss |
sharepoint对象模型及相关属性
首先介绍关于SharePoint对象模型的开发简单的入门
SharePoint对象模型概述
一些基本对象
Farm, Service, Web Application, Site, Web
List, View, Field, Item
几个主要功能
文件结构
权限系统
查询
集合(Collection)
很多对象都有集合
SPWeb–SPWebCollection
SPList - SPListCollection
…
操作
Get:xxCollection[idx], xxCollection.GetxxxByxxx
Add: xxCollection.Add
Del: xxCollection.Delete, xx.Delete, xx.Recycle
Update: xx.Update
集合(Collection)
向下访问
site.AllWebs
web.Lists
list.Views
…
向上访问
web.Site
list.ParentWeb
view.ParentList
…
四种Url
absolute url
[moss]
server-relative url
/sites/myweb/doc/folder/file.doc
xx.ServerRelativeUrl
site-relative url
doc/folder/file.doc
xx.Url
relative url
file.doc (base = folder)