public void OnSelection(MaterialDialog p0, View p1, int itemId, ICharSequence itemString)
        {
            try
            {
                if (TypeDialog == "Categories")
                {
                    CategoryId       = CategoriesController.ListCategoriesJob.FirstOrDefault(categories => categories.CategoriesName == itemString.ToString())?.CategoriesId;
                    TxtCategory.Text = itemString.ToString();
                }
                else if (TypeDialog == "JobType")
                {
                    JobTypeId       = WoWonderTools.GetJobTypeList(this)?.FirstOrDefault(a => a.Value == itemString.ToString()).Key.ToString();
                    TxtJobType.Text = itemString.ToString();
                }
                else if (TypeDialog == "SalaryDate")
                {
                    SalaryDateId       = WoWonderTools.GetSalaryDateList(this)?.FirstOrDefault(a => a.Value == itemString.ToString()).Key.ToString();
                    TxtSalaryDate.Text = itemString.ToString();
                }
                else if (TypeDialog == "Currency")
                {
                    TxtCurrency.Text = itemString.ToString();
                    CurrencyId       = itemId.ToString();
                }
                else if (TypeDialog == "AddQuestion")
                {
                    TxtAddQuestion.Text = GetText(Resource.String.Lbl_AddQuestion) + "(" + MAdapter.ItemCount + ")";

                    var addQuestionId = WoWonderTools.GetAddQuestionList(this)?.FirstOrDefault(a => a.Value == itemString.ToString()).Key.ToString();
                    //SetQuestionOne(addQuestionId);
                    MAdapter.QuestionList.Add(new QuestionJob()
                    {
                        Id           = MAdapter.ItemCount,
                        QuestionType = addQuestionId
                    });
                    MAdapter.NotifyItemInserted(MAdapter.QuestionList.IndexOf(MAdapter.QuestionList.Last()));
                }
                else if (TypeDialog == "AddQuestionAdapter")
                {
                    TxtAddQuestion.Text = GetText(Resource.String.Lbl_AddQuestion) + "(" + MAdapter.ItemCount + ")";

                    var addQuestionId = WoWonderTools.GetAddQuestionList(this)?.FirstOrDefault(a => a.Value == itemString.ToString()).Key.ToString();

                    var data = MAdapter.QuestionList.FirstOrDefault(a => a.Id == ItemQuestionJob.Id && a.QuestionType == ItemQuestionJob.QuestionType);
                    if (data != null)
                    {
                        data.QuestionType = addQuestionId;
                        MAdapter.NotifyItemChanged(MAdapter.QuestionList.IndexOf(data));
                    }
                }
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
        public void OnSelection(MaterialDialog p0, View p1, int itemId, ICharSequence itemString)
        {
            try
            {
                switch (TypeDialog)
                {
                case "Categories":
                    CategoryId       = CategoriesController.ListCategoriesJob.FirstOrDefault(categories => categories.CategoriesName == itemString.ToString())?.CategoriesId;
                    TxtCategory.Text = itemString.ToString();
                    break;

                case "JobType":
                    JobTypeId       = WoWonderTools.GetJobTypeList(this)?.FirstOrDefault(a => a.Value == itemString.ToString()).Key.ToString();
                    TxtJobType.Text = itemString.ToString();
                    break;

                case "SalaryDate":
                    SalaryDateId       = WoWonderTools.GetSalaryDateList(this)?.FirstOrDefault(a => a.Value == itemString.ToString()).Key.ToString();
                    TxtSalaryDate.Text = itemString.ToString();
                    break;

                case "Currency":
                    TxtCurrency.Text = itemString.ToString();
                    CurrencyId       = WoWonderTools.GetIdCurrency(itemString.ToString());
                    break;

                case "AddQuestion":
                {
                    TxtAddQuestion.Text = GetText(Resource.String.Lbl_AddQuestion) + "(" + MAdapter.ItemCount + ")";

                    var addQuestionId = WoWonderTools.GetAddQuestionList(this)?.FirstOrDefault(a => a.Value == itemString.ToString()).Key.ToString();
                    //SetQuestionOne(addQuestionId);
                    MAdapter.QuestionList.Add(new QuestionJob
                        {
                            Id           = MAdapter.ItemCount,
                            QuestionType = addQuestionId
                        });
                    MAdapter.NotifyItemInserted(MAdapter.QuestionList.IndexOf(MAdapter.QuestionList.Last()));
                    break;
                }

                case "AddQuestionAdapter":
                {
                    TxtAddQuestion.Text = GetText(Resource.String.Lbl_AddQuestion) + "(" + MAdapter.ItemCount + ")";

                    var addQuestionId = WoWonderTools.GetAddQuestionList(this)?.FirstOrDefault(a => a.Value == itemString.ToString()).Key.ToString();

                    var data = MAdapter.QuestionList.FirstOrDefault(a => a.Id == ItemQuestionJob.Id && a.QuestionType == ItemQuestionJob.QuestionType);
                    if (data != null)
                    {
                        data.QuestionType = addQuestionId;
                        MAdapter.NotifyItemChanged(MAdapter.QuestionList.IndexOf(data));
                    }

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