/// <summary> /// 绑定客户来源 /// </summary> private void Bindsource() { BLL.guest_source bllct = new BLL.guest_source(); Csource.DataSource = bllct.GetAllList(); Csource.DataTextField = "gs_name"; Csource.DataValueField = "ID"; Csource.DataBind(); }
/// <summary> /// 绑定客户来源 /// </summary> private void Bindsource() { BLL.guest_source bllct = new BLL.guest_source(); Csource.DataSource = bllct.GetAllList(); Csource.DataTextField = "gs_name"; Csource.DataValueField = "ID"; Csource.DataBind(); Csource.Items.Insert(0, new ListItem("全部", "0")); }
//获得客人来源中文名称 public string GetSourceTypeName(object id) { if (id.ToString() == "") { return(""); } BLL.guest_source gsbll = new BLL.guest_source(); Model.guest_source model = gsbll.GetModel(Convert.ToInt32(id.ToString())); return(model.gs_name); }