예제 #1
0
        //刷新
        private void sx()
        {
            List <ProductType> list = ProductTypeBLL.selectall();
            ProductType        p    = new ProductType();

            p.id   = 0;
            p.name = "全部";
            list.Add(p);
            list.Reverse();
            this.cbotype.DisplayMember = "name";
            this.cbotype.ValueMember   = "id";
            this.cbotype.DataSource    = list;
            //  显示白道一
            foreach (var item in list)
            {
                if (item.id != 0)
                {
                    ListViewItem lvi = new ListViewItem(item.id.ToString());

                    if (item.id != 0)
                    {
                        lvi.SubItems.Add(item.name);
                    }
                    this.lv.Items.Add(lvi);
                }
            }
        }
예제 #2
0
        private void FrmProductsT_Load(object sender, EventArgs e)
        {
            List <ProductType> list = ProductTypeBLL.selectall();

            this.cbotype.DisplayMember = "name";
            this.cbotype.ValueMember   = "id";

            this.cbotype.DataSource = list;
        }
예제 #3
0
파일: FrmProductsX.cs 프로젝트: JacBang/CMS
        private void FrmProducts_Load(object sender, EventArgs e)
        {
            string id = Comm.ProductID;


            this.txtjp.Text    = Comm.ProductJP;
            this.txtname.Text  = Comm.ProductName;
            this.txtprice.Text = Comm.ProductPrice;

            List <ProductType> list = ProductTypeBLL.selectall();

            this.cbotype.DisplayMember = "name";
            this.cbotype.ValueMember   = "id";

            this.cbotype.DataSource = list;
        }