コード例 #1
0
        private async void BtnPhones_Click(object sender, EventArgs e)
        {
            if (_isItOrganization)
            {
                var orga      = (Organization)TvOrganization.SelectedObject;
                var db        = new DataBase();
                var phoneList = await db.PhoneNumbers.Where(d =>
                                                            !d.Deleted && d.OrganizationNode.Any(f => f.Organization.Id == orga.Id)).ToListAsync();

                var phone = new Phones(ref phoneList, orga.Id, 1, false);
                phone.Show();
            }
            else
            {
                var member    = ((MemberWithGroup)TvGroupsMembers.SelectedObject).Member;
                var group     = ((MemberWithGroup)TvGroupsMembers.SelectedObject).Group;
                var doYouMean = new DoYouMean(ref group, ref member, 1);
                doYouMean.Show();
            }
        }