C# List.Sort() 排序; DataView 对DataTable 排序

摘要: List<string> sortedHeight = new List<string>(); foreach (var cs in contourDoc.SelectNodes("Xml/ContourSet")) { XmlElement tempEle = cs as XmlElement; sortedHeight.Add(tempEle.Attributes["height"].Value); } sortedHeight.Sor... 阅读全文
posted @ 2012-07-13 17:23 imihiro 阅读(2485) 评论(0) 推荐(0)

C# 语言特性(继承)

摘要: (1)只能继承1个基类, 可继承多个接口 阅读全文
posted @ 2012-07-13 16:39 imihiro 阅读(152) 评论(0) 推荐(0)

AE Contour和ContourAsPolyline

摘要: 转自http://www.cnblogs.com/cglNet/archive/2011/03/03/1970061.html感谢cglNet分享(1)ISurfaceOp.Contour 根据DEM生成等高线图层: private void button1_Click(object sender, EventArgs e) { //得到Raster ILayer tLayer=this.axMapControl1.get_Layer(0); IRasterLayer tRasterLayer=(IRa... 阅读全文
posted @ 2012-07-13 15:06 imihiro 阅读(1020) 评论(0) 推荐(1)

MVC EF 建立表关联, 关联查询实现

摘要: 例1:>Model中体现1对多>DbContext两个表都已声明>Controller中使用Include("表名")即可//效果示意:例2:显示Album表字段 关联到 Genre和Artist字段 阅读全文
posted @ 2012-07-13 11:29 imihiro 阅读(20999) 评论(2) 推荐(2)

C# Keyword(base,protected, override,....)

摘要: (1)protected The protected keyword is a member access modifier. A protected member is accessible from within the class in which it is declared, and from within any class derived from the class that declared this member. //proteted修饰的方法 (本类 和 派生类 内部可访问)class A { protected int x = 123;}class B : A {.. 阅读全文
posted @ 2012-07-13 08:51 imihiro 阅读(843) 评论(0) 推荐(0)

MVC Music Sotre -2

摘要: 七、使用EF快速完成CRUD功能(1)新建Artist,Genre,Album3个类,用属性显示3张表的关联(2)添加DbContext类(对应数据库),添加DbSet<Model>(对应表)>画出数据库设计图(表、表间关系),手动、UML、SQL的工具均可>添加Album、Genre、Artist类,和DbContext类 public class DbMusicContext:DbContext //相当于数据库 { public DbSet<Album> Albums { get; set; } //Album表 public DbSet<Gen 阅读全文
posted @ 2012-07-13 08:22 imihiro 阅读(2450) 评论(0) 推荐(0)