private void GetInfo() { try { #region //物料名称 DataTable dtMat = tmo_order.GetOrderMat().Tables[0]; if (dtMat.Rows.Count > 0) { dropMatName.DataSource = dtMat; dropMatName.DataTextField = "C_MAT_NAME"; dropMatName.DataValueField = "C_MAT_NAME"; dropMatName.DataBind(); dropMatName.Items.Insert(0, new ListItem("全部", ""));// } #endregion #region /区域 Mod_TS_DIC mod = new Mod_TS_DIC(); mod.C_TYPECODE = "ConArea"; DataTable dtArea = ts_dic.GetList(mod).Tables[0]; if (dtArea.Rows.Count > 0) { dropArea.DataSource = dtArea; dropArea.DataTextField = "C_DETAILNAME"; dropArea.DataValueField = "C_DETAILNAME"; dropArea.DataBind(); dropArea.Items.Insert(0, new ListItem("全部", ""));// } #endregion #region 规格 DataTable dtSpec = tmo_order.GetSpec().Tables[0]; if (dtSpec.Rows.Count > 0) { dropSpec.DataSource = dtSpec; dropSpec.DataValueField = "C_SPEC"; dropSpec.DataTextField = "C_SPEC"; dropSpec.DataBind(); dropSpec.Items.Insert(0, new ListItem("全部规格", "")); } #endregion #region //包装 DataTable dtpack = pack.GetPackList("", "").Tables[0]; if (dtpack.Rows.Count > 0) { dropPack.DataSource = dtpack; dropPack.DataValueField = "C_PACK_TYPE_CODE"; dropPack.DataTextField = "C_PACK_TYPE_CODE"; dropPack.DataBind(); dropPack.Items.Insert(0, new ListItem("全部", "")); } #endregion } catch (Exception ex) { WebMsg.MessageBox(ex.Message); } }