示例#1
0
        private async void BtnPhones_Click(object sender, EventArgs e)
        {
            var db           = new DataBase();
            var phoneNumbers = new List <PhoneNumber>();

            if (_group.Id != 0)
            {
                phoneNumbers = await db.PhoneNumbers.Where(d =>
                                                           !d.Deleted && d.GroupNode.Any(f => !f.Deleted && f.GroupId == _group.Id)).ToListAsync();
            }

            var phoneForm = new Phones(ref phoneNumbers, 0, 0, true);

            phoneForm.ShowDialog();
            _gotPhone     = true;
            _phoneNumbers = phoneNumbers;
        }