摘要: AdventureWorksLT2008Entities db = new AdventureWorksLT2008Entities(); var querys = db.Products.Where(p => p.ProductID % 55 == 0).Select(p => new { Id = p.ProductID, LPrice = p.ListPrice, Name = p.Nam... 阅读全文
posted @ 2012-03-12 21:46 joe62 阅读(2384) 评论(2) 推荐(0) 编辑
摘要: 代码如下: public static Image BytesToImage(this byte[] bytes) { Image image = null; if (bytes != null) { using (MemoryStream sm=new MemoryStream(bytes)) { image = Image.FromStream(sm); } } return image; }... 阅读全文
posted @ 2011-05-16 15:38 joe62 阅读(305) 评论(0) 推荐(0) 编辑
摘要: 用.NET 自带的 ImageAnimator类来播放GIF图像 1. 注册动画事件ImageAnimator.Animate(animatedImage, new EventHandler(this.OnFrameChanged)); 2. 在OnFrameChanged事件中调用this.Invalidate(); 3. 在OnPaint中绘当前帧ImageAnimator.UpdateFra... 阅读全文
posted @ 2011-05-13 22:56 joe62 阅读(272) 评论(0) 推荐(0) 编辑
摘要: sapi.dll: %windir%\System32\Speech\Common using SpeechLib;SpVoice voice = new SpVoiceClass(); voice.Speak(text, SpeechVoiceSpeakFlags.SVSFDefault); 阅读全文
posted @ 2011-05-04 09:26 joe62 阅读(188) 评论(0) 推荐(0) 编辑
摘要: 1. Solution:WebApp, WpfAff 2. WebApp add : Silverlight-enabled WCF Service [OperationContract] public IList<Customer> GetCustomers() { List<Customer> results = new List<Customer>(); results.Add(new Customer {LastName="Brown",FisrtName="Pete" }); results.Add(new 阅读全文
posted @ 2011-04-17 11:24 joe62 阅读(209) 评论(0) 推荐(0) 编辑
摘要: 数据类型 (Transact-SQL)Functions (Transact-SQL)运算符 (Transact-SQL)系统存储过程 (Transact-SQL)系统视图 (Transact-SQL) 1. 语法: BULK INSERT (Transact-SQL) DELETE (Transact-SQL) EXECUTE (Transact-SQL) FROM (Transact-SQL... 阅读全文
posted @ 2011-04-16 17:11 joe62 阅读(785) 评论(0) 推荐(0) 编辑
摘要: 简述:EF4.1包括Code First和DbContext API。DbContext API为EF提供更多的工作方式:Code First,Database First和Model First。 使用DbContext构造函数 1. Code First约定连接 namespace Magic.Unicorn{ public class UnicornsContext : DbContext ... 阅读全文
posted @ 2011-04-10 20:24 joe62 阅读(18390) 评论(3) 推荐(6) 编辑
摘要: 1. public class Blog{ … public virtural ICollection<Post> Posts{get;set;}} public class Post{… public ICollection<Comment> Comments{get;set;}} public class Comment{… public Post Post{get;set;}} 2. pub... 阅读全文
posted @ 2011-04-10 15:13 joe62 阅读(922) 评论(0) 推荐(0) 编辑
摘要: 实然发现Dropbox能正常使用了 阅读全文
posted @ 2011-02-14 09:30 joe62 阅读(280) 评论(0) 推荐(0) 编辑
摘要: UDP_Server:UDP_Client 阅读全文
posted @ 2010-06-23 17:54 joe62 阅读(8727) 评论(1) 推荐(1) 编辑