08 2011 档案

Linq Distinct
摘要:var t = (from orders in replenismentOrders where (string .IsNullOrEmpty (conditDTO .OrderId) || orders .ID ==conditDTO .OrderId) &&(string .IsNullOrEmpty (conditDTO .RVC )|| orders .RVC .ID ==conditDTO .RVC) &&(string .IsNullOrEmpty (conditDTO .OrderStatus.ToString())|| orders .Reple 阅读全文

posted @ 2011-08-27 15:32 EveryMan

页面返回
摘要:<input type=button value=刷新 onclick= "window.location.reload() "> <input type=button value=前进 onclick= "window.history.go(1) "> <input type=button value=后退 onclick= "window.history.go(-1) "> <input type=button value=前进 onclick= "window.history. 阅读全文

posted @ 2011-08-26 13:49 EveryMan

Gridview传参
摘要:<a href='<%# Eval("ID","s.aspx?Rpl_No={0}& Type=R_AMEND") %>'> <asp:Label runat ="server" Text ='<%#Eval("ID")%>'></asp:Label></a> 阅读全文

posted @ 2011-08-25 11:12 EveryMan

去除末尾字符
摘要:if (no.EndsWith(",")) { no = no.Substring(0, no.Length - 1); } 阅读全文

posted @ 2011-08-19 13:37 EveryMan

C#抽象类与接口的区别
摘要:一、抽象类:抽象类是特殊的类,只是不能被实例化;除此以外,具有类的其他特性;重要的是抽象类可以包括抽象方法,这是普通类所不能的。抽象方法只能声明于抽象类中,且不包含任何实现,派生类必须覆盖它们。另外,抽象类可以派生自一个抽象类,可以覆盖基类的抽象方法也可以不覆盖,如果不覆盖,则其派生类必须覆盖它们。1publicabstractclassA2{3privateint?num=null;45publicint?Num6{7get{returnnum;}8set{num=value;}9}1011publicvirtualint?getNum()12{13returnnum;14}1516publ 阅读全文

posted @ 2011-08-09 14:27 EveryMan

C#接口实现
摘要:C#可用interface IDrivable实现接口:/* 2 Example8_1.cs illustrates interfaces 3 */ 4 5 using System; 6 7 8 // define the IDrivable interface 9 public interface IDrivable10 {11 12 // method declarations13 void Start();14 void Stop();15 16 // property declaration17 bool Started18 {19 get;20 }21 22 }23 24 25 / 阅读全文

posted @ 2011-08-09 14:04 EveryMan

深入浅出分析C#接口的作用
摘要:1、C#接口的作用 :C#接口是一个让很多初学C#者容易迷糊的东西,用起来好像很简单,定义接口,里面包含方法,但没有方法具体实现的代码,然后在继承该接口的类里面要实现接口的所有方法的代码,但没有真正认识到接口的作用的时候就觉得用接口是多此一举,当然你这样想那是绝对绝对错误的,比尔盖茨的微软请的员工都是比盖茨还聪明的人,他们的C#能添这样的多足吗?!关于接口的作用,网上有一位就真的深入浅出给我们做了很好理解的分析。 我们定义一个接口public interface IBark{ void Bark();}再定义一个类,继承于IBark,并且必需实现其中的Bark()方法public class 阅读全文

posted @ 2011-08-09 14:03 EveryMan

导航