COMBOX的ITEM设置

 private void getGoodsCode()
        {

        
         

            DataSet dscode = (DataSet)WebServiceHepler.WebServiceHepler.InvokeWebService(url + "NewGoodSet.asmx", "getGoodsCode", null);
            DataSet dsbreed = (DataSet)WebServiceHepler.WebServiceHepler.InvokeWebService(url + "NewGoodSet.asmx", "getGoodsBreed", null);
            if (dscode != null)
            {
                this.comCode.DataSource = dscode.Tables[0];
                this.comCode.ValueMember = "PC_Code";
                this.comCode.DisplayMember = "PC_Code";
                this.comCode.SelectedIndex = -1;


              
                DataView dv = dsbreed.Tables[0].DefaultView;
                dv.Sort = "PC_Greed";
                foreach (DataRow dr in dv.ToTable().Rows)
                {
                    this.treeView1.Nodes.Add(dr[0].ToString().Trim());
                }

            }
        }

你可能感兴趣的:(COMBOX的ITEM设置)