Example #1
0
        private void UpdateDetail(bool reloadDetail)
        {
            try
            {
                if (reloadDetail)
                {
                    if (currentDetail is BaseDetail)
                    {
                        currentDetail.Reload();
                    }
                }
            }
            catch (Exception ex)
            {
                Program.Provider.Logger.Log("Error while loading data", ex);
                return;
            }


            bool permission = currentDetail.HasPermission(Users.CurrentUser, DataEvent.Update);

            headerControl.ActionControl.ShowEditButton = permission;
            buttonAddCompliance.Enabled = (permission && currentDetail.GetDetailDirectives().Length > 0);

            complianceDirectiveControl_SelectedItemsChanged(complianceControl, new SelectedItemsChangeEventArgs(0));

            baseDetailHeaderControl.UpdateInformation();
            generalInformationControl.UpdateInformation();
            compliancePerformanceControl.UpdateInformation();
            warrantyControl.UpdateInformation();
            easaControl.UpdateInformation();
            if (!currentDetail.InUse)
            {
                storeControl.UpdateInformation();
            }


            complianceControl.UpdateItems();
            complianceControl.DoubleClickEnable = permission;
            headerControl.ContextActionControl.ButtonPrint.Enabled = !(DisplayedDetailRecords.Length == 0);
        }
Example #2
0
 void GeneralDataAndPerformanceControlLLPMarkChecked(object sender, EventArgs e)
 {
     _compliancePerformanceControl.UpdateInformation();
 }