コード例 #1
0
        private void btnDisplayTable_Click_1(object sender, EventArgs e)
        {
            subscriberBLL          = new SubscriberBLL();
            gridMembers.DataSource = null;

            if (comboMembers.SelectedIndex == 0)
            {
                gridMembers.DataSource = subscriberBLL.GetAll().Where(x => x.IsActive == true);
            }
            else if (comboMembers.SelectedIndex == 1)
            {
                gridMembers.DataSource = subscriberBLL.Get5LastSubscribers().Where(x => x.IsActive == true);
            }
            else if (comboMembers.SelectedIndex == 2)
            {
                gridMembers.DataSource = subscriberBLL.Get10LastSubscribers().Where(x => x.IsActive == true);
            }
        }