string str="select * from pe_production where id='"+TextBox23.Text.Trim()+"'";
tb=updata.ExecuteSql4Ds(str).Tables[0];
if(tb.Rows.Count>0)
{
     BindDropDownList1();//从数据库中绑定数据,删除此行,必须手动绑定DropDownList1中信息
     TextBox1.Text=tb.Rows[0][2].ToString().Trim();
     TextBox3.Text=tb.Rows[0][5].ToString().Trim();
     string DropDown1=tb.Rows[0][3].ToString().Trim();
     for (int i=0;i<DropDownList1.Items.Count;i++)
        {
            if (DropDownList1.Items[i].ToString().Trim() == DropDown1)                                     
              {
                  DropDownList1.SelectedIndex = i;
                  BindDropDownList2();
                  BindDropDownList3();
                  break;
              }
        }
}

相关文章:

  • 2021-07-26
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-08-10
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-28
相关资源
相似解决方案