Esempio n. 1
0
        public void ResetCache()
        {
            Debug.Assert(_ticketWorkspace.Ticket == null);

            if (_tableWorkspace == null)
            {
                var selectedDepartment  = SelectedDepartment != null ? SelectedDepartment.Id : 0;
                var selectedTableScreen = SelectedTableScreen != null ? SelectedTableScreen.Id : 0;

                SelectedTableScreen = null;
                SelectedDepartment  = null;

                _tableScreens         = null;
                _departments          = null;
                _permittedDepartments = null;
                _reasons            = null;
                _lastTwoWorkPeriods = null;
                _users               = null;
                _rules               = null;
                _actions             = null;
                _vatTemplates        = null;
                _taxServiceTemplates = null;

                if (selectedTableScreen > 0 && TableScreens.Count(x => x.Id == selectedTableScreen) > 0)
                {
                    SelectedTableScreen = TableScreens.Single(x => x.Id == selectedTableScreen);
                }
                if (selectedDepartment > 0 && Departments.Count(x => x.Id == selectedDepartment) > 0)
                {
                    SelectedDepartment = Departments.Single(x => x.Id == selectedDepartment);
                }
            }
        }
Esempio n. 2
0
 public void UpdateTables(int tableScreenId, int pageNo)
 {
     SelectedTableScreen = null;
     if (tableScreenId > 0)
     {
         SelectedTableScreen = TableScreens.Single(x => x.Id == tableScreenId);
         AppServices.MainDataContext.UpdateTableData(SelectedTableScreen, pageNo);
     }
 }