private void FillGridClinics()
        {
            _listClinicsForGroup.Clear();
            if (gridGroups.GetSelectedIndex() >= 0)
            {
                _listClinicsForGroup = Clinics.GetClinics(gridGroups.SelectedTag <FeeSchedGroup>().ListClinicNumsAll).OrderBy(x => x.Abbr).ToList();
            }
            gridClinics.BeginUpdate();
            gridClinics.ListGridColumns.Clear();
            GridColumn col;

            col = new GridColumn(Lan.g(this, "Abbr"), -1);
            gridClinics.ListGridColumns.Add(col);
            col = new GridColumn(Lan.g(this, "Description"), -2);
            gridClinics.ListGridColumns.Add(col);
            gridClinics.ListGridRows.Clear();
            GridRow row;

            foreach (Clinic clinicCur in _listClinicsForGroup)
            {
                row = new GridRow();
                row.Cells.Add(clinicCur.Abbr);
                row.Cells.Add(clinicCur.Description + (clinicCur.IsHidden?" (Hidden)":""));
                row.Tag = clinicCur;
                gridClinics.ListGridRows.Add(row);
            }
            gridClinics.EndUpdate();
        }
Example #2
0
 public FormFeeSchedGroupEdit(FeeSchedGroup feeSchedGroupCur)
 {
     InitializeComponent();
     Lan.F(this);
     _feeSchedGroupCur   = feeSchedGroupCur;
     _listClinicsInGroup = Clinics.GetClinics(_feeSchedGroupCur.ListClinicNumsAll ?? new List <long>());
     if (_feeSchedGroupCur.FeeSchedNum > 0)
     {
         _listOtherGroupsWithFeeSched = FeeSchedGroups.GetAllForFeeSched(_feeSchedGroupCur.FeeSchedNum)
                                        .FindAll(x => x.FeeSchedGroupNum != _feeSchedGroupCur.FeeSchedGroupNum);
     }
     _listFeeScheds = FeeScheds.GetDeepCopy(true);
     //Global fee schedules cannot be localized, so there can't be clinic overrides for them. This block also exists in FormFeeSchedEdit.cs
     _listFeeScheds.RemoveAll(x => x.IsGlobal == true);
 }