//#region 批次号下拉列表改变时绑定属性下拉列表 //protected void drpPCH_SelectedIndexChanged(object sender, EventArgs e) //{ // try // { // if (!string.IsNullOrEmpty(this.drpPCH.SelectedValue)) // { // string CK = this.hidCK.Value.Trim(); // string PCH = this.drpPCH.SelectedValue; // DataSet ds = QTCKQuery.GetSXbyPCH(PCH, CK); // if (ds != null) // { // this.drpSX.DataSource = ds; // this.drpSX.DataTextField = "SX"; // this.drpSX.ToolTip = "属性"; // this.drpSX.DataValueField = "SX"; // this.drpSX.DataBind(); // this.txtWLH.Text = ds.Tables[0].Rows[0]["WLH"].ToString(); // this.txtWLMC.Text = ds.Tables[0].Rows[0]["WLMC"].ToString(); // this.txtPH.Text = ds.Tables[0].Rows[0]["PH"].ToString(); // this.txtGG.Text = ds.Tables[0].Rows[0]["GG"].ToString(); // } // } // } // catch // { // this.PrintfError("数据访问错误"); // return; // } //} //#endregion #region 属性下拉列表改变时给规格等几个文本框赋值 protected void drpSX_SelectedIndexChanged(object sender, EventArgs e) { try { if (!string.IsNullOrEmpty(this.drpSX.SelectedValue)) { string CK = this.hidCK.Value.Trim(); //string PCH = this.drpPCH.SelectedValue; string PCH = this.txtPCH.Text.Trim(); string SX = this.drpSX.SelectedValue; DataSet ds = QTCKQuery.GetWLHbySX(SX, PCH, CK); if (ds != null) { this.drpFree1.DataSource = ds; this.drpFree1.DataTextField = "vfree1"; this.drpFree1.ToolTip = "自由项1"; this.drpFree1.DataValueField = "vfree1"; this.drpFree1.DataBind(); this.drpFree2.DataSource = ds; this.drpFree2.DataTextField = "vfree2"; this.drpFree2.ToolTip = "自由项2"; this.drpFree2.DataValueField = "vfree2"; this.drpFree2.DataBind(); this.drpFree3.DataSource = ds; this.drpFree3.DataTextField = "vfree3"; this.drpFree3.ToolTip = "自由项3"; this.drpFree3.DataValueField = "vfree3"; this.drpFree3.DataBind(); this.txtWLH.Text = ds.Tables[0].Rows[0]["WLH"].ToString(); this.txtWLMC.Text = ds.Tables[0].Rows[0]["WLMC"].ToString(); this.txtPH.Text = ds.Tables[0].Rows[0]["PH"].ToString(); this.txtGG.Text = ds.Tables[0].Rows[0]["GG"].ToString(); } } } catch { this.PrintfError("数据访问错误"); return; } }