Пример #1
0
 private void ReloadDirective()
 {
     try
     {
         currentDirective.Reload();
     }
     catch (Exception ex)
     {
         Program.Provider.Logger.Log("Error while loading data", ex);
         return;
     }
     UpdateDirective();
 }
Пример #2
0
        /// <summary>
        /// Обновляет информацию о директиве
        /// </summary>
        /// <param name="reloadDirective">Синхронизировать ли с базой данных</param>
        private void UpdateScreen(bool reloadDirective)
        {
            if (reloadDirective)
            {
                try
                {
                    directive.Reload();
                }
                catch (Exception ex)
                {
                    Program.Provider.Logger.Log("Error while loading data", ex);
                    return;
                }
            }
            statusLinkLabel.Status = (Statuses)directive.Condition;
            statusLinkLabel.Text   = "Status: " + UsefulMethods.EnumToString(statusLinkLabel.Status);

            generalInformationControl.UpdateInformation();
            summaryDirectiveControl.UpdateInformation();
            complianceDirectiveControl.SetItemsArray(DisplayedRecords);
        }