2008年12月18日

原创 XPO中的Session实例和创建Access数据库

创建Access数据库(文件名为:Data.MDF 密码为:123456) String connectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Jet OLEDB:Database Password=123456;Data Source=c:\\Data.MDF;"; ADOX.CatalogClass CreateADOX = new CatalogClass(); CreateADOX.Create(connectionString); 第一: String connectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Jet OLEDB:Database Password=123456;Data Source=c:\\Data.MDF;"; IDataLayer dataLayer = XpoDefault.GetDataLayer(connectionString, AutoCreateOption.DatabaseAndSchema); Sessio阅读全文>

发表于 @ 2008年12月18日 04:49:00|评论(loading...)|编辑|举报|收藏

2008年09月05日

原创 对像写入流,序列化 反序列化


命名空间:using System.Runtime.Serialization.Formatters.Binary;

            //序列化

            IUserReg aIUserReg = (IUserReg)aUserReg;
            //对像写进流
            MemoryStream streamw = new MemoryStream();
            BinaryFormatter f = new BinaryFormatter();
      &nbs阅读全文>

发表于 @ 2008年09月05日 18:12:00|评论(loading...)|编辑|举报|收藏

2008年07月26日

转载 一位老工程师的终告(转贴)

诸位,咱当电子工程师也是十余年了,不算有出息,环顾四周,也没有看见几个有出息的!回顾工程师生涯,感慨万千,愿意讲几句掏心窝子的话,也算给咱们师弟师妹们提个醒,希望他们比咱们强! 阅读全文>

发表于 @ 2008年07月26日 02:46:00|评论(loading...)|编辑|举报|收藏

2008年07月15日

原创 XPO条件一般使用

一般条件:Name为AXPCollection xp = SpecialPlayNu.GetByCompany(DataBase.XpoSession,int.Parse(Session["CompanyId"].ToString())); GroupOperator gxp = new GroupOperator();gxp.Operands.Add(new BinaryOperator("Name", "A"));xp.Filter = gxp;或条件:Name为A或BXPCollection xpClasses2 = PlayeType.GetAll(DataBase.XpoSession);//得到记录集 xpClasses2.Sorting.Add(new SortProperty("Name", SortingDirection.Ascending));//设定排序规则GroupOperator gxp = new GroupOperator(); gxp.Operands.Add(new GroupOper阅读全文>

发表于 @ 2008年07月15日 22:36:00|评论(loading...)|编辑|举报|收藏

原创 DevComponents.DotNetBar.TabControl 在代码中的使用

private DevComponents.DotNetBar.TabControl aTabControl; ((System.ComponentModel.ISupportInitialize)(aTabControl)).BeginInit(); DevComponents.DotNetBar.TabItem aTabItem=new DevComponents.DotNetBar.TabItem(this.components); DevComponents.DotNetBar.TabControlPanel aTabControlPanel=new DevComponents.DotNetBar.TabControlPanel(); aTabControlPanel.Controls.Add("添加到板面的中的组件"); aTabControlPanel.Dock = System.Windows.Forms.DockStyle.Fill; aTabControlPanel.Location = new System.Drawing.Point(0阅读全文>

发表于 @ 2008年07月15日 21:15:00|评论(loading...)|举报|收藏

原创 .NET 一些装饰符

接口:interface 命名空间:namespace 继承 重载 重写 sealed 防止继承 virtual 定义可重写 当要重写时:override public 访问不受限制。 protected 访问仅限于包含类或从包含类派生的类型。 internal 访问仅限于当前程序集。 ................................ ....................................阅读全文>

发表于 @ 2008年07月15日 21:08:00|评论(loading...)|举报|收藏

原创 在C# ASP.NET中,要添加属性到控件中 在HTML页面获取控件中自己定义属性和值

在C# ASP.NET中,要添加属性到控件中: CheckBox c = new CheckBox(); c.ID="testcheckbox"; c.InputAttributes.Add("name2", "这个是自定义添加的name2属性值"); 在HTML页面获取控件中自己定义属性: document.getElementById("testcheckbox").attributes.getNamedItem("name2"); 在HTML页面获取控件中自己定义属性的值: document.getElementById("testcheckbox").attributes.getNamedItem("name2").value; 阅读全文>

发表于 @ 2008年07月15日 21:03:00|评论(loading...)|举报|收藏

2008年06月17日

原创 线程传参 和 Invoke方法的使用

线程传参 和 Invoke方法的使用阅读全文>

发表于 @ 2008年06月17日 06:14:00|评论(loading...)|编辑|举报|收藏

2008年06月03日

原创 window.execScript

在HTML中可以这样 window.execScript(ScriptCode, "javascript 阅读全文>

发表于 @ 2008年06月03日 18:01:00|评论(loading...)|编辑|举报|收藏

原创 线程滚动条C#

线程滚动条C#阅读全文>

发表于 @ 2008年06月03日 16:29:00|评论(loading...)|编辑|举报|收藏

2008年05月26日

原创 aspx.net C# 获取或设置前台元素值

aspx.net C# 获取或设置前台元素值,在此讲的有两种. 阅读全文>

发表于 @ 2008年05月26日 15:49:00|评论(loading...)|编辑|举报|收藏

2008年05月24日

原创 ASP.NET定制简单的错误处理页面

  简单的错误处理页面可以通过web.config来设置 <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">  <error statusCode="403" redirect="NoAccess.htm" />  <error statusCode="404" redirect="FileNotFound.htm" /> </customErrors>   如果想通过编程的方式来呈现错误原因,可以通过Page_Error事件来做这件事。阅读全文>

发表于 @ 2008年05月24日 02:25:00|评论(loading...)|编辑|举报|收藏

2008年05月22日

原创 VB.NET及C#调用API

C#调用API: [DllImport("user32.dll")] public static extern int GetWindow (int hwnd,int wCmd); //在括号里写上API的*.DLL文件名,并在下一行写上API函数原型即: //可在函数原型上写是权限,如公有,私有,在权限后的是static[静态],接着是extern[外部],再来的就是函数原型了 //如以下: [DllImport("user32.dll")] public static extern int FindWindowEx (int hwndParent,int hwndChildAfter,string lpszClass,string lpszWindow); [DllImport("user32.dll")] public static extern int SendMessage (int hwnd,int wMsg,string wParam,string lParam); [DllImport("user32.dll")] public stat阅读全文>

发表于 @ 2008年05月22日 17:52:00|评论(loading...)|编辑|举报|收藏

原创 动态添加WEB控件,点控件获取动态添加的控件

特别注意: 动态添加控件的代码不可放到非IsPostBack里,对动态添加的控件,无论是否IsPostBack都要执行才可以。 比如: Page_Load() { if (!this.IsPostBack) { } this.addControls(); } 阅读全文>

发表于 @ 2008年05月22日 17:48:00|评论(loading...)|编辑|举报|收藏

原创 获取HTML中的父控件方法

function setvalue(v,o) { //var obj=document.getElementById('batchRate'); //windows. alert(o.parentNode.innerHTML); alert(o.parentNode); //parentNode此处也是获取父控件 alert(o.parentElement); //parentElement此处也是获取父控件 alert(o.parentElement.parentNode); //parentElement.parentNode此处也是获取父控件 //o.parentNode.bgColor="red"; o.parentElement.parentNode.bgColor="red"; } 阅读全文>

发表于 @ 2008年05月22日 17:45:00|评论(loading...)|编辑|举报|收藏

Csdn Blog version 3.1a
Copyright © kevery_net