Example #1
0
        private void changeExportTemplateToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (this.ActiveMdiChild != null)
            {
                this.ActiveMdiChild.Close();
            }

            fExportTemplates             = new frmTemplates_editExport();
            fExportTemplates.WindowState = FormWindowState.Maximized;
            fExportTemplates.MdiParent   = this;
            fExportTemplates.Show();

            toolStripStatusLabel1.Text = "Update export templates";
        }
Example #2
0
        private void button2_Click(object sender, EventArgs e)
        {
            if (!validateInputs(panel1))
            {
                return;
            }

            //create the template
            string templateID = string.Empty;

            try
            {
                templateID = tempMethods.createTemplate(cbSuppliers.SelectedValue.ToString(), txtTemplateName.Text, cbDirection.Text);
            }
            catch (Exception ee)
            {
                MessageBox.Show(ee.Message);
                return;
            }

            //open the template editor child form
            switch (cbDirection.Text)
            {
            case "IMPORT":
            {
                frmTemplates_editImport f = new frmTemplates_editImport();
                f.supplierID = cbSuppliers.SelectedValue.ToString();
                f.templateID = templateID;
                START._parent.loadChildForm(f);
            } break;

            case "EXPORT":
            {
                frmTemplates_editExport f = new frmTemplates_editExport();
                f.supplierID = cbSuppliers.SelectedValue.ToString();
                f.templateID = templateID;
                START._parent.loadChildForm(f);
            } break;
            }
        }
 public frmColumnMergeEditor(frmTemplates_editExport parentForm)
 {
     frmParent = parentForm;
     InitializeComponent();
 }
 public frmSpecialsCalculationEditor(frmTemplates_editExport parentForm)
 {
     InitializeComponent();
     frmParent = parentForm;
 }