· 根据自己平时的经验写的针对SQLSERVER操作的通用类库
using System;
using System.Data;
using System.Data.SqlClient;
using System.Web;namespace Whgw_lc
{/// <summary>/// Data 的摘要说明。/// </summary>/// <summary>/// 数据库相关操作类/// 作者:DarkAngel/// 时间:...
· 假设有一下一个实体类。using System;
using System.XML;
using System.XML.Serialization;namespace TestPerson
{ public class Person{ public string FullName;[NonSerialized()]public string Password;public Male sex; }public enum Male{M,F}
}先决定用XML 序列化把对象的状态dump到一个XM...
· using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Net;
using System.Threading;namespace WindowsApplication1
{/// <summary>/// Form1 的摘要说明。/// </summary>public class Form1 : Sys...
· Confirmation Page1. IntroductionIn New or Edit page, users might press the Close button by mistake and lost the content that they have input. To avoid this mistaken action, application should prompt users before the page is closed. This page will not be closed unless use...
· 其实非常简单,就是用SqlDataAdapter的update方法就行了。主要代码例如下所示:
private void update(){string link = ConfigurationSettings.AppSettings["link_local"].ToString();SqlConnection conn = new SqlConnection(link);SqlDataAdapter da = new SqlDataAdapter("SELECT...
· 在.NET Data Access Architecture Guide一文中看到的几种保存ConnectionString的方法:In an application configuration file 优点:易部署,易编程控制,支持动态更新缺点:安全性 In a Universal Data Link (UDL) file (supported only by the OLE DB .NET Data Provider) 优点:标准方案缺点:性能,安 ...