示例#1
0
        private void LoadHang()
        {
            List <Hang> hangs = servicecombobox.getAllHang();

            foreach (Hang hang in hangs)
            {
                ItemCombobox item = new ItemCombobox(hang.ThongTin, hang.ID);
                this.cbbHang.Items.Add(item);
            }
        }
示例#2
0
        private void LoadHinhThuc()
        {
            List <HinhThuc> hinhthucs = servicecombobox.getAllHinhThuc();

            foreach (HinhThuc hinhthuc in hinhthucs)
            {
                ItemCombobox item = new ItemCombobox(hinhthuc.ThongTin, hinhthuc.ID);
                this.cbbSoNguoi.Items.Add(item);
            }
        }
示例#3
0
        private void LoadTang()
        {
            List <String> tangs = servicecombobox.getAllTang();

            tangs.Sort();
            List <ItemCombobox> item = new List <ItemCombobox>();

            foreach (String tang in tangs)
            {
                ItemCombobox tmp = new ItemCombobox("Tang " + tang, Int32.Parse(tang));
                item.Add(tmp);
            }
            item.Sort(delegate(ItemCombobox x, ItemCombobox y)
            {
                return(Int32.Parse(x.Value.ToString()) > Int32.Parse(y.Value.ToString()) ? 1 : -1);
            });
            foreach (ItemCombobox i in item)
            {
                this.cbbTang.Items.Add(i);
            }
        }