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 }
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 }
private void BindInfo() { DataTable dt = GetData("ShipVia"); if (dt.Rows.Count > 0) { dropfyfs.DataSource = dt; dropfyfs.DataTextField = "C_DETAILNAME"; dropfyfs.DataValueField = "C_DETAILNAME"; dropfyfs.DataBind(); dropfyfs.Items.Insert(0, new ListItem("全部", "")); } else { dropfyfs.DataSource = null; dropfyfs.DataBind(); dropfyfs.Items.Insert(0, new ListItem("全部", "")); } DataTable dtArea = GetData("ConArea"); if (dtArea.Rows.Count > 0) { droparea.DataSource = dtArea; droparea.DataTextField = "C_DETAILNAME"; droparea.DataValueField = "C_DETAILNAME"; droparea.DataBind(); droparea.Items.Insert(0, new ListItem("全部区域", "")); } else { droparea.DataSource = null; droparea.DataBind(); droparea.Items.Insert(0, new ListItem("全部区域", "")); } #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 dt2 = GetData("TRANCUST"); if (dt.Rows.Count > 0) { dropcys.DataSource = dt2; dropcys.DataTextField = "C_DETAILNAME"; dropcys.DataValueField = "C_DETAILNAME"; dropcys.DataBind(); dropcys.Items.Insert(0, new ListItem("全部承运商", "全部承运商")); } else { dropcys.DataSource = null; dropcys.DataBind(); dropcys.Items.Insert(0, new ListItem("全部承运商", "全部承运商")); } #endregion }