public void MyBind() { DataTable dt = new DataTable(); if (!string.IsNullOrEmpty(KeyWord)) { if (DataConverter.CLng(KeyWord) > 0) { dt = bll.ProductSearch(NodeID, 10, KeyWord); } else { dt = bll.ProductSearch(NodeID, 0, KeyWord); } } else { dt = bll.GetProductAll(NodeID, StoreID, QuickSouch, Pid); } string byfilde = txtbyfilde.SelectedValue.ToString(); string byOrder = txtbyOrder.SelectedValue.ToString(); if (!string.IsNullOrEmpty(byfilde)) { dt.DefaultView.Sort = byfilde + " " + byOrder; dt = dt.DefaultView.ToTable(); } countsp.InnerText = dt.Rows.Count.ToString(); EGV.DataSource = dt; EGV.DataBind(); }
public void MyBind() { M_UserInfo mu = buser.GetLogin(); M_CommonData storeMod = conBll.SelMyStore_Ex(); DataTable dt = new DataTable(); if (string.IsNullOrEmpty(KeyWord)) { dt = bll.GetProductAll(NodeID, storeMod.GeneralID, QuickSouch, Pid); } else { if (DataConverter.CLng(KeyWord) > 0) { dt = bll.ProductSearch(10, KeyWord, storeMod.GeneralID); } else { dt = bll.ProductSearch(0, KeyWord, storeMod.GeneralID); } } EGV.DataSource = dt; EGV.DataBind(); }
private void MyBind() { DataTable dt = new DataTable(); if (!string.IsNullOrEmpty(KeyWord)) { dt = proBll.ProductSearch(NodeID, 0, KeyWord); } else { dt = proBll.GetProductAll(NodeID); } RPT.DataSource = dt; RPT.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { DataTable table = cll.SelectByUserName(ull.GetLogin().UserName, ull.GetLogin().GroupID); DropDownList1.DataSource = table; DropDownList1.DataTextField = "Classname"; DropDownList1.DataValueField = "id"; DropDownList1.DataBind(); this.DropDownList1.Items.Insert(0, new ListItem("请选择分类", "")); this.UserInfo = buser.GetLogin(); if (string.IsNullOrEmpty(base.Request.QueryString["GeneralID"])) { function.WriteErrMsg("没有指定要修改的内容ID!"); } else { this.GeneralID = DataConverter.CLng(base.Request.QueryString["GeneralID"]); } M_CommonData Cdata = this.bll.GetCommonData(this.GeneralID); if (UserInfo.UserName != Cdata.Inputer) { function.WriteErrMsg("不能编辑不属于自己输入的内容!"); } this.NodeID = Cdata.NodeID; this.ModelID = Cdata.ModelID; DropDownList1.SelectedValue = Cdata.OrederClass.ToString(); if (bmode.GetModelById(this.ModelID).ModelType == 2) { string i = ""; DataTable dt = bpbll.ProductSearch(7, GeneralID.ToString()); if (dt.Rows.Count > 0) { i = dt.Rows[0]["ID"].ToString(); } Response.Redirect("addproduct.aspx?menu=edit&ID=" + i + "&ModelID=" + this.ModelID + "&NodeID=" + this.NodeID);//跳转到商城 } if (bmode.GetModelById(this.ModelID).ModelType == 5) { string i = ""; DataTable dt = butbll.ProductSearch(7, GeneralID.ToString(), buser.GetLogin().UserID); if (dt.Rows.Count > 0) { i = dt.Rows[0]["ID"].ToString(); } Response.Redirect("../UserShop/ProductAdd.aspx?menu=edit&ID=" + i + "&ModelID=" + this.ModelID + "&NodeID=" + this.NodeID);//跳转到店铺 } string ModelName = this.bmode.GetModelById(this.ModelID).ModelName; string NodeName = this.bnode.GetNodeXML(this.NodeID).NodeName; this.NodeName_L.Text = "修改" + NodeName; this.EBtnSubmit.Text += this.bmode.GetModelById(this.ModelID).ItemName; this.Label2.Text = NodeName; this.txtTitle.Text = Cdata.Title; this.TxtTagKey.Text = Cdata.TagKey; this.pronum.Text = Cdata.Pronum.ToString(); this.proweek.Text = Cdata.ProWeek.ToString(); this.BidType.SelectedValue = Cdata.BidType.ToString(); this.bidmoney.Text = Cdata.BidMoney.ToString("F2"); this.HdnItem.Value = this.GeneralID.ToString(); DataTable dtContent = this.bll.GetContent(this.GeneralID); this.ModelHtml.Text = this.bfield.GetUpdateHtmlUser(this.ModelID, NodeID, dtContent); DataSet ds = bfield.GetProModelFieldS(this.ModelID.ToString()); this.Title_L.Text = GetAlias("Title", ds.Tables[0]); } M_UserInfo infos = buser.GetLogin(); M_UserPromotions upsinfo = ups.GetSelect(this.NodeID, infos.GroupID); #region 权限 GetNodePreate(this.NodeID); #endregion }