private void butWebSchedRecallBlockouts_Click(object sender, EventArgs e)
        {
            string[]    arrayDefNums      = PrefC.GetString(PrefName.WebSchedRecallIgnoreBlockoutTypes).Split(new char[] { ',' }); //comma-delimited list.
            List <long> listBlockoutTypes = new List <long>();

            foreach (string strDefNum in arrayDefNums)
            {
                listBlockoutTypes.Add(PIn.Long(strDefNum));
            }
            List <Def>           listBlockoutTypeDefs = Defs.GetDefs(DefCat.BlockoutTypes, listBlockoutTypes);
            FormDefinitionPicker FormDP = new FormDefinitionPicker(DefCat.BlockoutTypes, listBlockoutTypeDefs);

            FormDP.HasShowHiddenOption  = true;
            FormDP.IsMultiSelectionMode = true;
            FormDP.ShowDialog();
            if (FormDP.DialogResult == DialogResult.OK)
            {
                listboxWebSchedRecallIgnoreBlockoutTypes.Items.Clear();
                foreach (Def defCur in FormDP.ListSelectedDefs)
                {
                    listboxWebSchedRecallIgnoreBlockoutTypes.Items.Add(defCur.ItemName);
                }
                string strListWebSChedRecallIgnoreBlockoutTypes = String.Join(",", FormDP.ListSelectedDefs.Select(x => x.DefNum));
                Prefs.UpdateString(PrefName.WebSchedRecallIgnoreBlockoutTypes, strListWebSChedRecallIgnoreBlockoutTypes);
            }
        }
Exemple #2
0
        ///<summary>Pop a def picker to allow the user to select which def they wish to use for sales tax returns</summary>
        private void butChooseRetAdjType_Click(object sender, EventArgs e)
        {
            FormDefinitionPicker formDP = new FormDefinitionPicker(DefCat.AdjTypes);

            if (formDP.ShowDialog() == DialogResult.OK)
            {
                _defCurrentSalesTaxReturnAdjType = formDP.ListSelectedDefs[0];
                textReturnAdjType.Text           = _defCurrentSalesTaxReturnAdjType.ItemName;
            }
        }
Exemple #3
0
        private void butWSNPAPickApptTypes_Click(object sender, EventArgs e)
        {
            FormDefinitionPicker FormDP = new FormDefinitionPicker(DefCat.WebSchedNewPatApptTypes, _listWSNPAOperatoryDefs);

            FormDP.IsMultiSelectionMode = true;
            if (FormDP.ShowDialog() == DialogResult.OK)
            {
                _listWSNPAOperatoryDefs = FormDP.ListSelectedDefs.Select(x => x.Copy()).ToList();
                FillWSNPAApptTypes();
            }
        }
Exemple #4
0
        private void butBillingType_Click(object sender, EventArgs e)
        {
            FormDefinitionPicker FormDP = new FormDefinitionPicker(DefCat.BillingTypes);

            FormDP.HasShowHiddenOption  = false;
            FormDP.IsMultiSelectionMode = false;
            FormDP.ShowDialog();
            if (FormDP.DialogResult == DialogResult.OK)
            {
                textCompareString.Text = FormDP.ListSelectedDefs?[0]?.ItemName ?? "";
            }
        }
Exemple #5
0
        private void butPickPaymentGroup_Click(object sender, EventArgs e)
        {
            FormDefinitionPicker FormDP = new FormDefinitionPicker(DefCat.ClaimPaymentGroups);

            FormDP.ShowDialog();
            if (FormDP.DialogResult == DialogResult.OK)
            {
                if (FormDP.ListSelectedDefs.Count < 1)
                {
                    FillComboPaymentGroup();
                }
                else
                {
                    FillComboPaymentGroup(FormDP.ListSelectedDefs[0].DefNum);
                }
            }
        }
Exemple #6
0
        private void butSelect_Click(object sender, EventArgs e)
        {
            long defNumParent           = PIn.Long(DefCur.ItemValue);//ItemValue could be blank, in which case defNumCur will be 0
            FormDefinitionPicker FormDP = new FormDefinitionPicker(DefCur.Category, _defsList.ToList().FindAll(x => x.DefNum == defNumParent), DefCur.DefNum);

            FormDP.IsMultiSelectionMode = false;
            FormDP.HasShowHiddenOption  = false;
            FormDP.ShowDialog();
            if (FormDP.DialogResult != DialogResult.OK)
            {
                return;
            }
            Def selectedDef = FormDP.ListSelectedDefs.DefaultIfEmpty(new Def()
            {
                ItemName = ""
            }).First();

            _selectedValueString = selectedDef.DefNum == 0?"":selectedDef.DefNum.ToString();        //list should have exactly one def in it, but this is safe
            textValue.Text       = selectedDef.ItemName;
        }