protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { BLL.procate myb = new BLL.procate(); DataSet ds = myb.dataset(); _cateid.DataSource = ds.Tables[0]; _cateid.DataBind(); L_id.Text = Request.QueryString["id"].ToString(); int u_id = Convert.ToInt32( L_id.Text); BLL.product prob = new BLL.product(); MySqlDataReader dr = prob.selectupdate(u_id); if (dr.Read()) { _title.Text = dr["_title"].ToString(); FCKeditor1.Value = dr["_content"].ToString(); _posttime.Text = dr["_posttime"].ToString(); _weight.Text = dr["_weight"].ToString(); _imageid.Text = dr["_imageid"].ToString(); _marketprice.Text = dr["_marketprice"].ToString(); _localprice.Text = dr["_localprice"].ToString(); _procount.Text = dr["_procount"].ToString(); _ischeap.SelectedIndex = Convert.ToInt32(dr["_ischeap"].ToString()); _isrecomment.SelectedIndex = Convert.ToInt32(dr["_isrecommend"].ToString()); _top.SelectedIndex = Convert.ToInt32(dr["_top"].ToString()); _cateid.SelectedIndex = Convert.ToInt32(dr["_cateid"].ToString()) + 1; } dr.Close(); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { BLL.procate myb = new BLL.procate(); DataSet ds = myb.dataset(); _cateid.DataSource = ds.Tables[0]; _cateid.DataBind(); L_id.Text = Request.QueryString["id"].ToString(); int u_id = Convert.ToInt32(L_id.Text); BLL.product prob = new BLL.product(); SqlDataReader dr = prob.selectupdate(u_id); if (dr.Read()) { _title.Text = dr["_title"].ToString(); FCKeditor1.Value = dr["_content"].ToString(); _posttime.Text = dr["_posttime"].ToString(); _weight.Text = dr["_weight"].ToString(); _imageid.Text = dr["_imageid"].ToString(); _marketprice.Text = dr["_marketprice"].ToString(); _localprice.Text = dr["_localprice"].ToString(); _procount.Text = dr["_procount"].ToString(); _ischeap.SelectedIndex = Convert.ToInt32(dr["_ischeap"].ToString()); _isrecomment.SelectedIndex = Convert.ToInt32(dr["_isrecommend"].ToString()); _top.SelectedIndex = Convert.ToInt32(dr["_top"].ToString()); _cateid.SelectedIndex = Convert.ToInt32(dr["_cateid"].ToString()) + 1; } dr.Close(); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { BLL.fathercate my_f = new BLL.fathercate(); DataSet ds_f = my_f.dataset(); Repeater1.DataSource = ds_f.Tables[0]; Repeater1.DataBind(); uid.Text = Request.QueryString["uid"].ToString(); int u_id = Convert.ToInt32(uid.Text); BLL.product prob = new BLL.product(); SqlDataReader dr_pro = prob.selectupdate(u_id); dr_pro.Read(); market.Text = Math.Round(Convert.ToDecimal(dr_pro["_market_price"].ToString()), 2).ToString(); local.Text = Math.Round(Convert.ToDecimal(dr_pro["_local_price"].ToString()), 2).ToString(); image_id.Text = dr_pro["_imageid"].ToString(); title_l.Text = dr_pro["_product_name"].ToString(); content_s.Text = dr_pro["_describe"].ToString(); int cate_id = Convert.ToInt32(dr_pro["_cateid"].ToString()); catename(cate_id); dr_pro.Close(); BLL.proimage b_image = new BLL.proimage(); DataSet ds_image = b_image.select_sizeid(image_id.Text); DataList1.DataSource = ds_image.Tables[0]; DataList1.DataBind(); Image_1.ImageUrl = Convert.ToString(ds_image.Tables[0].Rows[0]["_imageurl"]); im_url = Image_1.ImageUrl; img_url.Text = im_url; d_color.Text = Convert.ToString(ds_image.Tables[0].Rows[0]["_color"]); if (ds_image.Tables[0].Rows[0]["_sizeid"] != null) { string size_id = Convert.ToString(ds_image.Tables[0].Rows[0]["_sizeid"]); sizeid.Text = size_id; siz(sizeid.Text); } } }