Exemple #1
0
        private void listViewGroup_DoubleClick(object sender, EventArgs e)
        {
            IClient client = (IClient)listViewGroup.SelectedItems[0].Tag;

            client = ServicesProvider.GetInstance().GetClientServices().FindTiers(client.Id, client.Type);
            if (client is Group)
            {
                ClientForm form = new ClientForm((Group)client, _mdiParent);
                form.ShowDialog();
            }
            else if (client is Village)
            {
                NonSolidaryGroupForm form = new NonSolidaryGroupForm((Village)client);
                form.ShowDialog();
            }
        }
        private void listViewGroup_DoubleClick(object sender, EventArgs e)
        {
            var data       = (object[])listViewGroup.SelectedItems[0].Tag;
            var clientId   = (int)data[0];
            var clientType = (OClientTypes)data[1];

            var client = ServicesProvider.GetInstance().GetClientServices().FindTiers(clientId, clientType);

            if (client is Group)
            {
                var form = new ClientForm((Group)client, _mdiParent);
                form.ShowDialog();
            }
            else if (client is Village)
            {
                var form = new NonSolidaryGroupForm((Village)client, _applicationController);
                form.ShowDialog();
            }
        }