摘要: namespace Console运算符重载{ /// <summary> /// 这种写法类似于集成的计算方式,比较专业 /// </summary> class Class1 { public int a; public int a1; public Class1(int c, int b ) { a = c; a1 = b; } //public Class1(double cc) //{ // a1 = cc; //} //说明:implicit 关键字隐式转换指定用在将 Class 类型转换成为 int 类型,换成 explicit 就会报错 //public 阅读全文
posted @ 2012-07-13 19:12 blog_yuan 阅读(132) 评论(0) 推荐(0) 编辑
摘要: using System.Web.Caching;namespace PetShop.ICacheDependency { /// <summary> /// This is the interface that the DependencyFactory (Factory Pattern) returns. /// Developers could implement this interface to add different types of Cache Dependency to Pet Shop. /// </summary> public interfac 阅读全文
posted @ 2012-07-07 22:24 blog_yuan 阅读(140) 评论(0) 推荐(0) 编辑
摘要: <?xml version="1.0"?><configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0"><connectionStrings><!-- SQL connection string for Profile database --><add name="SQLProfileConnString" connectionString="CONFIG_SQL_PROFILE&qu 阅读全文
posted @ 2012-07-07 22:22 blog_yuan 阅读(191) 评论(0) 推荐(0) 编辑
摘要: <%@ OutputCacheLocation="Any" 输出缓存可以位于发出请求的客户端浏览器,代理服务器,处理请求的服务器,对应于HttpCacheability.publicLocation="Client" 输出缓存位于发出请求的客户端,对应于HttpCacheability.privateLocation="Downstream" 输出缓存可以存储在任何HTTP1.1 可缓存设备中,源服务器除外,这包裹代理服务器和发出的请求的客户端。Location="server" 输出缓存可以位于处理请求的 阅读全文
posted @ 2012-07-07 22:13 blog_yuan 阅读(451) 评论(0) 推荐(0) 编辑
摘要: public static class CacheHelper{ public static System.Collections.Generic.List Products { get { HttpContext context = HttpContext.Current; List list ... 阅读全文
posted @ 2012-07-07 13:36 blog_yuan 阅读(217) 评论(0) 推荐(0) 编辑
摘要: public class CacheCD{ public static string GetMessageByCache//使用方法和属性都可以被HtmlEncode()传回去 { //HttpContext context = HttpContext.Current; get { //string message = context.Cache[ "Message" ] as string; string message = HttpRuntime.Cache[ "Message" ] as string; if ( message == null ) 阅读全文
posted @ 2012-07-06 11:54 blog_yuan 阅读(647) 评论(0) 推荐(0) 编辑
摘要: protected void BtnSace_Click( object sender, EventArgs e ) { int cellCount = int.Parse( this.TextBox1.Text ); int rowCount = int.Parse( this.TextBox2.Text ); string data = this.TextBox3.Text; for ( int i = 0; i < rowCount; i++ ) { TableRow row = new TableRow( ); Table1.Rows.Add( row ); string inp 阅读全文
posted @ 2012-07-01 18:33 blog_yuan 阅读(336) 评论(0) 推荐(0) 编辑
摘要: [WebMethod] public DataTable Show( string filename) { XmlSerializer ser = new XmlSerializer( typeof( DataTable ) ); DataTable table = new DataTable( "User" ); DataColumn col = new DataColumn( "string" ); table.Columns.Add( col ); DataRow r; for ( int i = 0; i < 10; i++ ) { r = 阅读全文
posted @ 2012-07-01 13:04 blog_yuan 阅读(2117) 评论(0) 推荐(0) 编辑
摘要: create or replace procedure pro_cursor_type_Vast_tmp table3%rowtype;type c_type is ref cursor;cur c_type; v_taname varchar2(100);beginv_taname:='aa';open cur for 'select * from table3 where taname=:a order by taid desc' --a只是绑定变量的占位符以 =: 符号进行绑定 using v_taname; dbms_output.put_line(&# 阅读全文
posted @ 2012-06-21 19:10 blog_yuan 阅读(435) 评论(0) 推荐(0) 编辑
摘要: create or replace procedure pro_cursor_delete( inpit_taid number)as v_taid number;cursor c_delete is select taid from table3 where taid=inpit_taid for update of taid; --锁定taid列的单行值,防止所有的数据被删除了beginopen c_delete;loopfetch c_delete into v_taid; exit when c_delete%notfound; delete table3 where taid=inp 阅读全文
posted @ 2012-06-13 21:48 blog_yuan 阅读(1399) 评论(0) 推荐(0) 编辑