예제 #1
0
 private void LoadData()
 {
     // Option for brand
     cbbBrand.DataSource    = BrandBLL.FindAll();
     cbbBrand.DisplayMember = "Name";
     cbbBrand.ValueMember   = "Name";
     //cbbBrand.Hide();
     // Option for purpose
     cbbPurpose.DataSource    = PurposeBLL.FindAll();
     cbbPurpose.DisplayMember = "Name";
     cbbPurpose.ValueMember   = "Name";
     // Option for Price
     cbbPrice.DataSource    = PriceBLL.FindAll();
     cbbPrice.DisplayMember = "Name";
     cbbPrice.ValueMember   = "Name";
     //cbbPrice.Hide();
     // Option for color
     cbbColor.DataSource    = ColorBLL.FindAll();
     cbbColor.DisplayMember = "Name";
     cbbColor.ValueMember   = "Name";
     //cbbColor.Hide();
     // Option for gender
     cbbGender.DataSource    = GenderBLL.FindAll();
     cbbGender.DisplayMember = "Name";
     cbbGender.ValueMember   = "Name";
     // Option for Object using
     cbbObjectUsing.DataSource    = ObjectUsingBLL.FindAll();
     cbbObjectUsing.DisplayMember = "Name";
     cbbObjectUsing.ValueMember   = "Name";
 }
예제 #2
0
        private void LoadEvent()
        {
            StringBuilder gd = new StringBuilder("");

            GenderBLL.FindAll().ForEach(x => {
                gd.Append(x.ToString());
            });
            StringBuilder ou = new StringBuilder();

            ObjectUsingBLL.FindAll().ForEach(x =>
            {
                ou.Append(x.ToString());
            });
            StringBuilder pp = new StringBuilder();

            PurposeBLL.FindAll().ForEach(x =>
            {
                pp.Append(x.ToString());
            });
            StringBuilder pr = new StringBuilder();

            PriceBLL.FindAll().ForEach(x =>
            {
                pr.Append(x.ToString());
            });
            StringBuilder br = new StringBuilder();

            BrandBLL.FindAll().ForEach(x =>
            {
                br.Append(x.ToString());
            });
            StringBuilder cl = new StringBuilder();

            ColorBLL.FindAll().ForEach(x =>
            {
                cl.Append(x.ToString());
            });
            lbGD.Text = gd.ToString();
            lbOU.Text = ou.ToString();
            lbBR.Text = br.ToString();
            lbCL.Text = cl.ToString();
            lbPP.Text = pp.ToString();
            lbPR.Text = pr.ToString();
        }