Esempio n. 1
0
        private void AccountantWindow_Load(object sender, EventArgs e)
        {
            Gridviews.accountantgridview = Accountantgridview;
            foreach (var item in Enum.GetValues(typeof(ProductType)))
            {
                FilterComboBox.AddItem(item.ToString());
            }

            Accountantgridview.DataSource = Accountant.AccountantList;
            Accountantgridview.Refresh();
        }
Esempio n. 2
0
        private void FilterComboBox_onItemSelected(object sender, EventArgs e)
        {
            Accountant.CopyAccountantList = new BindingList <OrderItem>();
            foreach (var item in Accountant.AccountantList)
            {
                if (FilterComboBox.selectedValue.ToString() == item.Type.ToString())
                {
                    Accountant.CopyAccountantList.Add(item);
                }
            }

            if (FilterComboBox.selectedValue.ToString() == ProductType.მენიუ.ToString())
            {
                Accountantgridview.DataSource = Accountant.AccountantList;
            }
            else
            {
                Accountantgridview.DataSource = Accountant.CopyAccountantList;
            }
            Accountantgridview.Refresh();
        }