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);
            }
        }
        private void FillListBoxWebSchedBlockoutTypes(string[] arrayBlockoutTypeDefNums, ListBox listBoxToFill)
        {
            List <long> listBlockoutTypes = new List <long>();

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

            listBoxToFill.Items.Clear();
            foreach (Def defCur in listBlockoutTypeDefs)
            {
                listBoxToFill.Items.Add(defCur.ItemName);
            }
        }
Beispiel #3
0
        private void FillGridWebSchedNewPatApptOps()
        {
            int opNameWidth = 150;
            int clinicWidth = 150;

            if (!PrefC.HasClinicsEnabled)
            {
                opNameWidth += clinicWidth;
            }
            gridWebSchedNewPatApptOps.BeginUpdate();
            gridWebSchedNewPatApptOps.ListGridColumns.Clear();
            gridWebSchedNewPatApptOps.ListGridColumns.Add(new GridColumn(Lan.g("FormEServicesSetup", "Op Name"), opNameWidth));
            gridWebSchedNewPatApptOps.ListGridColumns.Add(new GridColumn(Lan.g("FormEServicesSetup", "Abbrev"), 60));
            if (PrefC.HasClinicsEnabled)
            {
                gridWebSchedNewPatApptOps.ListGridColumns.Add(new GridColumn(Lan.g("FormEServicesSetup", "Clinic"), clinicWidth));
            }
            gridWebSchedNewPatApptOps.ListGridColumns.Add(new GridColumn(Lan.g("FormEServicesSetup", "Provider"), 60));
            gridWebSchedNewPatApptOps.ListGridColumns.Add(new GridColumn(Lan.g("FormEServicesSetup", "Hygienist"), 60));
            gridWebSchedNewPatApptOps.ListGridColumns.Add(new GridColumn(Lan.g("FormEServicesSetup", "ApptTypes"), 0));
            gridWebSchedNewPatApptOps.ListGridRows.Clear();
            //A list of all operatories that are considered for web sched new pat appt.
            List <Operatory> listWSNPAOps     = Operatories.GetOpsForWebSchedNewPatAppts();
            List <long>      listWSNPADefNums = listWSNPAOps.SelectMany(x => x.ListWSNPAOperatoryDefNums).Distinct().ToList();
            List <Def>       listWSNPADefs    = Defs.GetDefs(DefCat.WebSchedNewPatApptTypes, listWSNPADefNums);
            GridRow          row;

            foreach (Operatory op in listWSNPAOps)
            {
                row = new GridRow();
                row.Cells.Add(op.OpName);
                row.Cells.Add(op.Abbrev);
                if (PrefC.HasClinicsEnabled)
                {
                    row.Cells.Add(Clinics.GetAbbr(op.ClinicNum));
                }
                row.Cells.Add(Providers.GetAbbr(op.ProvDentist));
                row.Cells.Add(Providers.GetAbbr(op.ProvHygienist));
                //Display the name of all "appointment types" (definition.ItemName) that are associated with the current operatory.
                row.Cells.Add(string.Join(", ", listWSNPADefs.Where(x => op.ListWSNPAOperatoryDefNums.Any(y => y == x.DefNum)).Select(x => x.ItemName)));
                row.Tag = op;
                gridWebSchedNewPatApptOps.ListGridRows.Add(row);
            }
            gridWebSchedNewPatApptOps.EndUpdate();
        }
Beispiel #4
0
 private void FormOperatoryEdit_Load(object sender, System.EventArgs e)
 {
     textOpName.Text               = OpCur.OpName;
     textAbbrev.Text               = OpCur.Abbrev;
     checkIsHidden.Checked         = OpCur.IsHidden;
     comboClinic.SelectedClinicNum = OpCur.ClinicNum;          //can be 0
     FillCombosProv();
     comboProv.SetSelectedProvNum(OpCur.ProvDentist);
     comboHyg.SetSelectedProvNum(OpCur.ProvHygienist);
     if (OpCur.ListWSNPAOperatoryDefNums != null)
     {
         //This is an existing operatory with WSNPA appointment types associated.  Go get them in order to display to the user.
         _listWSNPAOperatoryDefs = Defs.GetDefs(DefCat.WebSchedNewPatApptTypes, OpCur.ListWSNPAOperatoryDefNums);
     }
     FillWSNPAApptTypes();
     checkIsHygiene.Checked      = OpCur.IsHygiene;
     checkSetProspective.Checked = OpCur.SetProspective;
     checkIsWebSched.Checked     = OpCur.IsWebSched;
 }
Beispiel #5
0
 private void FormOperatoryEdit_Load(object sender, System.EventArgs e)
 {
     textOpName.Text       = OpCur.OpName;
     textAbbrev.Text       = OpCur.Abbrev;
     checkIsHidden.Checked = OpCur.IsHidden;
     if (PrefC.GetBool(PrefName.EasyNoClinics))
     {
         labelClinic.Visible = false;
         comboClinic.Visible = false;
         butPickClin.Visible = false;
     }
     _listClinics = new List <Clinic>()
     {
         new Clinic()
         {
             Abbr = Lan.g(this, "None")
         }
     };                                                                        //Seed with "None"
     Clinics.GetForUserod(Security.CurUser).ForEach(x => _listClinics.Add(x)); //do not re-organize from cache. They could either be alphabetizeded or sorted by item order.
     _listClinics.ForEach(x => comboClinic.Items.Add(x.Abbr));                 //Add to UI control
     //Set Selected nums
     _selectedClinicNum  = OpCur.ClinicNum;                                    //can be 0
     _selectedProvNum    = OpCur.ProvDentist;
     _selectedProvHygNum = OpCur.ProvHygienist;
     //Set comboindexes for compatibility with fillComboProvHyg
     comboProv.SelectedIndex = -1;
     comboHyg.SelectedIndex  = -1;
     comboClinic.IndexSelectOrSetText(_listClinics.FindIndex(x => x.ClinicNum == _selectedClinicNum)
                                      , () => { return(Clinics.GetAbbr(_selectedClinicNum)); });
     if (OpCur.ListWSNPAOperatoryDefNums != null)
     {
         //This is an existing operatory with WSNPA appointment types associated.  Go get them in order to display to the user.
         _listWSNPAOperatoryDefs = Defs.GetDefs(DefCat.WebSchedNewPatApptTypes, OpCur.ListWSNPAOperatoryDefNums);
     }
     FillWSNPAApptTypes();
     FillComboProvHyg();
     checkIsHygiene.Checked      = OpCur.IsHygiene;
     checkSetProspective.Checked = OpCur.SetProspective;
     checkIsWebSched.Checked     = OpCur.IsWebSched;
 }