private void GenderAdapterOnItemClick(object sender, GendersAdapterClickEventArgs e)
        {
            try
            {
                var position = e.Position;
                if (position >= 0)
                {
                    var item = GenderAdapter.GetItem(position);
                    if (item != null)
                    {
                        var check = GenderAdapter.GenderList.Where(a => a.GenderSelect).ToList();
                        if (check.Count > 0)
                        {
                            foreach (var all in check)
                            {
                                all.GenderSelect = false;
                            }
                        }

                        item.GenderSelect = true;
                        GenderAdapter.NotifyDataSetChanged();

                        Gender = item.GenderId;
                    }
                }
            }
            catch (Exception exception)
            {
                Console.WriteLine(exception);
            }
        }
Ejemplo n.º 2
0
        private void GenderAdapterOnItemClick(object sender, GendersAdapterClickEventArgs e)
        {
            try
            {
                var position = e.Position;
                switch (position)
                {
                case >= 0:
                {
                    var item = GenderAdapter.GetItem(position);
                    if (item != null)
                    {
                        var check = GenderAdapter.GenderList.Where(a => a.GenderSelect).ToList();
                        switch (check.Count)
                        {
                        case > 0:
                        {
                            foreach (var all in check)
                            {
                                all.GenderSelect = false;
                            }
                            break;
                        }
                        }

                        item.GenderSelect = true;
                        GenderAdapter.NotifyDataSetChanged();

                        Gender = item.GenderId;
                    }

                    break;
                }
                }
            }
            catch (Exception exception)
            {
                Methods.DisplayReportResultTrack(exception);
            }
        }