Esempio n. 1
0
        private async void BtnSurNameFillFrid_Click(object sender, RoutedEventArgs e)
        {
            MembersService members = new MembersService();

            list = await members.GetMembersSurName();

            MemberDatagridview.ItemsSource = list.Take(numberOfRecPerPage);
            int count = list.Take(numberOfRecPerPage).Count();

            lblPageNumber.Content = count + " of " + list.Count;
            TotalNoPeople totalNoPeople = new TotalNoPeople();

            totalNoPeople.NoMales   = list.Where(x => x.Sex == "M").Count().ToString();
            totalNoPeople.NoFemales = list.Where(x => x.Sex == "F").Count().ToString();
            this.DataContext        = totalNoPeople;
            FillType = 8;
        }
Esempio n. 2
0
        private void BtnReset_Click(object sender, RoutedEventArgs e)
        {
            txbxName.Clear();
            txbxHNo.Clear();
            txbxSrNo.Clear();
            txbxPartFrom.Clear();
            txbxPartTo.Clear();
            txbxEpicId.Clear();
            txbxRelative.Clear();

            MemberDatagridview.ItemsSource = null;

            list = GetTypeOfFill(FillType, list);
            MemberDatagridview.ItemsSource = list.Take(numberOfRecPerPage);
            int           count         = list.Take(numberOfRecPerPage).Count();
            TotalNoPeople totalNoPeople = new TotalNoPeople();

            totalNoPeople.NoMales   = list.Where(x => x.Sex == "M").Count().ToString();
            totalNoPeople.NoFemales = list.Where(x => x.Sex == "F").Count().ToString();
            this.DataContext        = totalNoPeople;
            lblPageNumber.Content   = count + " of " + list.Count;
        }