public override void Refresh(Sungero.Presentation.FormRefreshEventArgs e) { if (!e.IsValid) { return; } var isResponsible = _obj.AccessRights.CanUpdate() && Functions.Module.CalculateParams(e, _obj, true, false, false, false, null); if (!isResponsible && !_obj.AccessRights.CanManage()) { e.AddInformation(RegistrationGroups.Resources.FormDisable); foreach (var property in _obj.State.Properties) { property.IsEnabled = false; } } if (_obj.AccessRights.CanUpdate() && Functions.Module.CalculateParams(e, _obj, false, true, false, false, null)) { _obj.State.Properties.CanRegisterIncoming.IsEnabled = true; _obj.State.Properties.CanRegisterOutgoing.IsEnabled = true; _obj.State.Properties.CanRegisterInternal.IsEnabled = true; _obj.State.Properties.CanRegisterContractual.IsEnabled = true; } else { _obj.State.Properties.Status.IsEnabled = false; } }
public override void Refresh(Sungero.Presentation.FormRefreshEventArgs e) { foreach (var property in _obj.State.Properties) { property.IsEnabled = string.IsNullOrWhiteSpace(_obj.Sid); } }
public override void Refresh(Sungero.Presentation.FormRefreshEventArgs e) { if (_obj.Assignee != null) { _obj.State.Properties.Assignee.IsEnabled = false; } }
public override void Refresh(Sungero.Presentation.FormRefreshEventArgs e) { if (Functions.AcquaintanceTask.NeedShowSignRecommendation(_obj, _obj.IsElectronicAcquaintance.Value, _obj.DocumentGroup.OfficialDocuments.FirstOrDefault())) { e.AddWarning(_obj.Info.Properties.IsElectronicAcquaintance, AcquaintanceTasks.Resources.RecommendApprovalSignature); } }
public override void Refresh(Sungero.Presentation.FormRefreshEventArgs e) { base.Refresh(e); if (_obj.IsManyAddressees == true) { _obj.State.Properties.Correspondent.IsVisible = false; _obj.State.Properties.Correspondent.IsRequired = false; _obj.State.Properties.DistributionCorrespondent.IsVisible = true; _obj.State.Properties.Addressee.IsEnabled = false; _obj.State.Properties.DeliveryMethod.IsEnabled = false; _obj.State.Properties.Addressees.IsEnabled = true; _obj.State.Properties.Addressees.Properties.Addressee.IsEnabled = !Functions.OutgoingDocumentBase.DisableAddresseesOnRegistration(_obj, e); } else { _obj.State.Properties.Correspondent.IsRequired = true; _obj.State.Properties.Correspondent.IsVisible = true; _obj.State.Properties.DistributionCorrespondent.IsVisible = false; _obj.State.Properties.Addressee.IsEnabled = !Functions.OutgoingDocumentBase.DisableAddresseesOnRegistration(_obj, e) && (_obj.Correspondent == null || Sungero.Parties.CompanyBases.Is(_obj.Correspondent)); _obj.State.Properties.DeliveryMethod.IsEnabled = true; _obj.State.Properties.Addressees.IsEnabled = false; } }
public override void Refresh(Sungero.Presentation.FormRefreshEventArgs e) { _obj.State.Properties.DocumentFlow.IsEnabled = _obj.State.IsInserted; _obj.State.Properties.AutoNumbering.IsVisible = _obj.NumberingType == NumberingType.Numerable; _obj.State.Properties.ProjectsAccounting.IsEnabled = _obj.DocumentType == null || _obj.DocumentType.DocumentTypeGuid != Constants.Module.ProjectDocumentTypeGuid; _obj.State.Properties.GrantRightsToProject.IsEnabled = _obj.ProjectsAccounting == true; }
public override void Refresh(Sungero.Presentation.FormRefreshEventArgs e) { if (_obj.Task.SchemeVersion == 1) { _obj.State.Properties.Addressee.IsVisible = false; } }
public override void Refresh(Sungero.Presentation.FormRefreshEventArgs e) { // Если в регламенте запрещен уменьшающийся круг рецензентов, то не даем изменять действие в гриде. if (ApprovalTasks.As(_obj.Task).ApprovalRule.IsSmallApprovalAllowed != true) { _obj.State.Properties.Approvers.Properties.Action.IsEnabled = false; } var document = _obj.DocumentGroup.OfficialDocuments.FirstOrDefault(); var refreshParameters = Functions.ApprovalTask.Remote.GetStagesInfoForRefresh(ApprovalTasks.As(_obj.Task)); _obj.State.Properties.Addressee.IsVisible = refreshParameters.AddresseeIsVisible; _obj.State.Properties.Addressee.IsRequired = refreshParameters.AddresseeIsRequired; _obj.State.Properties.Signatory.IsVisible = refreshParameters.SignatoryIsVisible; _obj.State.Properties.Signatory.IsRequired = refreshParameters.SignatoryIsRequired; _obj.State.Properties.AddApprovers.IsVisible = refreshParameters.AddApproversIsVisible; _obj.State.Properties.DeliveryMethod.IsVisible = refreshParameters.DeliveryMethodIsVisible; _obj.State.Properties.ExchangeService.IsVisible = refreshParameters.ExchangeServiceIsVisible; _obj.State.Properties.ForwardPerformer.IsVisible = Functions.ApprovalTask.SchemeVersionSupportsRework(ApprovalTasks.As(_obj.Task)); Functions.ApprovalReworkAssignment.UpdatePropertiesEnableState(_obj); if (_obj.Status == Status.InProcess && !Functions.Module.IsLockedByOther(_obj) && _obj.AccessRights.CanUpdate()) { Functions.ApprovalTask.ShowExchangeHint(ApprovalTasks.As(_obj.Task), _obj.State.Properties.DeliveryMethod, _obj.Info.Properties.DeliveryMethod, _obj.DeliveryMethod, e); } if (!_obj.DocumentGroup.OfficialDocuments.Any()) { e.AddError(ApprovalTasks.Resources.NoRightsToDocument); } }
public override void Refresh(Sungero.Presentation.FormRefreshEventArgs e) { if (!_obj.DocumentGroup.OfficialDocuments.Any()) { e.AddError(ApprovalTasks.Resources.NoRightsToDocument); } }
public override void Refresh(Sungero.Presentation.FormRefreshEventArgs e) { // Заблокировать ФИО, если есть персона. if (_obj.Person != null) { _obj.State.Properties.Name.IsEnabled = false; } }
public override void Refresh(Sungero.Presentation.FormRefreshEventArgs e) { var categories = Functions.SignatureSetting.GetPossibleCashedCategories(_obj); _obj.State.Properties.Categories.IsEnabled = categories.Any(); Functions.SignatureSetting.ChangePropertiesAccess(_obj); }
public override void Refresh(Sungero.Presentation.FormRefreshEventArgs e) { Functions.VisibilitySetting.SetRequiredProperties(_obj); if (_obj.NeedRestrictVisibility == true) { e.AddWarning(Sungero.Company.VisibilitySettings.Resources.OnlyWebWarning); } }
public override void Refresh(Sungero.Presentation.FormRefreshEventArgs e) { if (!string.IsNullOrWhiteSpace(_obj.Sid)) { _obj.State.Properties.Name.IsEnabled = false; _obj.State.Properties.Rate.IsEnabled = false; } }
public override void Refresh(Sungero.Presentation.FormRefreshEventArgs e) { _obj.State.Properties.DeadlineInDays.IsEnabled = _obj.Routing != Sungero.ExchangeCore.BoxBase.Routing.NoAssignments; _obj.State.Properties.DeadlineInHours.IsEnabled = _obj.Routing != Sungero.ExchangeCore.BoxBase.Routing.NoAssignments; _obj.State.Properties.DeadlineInDays.IsRequired = !_obj.DeadlineInHours.HasValue && _obj.Routing != Sungero.ExchangeCore.BoxBase.Routing.NoAssignments; _obj.State.Properties.DeadlineInHours.IsRequired = !_obj.DeadlineInDays.HasValue && _obj.Routing != Sungero.ExchangeCore.BoxBase.Routing.NoAssignments; }
public override void Refresh(Sungero.Presentation.FormRefreshEventArgs e) { _obj.State.Properties.NewDeadline.IsEnabled = _obj.Addressee != null; _obj.State.Properties.NewDeadline.IsRequired = _obj.Addressee != null; e.Params.AddOrUpdate(Sungero.SmartProcessing.PublicConstants.VerificationAssignment.CanDeleteParamName, Sungero.Docflow.OfficialDocuments.AccessRights.CanDelete()); }
public override void Refresh(Sungero.Presentation.FormRefreshEventArgs e) { base.Refresh(e); var isCorrespondent = _obj.Correspondent == null || Sungero.Parties.CompanyBases.Is(_obj.Correspondent); _obj.State.Properties.SignedBy.IsEnabled = isCorrespondent; _obj.State.Properties.Contact.IsEnabled = isCorrespondent; }
public override void Refresh(Sungero.Presentation.FormRefreshEventArgs e) { // Изменить доступность контролов на форме в соответствии со статусом. var isEnabled = _obj.Status.Value == Workflow.AssignmentBase.Status.InProcess; _obj.State.Properties.NewDeadline.IsEnabled = isEnabled; _obj.State.Properties.Deadline.IsEnabled = isEnabled; }
public override void Refresh(Sungero.Presentation.FormRefreshEventArgs e) { Sungero.Company.PublicFunctions.Employee.SetRequiredProperties(_obj); if (!Functions.Employee.IsValidEmail(_obj.Email)) { e.AddWarning(_obj.Info.Properties.Email, Parties.Resources.WrongEmailFormat); } }
public override void Refresh(Sungero.Presentation.FormRefreshEventArgs e) { base.Refresh(e); var isCompany = Sungero.Parties.CompanyBases.Is(_obj.Counterparty) || _obj.Counterparty == null; _obj.State.Properties.Contact.IsEnabled = isCompany; _obj.State.Properties.CounterpartySignatory.IsEnabled = isCompany; }
public override void Refresh(Sungero.Presentation.FormRefreshEventArgs e) { _obj.State.Properties.Description.IsVisible = !string.IsNullOrWhiteSpace(_obj.Description); if (!_obj.DocumentGroup.OfficialDocuments.Any()) { e.AddError(Docflow.ApprovalTasks.Resources.NoRightsToDocument); } }
public override void Refresh(Sungero.Presentation.FormRefreshEventArgs e) { base.Refresh(e); if (!string.IsNullOrWhiteSpace(_obj.OrganizationId)) { _obj.State.Properties.BusinessUnit.IsEnabled = false; _obj.State.Properties.ExchangeService.IsEnabled = false; } }
public override void Refresh(Sungero.Presentation.FormRefreshEventArgs e) { base.Refresh(e); // Контрагент не дб задизейблен, если незаполнен. if (_obj.Counterparty == null) { _obj.State.Properties.Counterparty.IsEnabled = true; } }
public override void Refresh(Sungero.Presentation.FormRefreshEventArgs e) { // Проверить, что у пользователя есть сертификат сервиса обмена, если задачу еще не переадресовывали. if (e.IsValid && ExchangeDocumentProcessingTasks.As(_obj.Task).Addressee == null && !Functions.Module.HasCurrentUserExchangeServiceCertificate(_obj.BusinessUnitBox)) { e.AddWarning(ExchangeDocumentProcessingAssignments.Resources.CertificateNotFound); } _obj.State.Properties.NewDeadline.IsEnabled = _obj.Addressee != null; }
public override void Refresh(Sungero.Presentation.FormRefreshEventArgs e) { if (!Users.Current.IncludedIn(Roles.Administrators)) { foreach (var property in _obj.State.Properties) { property.IsEnabled = false; } } }
public override void Refresh(Sungero.Presentation.FormRefreshEventArgs e) { base.Refresh(e); // Отобразить однократно нотифайку о выдаче прав на проектные документы. if (_obj.State.IsInserted && _obj.LeadingDocument != null && _obj.LeadingDocument.Project != null && Projects.Projects.Is(_obj.LeadingDocument.Project)) { Projects.PublicFunctions.Module.ShowProjectRightsNotifyOnce(e, Projects.Projects.Resources.ProjectDocumentRightsNotifyMessage); } }
public override void Refresh(Sungero.Presentation.FormRefreshEventArgs e) { Functions.ApprovalTask.RefreshApprovalTaskForm(_obj); // Обновить предметное отображение регламента. _obj.State.Controls.Control.Refresh(); if (_obj.Status == Status.Draft && !Functions.Module.IsLockedByOther(_obj) && _obj.AccessRights.CanUpdate()) { Functions.ApprovalTask.ShowExchangeHint(_obj, _obj.State.Properties.DeliveryMethod, _obj.Info.Properties.DeliveryMethod, _obj.DeliveryMethod, e); } }
public override void Refresh(Sungero.Presentation.FormRefreshEventArgs e) { _obj.State.Properties.Texts.IsVisible = false; bool canSelect = true; if (e.Params.TryGetValue(Constants.DeadlineExtensionTask.CanSelectAssignee, out canSelect) && !canSelect) { _obj.State.Properties.Assignee.IsEnabled = false; } }
public override void Refresh(Sungero.Presentation.FormRefreshEventArgs e) { var distinctParticipants = _obj.Participants.Select(r => r.Participant).Distinct(); var distinctExcludedParticipants = _obj.ExcludedParticipants.Select(r => r.ExcludedParticipant).Distinct(); if (distinctParticipants.Count() != _obj.Participants.Count() || distinctExcludedParticipants.Count() != _obj.ExcludedParticipants.Count()) { e.AddWarning(AcquaintanceLists.Resources.DuplicatesWarning); } }
public override void Refresh(Sungero.Presentation.FormRefreshEventArgs e) { base.Refresh(e); if (_obj.IsCardReadOnly == true) { foreach (var property in _obj.State.Properties) { property.IsEnabled = false; } } }
public override void Refresh(Sungero.Presentation.FormRefreshEventArgs e) { // Дизейбл полей. foreach (var property in _obj.State.Properties) { property.IsEnabled = false; } // Хинт о смене типа. e.AddInformation(ExchangeDocuments.Resources.ChangeDocumentTypeHint, _obj.Info.Actions.ChangeDocumentType); }