Exemplo n.º 1
0
        /// <summary>
        /// Срабатывает при сохранении карточки.
        /// </summary>
        /// <param name="solutionParameters">Параметры решения.</param>
        public static void SolutionCustomAction(DMSCustomActionParam solutionParameters)
        {
            if (solutionParameters == null)
            {
                throw new ArgumentNullException("solutionParameters");
            }

            if (solutionParameters.DMSLogic.Solution != null)
            {
                if (solutionParameters.DMSLogic.Solution.Name == Const.RollBack)
                {
                    StageHandlerManager manager = new StageHandlerManager(solutionParameters.DMSLogic);
                    manager.Process();
                }
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Срабатывает при сохранении карточки.
        /// </summary>
        /// <param name="solutionParameters">Параметры решения.</param>
        public static void SolutionCustomAction(DMSCustomActionParam solutionParameters)
        {
            if (solutionParameters == null)
            {
                throw new ArgumentNullException("solutionParameters");
            }

            if (solutionParameters.DMSLogic.Solution != null)
            {
                // TODO: CR: Тряхов Дмитрий: только часть с отклонением аннулирования
                if (solutionParameters.DMSLogic.Solution.Name == Const.SolutionAnnul || solutionParameters.DMSLogic.Solution.Name == "Аннулировать")
                {
                    AnnulHandlerManager manager = new AnnulHandlerManager(solutionParameters.DMSLogic, true);
                    manager.Process();
                }
                else if (solutionParameters.DMSLogic.Solution.Name == Const.SolutionRollBack)
                {
                    AnnulHandlerManager manager = new AnnulHandlerManager(solutionParameters.DMSLogic, false);
                    manager.Process();
                }
            }
        }