private void ButtonCheckGenerator_Click(object sender, EventArgs e)
        {
            if (ComboBoxSelectViewType.EditValue == null)
            {
                MessageBox.Show("Необходимо указать тип представления");
                return;
            }

            var form = new CheckedBody();

            string jsonParams = string.Empty;

            if (form.ShowDialog() == DialogResult.OK)
            {
                jsonParams = form.JsonBody;
            }

            dynamic item      = MetadataGeneratorSelect.EditValue;
            var     result    = ViewModelExtension.CheckGetView(Version(), ConfigId(), item.DocumentId, NameEditor.Text, ComboBoxSelectViewType.EditValue.ToString(), jsonParams);
            var     checkForm = new CheckForm();

            checkForm.MemoText = result;
            checkForm.BodyText = "";
            checkForm.UrlText  = "";
            checkForm.ShowDialog();
        }
        private string CreateGeneratedView(string documentId, string generatorName, string viewType)
        {
            var form = new CheckedBody();

            string jsonParams = string.Empty;

            if (form.ShowDialog() == DialogResult.OK)
            {
                jsonParams = form.JsonBody;
            }

            try
            {
                return(ViewModelExtension.CheckGetView(Version(), ConfigId(), documentId, generatorName, viewType, jsonParams));
            }
            catch (Exception e)
            {
                MessageBox.Show(e.Message);
                return(null);
            }
        }
Ejemplo n.º 3
0
        void ButtonCheckGenerator_Click(object sender, EventArgs e)
        {
            var form = new CheckedBody();

            string jsonParams = string.Empty;

            if (form.ShowDialog() == DialogResult.OK)
            {
                jsonParams = form.JsonBody;
            }

            var result = ViewModelExtension.CheckGetView(Version(), ConfigId(), DocumentId(), "", ComboBoxSelectViewType.EditValue.ToString(), jsonParams);


            var checkForm = new CheckForm
            {
                MemoText = result,
                BodyText = "",
                UrlText  = ""
            };

            checkForm.ShowDialog();
        }