上一页 1 ··· 8 9 10 11 12 13 14 15 16 下一页
摘要: //取出xml文件的全路径 string path = Server.MapPath("App_Data/new.xml"); //导入XML文件 XElement xe = XElement.Load(path); //用LINQ查找要操作的元素 IEnumerable<XElement> element = from ee in xe.Elements("Person") where ee.Attribute("IDCard").Value == "22030219771... 阅读全文
posted @ 2013-01-19 15:16 yellowshorts 阅读(188) 评论(0) 推荐(0) 编辑
摘要: //取出xml文件的全路径 string path = Server.MapPath("App_Data/new.xml"); //导入XML文件 XElement xe = XElement.Load(path); //用LINQ查找要删除的元素 IEnumerable<XElement> element = from ee in xe.Elements("Person") where ee.Attribute("IDCard").Value == "22030219881... 阅读全文
posted @ 2013-01-19 15:15 yellowshorts 阅读(282) 评论(0) 推荐(0) 编辑
摘要: //取出xml文件的全路径 string path = Server.MapPath("App_Data/new.xml"); //导入XML文件 XElement xe = XElement.Load(path); //用LINQ查找要修改的元素 IEnumerable<XElement> element = from ee in xe.Elements("Person") where ee.Attribute("IDCard").Value == "220302198810... 阅读全文
posted @ 2013-01-19 15:14 yellowshorts 阅读(724) 评论(0) 推荐(0) 编辑
摘要: //取出xml文件的全路径 string path = Server.MapPath("App_Data/new.xml"); //导入XML文件 XElement xe = XElement.Load(path); //创建一个新节点 XElement newPerson = new XElement("Person", new XAttribute("IDCard", "22030219881012***"), new XElement("Name", "李四"), .. 阅读全文
posted @ 2013-01-19 15:12 yellowshorts 阅读(134) 评论(0) 推荐(0) 编辑
摘要: //设置xml文件存放的目录 string path = Server.MapPath("App_Data/new.xml"); //使用LINQ创建xml文件的内容 XDocument doc = new XDocument( new XDeclaration("1.0", "utf-8", "yes"), new XElement("People", new XElement("Person", new XAttribute("IDC... 阅读全文
posted @ 2013-01-19 15:10 yellowshorts 阅读(146) 评论(0) 推荐(0) 编辑
摘要: DataSet ds = new DataSet();//创建数据集 string conStr = "Server=.;Database=ExpatiateAspNet;uid=sa;pwd="; //创建数据连接 using (SqlConnection con = new SqlConnection(conStr)) { //创建数据适配器 SqlDataAdapter sda = new SqlDataAdapter("select * from UserInfo", con); con.Open();... 阅读全文
posted @ 2013-01-19 15:03 yellowshorts 阅读(1417) 评论(0) 推荐(0) 编辑
摘要: //取“Dir1”的路径 string dir1 = Server.MapPath("~/App_Data/Dir1/"); //取“Dir1”中的文件信息 List<FileInfo> files1 = new List<FileInfo>(); foreach (string file in Directory.GetFiles(dir1)) { files1.Add(new FileInfo(file)); } //取“Dir2”的路径 string d... 阅读全文
posted @ 2013-01-19 14:31 yellowshorts 阅读(269) 评论(0) 推荐(0) 编辑
摘要: //给字符串变量赋值 string text = @"A better activation model is to allocate an object for a client only while a call is in progress from the client to the service. That way, you have to create and maintain only as many objects in memory as there are concurrent calls, not as m... 阅读全文
posted @ 2013-01-19 14:26 yellowshorts 阅读(517) 评论(0) 推荐(0) 编辑
摘要: string text = @"var query = from info in infoList where info.AuditFlag == null || info.AuditFlag == false join emp in empList on info.SaleMan equals emp.EmployeeCode join house in houseList on info.WareHouse equals house.WareHouseCode join clien... 阅读全文
posted @ 2013-01-19 14:19 yellowshorts 阅读(192) 评论(0) 推荐(0) 编辑
摘要: string text = @"A better activation model is to allocate an object for a client only while a call is in progress from the client to the service. That way, you have to create and maintain only as many objects in memory as there are concurrent calls, not as many objects as there are o... 阅读全文
posted @ 2013-01-19 14:15 yellowshorts 阅读(256) 评论(0) 推荐(0) 编辑
上一页 1 ··· 8 9 10 11 12 13 14 15 16 下一页