private void LoadTypeList() { DishTypeInfoBll dtiBll = new DishTypeInfoBll(); #region 绑定查询的下拉列表 List <DishTypeInfo> list = dtiBll.GetList(); //向list中插入数据 list.Insert(0, new DishTypeInfo() { DId = 0, DTitle = "全部" }); ddlTypeSearch.DataSource = list; ddlTypeSearch.ValueMember = "did"; //对应于SelectedValue属性 ddlTypeSearch.DisplayMember = "dtitle"; //用于显示的值 #endregion #region 绑定添加的下拉列表 ddlTypeAdd.DataSource = dtiBll.GetList(); ddlTypeAdd.DisplayMember = "dtitle"; ddlTypeAdd.ValueMember = "did"; #endregion }
private void LoadTypeList() { DishTypeInfoBll dtiBll = new DishTypeInfoBll(); List <DishTypeInfo> list = dtiBll.GetList(); //向list中插入数据 使用insert制定位置插入 #region 查询 list.Insert(0, new DishTypeInfo() { DId = 0, DTitle = "全部" }); ddlTypeSearch.DataSource = list; //显示 ddlTypeSearch.DisplayMember = "DTitle"; //值 ddlTypeSearch.ValueMember = "DId"; #endregion #region 添加 ddlTypeAdd.DataSource = dtiBll.GetList();; //显示 ddlTypeAdd.DisplayMember = "DTitle"; //值 ddlTypeAdd.ValueMember = "DId"; #endregion }
private void LoadTypeList() { //throw new NotImplementedException(); DishTypeInfoBll dtiBll = new DishTypeInfoBll(); #region Bind the query dropdown list. List <DishTypeInfo> list = dtiBll.GetList(); // list.Insert(0, new DishTypeInfo() { DId = 0, DTitle = "All" }); ddlTypeSearch.DataSource = list; ddlTypeSearch.ValueMember = "did"; ddlTypeSearch.DisplayMember = "dtitle"; #endregion #region Bind the dropdown list when adding an item. ddlTypeAdd.DataSource = dtiBll.GetList(); ddlTypeAdd.DisplayMember = "dtitle"; ddlTypeAdd.ValueMember = "did"; #endregion }
private void LoadDishType() { DishTypeInfoBll dtiBll = new DishTypeInfoBll(); var list = dtiBll.GetList(); list.Insert(0, new CaterModel.DishTypeInfo() { DId = 0, DTitle = "All" }); ddlType.ValueMember = "did"; ddlType.DisplayMember = "dtitle"; ddlType.DataSource = dtiBll.GetList(); }
private void LoadTypeList() { DishTypeInfoBll dtiBll = new DishTypeInfoBll(); #region 绑定查询的下拉列表 List <DishTypeInfo> list = dtiBll.GetList(); List <string> dishTypeList = new List <string>(); dishTypeList.Add("-请选择-"); foreach (DishTypeInfo dishType in list) { dishTypeList.Add(dishType.DTypeTitle); } ddlTypeAdd.DataSource = dishTypeList; dishTypeList.Clear(); #endregion #region 绑定添加的下拉列表 //向list中插入数据 list.Insert(0, new DishTypeInfo() { Id = 0, DTypeTitle = "全部" }); foreach (DishTypeInfo dishType in list) { dishTypeList.Add(dishType.DTypeTitle); } ddlTypeSearch.DataSource = dishTypeList; #endregion }
private void LoadTypeList() { DishTypeInfoBll dtiBll = new DishTypeInfoBll(); List <DishTypeInfo> list = dtiBll.GetList(); list.Insert(0, new DishTypeInfo() { DId = 0, DTitle = "全部" }); ddlTypeSearch.DataSource = list; ddlTypeSearch.ValueMember = "DId"; ddlTypeSearch.DisplayMember = "DTitle"; ddlTypeAdd.DataSource = dtiBll.GetList(); ddlTypeAdd.ValueMember = "DId"; ddlTypeAdd.DisplayMember = "DTitle"; }
private void GetInfo() { dataGridView_菜单类型管理.AutoGenerateColumns = false; List <DishTypeInfo> list = new List <DishTypeInfo>(); list = dtibll.GetList(); dataGridView_菜单类型管理.DataSource = list; }
private void LoadList() { dgvList.AutoGenerateColumns = false; dgvList.DataSource = dtiBll.GetList(); if (index >= 0) { dgvList.Rows[index].Selected = true; } }
private void LoadList() { //dgvList.AutoSizeColumnsMode=DataGridViewAutoSizeColumnsMode.Fill; dgvList.AutoGenerateColumns = false; dgvList.DataSource = bll.GetList(); if (rowIndex > -1) { dgvList.Rows[rowIndex].Selected = true; } }
private void LoadList() { //throw new NotImplementedException(); dgvList.AutoGenerateColumns = false; dgvList.DataSource = dtiBll.GetList(); if (rowIndex >= 0) { dgvList.Rows[rowIndex].Selected = true; } }
private void LoadTypeList() { DishTypeInfoBll dtiBll = new DishTypeInfoBll(); //绑定添加与修改的分类 comboBox1.DisplayMember = "DTitle"; comboBox1.ValueMember = "DId"; comboBox1.DataSource = dtiBll.GetList(); //绑定查询的分类 var list = dtiBll.GetList(); list.Insert(0, new DishTypeInfo() { DId = 0, DTitle = "全部" }); comboBox2.DisplayMember = "DTitle"; comboBox2.ValueMember = "DId"; comboBox2.DataSource = list; }
private void LoadList() { //设置列宽自适应 dgvList.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill; dgvList.AutoGenerateColumns = false; dgvList.DataSource = dtiBll.GetList(); if (index >= 0) { dgvList.Rows[index].Selected = true; } }
private void LoadList() { //设置列自动适应宽度 dgvList.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill; dgvList.AutoGenerateColumns = false; dgvList.DataSource = dtiBll.GetList(); //设置某行选中 if (rowIndex >= 0) { dgvList.Rows[rowIndex].Selected = true; } }
private void LoadTypeList() { DishTypeInfoBll dtiBll = new DishTypeInfoBll(); //绑定添加修改的分类 cbxType.DisplayMember = "DTitle"; cbxType.ValueMember = "DId"; cbxType.DataSource = dtiBll.GetList();; //绑定查询的分类 var list = dtiBll.GetList(); list.Insert(0, new DishTypeInfo() { DId = 0, DTitle = "全部", }); cbxTypeSearch.DisplayMember = "DTitle"; cbxTypeSearch.ValueMember = "DId"; cbxTypeSearch.DataSource = list; }
private void LoadTypeList() { List <DishTypeInfo> list = dtiBll.GetList(); list.Insert(0, new DishTypeInfo() { DId = 0, DTitle = "全部" }); ddlTypeSearch.DataSource = list; ddlTypeSearch.ValueMember = "did"; //对应于SelectedValue属性 ddlTypeSearch.DisplayMember = "dtitle"; //用于显示的值 }
private void LoadDishType() { DishTypeInfoBll dtBll = new DishTypeInfoBll(); List <DishTypeInfo> dtList = dtBll.GetList(); dtList.Insert(0, new DishTypeInfo() { DId = 0, DTitle = "全部" }); ddlType.DisplayMember = "DTitle"; ddlType.ValueMember = "DId"; ddlType.DataSource = dtList; }
private void LoadTypeList() { DishTypeInfoBll dtiBll = new DishTypeInfoBll(); //为了下拉框显示“全部”,向list中插入数据 #region 绑定搜索的下拉列表 List <DishTypeInfo> list = dtiBll.GetList(); list.Insert(0, new DishTypeInfo() { DId = 0, DTitle = "全部" }); ddlTypeSearch.DataSource = list; ddlTypeSearch.ValueMember = "did"; ddlTypeSearch.DisplayMember = "dtitle"; #endregion #region 绑定添加的下拉列表 cbbType.DataSource = dtiBll.GetList(); cbbType.DisplayMember = "dtitle"; cbbType.ValueMember = "did"; #endregion }
private void LoadAddType() { List <DishTypeInfo> list = typeBll.GetList(); list.Insert(0, new DishTypeInfo() { DId = 0, DTitle = "全部" }); ddlType.DataSource = list; ddlType.DisplayMember = "DTitle"; ddlType.ValueMember = "DId"; }
void LoadTypeList() { DishTypeInfoBll dtibll = new DishTypeInfoBll(); var list = dtibll.GetList(); list.Insert(0, new DishTypeInfo() { DId = 0, DTitle = "全部" }); ddlType.DisplayMember = "DTitle"; ddlType.ValueMember = "DId"; ddlType.DataSource = list; }
private void GetCombox() { DishTypeInfoBll dtibll = new DishTypeInfoBll(); List <DishTypeInfo> list = new List <DishTypeInfo>(); list = dtibll.GetList(); comboBox_搜索_分类.DataSource = list; comboBox_搜索_分类.DisplayMember = "DTitle"; comboBox_搜索_分类.ValueMember = "DId"; comboBox_添加_分类.DataSource = list; comboBox_添加_分类.DisplayMember = "DTitle"; comboBox_添加_分类.ValueMember = "DId"; }
private void LoadDishTypeInfo() { //加载菜品分类下拉框 DishTypeInfoBll dtiBll = new DishTypeInfoBll(); var list = dtiBll.GetList(); list.Insert(0, new DishTypeInfo() { DId = 0, DTitle = "全部", }); cbxDishType.DisplayMember = "DTitle"; cbxDishType.ValueMember = "DId"; cbxDishType.DataSource = list; }
private void LoadDishTypeInfo() { DishTypeInfoBll dtiBll = new DishTypeInfoBll(); cb_DishType.DisplayMember = "DTitle"; cb_DishType.ValueMember = "Did"; var list = dtiBll.GetList(); list.Insert(0, new DishTypeInfo() { DId = -1, DTitle = "全部" }); cb_DishType.DataSource = list; }
private void LoadDishType() { //throw new NotImplementedException(); DishTypeInfoBll dtiBll = new DishTypeInfoBll(); var list = dtiBll.GetList(); list.Insert(0, new DishTypeInfo() { DId = 0, DTitle = "All" }); ddlType.ValueMember = "did"; ddlType.DisplayMember = "dtitle"; ddlType.DataSource = list; }
private void LoadDishType() { DishTypeInfoBll dtiBll = new DishTypeInfoBll(); var list = dtiBll.GetList(); list.Insert(0, new DishTypeInfo() { Id = 0, DTypeTitle = "全部" }); List <string> dishTypelist = new List <string>(); foreach (DishTypeInfo dishType in list) { dishTypelist.Add(dishType.DTypeTitle); } ddlType.DataSource = dishTypelist; }
public void Category() { //DishTypeInfoBll typebll = new DishTypeInfoBll(); List <DishTypeInfo> list = typebll.GetList(); list.Insert(0, new DishTypeInfo() { DId = 0, DTitle = "全部" }); ddlTypeSearch.DataSource = list; ddlTypeSearch.DisplayMember = "DTitle"; ddlTypeSearch.ValueMember = "DId"; //Error:不能这样写 会将两个下拉框关联起来 //ddlTypeAdd.DataSource = typebll.GetList(); //ddlTypeAdd.DisplayMember = "DTitle"; //ddlTypeAdd.ValueMember = "DId"; }
void LoadList() { dgvList.AutoGenerateColumns = false; dgvList.DataSource = dishTypeInfoBll.GetList(); }
private void LoadList() { dgvList.AutoGenerateColumns = false; dgvList.DataSource = dtiBll.GetList(); }
private void LoadList() { gv_DishTypeInfoList.AutoGenerateColumns = false; gv_DishTypeInfoList.DataSource = _dtiBll.GetList(); }
private void LoadList() { dataGridView1.AutoGenerateColumns = false; dataGridView1.DataSource = dtiBll.GetList(); }
public void LoadDishTypeList() { gvDishTypeInfo.AutoGenerateColumns = false; gvDishTypeInfo.DataSource = dtiBll.GetList(); }