Ejemplo n.º 1
0
        private void cmbFonksiyonBulKategoriSec_SelectedIndexChanged(object sender, EventArgs e)
        {
            lstFonksiyonBulFonksiyonListele.Items.Clear();
            SelectedCategory = (Category)cmbFonksiyonBulKategoriSec.SelectedItem;
            FunctionRepository FuncRepository   = new FunctionRepository();
            List <Function>    FullFunction     = FuncRepository.GetAll();
            List <Function>    FilteredFunction = new List <Function>();

            foreach (Function item in FullFunction)
            {
                if (item.Categories != null && item.Categories.Contains(SelectedCategory))
                {
                    FilteredFunction.Add(item);
                }
            }

            foreach (Function item in FilteredFunction)
            {
                ListViewItem li = new ListViewItem();
                li.Text = item.Name;
                li.SubItems.Add(item.Description);
                li.SubItems.Add(item.Code);
                li.Tag = item;
                lstFonksiyonBulFonksiyonListele.Items.Add(li);
            }
        }
Ejemplo n.º 2
0
        private void lstFonksiyonBulFonksiyonListeleDoldur()
        {
            lstFonksiyonBulFonksiyonListele.Items.Clear();
            FunctionRepository FuncRepository = new FunctionRepository();

            foreach (Function item in FuncRepository.GetAll())
            {
                ListViewItem li = new ListViewItem();
                li.Text = item.Name;
                li.SubItems.Add(item.Description);
                li.SubItems.Add(item.Code);
                li.Tag = item;
                lstFonksiyonBulFonksiyonListele.Items.Add(li);
            }
        }
Ejemplo n.º 3
0
 public List <Function> GetAll()
 {
     return(functionRepository.GetAll());
 }