Esempio n. 1
0
        private void RunJob(Job job)
        {
            // var tProgressThread = new Thread(() =>
//Task.Run(() =>
            // {
            var frmDo = new FrmBackupAndUpload(
                job.Connection.Server,         //txtConServer.Text,
                job.Connection.Database,       //txtConDatabase.Text,
                job.Connection.AuthWindows,    //rdbConAuthWin.Checked,
                job.Connection.AuthSql
                            ? _job.Connection.Login
                            : "", //(rdbConAuthSql.Checked ? txtConLogin.Text : ""),
                job.Connection.AuthSql
                            ? _job.Connection.Password
                            : "", //(rdbConAuthSql.Checked ? txtConPassword.Text : ""),
                true,
                true,
                true,
                job.Connection.Database,                       //txtConDatabase.Text.ToUpper(),
                !job.IsSaveToLocalFolder,                      //!chbSaveToFolder.Checked,
                job.IsSaveToLocalFolder ? job.FolderPath : "", //chbSaveToFolder.Checked ? txtFolder.Text : "",
                true
                );

            frmDo.Show();
            frmDo.Run();
            //}
            //);

            //tProgressThread.Start();
        }
Esempio n. 2
0
        private void btnBackupOnly_Click(object sender, EventArgs e)
        {
            var frmDo = new FrmBackupAndUpload(
                txtConServer.Text,
                txtConDatabase.Text,
                rdbConAuthWin.Checked,
                (rdbConAuthSql.Checked ? txtConLogin.Text : ""),
                (rdbConAuthSql.Checked ? txtConPassword.Text : ""),
                true,
                false,
                false,
                "",
                false,
                chbSaveToFolder.Checked ? txtFolder.Text : "",
                true
                );

            frmDo.Show();
            frmDo.Run();
        }