山本

导航

2013年5月31日 #

三级联动方法二

摘要: string sqlcon = ConfigurationManager.ConnectionStrings["sqlservercon"].ConnectionString; protected void Page_Load(object sender, EventArgs e) { if(!IsPostBack) { GetProvince(); } } public void GetProvince() { SqlConnection conn = new SqlConnection(sqlcon); conn.Open(); SqlCommand cmd=new S 阅读全文

posted @ 2013-05-31 00:06 高级菜鸟 阅读(237) 评论(2) 推荐(0) 编辑

三级联动方法一

摘要: public partial class WebForm2 : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if(!IsPostBack) { LoadProvince(); } } /// <summary> /// 省份 /// </summary> public void LoadProvince() { BLL.province bpro = new BLL.province(); DataTable dt = bpro.GetList("&qu 阅读全文

posted @ 2013-05-31 00:04 高级菜鸟 阅读(250) 评论(1) 推荐(0) 编辑

构造函数练习

摘要: 新建一个类库,然后添加一个”电脑“类,如下: public class Computer { public Computer() { } public Computer(string brand,string model,double price,string color) { this.Brand = brand; this.Model = model; this.Price = price; this.Color = color; } public string Brand { get; set; } public string Model { get; set; } public dou 阅读全文

posted @ 2013-05-31 00:02 高级菜鸟 阅读(173) 评论(0) 推荐(0) 编辑