To xinyulou(心雨楼):
什么办法呢?
什么办法呢?
解决方案 »
- 能否从数据库表中查询出该表某列不同取值的个数以及值分别是什么?
- C#多个窗体的问题。。。
- 新手求教记事本程序
- 写一个C#程序,自动获取sql2005里面所有的数据库
- c#如何快速操作大的文本文件
- ConfigurationElement与ConfigurationSection的问题?
- 后台添加GirdView,将其中一列设置为Linkbutton
- 高手急救:有关消息队列问题,为什么我发送消息后,我查该消息的值时,为什么前面会出现一串乱字符,
- 如何判断读取文本的一行都是空呢?
- 一个字符串中有两个“解析”,我只要把第一个替换成“答案”,最简单的方法是什么
- 提供vs.net 2003(中文)、movie、music、tools下载,谁把msdn2003上传一下?
- 狗是什么呀??
http://expert.csdn.net/Expert/topic/1887/1887810.xml?temp=4.668826E-02
private DataView sourceView;
this.OnlyOneAdapter.strSQL=string.Format("select ID,ShiJian,CaoZuoRen,ZhongLei,ShuLiang,QiHao,ZiHao,FangFa,ND,convert(bit,0) as DF,datareturn from T_DangAn_JiLu where LeiBie='{0}' and Flag=0 and ND='{1}' and CaoZuoRen='{2}'","文件",this.ND,this.CaoZuoRen);
this.OnlyOneAdapter.GiveMeData(out ds);
dataGrid1.SetDataBinding(ds,"Table");
sourceCM = (CurrencyManager)this.BindingContext[dataGrid1.DataSource, dataGrid1.DataMember];
sourceView=((DataView)sourceCM.List);
sourceView.AllowNew=false;
sourceView.AllowDelete=false; private void getnetcomputername() //取局域网内的全部计算机
{
//or use "WinNT://your_domain_name"
DirectoryEntry root = new DirectoryEntry("WinNT:");
DirectoryEntries domains = root.Children;
domains.SchemaFilter.Add("domain");
foreach (DirectoryEntry domain in domains)
{
string ss=domain.Name.ToString();
// if(domain.Name.ToString()==domain_name)
// {
DirectoryEntries computers = domain.Children;
computers.SchemaFilter.Add("computer");
foreach (DirectoryEntry computer in computers)
{
try
{
IPHostEntry iphe = Dns.GetHostByName(computer.Name);
foreach (IPAddress ip in iphe.AddressList)
{
this.LB.Items.Add(computer.Name);
}
DirectoryEntries users = computer.Children;
}
catch(Exception){}
}
// }
}
}