Exemplo n.º 1
0
        private void severityTableButotn_Click(object sender, EventArgs e)
        {
            ShowTableForm table = new ShowTableForm(Properties.Resources.Quadro2, "Classificação quanto à severidade");

            table.ShowDialog();
        }
Exemplo n.º 2
0
        private void frequencyTableButton_Click(object sender, EventArgs e)
        {
            ShowTableForm table = new ShowTableForm(Properties.Resources.Quadro3, "Classificação quanto à frequência");

            table.ShowDialog();
        }
Exemplo n.º 3
0
        public ActionResult ShowForm()
        {
            try
            {
                var process = Check <RunProcess>();

                if (process.ProcessContext.CurrentFormId != null)
                {
                    var formId = (Guid)process.ProcessContext.CurrentFormId;
                    var form   = process.FindFormById(formId);
                    if (form == null)
                    {
                        var pm = GetPresentationProxy();
                        form = pm.Proxy.GetAnyForm(formId, GetLanguage());
                    }
                    if (form is BizDetailForm)
                    {
                        if (process.ProcessContext.CurrentDocument != null)
                        {
                            if (process.ProcessContext.CurrentDocument.IsNew)
                            {
                                return(RedirectTo(
                                           new EditDocForm(this, formId, process.ProcessContext.CurrentDocument,
                                                           process.ProcessContext.UserActions, process.ProcessContext.ErrorMessages)
                                {
                                    FormCaption = process.ProcessContext.FormCaption,
                                    IsProcessState = true,
                                    ControlOptions = GetFormOptions(formId, process.ProcessContext.FormOptions)
                                }));
                            }

                            return
                                (RedirectTo(
                                     new ShowDocForm(this, formId, process.ProcessContext.CurrentDocument,
                                                     process.ProcessContext.UserActions, process.ProcessContext.ErrorMessages)
                            {
                                FormCaption = process.ProcessContext.FormCaption,
                                IsProcessState = true,
                                ControlOptions = GetFormOptions(formId, process.ProcessContext.FormOptions)
                            }));
                        }

                        if (process.ProcessContext.CurrentDocumentId != null)
                        {
                            return
                                (RedirectTo(
                                     new ShowDocForm(this, formId, (Guid)process.ProcessContext.CurrentDocumentId,
                                                     process.ProcessContext.UserActions, process.ProcessContext.ErrorMessages)
                            {
                                FormCaption = process.ProcessContext.FormCaption,
                                IsProcessState = true,
                                ControlOptions = GetFormOptions(formId, process.ProcessContext.FormOptions)
                            }));
                        }

                        return
                            (RedirectTo(
                                 new ExceptionState(this, process.Previous, Process.ParameterError
                                                    /*"Не все параметры заданы!"*/)));
                    }
                    if (form is BizTableForm)
                    {
                        var newTableState =
                            new ShowTableForm(this, formId, process.ProcessContext.FilterDocument,
                                              process.ProcessContext.UserActions)
                        {
                            FormCaption    = process.ProcessContext.FormCaption,
                            QueryDef       = process.ProcessContext.CurrentQuery,
                            IsProcessState = true,
                            ControlOptions = GetFormOptions(formId, process.ProcessContext.FormOptions)
                        };

                        var filterForm = newTableState.GetFilterForm(this);
                        if (filterForm != null)
                        {
                            newTableState.FilterControlOptions = GetFormOptions(filterForm.Id,
                                                                                process.ProcessContext.FormOptions);
                        }
                        return(RedirectTo(newTableState));
                    }

                    return(ThrowException(Form.FormTypeError /*"Ошибка в типе формы"*/));
                }
                return(RedirectTo(
                           new ExceptionState(this, process.Previous, Process.ParameterError
                                              /*"Не все параметры заданы!"*/)));
            }
            catch (Exception e)
            {
                return(RedirectTo(new ExceptionState(this, e.Message)));
            }
        }
Exemplo n.º 4
0
        private void showTable4Button_Click(object sender, EventArgs e)
        {
            ShowTableForm table1 = new ShowTableForm(Properties.Resources.Quadro4, "Quadro 4");

            table1.ShowDialog();
        }
Exemplo n.º 5
0
        private void showRiskClassTableButton_Click(object sender, EventArgs e)
        {
            ShowTableForm table = new ShowTableForm(Properties.Resources.Quadro1, "Classificação de risco");

            table.ShowDialog();
        }