コード例 #1
0
        private void FillComboBrokenProc()
        {
            //Mimics FormRpBrokenAppointments.cs
            int index = 0;
            BrokenApptProcedure brokenApptCodeDB = (BrokenApptProcedure)PrefC.GetInt(PrefName.BrokenApptProcedure);

            switch (brokenApptCodeDB)
            {
            case BrokenApptProcedure.None:
            case BrokenApptProcedure.Missed:
                index = comboBrokenProcType.Items.Add(Lans.g(this, brokenApptCodeDB.ToString()) + ": (D9986)");
                break;

            case BrokenApptProcedure.Cancelled:
                index = comboBrokenProcType.Items.Add(Lans.g(this, brokenApptCodeDB.ToString()) + ": (D9987)");
                break;

            case BrokenApptProcedure.Both:
                comboBrokenProcType.Items.Add(Lans.g(this, BrokenApptProcedure.Missed.ToString()) + ": (D9986)");
                comboBrokenProcType.Items.Add(Lans.g(this, BrokenApptProcedure.Cancelled.ToString()) + ": (D9987)");
                index = comboBrokenProcType.Items.Add(Lans.g(this, brokenApptCodeDB.ToString()));
                break;
            }
            comboBrokenProcType.SelectedIndex = index;
        }
コード例 #2
0
        private void radioProcs_CheckedChanged(object sender, EventArgs e)
        {
            if (radioProcs.Checked)
            {
                listOptions.Items.Clear();
                listOptions.SelectionMode = SelectionMode.One;
                int index = 0;
                _listBrokenProcOptions.Clear();
                BrokenApptProcedure brokenApptCodeDB = (BrokenApptProcedure)PrefC.GetInt(PrefName.BrokenApptProcedure);
                switch (brokenApptCodeDB)
                {
                case BrokenApptProcedure.None:
                case BrokenApptProcedure.Missed:
                    _listBrokenProcOptions.Add(BrokenApptProcedure.Missed);
                    index           = listOptions.Items.Add(Lans.g(this, brokenApptCodeDB.ToString()) + ": (D9986)");
                    labelDescr.Text = Lan.g(this, "Broken appointments based on ADA code D9986");
                    break;

                case BrokenApptProcedure.Cancelled:
                    _listBrokenProcOptions.Add(BrokenApptProcedure.Cancelled);
                    index           = listOptions.Items.Add(Lans.g(this, brokenApptCodeDB.ToString()) + ": (D9987)");
                    labelDescr.Text = Lan.g(this, "Broken appointments based on ADA code D9987");
                    break;

                case BrokenApptProcedure.Both:
                    _listBrokenProcOptions.Add(BrokenApptProcedure.Missed);
                    _listBrokenProcOptions.Add(BrokenApptProcedure.Cancelled);
                    _listBrokenProcOptions.Add(BrokenApptProcedure.Both);
                    listOptions.Items.Add(Lans.g(this, BrokenApptProcedure.Missed.ToString()) + ": (D9986)");
                    listOptions.Items.Add(Lans.g(this, BrokenApptProcedure.Cancelled.ToString()) + ": (D9987)");
                    index           = listOptions.Items.Add(Lans.g(this, brokenApptCodeDB.ToString()));
                    labelDescr.Text = Lan.g(this, "Broken appointments based on ADA code D9986 or D9987");
                    break;
                }
                listOptions.SetSelected(index, true);
                listOptions.Visible = true;
            }
        }