Пример #1
0
        public FormHome()
        {
            InitializeComponent();
            ListItem listitem = new ListItem();

            ControlClass.showControl(listitem, panelCont);
        }
Пример #2
0
        private void btnCari_Click(object sender, EventArgs e)
        {
            Item item = new Item();

            item.jenis = Convert.ToString(cbJenisBarang.Text);
            item.harga = Convert.ToString(cbRangeHarga.Text);

            if (cbJenisBarang.Text == "Elektronik")
            {
                if (cbRangeHarga.Text == "500rb - 1jt")
                {
                    ControlElektronik elektronik = new ControlElektronik();
                    ControlClass.showControl(elektronik, panelCont);
                }
                else
                {
                    MessageBox.Show("Barang yang anda cari tidak ada.");
                }
            }
            else if (cbJenisBarang.Text == "Makanan")
            {
                if (cbRangeHarga.Text == "100rb - 200rb")
                {
                    ControlMakanan makanan = new ControlMakanan();
                    ControlClass.showControl(makanan, panelCont);
                }
                else
                {
                    MessageBox.Show("Barang yang anda cari tidak ada.");
                }
            }
            else if (cbJenisBarang.Text == "Baju")
            {
                if (cbRangeHarga.Text == "200rb - 500rb")
                {
                    Baju bj = new Baju();
                    ControlClass.showControl(bj, panelCont);
                }
                else
                {
                    MessageBox.Show("Barang yang anda cari tidak ada.");
                }
            }
            cbJenisBarang.Text = "Jenis Barang";
            cbRangeHarga.Text  = "Range Harga";
        }
Пример #3
0
        private void button1_Click(object sender, EventArgs e)
        {//button home
            ListItem listitem = new ListItem();

            ControlClass.showControl(listitem, panelCont);
        }