示例#1
0
        private void ShowAdvertisementData(List <Advertisement> rows)
        {
            listView1.Items.Clear();
            int     code         = 0;
            Country combocountry = new Country();

            combocountry = (Country)comboBox1.SelectedItem;
            City combocity = new City();

            combocity = (City)comboBox2.SelectedItem;
            Category combocategory = new Category();

            combocategory = (Category)comboBox3.SelectedItem;
            SubCategory combosubCategory = new SubCategory();

            combosubCategory = (SubCategory)comboBox4.SelectedItem;
            Discovered combodiscovered = new Discovered();

            combodiscovered = (Discovered)comboBox5.SelectedItem;
            if (combocountry.NameCountry == "" && combocategory.NameCategory == "" && combodiscovered.Status == "")
            {
                code = 0;
                viewer.ViewData(rows, code);
                return;
            }
            if (combocountry.NameCountry != "" && combocategory.NameCategory != "" && combodiscovered.Status != "" && combocity.NameCity != "" && combosubCategory.NameSubcategory != "")
            {
                code = 1;
                viewer.ViewData(rows, code);
                return;
            }
        }
 private void ShowData(List <Country> rows)
 {
     viewer.ViewData(rows.Select(s => (IViewRow)s));
 }
 private void ShowData(List <SubCategory> rows)
 {
     viewer.ViewData(rows.Select(s => (IViewRow)s));
 }
 private void Paginator_ShowRowsChanges(object sender, EventArgs e)
 {
     viewer.ViewData(paginator.ShowRows);
 }