//保存排序 protected void btnSave_Click(object sender, EventArgs e) { ChkAdminLevel("productsys", MXEnums.ActionEnum.Edit.ToString()); //检查权限 BLL.wx_product_sys bll = new BLL.wx_product_sys(); for (int i = 0; i < rptList.Items.Count; i++) { int id = Convert.ToInt32(((HiddenField)rptList.Items[i].FindControl("hidId")).Value); int sortId; if (!int.TryParse(((TextBox)rptList.Items[i].FindControl("txtSortId")).Text.Trim(), out sortId)) { sortId = 99; } bll.UpdateField(id, "sort_id=" + sortId.ToString()); } AddAdminLog(MXEnums.ActionEnum.Edit.ToString(), "保存产品库排序"); //记录日志 JscriptMsg("保存排序成功!", "product_Sys.aspx", "Success"); }
//保存排序 protected void btnSave_Click(object sender, EventArgs e) { ChkAdminLevel("productsys", MXEnums.ActionEnum.Edit.ToString()); //检查权限 BLL.wx_product_sys bll = new BLL.wx_product_sys(); for (int i = 0; i < rptList.Items.Count; i++) { int id = Convert.ToInt32(((HiddenField)rptList.Items[i].FindControl("hidId")).Value); int sortId; if (!int.TryParse(((TextBox)rptList.Items[i].FindControl("txtSortId")).Text.Trim(), out sortId)) { sortId = 99; } bll.UpdateField(id, "sort_id=" + sortId.ToString()); } AddAdminLog(MXEnums.ActionEnum.Edit.ToString(), "保存产品库排序"); //记录日志 JscriptMsg("保存排序成功!", "product_Sys.aspx", "Success"); }
private void ProductTreeBind() { BLL.wx_product_sys sbll = new BLL.wx_product_sys(); Model.wx_userweixin weixin = GetWeiXinCode(); DataTable dt = sbll.GetWCodeList(weixin.id); this.ddlPStore.Items.Clear(); this.ddlPStore.Items.Add(new ListItem("默认产品库", "0")); foreach (DataRow dr in dt.Rows) { string Id = dr["id"].ToString(); string Title = dr["title"].ToString().Trim(); this.ddlPStore.Items.Add(new ListItem(Title, Id)); } }
private void ProductTreeBind() { BLL.wx_product_sys sbll = new BLL.wx_product_sys(); Model.wx_userweixin weixin = GetWeiXinCode(); DataTable dt = sbll.GetWCodeList(weixin.id); this.ddlPStore.Items.Clear(); this.ddlPStore.Items.Add(new ListItem("默认产品库", "0")); foreach (DataRow dr in dt.Rows) { string Id = dr["id"].ToString(); string Title = dr["title"].ToString().Trim(); this.ddlPStore.Items.Add(new ListItem(Title, Id)); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { BLL.wx_product_sys bll = new BLL.wx_product_sys(); IList <Model.wx_product_sys> sys = bll.GetModelList("wid=" + wid + " and id=" + pid); if (sys != null && sys.Count >= 0) { imgBanner.ImageUrl = sys[0].banner; this.Title = sys[0].title; } else { imgBanner.Style.Add("display", "none"); } BindTypeData(); BindPageInfoData(); BindRepeater(MyCommFun.RequestInt("page", 1)); } }
//数据绑定 private void RptBind() { BLL.wx_product_sys bll = new BLL.wx_product_sys(); Model.wx_userweixin weixin = GetWeiXinCode(); DataTable dt = bll.GetWCodeList(weixin.id); if (dt != null) { DataRow dr; for (int i = 0; i < dt.Rows.Count; i++) { dr = dt.Rows[i]; if (dr["banner"] != null && dr["banner"].ToString().Trim() != "") { if (dr["banner"].ToString().Contains(".")) { dr["banner"] = "<img src=\"" + dr["banner"].ToString() + "\" class=\"imgico\" />"; } else { dr["banner"] = "<span class=\"" + dr["banner"].ToString() + "\" />"; } } //链接处理,待做 if (dr["link_url"] != null && dr["link_url"].ToString().Trim() != "") { dr["link_url"] = "<span class=\"lianjie_wai\">[外]</span>" + " <a href=\"javascript:;\">" + dr["link_url"] + "</a>"; } else { dr["link_url"] = "<span class=\"lianjie_ben\">[本]</span>" + " <a href=\"javascript:;\">" + MyCommFun.getWebSite() + "/weixin/product/all.aspx?wid=" + MyCommFun.ObjToStr(dr["wid"]) + "&pid=" + dr["id"] + "</a>"; } } } this.rptList.DataSource = dt; this.rptList.DataBind(); }
//数据绑定 private void RptBind() { BLL.wx_product_sys bll = new BLL.wx_product_sys(); Model.wx_userweixin weixin = GetWeiXinCode(); DataTable dt = bll.GetWCodeList(weixin.id); if (dt != null) { DataRow dr; for (int i = 0; i < dt.Rows.Count; i++) { dr = dt.Rows[i]; if (dr["banner"] != null && dr["banner"].ToString().Trim() != "") { if (dr["banner"].ToString().Contains(".")) { dr["banner"] = "<img src=\"" + dr["banner"].ToString() + "\" class=\"imgico\" />"; } else { dr["banner"] = "<span class=\"" + dr["banner"].ToString() + "\" />"; } } //链接处理,待做 if (dr["link_url"] != null && dr["link_url"].ToString().Trim() != "") { dr["link_url"] = "<span class=\"lianjie_wai\">[外]</span>" + " <a href=\"javascript:;\">" + dr["link_url"] + "</a>"; } else { dr["link_url"] = "<span class=\"lianjie_ben\">[本]</span>" + " <a href=\"javascript:;\">" + MyCommFun.getWebSite() + "/weixin/product/all.aspx?wid=" + MyCommFun.ObjToStr(dr["wid"]) + "&pid=" + dr["id"] + "</a>"; } } } this.rptList.DataSource = dt; this.rptList.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { BLL.wx_product_sys bll = new BLL.wx_product_sys(); IList<Model.wx_product_sys> sys = bll.GetModelList("wid=" + wid+" and id="+pid); if (sys != null && sys.Count >= 0) { imgBanner.ImageUrl = sys[0].banner; this.Title = sys[0].title; } else { imgBanner.Style.Add("display", "none"); } BindTypeData(); BindPageInfoData(); BindRepeater(MyCommFun.RequestInt("page", 1)); } }