コード例 #1
0
ファイル: FormDishInfo.cs プロジェクト: EricDoReMi/Cater
        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
        }
コード例 #2
0
        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
        }
コード例 #3
0
        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
        }
コード例 #4
0
        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();
        }
コード例 #5
0
ファイル: FormDishInfo.cs プロジェクト: 2013101942/CasterByYQ
        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
        }
コード例 #6
0
ファイル: DishInfoFrm.cs プロジェクト: yang123vc/ItcastCater
        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";
        }
コード例 #7
0
        private void GetInfo()
        {
            dataGridView_菜单类型管理.AutoGenerateColumns = false;

            List <DishTypeInfo> list = new List <DishTypeInfo>();

            list = dtibll.GetList();
            dataGridView_菜单类型管理.DataSource = list;
        }
コード例 #8
0
 private void LoadList()
 {
     dgvList.AutoGenerateColumns = false;
     dgvList.DataSource          = dtiBll.GetList();
     if (index >= 0)
     {
         dgvList.Rows[index].Selected = true;
     }
 }
コード例 #9
0
 private void LoadList()
 {
     //dgvList.AutoSizeColumnsMode=DataGridViewAutoSizeColumnsMode.Fill;
     dgvList.AutoGenerateColumns = false;
     dgvList.DataSource          = bll.GetList();
     if (rowIndex > -1)
     {
         dgvList.Rows[rowIndex].Selected = true;
     }
 }
コード例 #10
0
 private void LoadList()
 {
     //throw new NotImplementedException();
     dgvList.AutoGenerateColumns = false;
     dgvList.DataSource          = dtiBll.GetList();
     if (rowIndex >= 0)
     {
         dgvList.Rows[rowIndex].Selected = true;
     }
 }
コード例 #11
0
        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;
        }
コード例 #12
0
 private void LoadList()
 {
     //设置列宽自适应
     dgvList.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
     dgvList.AutoGenerateColumns = false;
     dgvList.DataSource          = dtiBll.GetList();
     if (index >= 0)
     {
         dgvList.Rows[index].Selected = true;
     }
 }
コード例 #13
0
 private void LoadList()
 {
     //设置列自动适应宽度
     dgvList.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
     dgvList.AutoGenerateColumns = false;
     dgvList.DataSource          = dtiBll.GetList();
     //设置某行选中
     if (rowIndex >= 0)
     {
         dgvList.Rows[rowIndex].Selected = true;
     }
 }
コード例 #14
0
ファイル: DishInfoList.cs プロジェクト: AlexHung123/Cater
        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;
        }
コード例 #15
0
        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"; //用于显示的值
        }
コード例 #16
0
        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;
        }
コード例 #17
0
        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
        }
コード例 #18
0
        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";
        }
コード例 #19
0
        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;
        }
コード例 #20
0
ファイル: 菜单界面.cs プロジェクト: jiemo000/ItcastCater
        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";
        }
コード例 #21
0
        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;
        }
コード例 #22
0
ファイル: OrderInfoList.cs プロジェクト: Susilen/Cater
        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;
        }
コード例 #23
0
        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;
        }
コード例 #24
0
        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;
        }
コード例 #25
0
        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";
        }
コード例 #26
0
 void LoadList()
 {
     dgvList.AutoGenerateColumns = false;
     dgvList.DataSource          = dishTypeInfoBll.GetList();
 }
コード例 #27
0
ファイル: FormDishTypeInfo.cs プロジェクト: supeng4587/Cater
 private void LoadList()
 {
     dgvList.AutoGenerateColumns = false;
     dgvList.DataSource          = dtiBll.GetList();
 }
コード例 #28
0
 private void LoadList()
 {
     gv_DishTypeInfoList.AutoGenerateColumns = false;
     gv_DishTypeInfoList.DataSource          = _dtiBll.GetList();
 }
コード例 #29
0
 private void LoadList()
 {
     dataGridView1.AutoGenerateColumns = false;
     dataGridView1.DataSource          = dtiBll.GetList();
 }
コード例 #30
0
ファイル: DishTypeInfoList.cs プロジェクト: AlexHung123/Cater
 public void LoadDishTypeList()
 {
     gvDishTypeInfo.AutoGenerateColumns = false;
     gvDishTypeInfo.DataSource          = dtiBll.GetList();
 }