示例#1
0
 public CellTextMultiUser(CellConstruct construct, DataHandlerUser userHandler, ChooseUsers chooseUsers)
     : base(construct)
 {
     _dataHandlerUser = userHandler;
     _chooseUsers = chooseUsers;
     _waitingDelegateInfos = new List<UserInfo>();
 }
示例#2
0
        public MainPage(IDictionary<string, string> initParams)
        {
            InitializeComponent();

            eventaggregator = EventAggregator.Instance;
            eventaggregator.Subscribe<SPList>(new Action<SPList>(ListUpdatedSubscription));
            eventaggregator.Subscribe<LogErrorMessage>(new Action<LogErrorMessage>(AddMessageToLog));
            _sLists = new StringBuilder();
            InitParams = initParams;

            if (Constants.Logging)
                _sLog = new StringBuilder();

            if (HtmlPage.Document.QueryString.ContainsKey("save"))
                btnSave.Visibility = Visibility.Visible;

            _excelGrid = new ExcelGrid(excelGridControl, 30, _sLog, txtTextLine, lblTextBlock);

            AddToLog("Control Instantiated");

            _dataHandlerUser = new DataHandlerUser(_excelGrid, this);
            _liveUpdateHandler = new LiveUpdateHandler(this);

            // Fetching Login info and groups for the login user
            _userAccessHandler = new UserAccessHandler(this);
            _userAccessHandler.UserGroupsRetrieved += handler_UserGroupsRetrieved;
            _userAccessHandler.GetUserLoginIdAndMemberGroups();

            _handler = new DataHandler(_excelGrid, this);
            _handler.ListDataRetrieved += handler_ListDataRetrieved;
            _handler.ListsRetrieved += handler_ListsRetrieved;
            _handler.ListDeleted += handler_ListDeleted;


            _handler.GetSiteLists();
            _handler.GetFrequencyValidations();


            chooseUsers.InitializeComponent(_dataHandlerUser, _excelGrid);
            sbMenuShow.Completed += sbMenuShow_Completed;
            sbMenuHide.Completed += sbMenuHide_Completed;
            ldgLists.StartRotating();

            _excelGrid.DisplayColumnSpacer = true;
            _excelGrid.RowChangedEvent += excelGrid_RowChangedEvent;
            _excelGrid.AttachHandler(this);

            _excelGrid.UpdateStatus("Retrieving lists...");

            _excelGrid.AddHint("Use the list dropdown to select another list to edit. If a list is already loading you'll have to wait until it's finished before selecting another.");
            _excelGrid.AddHint("Use the 'Live Update' button to either generate or update tasks in the live system. If a task with the same ID1 was already generated in the system in the last day, the task will be updated, otherwise a new one will be generated.");
            _excelGrid.AddHint("View the version history of a task using the 'Version History' button.");
            _excelGrid.AddHint("Setup Alerts using the 'Alert Me' button. Try changing the frequency of the alert to 'Daily' or 'Weekly' if you find you're receiving too many.");
            _excelGrid.AddHint("You'll only be able to select the relevant 'Business Area' under an 'Asset Category'. These have been setup by the admin team. Please email 'BCheck L2 Support' if you believe the structure is incorrect.");
            _excelGrid.AddHint("Clicking on a user cell will popup the user edit window. From here you can add and remove users. If the user hasn't been inserted before, the name will turn blue as the system tries to identify them. If the user cannot be indentified the name will turn red, otherwise it will turn grey.");

            sbMenuShow.Begin();

            MessageDialog.SetupMessage(LayoutRoot);
            _columnFactory = new CustomColumnFactory();


            _deleteReady = false;
            _settingsAllowed = false;
            _settingsReady = false;

            string CurrentUrl = HtmlPage.Document.DocumentUri.ToString();
            _isRcoUrl = (CurrentUrl.ToUpper().IndexOf(Constants.RcoChecklistAdminPage) > 0) ? true : false;

            _bcontrolDataHandler = new BcontrolDataHandler(this);

            activityPopup.InitializeComponent(_bcontrolDataHandler, activityPopup.SearchResultsGrid);

            BusinessUnits = _handler.GetBusinessUnits();

        }