Exemple #1
0
        private void LoadCategoryInfoToCmb()
        {
            var list = catBLL.GetAllCategoryInfoByDelFlag(0);

            list.Insert(0, new CategoryInfo {
                CatId = -1, CatName = "请选择"
            });
            cmbCategory.DataSource    = list;
            cmbCategory.DisplayMember = "CatName";
            cmbCategory.ValueMember   = "CatId";
        }
Exemple #2
0
        //加载节点树
        private void LoadProductAndCategory()
        {
            CategoryInfoBLL     bll  = new CategoryInfoBLL();
            List <CategoryInfo> list = bll.GetAllCategoryInfoByDelFlag(0);

            LoadCategory(list, tvCategory.Nodes);
        }
Exemple #3
0
        private void LoadCategoryInfoByDelFlag(int p)
        {
            CategoryInfoBLL bll = new CategoryInfoBLL();

            dgvCategory.AutoGenerateColumns = false;//禁止自动生成列
            dgvCategory.DataSource          = bll.GetAllCategoryInfoByDelFlag(p);
        }
Exemple #4
0
        //加载所有商品类别
        private void LoadCategoryInfoByDelFlag(int delFlag)
        {
            CategoryInfoBLL bll = new CategoryInfoBLL();

            dgvCategoryInfo.AutoGenerateColumns      = false; //禁止自动生成列
            dgvCategoryInfo.DataSource               = bll.GetAllCategoryInfoByDelFlag(delFlag);
            dgvCategoryInfo.SelectedRows[0].Selected = false; //没有被选中的
        }
        //加载商品类别的方法
        private void LoadCategoryInfo(int delFlag)
        {
            CategoryInfoBLL bll = new CategoryInfoBLL();
            //获取所有没有被删除的商品类别
            List <CategoryInfo> list = bll.GetAllCategoryInfoByDelFlag(delFlag);

            LoadCategoryBingTv(list, tvCategory.Nodes);
        }
Exemple #6
0
        private void LoadCategoryInfoToCmb()
        {
            var bll  = new CategoryInfoBLL();
            var list = bll.GetAllCategoryInfoByDelFlag(0);

            cmbCategory.DataSource    = list;
            cmbCategory.DisplayMember = "CatName";
            cmbCategory.ValueMember   = "CatId";
        }
Exemple #7
0
        /// <summary>
        /// 所有商品类别
        /// </summary>
        /// <param name="v"></param>
        private void LoadCategoryInfoDelFlag(int v)
        {
            CategoryInfoBLL bll = new CategoryInfoBLL();

            dgvCategoryInfo.AutoGenerateColumns = false;
            dgvCategoryInfo.DataSource          = bll.GetAllCategoryInfoByDelFlag(v);
            if (dgvCategoryInfo.Rows.Count > 0)
            {
                dgvCategoryInfo.SelectedRows[0].Selected = false;
            }
        }
        //加载所有的类别
        private void LoadAllCategoryInfoByDelFlag(int p)
        {
            CategoryInfoBLL     cbll = new CategoryInfoBLL();
            List <CategoryInfo> list = cbll.GetAllCategoryInfoByDelFlag(p);

            for (int i = 0; i < list.Count; i++)
            {
                TreeNode tn = tvCategory.Nodes.Add(list[i].CName);
                LoadProductInfoByCId(tn.Nodes, list[i].CId);
            }
        }
Exemple #9
0
        //加载节点树
        private void LoadCategoryInfoByDelFlag(int p)
        {
            var bll  = new CategoryInfoBLL();
            var list = bll.GetAllCategoryInfoByDelFlag(p);

            foreach (var c in list)
            {
                var tn = tvCategory.Nodes.Add(c.CatName);
                LoadProductInfoByCatId(c.CatId, tn.Nodes);
            }
        }
Exemple #10
0
        private void BingCMBLoadCategoryInfoByDelFlag(int delFlag)
        {
            CategoryInfoBLL     bll  = new CategoryInfoBLL();
            List <CategoryInfo> list = bll.GetAllCategoryInfoByDelFlag(delFlag);

            list.Insert(0, new CategoryInfo {
                CatId = -1, CatName = "请选择"
            });
            cmbCategory.DataSource    = list;//为下拉框绑定数据
            cmbCategory.DisplayMember = "CatName";
            cmbCategory.ValueMember   = "CatId";
        }
        private void LoadCategory()
        {
            CategoryInfoBLL     categoryBll = new CategoryInfoBLL();
            List <CategoryInfo> list        = categoryBll.GetAllCategoryInfoByDelFlag(0);

            list.Insert(0, new CategoryInfo {
                CName = "请选择", CId = -1
            });
            cmbCategory.DataSource    = list;
            cmbCategory.DisplayMember = "CName";
            cmbCategory.ValueMember   = "CId";
        }
Exemple #12
0
        /// <summary>
        /// 把类别加载到下拉框中
        /// </summary>
        /// <param name="v"></param>
        private void LoadCategoryInfoByDelFlagInComboBox(int v)
        {
            CategoryInfoBLL     bll  = new CategoryInfoBLL();
            List <CategoryInfo> list = bll.GetAllCategoryInfoByDelFlag(v);

            list.Insert(0, new CategoryInfo()
            {
                CatName = "请选择", CatId = -1
            });
            cmbCategory.DataSource    = list;
            cmbCategory.DisplayMember = "CatName";
            cmbCategory.ValueMember   = "CatId";
        }
Exemple #13
0
        private void LoadCategory()
        {
            CategoryInfoBLL     bll  = new CategoryInfoBLL();
            List <CategoryInfo> list = bll.GetAllCategoryInfoByDelFlag(0);

            list.Insert(0, new CategoryInfo()
            {
                Catid = -1, Catname = "请选择"
            });
            cmbCategory.DataSource    = list;
            cmbCategory.DisplayMember = "Catname";
            cmbCategory.ValueMember   = "Catid";
        }
Exemple #14
0
        private string[] GetAllCategoryName()
        {
            var bll = new CategoryInfoBLL();

            return(bll.GetAllCategoryInfoByDelFlag(0).Select(ci => ci.CatName).ToArray());
        }
 private void LoadCategoryInfo(int flag)
 {
     cmbCategory.DataSource    = cbll.GetAllCategoryInfoByDelFlag(flag);
     cmbCategory.DisplayMember = "CName";
     cmbCategory.ValueMember   = "CId";
 }