protected void Load_loaihd() { LOAIHOPDONGBusiness lhd = new LOAIHOPDONGBusiness(); DataTable loai_hd = lhd.GetList(); loaihd.DataValueField = "loaihdid"; loaihd.DataTextField = "tenhd"; loaihd.DataSource = loai_hd; loaihd.DataBind(); }
protected void Loadloaihopdong(string q) { if (q == "Q") { LOAIHOPDONGBusiness hd = new LOAIHOPDONGBusiness(); DataTable dt = hd.GetList(); danhsachloaihopdong.DataSource = dt; danhsachloaihopdong.DataBind(); } }
protected void them_Click(object sender, EventArgs e) { LOAIHOPDONG hd = new LOAIHOPDONG(); hd.mahd = maloaihopdong.Text; hd.tenhd = tenloaihopdong.Text; LOAIHOPDONGBusiness lhd = new LOAIHOPDONGBusiness(); int i = lhd.Insert(hd); Loadloaihopdong("Q"); }