private void GetArea() { #region //需求区域 Mod_TS_DIC mod = new Mod_TS_DIC(); mod.C_TYPECODE = "ConArea"; DataTable dt = ts_dic.GetList(mod).Tables[0]; if (dt.Rows.Count > 0) { dropneedarea.DataSource = dt; dropneedarea.DataTextField = "C_DETAILNAME"; dropneedarea.DataValueField = "C_DETAILNAME"; dropneedarea.DataBind(); } else { dropneedarea.DataSource = null; dropneedarea.DataBind(); } #endregion var vUser = (NF.Framework.CurrentUser)HttpContext.Current.Session["CurrentUser"]; string dept = ts_user.GetDept(vUser.Account); dropneedarea.SelectedIndex = dropneedarea.Items.IndexOf(dropneedarea.Items.FindByText(dept)); #region //线材库区域 DataTable dtxcarea = tmo_order.GetXCAREA().Tables[0]; if (dtxcarea.Rows.Count > 0) { dropsalearea.DataSource = dtxcarea; dropsalearea.DataTextField = "C_SALE_AREA"; dropsalearea.DataValueField = "C_SALE_AREA"; dropsalearea.DataBind(); dropsalearea.Items.Insert(0, new ListItem("全部区域", "-1"));// } else { dropsalearea.DataSource = null; dropsalearea.DataBind(); } #endregion #region //质量 DataTable dtzl = tmo_order.GetXC_JUDGE_LEV_ZH("").Tables[0]; if (dtzl.Rows.Count > 0) { dropzldj.DataSource = dtzl; dropzldj.DataTextField = "C_JUDGE_LEV_ZH"; dropzldj.DataValueField = "C_JUDGE_LEV_ZH"; dropzldj.DataBind(); dropzldj.Items.Insert(0, new ListItem("全部质量", "")); } #endregion }
//质量 protected void dropzldj_SelectedIndexChanged(object sender, EventArgs e) { dropsalearea.Items.Clear(); dropMinArea.Items.Clear(); #region //线材库区域 if (!string.IsNullOrEmpty(dropzldj.SelectedItem.Value)) { DataTable dtxcarea = tmo_order.GetXCAREA(dropzldj.SelectedItem.Value).Tables[0]; if (dtxcarea.Rows.Count > 0) { dropsalearea.DataSource = dtxcarea; dropsalearea.DataTextField = "C_SALE_AREA"; dropsalearea.DataValueField = "C_SALE_AREA"; dropsalearea.DataBind(); dropsalearea.Items.Insert(0, new ListItem("全部", "-1"));// } else { dropsalearea.DataSource = null; dropsalearea.DataBind(); } } else { #region //销售区域 DataTable dt = ts_dic.GetDicArea("-1").Tables[0]; if (dt.Rows.Count > 0) { dropsalearea.DataSource = dt; dropsalearea.DataTextField = "C_DETAILNAME"; dropsalearea.DataValueField = "C_DETAILCODE"; dropsalearea.DataBind(); dropsalearea.Items.Insert(0, new ListItem("全部", "-1"));// } else { dropsalearea.DataSource = null; dropsalearea.DataBind(); } #endregion } #endregion dropMinArea.Items.Insert(0, new ListItem("全部", "")); }
private void BindInfo() { #region //质量 DataTable dtzl = tmo_order.GetXC_JUDGE_LEV_ZH("").Tables[0]; if (dtzl.Rows.Count > 0) { dropzldj.DataSource = dtzl; dropzldj.DataTextField = "C_JUDGE_LEV_ZH"; dropzldj.DataValueField = "C_JUDGE_LEV_ZH"; dropzldj.DataBind(); dropzldj.Items.Insert(0, new ListItem("全部", "")); } #endregion #region //特殊信息 DataTable dtts = tmo_order.GetTS().Tables[0]; if (dtts.Rows.Count > 0) { droptsxx.DataSource = dtts; droptsxx.DataTextField = "C_PCINFO"; droptsxx.DataValueField = "C_PCINFO"; droptsxx.DataBind(); droptsxx.Items.Insert(0, new ListItem("全部", "")); } #endregion #region //线材库区域 DataTable dtxcarea = tmo_order.GetXCAREA("").Tables[0]; if (dtxcarea.Rows.Count > 0) { dropsalearea.DataSource = dtxcarea; dropsalearea.DataTextField = "C_SALE_AREA"; dropsalearea.DataValueField = "C_SALE_AREA"; dropsalearea.DataBind(); dropsalearea.Items.Insert(0, new ListItem("全部", "-1"));// } else { dropsalearea.DataSource = null; dropsalearea.DataBind(); } #endregion #region //需求区域 Mod_TS_DIC mod = new Mod_TS_DIC(); mod.C_TYPECODE = "ConArea"; DataTable dt = ts_dic.GetList(mod).Tables[0]; if (dt.Rows.Count > 0) { dropneedarea.DataSource = dt; dropneedarea.DataTextField = "C_DETAILNAME"; dropneedarea.DataValueField = "C_DETAILNAME"; dropneedarea.DataBind(); dropneedarea.Items.Add(new ListItem("空白", "")); } else { dropneedarea.DataSource = null; dropneedarea.DataBind(); } #endregion }