/// <summary> /// 选择代理商返回 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btnSelectMaterialsReturn_ServerClick(object sender, EventArgs e) { string str = this.txtMaterialCodes.Value; string strWhere = string.Empty; string GoodsId = this.txtGoodsCodes.Value; GoodsId += str; this.txtGoodsCodes.Value = GoodsId; if (str != "") { strWhere += " Id in (" + str.Substring(0, str.Length - 1) + ")"; } List <Hi.Model.BD_Distributor> dbutorList = BDdbutorbll.GetList("", strWhere, "Id desc"); AddMaterial(dbutorList); //判断证件类型层的显示 if (this.ddltype.Value == "12") { this.tbdis.Visible = false; } else { this.tbdis.Visible = true; } //判断关联代理商按钮是否可用 if (this.chkIsno.Checked) { //this.btnDis.Attributes.Add("style", "display:none;"); //div_grid.Attributes.Add("style", "display:none;"); this.gvDtl.Visible = false; this.btnDis.Visible = false; } else { //this.btnDis.Attributes.Add("style", "display:block;"); //div_grid.Attributes.Add("style", "display:block;"); this.gvDtl.Visible = true; this.btnDis.Visible = true; } }
/// <summary> /// 选择材料返回 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btnSelectMaterialsReturn_ServerClick(object sender, EventArgs e) { string str = this.txtMaterialCodes.Value; string strWhere = string.Empty; string GoodsId = this.txtGoodsCodes.Value; GoodsId += str; this.txtGoodsCodes.Value = GoodsId; if (str != "") { strWhere += " Id in (" + str.Substring(0, str.Length - 1) + ")"; } List <Hi.Model.BD_Distributor> dbutorList = BDdbutorbll.GetList("", strWhere, "Id desc"); AddMaterial(dbutorList); }
/// <summary> /// 绑定数据 /// </summary> protected void Bind() { int pageCount = 0; int Counts = 0; string strWhere = string.Empty; string quer_code = Request.QueryString["code"].ToString(); string quer_stor = Request.QueryString["Store"]; if (quer_code != "") { string code = Request.QueryString["code"].ToString(); strWhere += " and ID not in (" + code.Substring(0, code.Length - 1) + ")"; } if (this.txtPager.Value.Trim().ToString() != "") { if (this.txtPager.Value.Trim().Length >= 5) { Pager.PageSize = 100; this.txtPager.Value = "100"; } else { Pager.PageSize = this.txtPager.Value.Trim().ToInt(0); } } if (ViewState["strWhere"] != null) { strWhere += ViewState["strWhere"].ToString(); } strWhere += " and AuditState=2 and IsEnabled=1 and CompID=" + CompID; List <Hi.Model.BD_Distributor> BdutorModel = DbutorBll.GetList(Pager.PageSize, Pager.CurrentPageIndex, "CreateDate", true, strWhere, out pageCount, out Counts); this.rpStockApplyList.DataSource = BdutorModel; this.rpStockApplyList.DataBind(); Pager.RecordCount = Counts; page = Pager.CurrentPageIndex.ToString(); }