예제 #1
0
        private void madddataset_Click(object sender, EventArgs e)
        {
            // Adding a new dataset
            string conname = InputBox.Execute(Translator.TranslateStr(539),
                                              Translator.TranslateStr(540), "").Trim().ToUpper();

            if (conname.Length == 0)
            {
                return;
            }
            if (FReport.DataInfo.IndexOf(conname) >= 0)
            {
                MessageBox.Show(Translator.TranslateStr(519));
                return;
            }
            DataInfo dinfo = new DataInfo(FReport);

            dinfo.Alias = conname;
            if (FReport.DatabaseInfo.Count > 0)
            {
                dinfo.DatabaseAlias = FReport.DatabaseInfo[0].Alias;
            }
            FReport.DataInfo.Add(dinfo);
            RefreshInterface();
            SelectItem(dinfo);
        }
예제 #2
0
        private void btnNuovo_Click(object sender, EventArgs e)
        {
            var inp = new InputBox();
            var res = inp.Execute(this, "Immettere il nome del nuovo job di invio:", "", true);

            if (res)
            {
                var node = CreaNuovoSenderJob(inp.InputText);
                treeView1.SelectedNode = node;
            }
        }
예제 #3
0
        private void btnNuova_Click(object sender, EventArgs e)
        {
            var inp = new InputBox();
            var res = inp.Execute(this, "Immettere il nome del nuovo recpiente di destinatari:", "", true);

            if (res)
            {
                var node = CreaNuovoRecipiente(inp.InputText);
                treeView1.SelectedNode = node;
            }
        }
예제 #4
0
        private void btnNuova_Click(object sender, EventArgs e)
        {
            var inp = new InputBox();
            var res = inp.Execute(this, "Immettere il nome della nuova mail:", "", true);

            if (res)
            {
                var node = CreaNuovaMail(inp.InputText);
                treeView1.SelectedNode = node;
            }
        }
예제 #5
0
        private void mstrucaddgroup_Click(object sender, EventArgs e)
        {
            // Ask the name
            string groupname = InputBox.Execute(Translator.TranslateStr(276),
                                                Translator.TranslateStr(277), "").Trim().ToUpper();

            if (groupname.Length > 0)
            {
                SubReport subrep = FindSelectedSubReport();
                if (subrep.IndexOfGroup(groupname) >= 0)
                {
                    MessageBox.Show(Translator.TranslateStr(278));
                    return;
                }
                Section sec = subrep.AddGroup(groupname);
                RefreshInterface();
                SelectItem(sec, false);
            }
        }
예제 #6
0
        private void btnTestMail_Click(object sender, EventArgs e)
        {
            var dlg = new InputBox();
            var res = dlg.Execute(this, "Immetti un destinatario", "Test send mail", true);

            if (res)
            {
                CtrlToModel();
                var mailer = new SmartMailer();
                mailer.Configure(_smtpCfg);
                try
                {
                    mailer.SendEmail(dlg.InputText, "Nome dest", "Mail di test",
                                     "Questo è un <b>esempio</b> di corpo mail html.</br>Inviato con BulkMailSender application.",
                                     "Questo è un esempio di corpo mail text. Inviato con BulkMailSender application.");
                }
                catch (Exception exception)
                {
                    MessageBox.Show(exception.Message, "Errore", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
        }
예제 #7
0
        private void maddparam_Click(object sender, EventArgs e)
        {
            // Adding a new dataset
            string paramname = InputBox.Execute(Translator.TranslateStr(543),
                                                Translator.TranslateStr(544), "").Trim().ToUpper();

            if (paramname.Length == 0)
            {
                return;
            }
            if (FReport.Params.IndexOf(paramname) >= 0)
            {
                MessageBox.Show(Translator.TranslateStr(545));
                return;
            }
            Param nparam = new Param(FReport);

            nparam.Alias = paramname;
            FReport.Params.Add(nparam);
            RefreshInterface();
            SelectItem(nparam);
        }
예제 #8
0
        private void mdataaddconnection_Click(object sender, EventArgs e)
        {
            // Adding a new connection
            string conname = InputBox.Execute(Translator.TranslateStr(399),
                                              Translator.TranslateStr(400), "").Trim().ToUpper();

            if (conname.Length == 0)
            {
                return;
            }
            if (FReport.DatabaseInfo.IndexOf(conname) >= 0)
            {
                MessageBox.Show(Translator.TranslateStr(505));
                return;
            }
            DatabaseInfo dbinfo = new DatabaseInfo(FReport);

            dbinfo.Alias = conname;
            FReport.DatabaseInfo.Add(dbinfo);
            RefreshInterface();
            SelectItem(dbinfo);
        }